|
php setup remote server |
Posted by Jorge Eduardo Ardila on Aug-25-2011 08:40 |
|
Hi Peter, I want to know which is the mechanism to setup chart directos on a remote
server where I don?t have administrative privileges and by no means access to php.ini?
Do I have to ask the customer service guys to register .dll?s or what must be done tu
succesfully run chartdirect,
Thanks in advance.
Jorge |
Re: php setup remote server |
Posted by Peter Kwan on Aug-25-2011 14:38 |
|
Hi Jorge,
If you are referring to PHP hosting on Linux or FreeBSD hosts, in the majority of the case, you can set up a "private php.ini" in your own directory, ask the PHP to your "private php.ini". So even if you cannot access the "system php.ini", you can still install ChartDirector without any help from the administrator. No registration is required for PHP.
(a) Many ISPs nowadays allow their customers to use a custom "php.ini". You may search the support forum of your ISP (eg. using the keyword "custom php.ini") to see if there are any instructions. Some ISPs may provide a "control panel" to allow you to enable a custom "php.ini". Some ISPs will enable this feature only if you ask. If you have not yet chosen an ISP, please choose one that supports custom "php.ini". (If you google for "custom php.ini", you can see a lot of ISPs supporting this feature.)
(b) If you can copy ChartDirector to the PHP extension directory, you may not need to access "php.ini" at all. If you cannot access the PHP extension directory and the ISP does not offer the private "php.ini" feature, you may try to ask your ISP if they can copy the ChartDirector library to the PHP extension directory for you. Some ISPs will do this for their customers.
(c) If your web site supports CGI (99% of hosting accounts support CGI), you may configure your system to use a private instance of the PHP interpreter instead of the default PHP interpreter provided by your system. The usual method is to use ".htaccess" to redirect the PHP request to your own CGI script. In your CGI script, you may forward the request to the CGI PHP interpreter, with an environmental variable to tell it to use your own private "php.ini".
To use method (c), you would need to be familiar with Apache/PHP administration. Because every server is different, it is hard to mention all possible cases (it may require writing a book). Even I myself may need around half to one hour to figure out which method works. If you can private a guest account to me to allow me to upload files to your web server document and CGI directories, I can try to install ChartDirector for you. You may email the details to me at pkwan@advsofteng.net.
(d) If you can use PHP 4.x or PHP 5.2.4 or below, you can install ChartDirector without using "php.ini" at all. Just upload the necessary files to your web directory. ChartDirector will dynamically load the ChartDirector PHP extension. For some reasons, dynamically loading PHP extension is not supported from PHP 5.2.5 onwards, so you must use "php.ini" to load any PHP extension.
Note that on Linux, some hosting companies will not even permit you to upload shared objects or binary executables (they may configure their system to automatically delete such files), or they may mount the disk volume so that shared objects or binary executables cannot be used (the "noexec" disk mounting option in Linux). This is not common, but if you are using such a host, then there is no way to install anything that requires shared objects or binary executables, including ChartDirector. (Of course, you can always ask the administrator to install it for you by copying the shared objects to a different disk volume.)
Hope this can help.
Regards
Peter Kwan |
Re: php setup remote server |
Posted by Ray on Jul-06-2012 20:21 |
|
Hi Peter
if we can't have our own php.ini file in the shared hosting, Can we hardcode the extenstion_dir so the cdLoadDLL function will load the specific path instead of read from extension_dir?
Ray
Thank you |
Re: php setup remote server |
Posted by Peter Kwan on Jul-07-2012 02:34 |
|
Hi Ray,
You can use relative path names only if you are using PHP 5.2.4 or below. If you are using PHP 5.2.5 or above, the PHP interpreter disables supporting paths in loading extensions. So you can only include the filename. If the file name has any path, the PHP will return error.
In fact, the "phpchartdir.php" will automatically try relative path names if it detects the PHP version is PHP 5.2.4 or below.
Furthermore, many editions of PHP 5.3 or above completely disable dynamic loading of extensions. So any PHP extension must be loaded with "php.ini".
However, from our experience, in most of the cases, it is possible to configure the system to use private "php.ini" with requiring administrative privilege. See (c) above in my previous response to this thread. Since it is so difficult to configure (requires in depth knowledge of CGI, PHP, and Apache configuration), if you can private a guest account to me to allow me to upload files to your web server document and CGI directories, I can try to install ChartDirector for you. You may email the details to me at pkwan@advsofteng.net.
Regards
Peter Kwan |
|