New TeeChart for PHP install

TeeChart for PHP
Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: New TeeChart for PHP install

Post by Yeray » Wed Nov 25, 2009 10:00 am

Hi Dan,

I've been talking with the people from the TeeChart for PHP and clarified to me an important tip:
The eval version of TeeChart for PHP sources have been obfuscated so that the nusphere loaders are needed to use them. In my testing process, I've used the sources without obfuscation so here it was my mistake (one more in my list). So at this point my deductions are:

- Using TeeChart for PHP with sources, it should work as described in the instructions, recompiling the php and without using the loaders.
- Using TeeChart for PHP eval, with obfuscated sources, phpexpress loaders are needed, but adding them in the php.ini causes the GD library not to be loaded successfully, so I'm not able to run teechart either.

I'll ask that to nushphere guys and I'll back to you asap.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

streamfoundry
Newbie
Newbie
Posts: 10
Joined: Tue Oct 23, 2007 12:00 am
Contact:

Re: New TeeChart for PHP install

Post by streamfoundry » Mon Nov 30, 2009 12:54 pm

Yeray - got this official answer from NuSphere:

"Dear Dan,
Sorry, but we don't support mainframe - we support many other platforms such as Windows, Linux on x86 CPU (32 and 64 bit), FreeBsd, Mac OS, Solaris OS.
Best regards,
Sergey

Ticket Details
===================
Ticket ID: KOE-897272
Department: Support
Status: Open "

They did follow-up with another email saying they might be able to provide a loader if we could promise some number of new NuCoder licenses and if we could provide our platform to them for the long term. No can do either. If anything, I would think Steema might be able to make the request for a z-hardware loader in support of your current NuCoder license.

Thanks,

Dan St.Cyr
StreamFoundry, Inc.

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: New TeeChart for PHP install

Post by Yeray » Tue Dec 01, 2009 12:40 pm

Hi Dan,

I've found that I was changing the extensions dir to load nusphere extension and then the gd.so and pdo.so couldn't be loaded.

