Project

General

Profile

Actions

Bug #143

closed

PHP with lighttpd not working

Added by Anonymous almost 20 years ago. Updated over 16 years ago.

Status:
Invalid
Priority:
High
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

Description

Hello,

i always get the following:
Parse error: parse error, unexpected T_STRING in /var/www/localhost/htdocs/test/index.php on line 1
when i try to get a php file via the browser.
if i execute php /var/www/localhost/htdocs/test/index.php
on the shell, everything works as expected.
I had this error several times before, than somewho this
error disapeard after some restarts and reinstalling.
But this happesn every time, when i update php!

Regards

Florian Engelhardt

-- dot

Actions #1

Updated by till about 18 years ago

  • Status changed from Fixed to Need Feedback
  • Resolution deleted (invalid)

Sorry to add "noise" here, but we seem to be getting the same error. The lighttpd we use runs behind a Proxy directive (from Apache). Most of the requests work, some do not and fail with the following error (or similar):


Parse error: syntax error, unexpected '{' in /path/foo/bar.php on line 

I know it's odd, but this is really not a parse error indeed because it works in 8 out of 10 tries - it is somehow connected to lighttpd serving the files.

We use lighttpd 1.4.13 with PHP 5.1.2 (fcgi of course). I am happy to provide more feedback if I get the chance to.

Actions #2

Updated by Anonymous about 17 years ago

Replying to :

Hello,

i always get the following:
Parse error: parse error, unexpected T_STRING in /var/www/localhost/htdocs/test/index.php on line 1
when i try to get a php file via the browser.
if i execute php /var/www/localhost/htdocs/test/index.php
on the shell, everything works as expected.
I had this error several times before, than somewho this
error disapeard after some restarts and reinstalling.
But this happesn every time, when i update php!

Regards

Florian Engelhardt

How did you install Lighty? RPM or from source?
Do you have any control panel? You can use LXadmin, it is free and Lighttpd is integrated.

Chris, B
Http://phim88.com/

Actions #3

Updated by Anonymous almost 17 years ago

Wow, i opened that bug three years ago, and now i found it in google ;-)

Well, my problem is solved in the meantime ;-)
Hehe. I had "short_open_tags" on in php.ini, so the xml-Header in XHTML-Files was parsed as php, and then php reported that error. Setting "short_open_tags" to "off" solved the problem.

This Bug is solved :-)

-- dot

Actions #4

Updated by stbuehler almost 17 years ago

  • Status changed from Need Feedback to Fixed
  • Resolution set to invalid

Hehe, thx for helping us closing old bugs ;-)

Actions #5

Updated by stbuehler over 16 years ago

  • Status changed from Fixed to Invalid
Actions

Also available in: Atom