Friday, March 9, 2007

PHP/MySQL FAQ

What versions of PHP are you running?
We are currently supporting PHP 4.4.2 and PHP 5.1.4. PHP4 runs as an apache module, while PHP5 runs as a CGI.

How do I know which PHP modules are installed?
Using the following code within a file with a .php extension:

How can I use PHP 5?
PHP5 is enabled network wide, which you can use with a .php5 extension or you can follow these directions to change .php on your site to use the PHP5 engine: How to enable PHP5 site wide

Will you install specific PHP extensions for my needs?
Yes, so long as it is well documented at php.net, including associated functions provided by this extension.

What version of MySQL do you currently support?
MySQL 4.1.19-standard

What resource limits do you put in place on the mysql services?
We limit each user to 25 simultaneous connections, if you exceed this limit you will begin to receive connection errors.

I am receiving “too many connection” errors with mysql, how do I fix this?
The most common occurence is that you have many sleeping mysql queries with your application. If it gives you the option to disable, or limit persistent connections, this will help alleviate this problem in our shared environments.

How do you define a “slow query?”
This is defined by any query which takes over 10 seconds to complete. We understand that queries can exceed 10 seconds when server loads are high, so we take into account multiple server variables including system load and rows analyzed when parsing through slow query logs.

How do I backup my Databases?
This may merely be done by using the Backup function within cPanel located under Download a MySQL Database Backup.

I am getting an error: “Client cannot support authentication protocol”?
MySQL made a significant change to the password hashing algorithm from 4.0 to 4.1 and PHP 4.x has not caught up with an updated mysql client library. Alterations to the servers have been made to limit the amount this error occurs, however, if you come across this please issue a support ticket and we will resolve it immediately.

I have a Large Database and Need to Restore it
The quickest way for those familiar with a linux command line is to use mysqldump to first dump the database (this will dump structure and data). Then when you wish to restore, use the mysql client, such as: mysql -uUser -p databasename <>

I would also like to know if you support phpsuexec?
We do not, however we do use openbasedir protection on our PHP installation
which protects you from other users reading the contents of your directories.

Alternative to Navacat
http://mysql.org/downloads/gui-tools/5.0.html

No comments: