PDA

View Full Version : restart for change in php.ini?



J_M
01-25-2011, 07:18 AM
what needs to be restarted for a change in a php.ini and is there an easy way to restart in WH4?

thanks

wildjokerdesign
01-25-2011, 09:02 AM
In the new cPanel (WH4) you should not have to restart anything. See this forum post for more details: http://forums.westhost.com/showthread.php?14325-using-php.ini-in-the-4.0-cPanel-environement

J_M
01-25-2011, 09:16 AM
Hi Shawn

Thanks for the great link, I'll have to spend some time with the info.

The reason that I need to adjust the php.ini is because of magic_quotes creating errors in php 5x. As I took a brief look at the link it mentions making a copy of the php.ini from the server and copying it to the public folder. But... the newer wh4 site that I just transferred already had a php.ini file in the public_html.

Do all WH4 sites now include a php.ini in the public area by default?
Is the php.ini turning on magic_quotes and I only need to delete the references to it in the php.ini?

thanks

j

wildjokerdesign
01-25-2011, 01:41 PM
Hmm.... that is a new one for me. :) Let me see if I can find out what WestHost is up to. BTW.... they want to call the new accounts cPanel and the older accounts Site Manager now. I think they felt that the use of WH3 and WH4 was confusing folks. I guess in a way it was since many really did not seem to get that they where two total different setups.

Let me do some checking and get back to you on your question about the included php.ini... If I had to guess, I would say perhaps they have decided to do what was posted at the link I gave you to all accounts when they are created.

wildjokerdesign
01-25-2011, 01:47 PM
I just checked with tech support and they are not aware of new accounts coming with a php.ini in the public_html directory. What package did you order?

wildjokerdesign
01-25-2011, 02:02 PM
No there is not default set up to create the php.ini in new accounts but if by chance you have been communicating with tech support it is possible that one of them created it for you. :)

Ok now back to your magic_quotes issue. You don't want to delete the refrence to it, you simply want to set it to Off. May I ask why you are needing to do this? I run php 5 on most my accounts both cPanel and Site Manager and have not issues with this.

wildjokerdesign
01-25-2011, 02:09 PM
Ahh... I just noticed in your post that this was a Site Manager account that was Transfered to cPanel. If it was WestHost that did this for you then I bet they set up the php.ini for you because they saw some modifications to the old one that needed to be made to deal with things.

J_M
01-25-2011, 02:13 PM
>May I ask why you are needing to do this?

I have error logs being created "php5_error_log" within a WordPress folder as well as another folder that uses a php script.

[11-Jan-2011 21:12:11] PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

>What package did you order?

"cPanel Shared, Preferred cPanel Hosting"

> but if by chance you have been communicating with tech support it is possible that one of them created it for you.

initially I did want them to transfer files from a Site Manager site to the new cPanel site, but they later told me that the file transfer was too large and they didn't have the tools to do it ( when I signed up it seemed that a transfer was part of the deal)

btw.... WH4 was a better name, cPanel doesn't really define this as a Westhost product.

In other words...by calling the WH4 sites "cPanel sites", you've reduced your product to a commodity. And any prospective client would simply compare your product to any other cPanel host.

Instead of defining it as a Westhost product that comes with support, years of experience etc..... with a simple change of the name they have tossed away any branding that they had created...... just my opinion.

J_M
01-25-2011, 02:18 PM
>I bet they set up the php.ini for you because they saw some modifications to the old one that needed to be made to deal with things.

When I inquired about magic_quotes with tech support I was told that they enable it because some clients use it.... but I still don't understand how it could be used if cPanel sites are using 5.x php ?

wildjokerdesign
01-25-2011, 02:25 PM
Ok now you have really peaked my interest in this issue. :) I am going to do some more digging on this. Is the other php folder homegrown code? The reason I ask is because I wonder if in the Wordpress code or even in .htaccess file, if they are trying to modify or access magic_quotes_gpc.

J_M
01-25-2011, 02:35 PM
>Is the other php folder homegrown code? The reason I ask is because I wonder if in the Wordpress code or even in .htaccess file, if they are trying to modify or access magic_quotes_gpc.

the other php folder is homegrown code, but doesn't access magic_quotes.

there is a theme that was loaded into a new install of Wordpress, but each folder generates the error log when the php is run within that folder. So each folder has it's own error log.

J_M
01-25-2011, 02:36 PM
if a cPanel site is using 5.x php can it use magic_quotes_gpc ? doesn't deprecated mean that it's not used.

wildjokerdesign
01-25-2011, 02:51 PM
I tried really hard to recreate what you where seeing on your site but could not get it to throw a warning. If you are not using magic_quotes_gpc, go ahead and comment it out.

One other thing, make sure you have the necessary .htaccess code to make your personal php.ini work recursively. That would be:
SetEnv PHPRC /home/[USERNAMW]/public_html/php.ini

J_M
01-25-2011, 02:58 PM
as always thanks again for your help.

I'm not sure how much I'm going to change at this point. With the exception of the error log much of the site is working.... so I'll modify the old adage... if it's not "entirely" broken don't fix it.

wildjokerdesign
01-25-2011, 03:13 PM
I know what you mean. :) Make sure to keep an eye on that thread I linked you to. I know that they keep changing and updateing things and Scott has posted a couple times that an update would be needed of the php.ini file.

Also Ryan just reminded me that in php.ini that there is the error_reporting directive. Should start around line 234. You could try and manipulate that, but I know that many php scripts change this. I think by default they have the E_DEPRECATED added.