Here there are the corrected instructions:
How-To Install TeeChart for PHP without sources (obfuscated) in Ubuntu 9.10.
This includes both the evaluation and the binary versions. Both them need nusphere loaders.
  • - Fresh install Ubuntu 9.10
    - Install php5 and sun-java6-jre through synaptic
    - Update everything through update manager

    - Prepare TeeChart. Supposing that you have the downloaded file from the web in your user Downloads folder:

    Code: Select all

    sudo mkdir /var/www/TeeChartForPHP
    sudo mv Downloads/TeeChartPHP1.zip /var/www/TeeChartForPHP/
    cd /var/www/TeeChartForPHP/
    sudo unzip TeeChartPHP1.zip
    java -jar TeeChart.Installer.jar
    sudo mkdir /var/www/TeeChartForPHP/sources
    cd
    sudo mv sources.zip /var/www/TeeChartForPHP/sources/
    cd /var/www/TeeChartForPHP/sources
    sudo unzip sources.zip
    sudo mv themes/y2009.php themes/Y2009.php
    - Prepare nusphere loaders. Unzip and untar the loaders according to your architecture and system. Then, place them together with the gd.so and pdo.so and load all them. For example:

    Code: Select all

    sudo mkdir /var/www/extensions
    sudo mv phpexpress-php-5.2.so /var/www/extensions/
    - Edit the php.ini file to load the phpexpress extensions:
    • Code: Select all

       sudo gedit /etc/php5/apache2/php.ini
      • - At line 508: extension_dir = "/var/www/extensions/"
        - At line 621: extension=phpexpress-php-5.2.so
    - Copy the gd.so and pdo.so into the same place in order to continue loading them too:

    Code: Select all

    sudo cp /usr/lib/php5/20060612+lfs/* /var/www/extensions/
    - Now we have to recompile php5 as explained here to solve GD library problems. Note that doing that, you'll generate ans install a .deb. This will cause Synaptics to find some updates. If you update your system including php5-gd package, you'll have to reinstall your .deb again running again the last command in this section:

    Code: Select all

    sudo apt-get install build-essential debhelper fakeroot
    cd /usr/src
    sudo apt-get source php5
    sudo apt-get build-dep php5
    cd php5-5.2.10.dfsg.1
    sudo gedit debian/rules
    • at line 220: --with-gd=shared --enable-gd-native-ttf \

    Code: Select all

    sudo dpkg-buildpackage -rfakeroot (this can take a while, be patient)
    cd ..
    sudo dpkg -i php5-gd_5.2.10.dfsg.1-2ubuntu6.1_i386.deb
    sudo /etc/init.d/apache2 restart
How-To Install TeeChart for PHP with sources (not obfuscated) in Ubuntu 9.10.
  • - Fresh install Ubuntu 9.10
    - Install php5 and sun-java6-jre through synaptic
    - Update everything through update manager

    - Prepare TeeChart. Supposing that you have the downloaded file from the web in your user Downloads folder:

    Code: Select all

    sudo mkdir /var/www/TeeChartForPHP
    sudo mv Downloads/TeeChartPHP1.zip /var/www/TeeChartForPHP/
    cd /var/www/TeeChartForPHP/
    sudo unzip TeeChartPHP1_with_Sources.zip
    java -jar TeeChart.SourcesInstaller.jar
    sudo mkdir /var/www/TeeChartForPHP/sources
    cd
    sudo mv sources.zip /var/www/TeeChartForPHP/sources/
    cd /var/www/TeeChartForPHP/sources
    sudo unzip sources.zip
    sudo mv themes/y2009.php themes/Y2009.php
    - Now we have to recompile php5 as explained here to solve GD library problems. Note that doing that, you'll generate ans install a .deb. This will cause Synaptics to find some updates. If you update your system including php5-gd package, you'll have to reinstall your .deb again running again the last command in this section:

    Code: Select all

    sudo apt-get install build-essential debhelper fakeroot
    cd /usr/src
    sudo apt-get source php5
    sudo apt-get build-dep php5
    cd php5-5.2.10.dfsg.1
    sudo gedit debian/rules
    • at line 220: --with-gd=shared --enable-gd-native-ttf \

    Code: Select all

    sudo dpkg-buildpackage -rfakeroot (this can take a while, be patient)
    cd ..
    sudo dpkg -i php5-gd_5.2.10.dfsg.1-2ubuntu6.1_i386.deb
    sudo /etc/init.d/apache2 restart
At this point you should be able to open a browser and call http://localhost/a.php:

Code: Select all

<?php

phpinfo();

require_once "/var/www/TeeChartForPHP/sources/TChart.php";
$chart1 = new TChart(500,300);
$bar = new Bar($chart1->getChart());
$bar->fillSampleValues(5);
$bar->setColorEach(true);

$chart1->render("chart1.png");
$rand=rand();
print '<font face="Verdana" size="2">Themes Demo<p>';
print '<img src="chart1.png?rand='.$rand.'">';

?>
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

streamfoundry
Newbie
Newbie
Posts: 10
Joined: Tue Oct 23, 2007 12:00 am
Contact:

Re: New TeeChart for PHP install

Post by streamfoundry » Tue Dec 01, 2009 1:58 pm

Yeray - via some emails with Dmitri Dmitrienko at NuSphere, they've told us that they don't support the IBM mainframe platform and, therefore, do not plan to provide a PhpExpress loader. Their rationale is that they don't see any monetary reason to extend PhpExpress support to the mainframe. Unfortunately, this leaves me no choice but to suspend looking at TeeChart for PHP (unless Steema can convince them otherwise!).

Thanks,

Dan St.Cyr
StreamFoundry, Inc.

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: New TeeChart for PHP install

Post by Yeray » Tue Dec 01, 2009 4:11 pm

Hi Dan,

We'll discuss options here and we'll contact you via email to see if we can work towards a solution.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply