Custom php.ini in cg directory

Web hosting discussion, programming, and shared and dedicated servers.
16 posts Page 2 of 2
by williamt » Thu Jan 03, 2013 10:51 am
jmoran,
I noticed you had the symlink for php53 pointing to the wrong binary. Not sure if this had anything to do with the problem you were having or not. But when I try with one of your domains to point to the php binary in your cgi-bin directory it processes the php.ini file there just fine. You have phpinfo disabled in that php.ini file so if you go test trying to use the function you will get an error message saying it's disabled.

Is there perhaps something else that isn't working that you think should be working ?

Feel free to pm me if you don't want to post exact details.
Sr. Systems Administrator @ sonic.net
by jmoran » Thu Jan 03, 2013 11:30 am
Cheers Joe. Can you briefly explain what you mean by pointing to the wrong binary? I'm presuming that you mean it's supposed to point to php53 in my cgi-bin from my htaccess? If so, then that's the problem; when I do point it to the php.ini in my cgi-bin, using my user name in the .htaccess url, it doesn't recognise the php.ini. That's really what is flummoxing me. If I just point it to Sonic's php5.3 then I'm ok but I can't change any variables, obviously.
You said you were able to point to my cgi-bin php.ini? When I do, RSFirewall gives me the Hebrew :: error message. And as I've had problems with Pharma hacks I really need RSFirewall.

Now, without repeating myself ad-nauseum, I have the same setup, same programs, RSFiurewall included everything the same on the other site I manage. Everything works beautifully, well until I have to kick the Pharma Hackers out every two weeks, but other than that no problems.
by williamt » Thu Jan 03, 2013 11:38 am
This is William not Joe. :)

In your cgi-bin directory you had the php53 symlink pointed to /opt/php5/bin/php which is php 5.2. If you use that version of php you will get that Hebrew error.

php53 should be pointed to /opt/php53/bin/php
I had already made that correction for you.

I have already adjusted one of your domains .htaccess files to point to the right version of php. You should check the rest to make sure the .htaccess file is correct.

You should be using this code in your .htaccess file

Code: Select all

Action php-cgi /cgi-bin/jmoran/php53
AddHandler php-cgi .php
Sr. Systems Administrator @ sonic.net
by jmoran » Thu Jan 03, 2013 3:13 pm
Thanks William I'll check it as soon as I get back home. Cheers for your response and help!!
by jmoran » Fri Jan 04, 2013 2:24 pm
William, you are indeed a genius. Thank you. It was a little confusing on the WiKi page as to the 5.3 aspect in semantics but that was probably my fault. Thanks to yourself and Joe.
by spentch » Wed Oct 08, 2014 4:41 pm
I have a similar issue. I want ot increase my upload file size and have created a .user.ini file with the upload_limit = 1500M and upload_max_filesize=1500M but it still won't allow file sizes larger than 15M. I have put the .ini file in the root directory but no luck. Is there something else that needs to be done?
Thanks
16 posts Page 2 of 2