Parse Error and Warning.... ran out of things to try...

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Thor
Registered User
Posts: 4
Joined: Sun Mar 24, 2002 3:14 pm

Parse Error and Warning.... ran out of things to try...

Post by Thor » Sun Mar 24, 2002 3:36 pm

Ok, first of all: I DID spend about 4 hours on this board trying to find a solution to my problem by looking through the threads without luck ... perhaps it has been posted somewhere and perhaps there is even a solution burried in the threads , but then perhaps its a problem that hasnt occured before :) .

I am trying to install the phpBB2 RC4 on my local network on a Linux OS with Apache Webserver, MySQL and PHP installed. Right now phpBB1.4 is running there with no problems at all.

I made a new directory, copied all the files in there and set all rights correctly. When I open the location in my webbrowser I get the following error:

Parse error: parse error in ./common.php on line 111

Line 111 in common.php is:

@include ($phpbb_root_path . 'config.'.$phpEx);

Searching through the board I found a post saying to add a line into the extensions.inc file with the absolute path to the forum added ... so thats what I did. The forum is located in : usr/local/httpd/htdocs/phpBB2/ so the line I added reads:

$phpbb_root_path = 'usr/local/httpd/htdocs/phpBB2/';

When I open the location in my webbrowser (the address for the browser is: http://intranet/phpBB2 and resolves to the path I mentioned above) I get the following error message:

Warning: Failed opening 'usr/local/httpd/htdocs/phpBB2/common.php' for inclusion in /usr/local/httpd/htdocs/phpBB2/index.php on line 26

Fatal error: Call to unsupported or undefined function session_pagestart() in /usr/local/httpd/htdocs/phpBB2/index.php on line 31


As you can see the path in the warning is exactly the path to the file. I can write that exact path in a command line and open the file from anywhere on the system. I even tried to add a / in front of usr which didnt work either. As I said, all rights are set correctly too.


Anyone have any ideas how to fix this problem? I ran out of clues....


Thanks,

Thor

Thor
Registered User
Posts: 4
Joined: Sun Mar 24, 2002 3:14 pm

Post by Thor » Mon Mar 25, 2002 8:26 pm

does noone have a clue on what else I could try to get the board running? any help would be appreciated, thanks

User avatar
jtoad
Registered User
Posts: 4
Joined: Tue Jan 22, 2002 8:28 pm
Location: Lesser Boston

leading slash?

Post by jtoad » Mon Mar 25, 2002 9:03 pm

If what you displayed is exactly what you typed, I'm guessing the path needs the leading slash in front of usr.

/usr/local/htdocs.....

Otherwise it's treated as a relative path.

Of course, solving one problems invariably just leads to the next problem.
j

Thor
Registered User
Posts: 4
Joined: Sun Mar 24, 2002 3:14 pm

Post by Thor » Tue Mar 26, 2002 11:41 am

Adding a leading slash in front of usr just brings me back to step 1:

Parse error: parse error in /usr/local/httpd/htdocs/phpBB2/common.php on line 111

I feel like I am running in circles :(

User avatar
jtoad
Registered User
Posts: 4
Joined: Tue Jan 22, 2002 8:28 pm
Location: Lesser Boston

php extension?

Post by jtoad » Tue Mar 26, 2002 5:41 pm

Sorry that it just restored the original problem. Just a thought... the line you show in the parse error:

@include ($phpbb_root_path . 'config.'.$phpEx);

Since you just reset the root path via hard-coding, could this be a file extension problem, i.e. filename.php vs filename.php4 vs filename.php3? I'm out of my depth now. Look for where $phpEx is defined?

You need the bigger guns.

Good luck
j

Thor
Registered User
Posts: 4
Joined: Sun Mar 24, 2002 3:14 pm

Post by Thor » Tue Mar 26, 2002 5:51 pm

Hmmm, no.. the file extensions should be ok... like I said phpBB 1.4.1 is running just fine right now. I am pretty sure it has something to do with the root path and I am also sure its something really stupid I am just not seeing right now.. but like I said, I ran out of clues... I tried to substitute the root path with just about any path combination I could come up with but nothing worked yet... and I only have that problem on my local intranet, when I publish a board on a public webserver it runs fine.

Maybe I should hit myself over the head with a heavy book to reset my brain.

User avatar
The_Systech
Former Team Member
Posts: 397
Joined: Thu Jul 05, 2001 5:10 pm
Location: Right here, can't you see me?
Contact:

Post by The_Systech » Tue Mar 26, 2002 5:57 pm

What version of php are you running... I know that some versions of php had problems with the @ symbol being in front of functions...

Try removing the @ from in front of the include statement.. This won't fix your problem, but the error moves to another line, then the issue is definately a php version problem, and I would recommend upgrading to a newer version.
Jonathan L. Haase - Ex-Senior Developer phpBB

Locked

Return to “2.0.x Support Forum”

Who is online

Users browsing this forum: No registered users and 24 guests