At some point of time you may want to change PHP Settings in GoDaddy shared hosting account. Most of time we need to increase memory limit, max upload size and max input size limit because by default these settings are extremely low. GoDaddy keeps master PHP.INI file in /web/conf/ folder which we are not allow to edit. But there is an alternative way to override Godaddy default php settings per account. GoDaddy allow to place our own PHP.INI settings file on per account basis which is effective to that account only.
How To Change
1. Download PHP.INI file from your godaddy account root folder. If file does not exist create your own file.
2. Create PHP.INI for php 4 and PHP5.INI file for PHP5. Default Godaddy PHP.INI file contain following content.
register_globals = off allow_url_fopen = off memory_limit = 128M max_execution_time = 120 expose_php = Off max_input_time = 120 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" ; Only uncomment zend optimizer lines if your application requires Zend Optimizer support ;[Zend] ;zend_optimizer.optimization_level=15 ;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3 ;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 ;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so ;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so ; -- Be very careful to not to disable a function which might be needed! ; -- Uncomment the following lines to increase the security of your PHP site. ;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru, ; phpinfo, exec, system, dl, fsockopen, set_time_limit, ; popen, proc_open, proc_nice,shell_exec,show_source,symlink"
3. You can add following setting as well.
display_errors = Off ; -- php display error on/off log_errors = On ; -- log php error on/off error_log = [path to your error log file] ;-- change error log file path.
4. Upload changed PHP ini file to your root folder.
5. Now it is time to reload Apache to take change effect. Login to your GoDaddy account. Launch web hosting control panel. Go to Options & Settings -> Stats & Monitors -> System Processes ->
6. You will see list of web services running under your account. Select all web services and click End Web button. This step will terminate apache web service and will reload automatically when you browse your website in browser.
7. Run Phpinfo to see changes taken effect.