ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  PHP Remote shared host
Posted by Jorge Eduardo Ardila on Aug-31-2012 10:31
Hi Peter,  I made the same question in May,  I got a extensive and detailed answer, by
the moment I was new to php so was unable to solve the issue.  At this moment I'm on
the issue again and having read:
"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."
I uploaded the whole extracted package,  from a browser loaded the phpdemo and
received this answer:

Error Loading ChartDirector for PHP Extension

It appears this PHP system has not loaded the ChartDirector extension by using an
extension statement in the PHP configuration file (typically called "php.ini"). An attempt
has been made to dynamically load ChartDirector on the fly, but it was not successful.
Please refer to the Installation section of the ChartDirector for PHP documentation on
how to resolve this problem.

Error Log


Trying to load "phpchartdir520nts.dll" from the PHP extension directory "C:\\php\\ext".

dl(): Unable to load dynamic library 'C:\\php\\ext\\phpchartdir520nts.dll' - The specified
module could not be found.


System Information
Operating System : Windows NT IIS2001 6.1 build 7601
PHP version : 5.2.14
PHP / Web Server interface : cgi-fcgi
PHP configuration file location : "C:\\PHP\\php.ini"
PHP extension directory : "C:\\php\\ext"

Don know how to proceed in order to enable chartdirector to work, having in mind that
I'm not able to modify the php.ini.

I) Here is the phpinfo of my site:
http://www.datelligence.com/phpinfo.php
II)The url where php was loaded
http://www.datelligence.com/chartdirector/phpdemo/

For sure I'm freshman to CGI, htaccess and so on,  but I can make an effort in order to
achieve.  Thanks in advance,

Jorge Eduardo.

  Re: PHP Remote shared host
Posted by Peter Kwan on Aug-31-2012 17:12
Hi Jorge,

As your PHP is PHP 5.2.15, which is above PHP 5.2.4, that PHP version requires all PHP extensions to be located in the PHP extension directory. Your current PHP extension directory is at "C:\\php\\ext". You may consider to ask your system admin or your host to see if they can help to put "phpchartdir520nts.dll" and "chartdir.dll" in that directory.

For Linux based system, many hosting companies nowadays supports private or custom "php.ini", which you can use to modify the PHP extension directory to another directory under your control. Even if private or custom "php.ini" is not support in the default PHP, in the vast majority of the case, you can use CGI and htaccess to configure a private instance of PHP that uses your custom "php.ini".

However, I see that your host is not Linux based (for PHP, the majority of the hosts are Linux, but Windows is also possible), and your web server IIS does not support htaccess (htaccess is a feature of Apache and many other Linux based web servers). I am not sure if your host supports custom or private "php.ini" (please asks your hosting company to see if custom or private "php.ini" is supported). Also, I am not sure if it can support CGI (virtually for Linux based host supports CGI) to the extent that it can be used to launch a private instance of PHP.

If custom  or private "php.ini" is supported, or if your hosting coimpany can copy the "phpchartdir520nts.dll" and "chartdir.dll" to the PHP extension directory, then there should be an easy solution. Otherwise, there may still be work around (such as to launch the private instance of PHP using the original PHP's exec or system function), but it would not be complicated and may require modifying the sample code to work.

Regards
Peter Kwan