[SOLVED] local php.ini, .htaccess, joomla problem

I followed the instruction to get php.ini and php.cgi in a cgi-bin directory. OK

I copied:

Options ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi

into .htaccess OK

When trying to access my site I get an error 500 and this in the error log:

Premature end of script headers:php.cgi, referer: http://www.otelho.com/administrator/index2.php?option=com_admin&task=sysinfo

File does not exist: /home/palladian/otelho.com/internal_error.html, referer: http://www.otelho.com/administrator/index2.php?option=com_admin&task=sysinfo

Any advice is welcome. Thanks

Have you looked at this in the wiki?

They need more support help.
Pay me (and DreamHost gets 5%+$0.30) Cut the code: [color=#00CC00]9999=$99.99 Off[/color]

Running php.cgi from the shell:

Premature end of script headers: php.cgi

is all I can get.

I’m lost

Sorry, this is a previous error in the log. It seems the command is still running without any output.

Have you tried completely clearing your local cache. I’ve found that this often makes a difference when you change .htaccess file handling methods, and most browsers are not very “transparent” about exactly what they cache.

Using FireFox2, I’ve even had to completely exit the browser and restart after clearing the cache in order to get a truly “clean” page load.

I suggest investigating those issues a little further before assuming that your “fixes” didn’t take. :wink:


Clearing the cache in Firefox: It seems I get the same error but faster.

In explorer : error 500 also

I’m sorry my suggestion didn’t help…I’m at a bit of a loss to tell what might be happening.

Have you tried reverting to the old .htaccess and testing to confirm that the new configuration is actually the problem?

(please bear with me; I know that seems obvious, but I’m just trying to help you debug what’s happening using techniques that have worked for me).



  • chmoded php.cgi and cgi-bin folder to 755
  • reinstalled the same .htaccess
  • first got the same error 500
  • installed test.php (Today is <? print strftime("%m/%d/%Y"); ?>)
  • ran it from web : Today is 12/15/2006
  • accessed my site : OK
  • php info confirmation in joomla: Configuration File (php.ini) Path /home/.nipto/palladian/otelho.com/cgi-bin/php.ini

Is it the chmod effect? Aren’t changes inmediate?

Thanks for trying to help.

Configuration File (php.ini) Path

Good deal! It looks to me like is was the chmod, which makes since since php.cgi runs under suexec and the directory needs to be 755 on DH.

That said, the changes should be immediate - but again what browsers cache locally remains a mystery to me, and seems to differ greatly depending upon the browser as well as the circumstances. Possibly just the reload of the page triggered the execution of the php.cgi with the new permissions?

Hey, at some point, once you’ve figured out what works, the rest of the mystery become a bit academic. :wink:

If you do ever figure out why it behaved like that, I’d appreciate you sharing!



thanks for the help. I’m a complete beginner in what refers to servers, php, cgi, mysql.

I can imagine I’ll be back soon on this forum.