Bug #143
PHP with lighttpd not working
| Status: | Invalid | Start: | ||
| Priority: | High | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | core | |||
| Target version: | - | |||
| Pending: | No |
Resolution: | invalid |
|
| Patch available: |
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
History
03/11/2007 10:24 PM - till
- 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.
03/30/2008 03:28 AM - Anonymous
Replying to dot@dot-matrix.de:
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/
04/22/2008 01:00 PM - Anonymous
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
04/22/2008 07:21 PM - stbuehler
- Status changed from Need Feedback to Fixed
- Resolution set to invalid
Hehe, thx for helping us closing old bugs ;-)