How do I check my PHP or MySQL Version from the Ubuntu Command Line?
# php -v
# mysql -v
or for a better version use the package command:
# dpkg -l | grep ‘\(php\|mysql\)’
How do I check my PHP or MySQL Version from the Ubuntu Command Line?
# php -v
# mysql -v
or for a better version use the package command:
# dpkg -l | grep ‘\(php\|mysql\)’
Symptoms: The following errors are found in the web server error logs:
Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: index.php
Solutions: This is one of those frustrating errors that can take a long time to fix and may be dependent on multiple problems. The solution that worked in my case was adding:
ini_set(‘zend.enable_gc’, 0); <<Below the <?php tag in the index.php
Why does this work? There are known conflicts between zend and APC, if both are installed you may receive the above error, adding the above code into your php file should resolve your issue.
Other possible solutions: Modify your php.ini to increase max_execution_time, post_max_size, and max_input_time :: IMPORTANT – Make sure you maintain a limit, no limit could result in massive resource usage.
Description: In default Plesk Installations a folder called Test is created under httpdocs/ this folder contains a series of scripts designed to perform “hello world” type tests to confirm that those scripting languages can be used.
If the test scripts are no longer needed you can remove the directory
If you would like to keep the scripts but prevent access to them, you can either:
1. chmod the directories to 700 and files to 644; or
2. Move the test folder out of the httpdocs/ directory into a non-webaccessible directory for later use.
Symptoms: A task is scheduled in Plesk under Scheduled Tasks, the task attempts to run a php script but fails.
Solution:
By Default Plesk 11 does not allow execution of scripts in a non-chrooted environment,
To Allow execution of Scripts, change the server policy from the command prompt:
# /usr/local/psa/bin/server_pref -u -crontab-secure-shell “/bin/sh”
To disallow:
# /usr/local/psa/bin/server_pref -u -crontab-secure-shell “”