WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: problem with php  (Read 2569 times)

Offline unforgiven

  • Newbie
  • *
  • Posts: 12
problem with php
« 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!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
The only barriers that can stop you are the ones you create yourself.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: problem with php
« Reply #2 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.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard