Php.ini change via .htaccess from wiki not working


#1

Hello.

I used the wiki article to create a new php.ini file so I could edit it. The .htaccess code given was:

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

However, after uploading .htaccess with this in it I get a 500 internal service error. How can I fix this and get my new php.ini working?


#2

Confirm that you have a /yourdomain.tld/cgi-bin/ directory and that directory contains the files php.cgi and php.ini.

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#3

I have a ~/mydomain.com/cgi-bin/ and php.ini and php.cgi are inside. And if I go to http://www.mydomain.com/cgi-bin/php.ini I can see the file.


#4

OK, so far, so good. Sorry for asking such an obvious question first up, but it’s always best to eliminate these things early. I have run into the ‘500 internal error’ myself, but only when I had the php.cgi file somewhere other than where I thought it was.

I assume you have checked php.cgi and it isnt 0 bytes in length or something silly like that and that it has its permissions set to 0755?

Also, it that your complete .htaccess file above, or are there other lines that may be conflicting?

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#5

I understand the obvious questions. I’m usually on your side of the support line on other forums.

That is the full .htaccess and my php.cgi file is 5607020kb and is chmodded to 0755.

Wait, found it. I had the folder protected, and then deleted the .htaccess file in cgi-bin but I guess my ftp program didn’t do something right. It showed it was gone, but uploading a blank .htaccess file worked fine. All is well. Thanks for your help.


#6

Excellent, I am glad to hear you found the problem. I figured it would be something simple, it usually is. :slight_smile:

No problem, I am always glad to help out where I can.

Good luck.

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#7

Either I’m an idiot or that’s a typo…

Well I guess it could be both.

Wholly


#8

:slight_smile:

I think it’s a typo, my php5.cgi is 5607020 Bytes in size.

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)