How to change PHP settings

Greetings, I think I can go in and change the PHP config file to change my settings. Is that the right way to do it? or is there a tool I am missing in the dreamhost panel?

Thanks for the help


You won’t be able to do it from the panel, and you won’t be able to change the generic php.ini file provided by DH, as its use is shared by all users, and you do not have the adequate *nix permissions to change it.

That said, there are numerous threads in this forum regarding the installation and use of your own copy of php.ini (as well as compiling your own php - though that is considerably more difficult) to allow you to modify things like maximum file upload size, register_globals setting, etc. Just search.

These generally point you to, and amplify, the information provided in the Dreamhost wiki regarding this purpose - just go to the Dreamhost wiki and search for “php.ini” (no quotes). Good Luck!


Thanks, I did look at that but it wasn’t apparent I could put any configuration setting in there…

I got the following message from my Joomla Admin panel

Following PHP Server Settings are not optimal for Security and it is recommended to change them:
PHP magic_quotes_gpc setting is OFF instead of ON
Joomla! RG_EMULATION setting is ON instead of OFF in file globals.php
ON by default for compatibility reasons

Please check the Official Joomla! Server Security post for more information.

Should I be able to put those settings in the php.ini I create?

Thanks again for the help!

Assuming you have a working local installation of PHP (and ini file) as per the wiki instructions, then yes you can change the php.ini file to your hearts content :slight_smile:


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

As I said, this whole discussion has been had, at length, on this forum.

1)RG_Emulation has nothing to do with php config…it is in the globals.php file that is part of the Joomla! distro. Read the Joomla! documents, the comments in the globals.php file, and/or visit, where this is discussed.

  1. Learn to search the forum - if you had searched for “joomla”, you would have found this thread - where modifying php.ini for Joomla! (and the rg-emulation) were addressed, solutions found, and example code posted.


Thanks all…

I did search and find the post you were talking about and noted the RG_Emulation being in globals.php…

I didn’t see where in the post it said anything specific about whether I could put the setting for
PHP magic_quotes_gpc setting is OFF instead of ON
in the php.ini file I create… (The wiki only mentions settings for max post and max upload size.)

I probably should have been more clear in my posts to specifically ask the question.

Thanks to rlparker and Raz2133 aka Mark for your help

I’m glad you found the rg-emulation solution :wink: !

I’m sure you are correct about the post I referenced (you should not have had to search the forum, as I actually linked the relevant thread for you in my last posting) not specifically referencing magic-quotes, as that user was using PHP 4.4.2, and no magic_quotes setting needed to be changed for that parameter.

I do suggest you carefully re-read the post, however, because, in addition to the max_post and max_upload_size that was talked about in the wiki article, I provided the code to be added to the script to modify the register_globals setting in the php.ini.

Exactly which setting(s) you need to modify in the php.ioni depend upon which version of PHP you are using (also discussed in the post). It seems you are using PHP5, as you are seeing a warning from Joomla! about “magic_quotes” instead of “register_globals”, right?

If that is the case, you will not need the line I supplied the other user for register_globals, but will need, instead, a “substitution” regular expression to change the magic_quotes setting.

The wiki only mentions the max_post and max_upload_size, but the forum thread not only talks about the whole process, it also supplies example code as it relates to the register_globals setting; you just need to modify that to make it change magic_quotes.

Yes, you can modify whatever php setting you need using this process. Just carefully review the php.ini file for your version of php (see the wiki to find it), then review the forum post(s) I pointed you to for a discussion of what is involved in changing the setting to be the way you want. You will need to modify the script to remove the substitution for register_globals, and replace it with one to modify magic_quotes, if you are using PHP 5.

You will know you have it right when:

  1. Your Joomla! warnings go away
  2. Checking both system setting and phpinfo in the Joomla! administrative backend will show the settings you set up.