This document introduces some PHP concepts and features that may be useful for ChartDirector installation.
phpinfo is a standard PHP function for obtain detail information about your PHP system. To use it, create a PHP file on your web server that contains only one line as follows:
Access the above PHP file with a browser, and it will display your PHP configuration.
PHP configurations are stored in a text file called the PHP configuration file. The file name is usually "php.ini" but sometimes a different file name is used. You may use
phpinfo to find out the exact location and name of your PHP configuration file.
Notes For Shared Hosting
If you are using shared hosting, you may be unable to modify the default "php.ini". In most cases, it is possible to use an alternative "php.ini" under your control. The details depend on how the PHP system is configured.
Some hosting companies provide instructions on how to set up custom "php.ini". (If you search for "custom php.ini hosting" using a search engine, you may find many hits from hosting companies.) So the first source of information is to read the technical documentation and FAQ of your hosting provider, and search its support forum to see if there are instructions on using custom "php.ini".
If the "Server API" of your PHP is CGI or FastCGI (you may use
phpinfo to find out), you may try to put the custom "php.ini" in the same directory as the PHP script. Some CGI PHP will scan the script directory first for the "php.ini" before using the default "php.ini".
If your web server is using Apache and supports CGI (the vast majority of PHP shared hosting are based on Apache and support CGI), you may use ".htaccess" to forward all ".php" request to your own CGI script. In your own CGI script (can be a shell script), you may invoke a PHP CGI interpreter with a "-c" flag to specify your own "php.ini". (Even if the default PHP interpreter is not CGI based, there is often a PHP CGI interpreter in "/usr/bin" or other directory.)
Note: From experience, the last method has a high success rate, but the exact steps differ depending on how the Apache and PHP are set up. If you are not sure how to implement this method, you may contact our support service at
support@advsofteng.net for help. Please include the URL of your
phpinfo page in your email.
The PHP extension directory is a directory for storing PHP extension DLLs or shared objects. The PHP extension directory is configured using the "extension_dir" statement in
php.ini. You may use
phpinfo to find out where is your PHP extension directory.
If the PHP extension directory is configured as a relative path (such as "./"), please make sure you know where the path is relative to. Depending on how the PHP system is set up, it can be relative to the PHP script directory, the PHP interpreter directory, the web server executable directory, other directory. To avoid confusion, it is best to set the PHP extension directory to an absolute path.
Notes For Shared Hosting
If you are using shared hosting, you may be unable to write to the PHP extension directory. In this case, you may ask your hosting company to copy the files for you. Some hosting companies are willing to do this for commercial PHP extensions with a proven track record (like ChartDirector, which is available since 2001).
Alternatively, you may try to use a custom "php.ini", and put an "extension_dir" statement in it to set the PHP extension directory to a directory under your control. The "extension_dir" statement is like:
extension_dir=/home/path/to/my/personal/directory
See
php.ini for details on how to set up a custom "php.ini".
© 2009 Advanced Software Engineering Limited. All rights reserved.