php-ini
Increase max execution time for php
PHP file (for example, my_lengthy_script.php) ini_set(‘max_execution_time’, 300); //300 seconds = 5 minutes .htaccess file <IfModule mod_php5.c> php_value max_execution_time 300 </IfModule> More configuration options <IfModule mod_php5.c> php_value post_max_size 5M php_value upload_max_filesize 5M php_value memory_limit 128M php_value max_execution_time 300 php_value max_input_time 300 php_value session.gc_maxlifetime 1200 </IfModule> If wordpress, set this in the config.php file, define(‘WP_MEMORY_LIMIT’, ‘128M’); If … Read more
php.ini reload in php-cli
The configuration is loaded fresh each time you invoke PHP from the CLI.
where can I find the php.ini for php-cli
Just ask PHP: php -i |grep php\.ini
phpunit require_once() error
UPDATE: As of 2013 November and Ubuntu 12.04 these 2 commands should suffice: sudo pear config-set auto_discover 1 sudo pear install pear.phpunit.de/PHPUnit The following is an older answer. It’s a known problem , although almost a year and a half had passed. Read about it here The code coverage must be installed in order for … Read more
How can I know which ‘php.ini’ file is used?
php –ini For the webserver-SAPIs use phpinfo() Here’s some sample output: bash-3.2# php –ini Configuration File (php.ini) Path: /usr/local/php5/lib Loaded Configuration File: /usr/local/php5/lib/php.ini Scan for additional .ini files in: /usr/local/php5/php.d Additional .ini files parsed: /usr/local/php5/php.d/10-extension_dir.ini, /usr/local/php5/php.d/20-extension-opcache.ini, /usr/local/php5/php.d/40-openssl.ini, /usr/local/php5/php.d/50-extension-apcu.ini, /usr/local/php5/php.d/50-extension-curl.ini, /usr/local/php5/php.d/50-extension-gmp.ini, /usr/local/php5/php.d/50-extension-imap.ini, /usr/local/php5/php.d/50-extension-intl.ini, /usr/local/php5/php.d/50-extension-mcrypt.ini, /usr/local/php5/php.d/50-extension-mssql.ini, /usr/local/php5/php.d/50-extension-pdo_pgsql.ini, /usr/local/php5/php.d/50-extension-pgsql.ini, /usr/local/php5/php.d/50-extension-propro.ini, /usr/local/php5/php.d/50-extension-raphf.ini, /usr/local/php5/php.d/50-extension-readline.ini, /usr/local/php5/php.d/50-extension-xdebug.ini, /usr/local/php5/php.d/50-extension-xsl.ini, /usr/local/php5/php.d/60-extension-pecl_http.ini, /usr/local/php5/php.d/99-liip-developer.ini
What is the difference between ‘local value’ and ‘master value’?
master is either the value compiled into PHP, or set via a main php.ini directive. I.e., the value that’s in effect when PHP fires up, before it executes any of your code. local is the value that’s currently in effect at the moment you call phpinfo(). This local value is the end result of any … Read more
php.ini changes don’t have any effect
if you’re unsure what php.ini is being used, create a new file in your webfolder, name it phpinfo.php for example , with the following content <?php phpinfo(); ?> then open the url in your browser (http://www.example.com/phpinfo.php). it will show the path to the php.ini being used. when you have identified the correct file, make your … Read more