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 default_charset= "UTF-8" ; 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 upload_max_filesize=6M memory_limit=48M max_execution_time=30 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=" date.timezone="Europe/Paris" allow_call_time_pass_reference = on ; Load PDO MySQL extension extension=pdo.so extension=pdo_mysql.so ;APC extension="apc.so" apc.enabled=1 apc.shm_segments=1 apc.shm_size=128 apc.ttl=7200 apc.user_ttl=7200 apc.num_files_hint=1024 apc.enable_cli=1 ; 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 GUARD (because we use PHP 5.3) ;zend_extension=/usr/local/Zend/lib/Guard-5.5.0/php-5.3.x/ZendGuardLoader.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"
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
<?php // Show all information, defaults to INFO_ALL phpinfo(); ?>
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”