ChartDirector 7.0 (PHP Edition)

Considerations for Shared Hosting


Note: This section only applies if you cannot modify the "php.ini" or add files to the PHP extension directory (eg. due to limited access rights). You may skip this section if this is not the case.

One of the common issues in using PHP extensions in shared PHP hosting is that the web site developer may not have write access to the default "php.ini" or PHP extension directory. The followings are some common solutions:

Using a Custom "php.ini"

Many PHP hosting companies nowadays support custom "php.ini". It means the web site developer can set up his own "php.ini", which applies to the web site only. With a custom "php.ini", the PHP extension directory can be configured to a directory within the hosting account, which the developer has full control. In this way, ChartDirector can be installed easily.

The exact steps of using a custom "php.ini" are different for different hosting companies. Most often, it is just a file "php.ini" in the web site document root, or in the same directory as the PHP script. However, some hosting companies may use a different directory or even different file name. From experience, many PHP hosting companies do not document this feature. You may need to ask for this feature, or check the forum or FAQ of the hosting company for information.

In some cases, the "php.ini" can appear to be non-writable, but internally it may include another writable file for developer customization. Since the "php.ini" is almost always readable, you can examine the "php.ini" to determine if it includes such a file. (If you cannot read the file with FTP or the command shell, you can always write a PHP script to read and display the file.)

If you have not yet decided on a hosting company, it is suggested you select one that supports custom "php.ini". You may also consider to choose a hosting plan that allows root or superuser access, such as various types of "virtual private server" hosting.

Using a Private Instance of PHP through CGI

If your hosting company does not support custom "php.ini", another method you may try is to launch a private instance of PHP through CGI.

Many hosts support CGI in addition to PHP. CGI may allow you to launch a program of your choice to handle a script. You can therefore launch a private instance of PHP to handle your PHP scripts, which would allow you to specify your private "php.ini".

The exact steps to perform the above depend on the configuration of the PHP, CGI, Apache and server OS. The following is an example just to demonstrate the general steps. It may need modification to work on your particular system, and this requires familiarity with PHP, CGI, Apache and the operating system. Please contact support@advsofteng.net or post to the ChartDirector Forum if you need help.