Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: unforgiven on December 20, 2009, 06:53:06 PM

Title: problem with php
Post by: unforgiven on December 20, 2009, 06:53:06 PM
Hi, i Install Apache 2, PHP 5 from AppBrowser.

and then i follow the docs for changing the httpd.conf(cgi.force_redirect =0 and .....)
but when i try to request a simple php file receive  the "500 Internal Server" error;

and this is my log file:

Code: [Select]
[Mon Dec 21 03:14:02 2009] [error] [client 127.0.0.1] (8)Exec format error: exec of '/usr/local/htdocs/info.php' failed
[Mon Dec 21 03:14:02 2009] [error] [client 127.0.0.1] Premature end of script headers: info.php

so....what is my problem?

thanks for your help.
sorry for my poor english!
Title: Re: problem with php
Post by: curaga on December 22, 2009, 04:32:48 PM
HTH:
http://httpd.apache.org/docs/1.3/misc/FAQ-F.html#premature-script-headers
Title: Re: problem with php
Post by: robc on December 22, 2009, 06:05:27 PM
It looks like the apache/php setup is having problems.

If you put a shebang at the top of the script it should run (ie #!/usr/local/bin/php-cgi).

I would recommend using lighttpd over apache with TC. It is quite a bit lighter and easier to configure. Plus the php scripts don't require a shebang.