Home » Frequently Asked Questions (FAQ) » PHP
PHP is an open source, dynamic scripting language that can be used as a front-end for a MySQL database.
What extension should be used for PHP scripts? #
PHP scripts need to have a .php extension.
What version of PHP are you running? #
We are running PHP 5.2.
What information and server paths are needed to run a PHP script? #
PHP scripts need to have a .php extension.
The list of current server side paths can be found in the control panel under Features > Server-side Paths.
path to sendmail = /usr/sbin/sendmail
path to the date program = /bin/date
include path = .:/usr/share/pear:/usr/share/php
You can see the current PHP environment using PHP info.
Is PHP configured with Safe Mode disabled? #
Yes, Safe Mode is disabled.
How do you enable register_globals? #
For security reasons, PHP configured with register_globals set to “Off” (this is PHP’s default setting). You can eable register_globals (at your own risk) by creating a .htaccess file in your public directory with the following:
php_flag register_globals on
A more secure option would be to reconfigure the script so that it does not require register_globals.
Here’s The PHP Group’s documentation on why register_globals is off by default.
Is PHP configured with allow_url_fopen enabled? #
Yes, allow_url_fopen is enabled.
Is PHP configured with magic_quotes_gpc turned on? #
Yes, magic_quotes_gpc is enabled.
Is Zend Optimzer available? #
Yes, Zend Optimzer is available.
Is PHP compiled with ImageMagick and the GD Graphics Library? #
Yes, is PHP compiled with ImageMagick and the GD Graphics Library version 2.0.
How do you enable PHP error logging? #
You can enable PHP error logging by creating a .htaccess file in your public directory with the following:
# enable PHP error logging
php_flag log_errors on
php_value error_log /mnt/stor1-wc1-dfw1/123456/123456/www.yourdomain.com/logs/php-error.log
Replace yourdomain.com with your actual domain name, and the rest of the path with your correct server side path as found in your control panel under Features > Server-side Paths.
Then create a blank file named php-error.log in the directory you specified and change the permissions to 777.
Once enabled PHP error logs can be accessed via FTP in /www.yourdomain/logs/ or the file you specify as above.
Logging is not enabled by default, so you’ll need to first turn it on in the control panel.
What does ‘No Suitable Nodes’ error mean? #
This a generic error served by the cloud hosting environment when a requested page is unable to be served. This could happen for a number of reasons, such as an out of memory error or a script timeout. There are reasonable timeouts limits set in order to ensure that there are enough available resources to serve the cloud. If these limits are exceeded, the error message appears.
This error message can be mitigated by:
A PHP script is not working, are you able to help install and troubleshoot it? #
PHP script debugging is beyond the scope of the support that we provide. This is a web development issue and we do not offer any in-house web development/consulting services. We make sure that PHP is enabled for your website, PHP is working properly, that you are provided with the correct path information and we can even help point you in the right direction, but we do not have the resouces to debug, install or develop your scripts.
Here are a few things to try when you are troubleshooting a PHP script:
How do you change the PHP maximum upload file size? #
The default upload size is set to 2M. This can be increased by creating a .htaccess file in your public directory with the following:
php_value upload_max_filesize ?M
Then replace ? with the value you want to use.
How do you change the PHP memory limit value? #
The default memory limit is set to 16M. This can be increased by creating a .htaccess file in your public directory with the following:
php_value memory_limit ?M
Then replace ? with the value you want to use.
How do you change the PHP post max size value? #
The default post max size value is set to 16M. This can be increased by creating a .htaccess file in your public directory with the following:
php_value post_max_size ?M
Then replace ? with the value you want to use.
How do you change the PHP maximum execution time? #
The default maximum execution time is set to 30 seconds. This can be increased by creating a .htaccess file in your public directory with the following:
php_value max_execution_time ?
Then replace ? with the value you want to use.