As I said earlier, Godaddy is implementing APC ( a great cache functionality) on its shared hosting plans. In a recent contact I had with them, it looks like the launch day is tomorrow.
Till now, Godaddy disabled (by default) this extension for clients using actually Zend and Ioncube; good choice; as these 3 extensions represent an incompatibility risk.
If you want to benefit from the “awaited” great performance boosts with APC, you need to disable Zend and Ioncube extension and enable APC.
Enable APC on Godaddy.com Hosting
Here is how to do it:
Open your working php.ini/php5.ini file (it might be in a subfolder or on your root folder)
If you have Zend or Ioncube extensions enabled, and you are sure your sites will work without them, disable these extensions by putting a semicolon (;) in front of each line about them.
If you see “apc.enabled=0” somewhere, comment this line with a semicolon (;) too.
Godaddy Optimized php(5).ini
Here is a nice PHP5.INI (for Godaddy Linux hosting plans using FastCGI PHP 5.3)
Save it as php5.ini and place it in the public root of your server (/html folder). Careful to backup your current php5.ini.
cgi.fix_pathinfo = 1
cgi.check_shebang_line = 0
;register_argc_argv = false
; Enable GZIP compression at the default level
zlib.output_compression = On
zlib.output_compression_level = 6
; Disable PHP magic quotes
;magic_quotes_gpc = Off
;magic_quotes_runtime = Off
;magic_quotes_sybase = Off
register_globals = off
allow_url_fopen = on
max_upload_filesize = 6M
expose_php = Off
max_input_time = 60
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="
allow_call_time_pass_reference = on
; Load PDO MySQL extension
; Only uncomment zend optimizer lines if your application requires Zend Optimizer support
;ZEND GUARD (because we use PHP 5.3)
; -- 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"
Now you have APC enabled by default!
Check if APC is installed on your Godaddy account
You can check it by opening a php file containing phpinfo() function.
Here is an example:
Save the code below in a file named: phpinfo.php
// Show all information, defaults to INFO_ALL
Now you can put this file next to your websites files (careful not to overwrite existing files) and browse to this file with your web browser. Search in the page for “APC”, you will know now…
Keep in mind that these settings apply if you have your hosting with any of Godaddy Resellers, like “DomainsPricedRight.com”