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

Message ListMessage List     Post MessagePost Message

  Problem Chart, apache blocks the chart
Posted by Dijkstra on Aug-20-2012 19:07
Dear,

I have a x86_64 linux server with Apache/2.2.22 and PHP/5.3.10. I have installed chartdirector with extension 530.dll (therefore I used 520 because the PHP version was 5.2.x)

If I startup Apache and I want to load the chart de connection breaks en the browser gives a default error that there was no connection available.

Apache gives the error:  [notice] child pid 30211 exit signal Illegal instruction (4)

If I try with 520.dll il get the normal warning that the chart try's to load phpchartdir530.dll.

Get anyone help me?

Thanks!

  Re: Problem Chart, apache blocks the chart
Posted by Peter Kwan on Aug-21-2012 01:44
Hi Dijkstra,

Would you mind to verify the followings?

(a) Are you using a PHP that is compiled for Linux x86_64? (If your PHP comes with your Linux x86_64 distribution, it should be compiled for Linux x86_64. However, sometimes people install 32-bit PHP on 64-bit Linux, in which case the PHP is for Linux i386/i686.)

(b) Are you using ChartDirector for PHP for Linux (x86_64) (as opposed to for Linux (i386/i686)?

(c) PHP 5.3 requires all PHP extensions to be copied to the PHP extension directory. Have you copied *everything* (all files and the fonts subdirectory, not just phpchartdir530.dll) from ChartDirector/lib to the PHP extension directory? (You may use phpinfo to determine where is your PHP extension directory.)

(d) PHP 5.3 requires all PHP extensions to be loaded using "php.ini". Have you added the line "extension=phpchartdir530.dll" in your "php.ini"? (You may use phpinfo to determine where is your "php.ini".)

(e) If your PHP is of type SAPI (as opposed to CGI), you would need to restart Apache for any changes to "php.ini" to take effect. (You may use phpinfo to determine your PHP type.)

For testing, is it possible to use the "Simple Bar Chart" (simplebar.php) sample script or the "cdinfo.php" sample script that comes with ChartDirector?

If loading the chart is not successful, please try to load a PHP script (such as phpinfo) that does not include charts. Does the other PHP script work?

Regards
Peter Kwan

  Re: Problem Chart, apache blocks the chart
Posted by Dijkstra on Aug-21-2012 15:39
Dear Peter,

(a) Yes it is a Linux x86_64. In the phpinfo also define the system as x86_64
(b) I have used Linux x86_64.
(c) Yes i have copied al the files
(d) Yes i have placed extension=phpchartdir530.dll in de php.ini
(e) I always reboot apache after changes in de php.ini

I have tested the simple charts in the phpdemo folder. I get a red cross with every chart en the error in the apache log is still child pid 9277 exit signal Illegal instruction (4)

If i look to phpinfo and if i load 530.dll i see he is recognising ChartDirector PHP API version 5.0. So it looks that it was loaded correctly in php.

Do you have any ideas?

  Re: Problem Chart, apache blocks the chart
Posted by Dijkstra on Aug-21-2012 21:07
Dear Peter,

Some extra information

after some more research it looks that the dll not work fine with apache. It seems that php recognised the dll and apache sees it like Illegal instruction (4).

I use the configuration. Apache 2.2.22 (openssl 1.0.0), php 5.3.10 on a Centos 6 linux server.

  Re: Problem Chart, apache blocks the chart
Posted by Peter Kwan on Aug-22-2012 15:03
Hi Dijkstra,

Please double check to see if the dll and so are of the correct size. In some cases, when the file is FTP from a Windows computer to Linux, the file will be corrupted if the FTP is in ASCII mode.

There should be a standalone PHP interpret (just enter "php -i" from the command line to see if there is such an interpreter). If there is such an interpret, you can run the PHP script (eg. ChartDirector/phpdemo/cdinfo.php) using the interpreter to see if it crashes. If the script is supposed to output a chart image, you will see garbage characters on the screen, but if the PHP does not crash, it would appear ChartDirector should work with the PHP.

To enable us to test the issue in more details, would you mind to inform me exact how you obtain the Apache/PHP? Is this the standard Apache/PHP that comes with the CentOS, or obtained using "yum" from the official CentOS distribution, or is it a third party distribution, or compiled by yourself using certain options? Also, exactly which CentOS version you are using?

There are many ways to compile Apache/PHP, and in some cases, the Apache/PHP compiled will become non-binary-compatible with the official pre-compiled Apache/PHP distribution. So I would need to know where does the Apache/PHP binary comes from.

Regards
Peter Kwan

  Re: Problem Chart, apache blocks the chart
Posted by Dijkstra on Aug-22-2012 16:03
Hello Peter,

I don't know exact how the vps is installed because my supplier uses a standaard template. What I know is that I use directadmin build option te adjust de vps. I donwgrade the vps to Centos 5.8 (openssl 0.9.8) apache 2.2.24 and php 5.2.17. Next i used the same version of chartdirector and uploaded and copy also the same way en now it works. Can it be that chartdirector does not work fine with openssl 1.0.0?

  Re: Problem Chart, apache blocks the chart
Posted by Peter Kwan on Aug-23-2012 01:26
Hi Dijkstra,

I suspect it is due to the Apache/PHP being compiled in a non-standard way. I am downloading CentOS 6 now, and will test it in a VM to see if I can reproduce the problem.

Because Apache/PHP is open source, everyone can modify them, or use custom configure options to compile them. For example, I had seen a modified PHP which the vendor claimed was "security hardened". It was modified in a way that made it binary incompatible with any other PHP in the world.

Another possible reason for this issue is file corruption. That's why in my previous message I mentioned about checking the file size.

I think incompatibiliy with openssl 1.0 is a remote possibility. (Are you using https when testing the charting pages?) In theory, this can happen if there are symbol conflicts. ChartDirector does not depend on any symbols other than those provided by PHP, and those provided by the standard C runtime. (I would expect openssl would not export symbols of the same names, otherwise it will crash a lot of programs.) ChartDirector also exports some symbols (its API at the C level), but I think it should not be in conflict with other system libraries.

I will update you with my test results.

Regards
Peter Kwan

  Re: Problem Chart, apache blocks the chart
Posted by Dijkstra on Aug-23-2012 02:22
Hello Peter,

thanks for your effort.

FYI
- I have checked the file size and that was ok.
- I have tested in http and https and both didn't worked.

  Re: Problem Chart, apache blocks the chart
Posted by Peter Kwan on Aug-25-2012 13:29
Hi Dijkstra,

I have just tested with CentOS 6.3 x86_64, and ChartDirector works normally.

I used CentOS 6.3 as it comes with OpenSSL 1.0.0. (Earlier versions of CentOS does not have OpenSSL 1.0.0.) I found that the Apache in CentOS 6.3 is 2.2.15 and the PHP version is 5.3.3. I used the CentOS command "yum" to check and apparently there is not a more updated version of PHP for CentOS.

So I suspect the Apache/PHP system in your machine is not from CentOS, but is a custom built version or from a third party.

Regards
Peter Kwan

  Re: Problem Chart, apache blocks the chart
Posted by Dijkstra on Aug-27-2012 14:58
Hello,

thanks for the testing.

Greets