Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Brian Jacobsen on December 12, 2001, 12:44:08 AM
-
Hi,
This is probably some simple error, but I cannot get my php scripts to work.
I have this ibay 'billeder' with dynamic content enabled
I have created an index.html that calls a php script in cgi-bin, but I get an internal server error:
The script and the cgi-bin directory has been chmod to 755, the script is a small sample script, that should work:
When I look at the error_log it says:
[Mon Dec 10 22:17:25 2001] [error] (8)Exec format error: exec of /home/e-smith/files/ibays/billeder/cgi-bin/spis.php3 failed
[Mon Dec 10 22:17:25 2001] [error] [client xx.xxx.xxx.xxx] Premature end of script headers: /home/e-smith/files/ibays/billeder/cgi-bin/spis.php3
I tried to imbed some php in a html in the html directory file like this:
PHP Test
"; ?>
and this does not work either. No errors in error.log, it just does not display anything.
Any ideas?
Kind regards
Brian
-
PHP will not process .html files--if you want to embed PHP code, call the file index.php instead.
-
also, why are you placing it in the cgi bin?Brian Jacobsen wrote:
-
Brian Jacobsen wrote:
> This is probably some simple error, but I cannot get my php
> scripts to work.
> I have this ibay 'billeder' with dynamic content enabled
> I have created an index.html that calls a php script in
> cgi-bin, but I get an internal server error:
Don't put PHP scripts in the cgi-bin directory. Remove *all* index.htm/html files from the html directory and call your PHP script index.php. Apache will pick it up fine.
Remember, any file with PHP embedded in it needs to have the extension .php in order for it to be picked up and processed properly.