#1 (permalink)  
Old 10-11-2009, 11:45 AM
Registered User
 
Join Date: Oct 2009
Posts: 31
martynh is on a distinguished road
Exclamation Allowing Custom PHP.INI files

Hello,

I have been playing about with this allday but can't get it working, I have a client that wants to disable register_globals so I told them to create a custom php.ini but they reported its not working so I had a look and it wasnt, I turned it on global and the script worked so its 100% not working with a custom php.ini.

I have tried nearly everything I have found in forums without any look so I have come to you guys. Is there a setting to allow or disallow them?

Please let me know what info I need to provide you with to find this problem


Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-11-2009, 12:12 PM
Registered User
 
Join Date: Oct 2009
Posts: 31
martynh is on a distinguished road
I have found a ton of these questions in this forum and everyone is unanswered...

My problem is same as this one Please help - PHP values htaccess/php.ini

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-11-2009, 02:02 PM
BANNED
 
Join Date: Jun 2005
Location: Wild Wild West
Posts: 2,026
Spiral will become famous soon enough
Lightbulb

Quote:
Originally Posted by martynh View Post
I have been playing about with this allday but can't get it working, I have a client that wants to disable register_globals so I told them to create a custom php.ini but they reported its not working so I had a look and it wasnt, I turned it on global and the script worked so its 100% not working with a custom php.ini.
Are you telling me you have "register_globals" turned on globally?

Bad ... bad idea!

If anything, you should do it the other way around and have it OFF
by default for the whole server and only turn it on for those specific accounts that absolutely have to have it and can't find any other solutions.

Now regarding your custom setting problem, I can help you with that.
Contact me by private message and I'll help you diagnose what is
going on and perhaps upgrade things a bit for you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-11-2009, 02:20 PM
Registered User
 
Join Date: Oct 2009
Posts: 31
martynh is on a distinguished road
Argh... sorry people, I was ment that they want it enabled but I have it disabled globally...

Thanks!

I have sent you a message.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-12-2009, 11:25 PM
linux7802's Avatar
Registered User
 
Join Date: Dec 2007
Posts: 154
linux7802 is on a distinguished road
Solution

Quote:
Originally Posted by martynh View Post
Hello,

I have been playing about with this allday but can't get it working, I have a client that wants to disable register_globals so I told them to create a custom php.ini but they reported its not working so I had a look and it wasnt, I turned it on global and the script worked so its 100% not working with a custom php.ini.

I have tried nearly everything I have found in forums without any look so I have come to you guys. Is there a setting to allow or disallow them?

Please let me know what info I need to provide you with to find this problem


Thank you
As per query it seems to be that you are confuse with SuExec server.The custom php.ini concept is working on only SuExec enabled server.First you need to confirm that your server is SuExec or not? refer following thread and check whether your server is SuExec or not?

Simply check server is SuExec or not? | Linux Servers cPanel webhosting blog

Once you confirm it that your server is SuExec then please copy and paste the php.ini file in each an every folder where you want to disable register_globals for your domain.

Note : On SuExec server php.ini file is working directory base due to that you need to add/copy php.ini in each directory where you want to change php values for your domain.
__________________
Regards,
Gunjan
cPanel Hosting | Dedicated server Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-13-2009, 04:53 AM
Registered User
 
Join Date: Apr 2009
Posts: 228
InstaCarma_Tech is on a distinguished road
It seems that you did not place the custom php.ini file in the required folder. The custom php.ini needs to be there in each and every folder(and sub-folder) where you need the change to take effect.

For example, if you have a directory named 'abc' under your public_html and this is where you need the change then place the custom php.ini in that folder.
Also, to check whether the change is actually taking effect, create another file named 'phpinfo.php' in the same directory and put the following line in it :

Code:
<? phpinfo();
?>
Now, access the URL http://yourdomainname.tld/abc/phpinfo.php to see whether the new settings are active.

Note: Replace 'yourdomainname.tld' with your domain name.
__________________
InstaCarma
Outsourced Web Hosting Technical Support and Server Management

To visit out Blog , click here
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-13-2009, 10:01 AM
Registered User
 
Join Date: Oct 2009
Posts: 31
martynh is on a distinguished road
Sorry for the delay...

Yes SuExec was enabled but it just was not working, I followed some forums about putting them in every folder then I tried going back to dso for .htaccess which did work but I got told that is is a bad way to do it...

In the end Spiral had a go and did some modifacations for me which allows me to enable it for them on request per account...

He did say that there were alsorts missing from my cPanel installation which maybe why it was not doing what its supposed to do...

Thanks all all your help, while Spirals way works now, when I get my next server I may need to follow your intructions so will write them down

Thanks
Martyn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-13-2009, 02:18 PM
BANNED
 
Join Date: Jun 2005
Location: Wild Wild West
Posts: 2,026
Spiral will become famous soon enough
InstaCarma_Tech, if you setup custom PHP.INI files the way you describe, all hosting users will have unlimited, unbound, and unrestricted control over your entire PHP system configuration without limits and can do pretty much anything they want unchecked which would actually put you in a worse situation that just keeping insecure Apache Module (DSO) PHP!

There is a few ways to get around this problem and still allow for custom configurations of each site left under administrator control.

I have setup martynh such that their server can have a different configuration for each and every account easily and under administrator control without additionally compromising security.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom php.ini with php handler set as cgi johny_gjx cPanel and WHM Discussions 0 02-16-2009 03:54 AM
php-fcgid+eaccelerator+custom php.ini+apache2-mpm-worker= segfault? internetfab cPanel and WHM Discussions 0 02-03-2009 04:04 AM
custom php.ini no longer works with PHP 5.2.8 Website Rob cPanel and WHM Discussions 0 01-07-2009 06:30 PM
custom php.ini for cpanel Cristi4n cPanel and WHM Discussions 0 08-20-2008 10:59 AM
Custom php.ini files? ehuk cPanel and WHM Discussions 0 04-12-2008 02:15 PM


All times are GMT -5. The time now is 01:47 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc