-
Best way to create you own php.ini on Windows host
Posted on June 25th, 2012 Add commentsI have a Windows host package on Godaddy.com, and recently moved my wordpress blog to this hosting server. Sometimes I need to change some php settings for the wordpress, so I decide to create my own php.ini instead of using Godaddy one.
First of all, we don’t need to create a brand new php.ini from scratch. We can just use Godaddy’s default php.ini as reference. So, just create a php file called “phpinfo.php”, put the following code below and upload the file to your hosting server (this step is to find where the Godaddy’s php.ini file located. If you know the location, just skip this step):123<?phpecho phpinfo();?>Browse this file from your hosting, and will see the phpinfo page including all the settings. Look at the line of “Loaded Configuration File” section, find the location of Godaddy’s php.ini. In my case, it’s “c:\cgi\php5\php.ini”.
Next, create another file called “phpfile.php”, and put the following code below, then upload to the server.123<?phpsystem("type c:\\cgi\\php5\\php.ini");?>Browser this file and get a page with lot of plain text. Use your browser to view the source of this page, save the source as “php5.ini” (Note: NOT “php.ini”), and you got Godaddy’s php.ini already.
In my case, I just need to change some settings like below:12max_execution_time = 300 //from 30 secmemory_limit = 128M //from 32MAfter modified your php5.ini, upload it to the root directory of hosting server. In Godaddy hosting, you need to do the following:
- Log in to your Account Manager.
- Click Web Hosting.
- Next to the hosting account you want to use, click Launch.
- In the Content section of the Hosting Control Center, click the IIS Management icon.
- Click Recycle App Pool and follow any prompts.
- Reload the phpinfo.php page to see if the desired changes have taken effect.
Leave a Reply
Be the First to Comment!