Knowledgebase Home | Glossary | Favorites | Contact | Login Knowledgebase Home | Glossary | Favorites | Contact
Search the Knowledgebase Browse by Category
How do I setup custom php.ini settings?
Article Details

Last Updated
15th of February, 2008

User Opinions (37 votes)
89% thumbs up 10% thumbs down

How would you rate this answer?
Helpful
Not helpful
As many of you know we have recently updated many of our shared hosting servers to php 5 with phpSuExec enabled. This update was essential for security and allows our customers to take advantages of all the new features of php 5. While the vast majority of our customers are not affected by this update, you may find that some features no longer work on our shared servers. Most notably, users are not able to have php flags in their .htaccess file.

Having php flags in .htaccess files is a common cause of internal server errors on servers with phpSuExec enabled. One way around this is to create a custom php.ini file with the php values you need. You need to place this in every directory that needs to use this as the custom php configuration values you set in your php.ini are not recursive. This file should have the following permissions: 644 permissions with the owner cpanelusername:cpanelusername

Lets assume your cpanel username is bobbob1.
You php.ini file should look like this in your file manager or ftp client:
-rw-r--r-- 1 bobbob1 bobbob1 21 Nov 20 18:57 php.ini
Now that you have created your php.ini file you can populate with the php configuration values you need to override on the server.

The syntax generally follows this format: phpconfigValueToOverride = value The most common php value you need to set for many of the scripts that we offer via fantastico is register_globals. To enable register_globals you simply place this in your php.ini file: register_globals = On Conversely, you can turn off register globals: register_globals = Off

Other common configuration changes include: upload_tmp_dir, display_errors, session.save_path.
Note: we do not allow our shared hosting customers to change their memory_limit to anything past 32M to protect the quality of service for our shared hosting environment. If you require more then 32M then please contact our support department at support@midphase.com.
You can check your current php settings by using the phpinfo() function. Simply place phpinfo(); in a new file with a .php extension. Again, it is important to note that any changes you make in the php.ini are not recursive meaning they do not carry over to other directories in your account.
You must have a php.ini in every directory needing your custom php.ini.

Note: to have upload_max_filesize changed please email support@midphase.com with this request
Related Articles
Attachments
No attachments were found.

Copyright © 2003 - 2009 Hosting Services, Inc. Part of the UK2 Group.

Visa, MasterCard, American Express, Discovery, Paypal Accepted. BBB Accredited Business
 

Need Help?

Our sales team is standing by, ready to help you.

Click here to chat