Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2006, 06:35 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default Parse error: T_REQUIRE_ONCE in

I have a file that I can put on one server and it runs fine. But when I put the same file on another server it gives me this error.

Parse error: parse error, unexpected T_REQUIRE_ONCE in c:\hosting\myPath on line 4

require_once "../scripts/conn.php"; this is line 4 but the line above it is also a require once
require_once "../scripts/validation.php";

 I am also not able to use
header("location: index.php")

Is there a setting I need to adjust in the ini file.
__________________
Peace
Mike
http://www.eclecticpixel.com
 
Old January 7th, 2006, 06:09 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

For require and include problem, verify/set correct include_path.

In header("location: index.php"), prefer to use absolute URI.

`~@#\^%&*/\.<.\/-|+|_!:;..=?>
Students' finances
 
Old January 7th, 2006, 03:39 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For some reason the T_Require_Once is working today. The Header Location is still not working, even with an absolute path as suggested. I did some testing and if I put it at the very top of the page before anything else and it will work, nothing else can be written before it though, except the <?php tag of course.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: syntax error, unexpected T_ELSE in /h vipin k varghese BOOK: XSLT Programmer's Reference, 2nd Edition 4 September 29th, 2011 01:19 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
Parse error: syntax error, unexpected T_STRING ginost7 Beginning PHP 1 November 9th, 2007 02:51 AM
PHP Parse error: parse error, unexpected T_STRING geminient PHP How-To 4 August 18th, 2007 02:27 AM
Parse error: parse error, unexpected $end Ayodeji Adegbaju Pro PHP 3 January 12th, 2007 12:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.