Php Sdk 3.2 Php5.3

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Php Sdk 3.2 Php5.3

      Hello,

      I've a problem ?( ?( ?( with the php sdk I couldn#t solve myself.

      I have a php-script which is on an lubuntu server the same server as the palo-database. Each time I trie to get data from the palo-database I get an error 500.

      If I run the same script on an Wndows-html-Server and access the palo-database on the Linux-Server the script work very well.

      Help me I don't know what to do.

      PHP Source Code

      1. $palo=palo_init($palo_host,$palo_port,$palo_user,$palo_pass);
      2. . . .
      3. $value=palo_data($palo, $Database,$cube,$year,$month,$element1,$element2,$element3,$unit);


      Volker
    • Hi laloune,

      here the complete code.

      The following php-script will be called from a javascript and in php I create a XML-File, which will be processed in the javascript.

      I've a database, where the values, positions and different translations of $element1 are stored.

      PHP Source Code

      1. $year=$_GET['year'];
      2. $month=$_GET['month'];
      3. $language=$_GET['language'];
      4. $db=new SQLite3("../db/database.s3db");
      5. $qry1="select * from Palo where report='sales' and language='.$language.' order by position";
      6. $res1=$db->query($qry1);
      7. $palo=palo_init($palo_host,$palo_port,$palo_user,$palo_pass);
      8. header('Content-type: text/xml');
      9. echo('<?xml version="1.0" encoding="iso-8859-1"?>');
      10. echo '<rows>';
      11. $element2='all';
      12. $element3='all';
      13. while ($r1=$res1->fetchArray()) {
      14. echo '<row id="'.$r1["element"].'">';
      15. $sp1=palo_data($palo, $database, $cube, $year, $month, $r1['element'], $element2, $element3, 'actual');
      16. $sp2=palo_data($palo, $database, $cube, $year, $month, $r1['element'], $element2, $element3, 'budget');
      17. echo '<cell>'.$r1['desc'].'</cell>';
      18. echo '<cell><![CDATA[<div style="width:100%; text-align:right;">'.number_format(-1*$sp1,2,',','.').'</div>]]></cell>';
      19. echo '<cell><![CDATA[<div style="width:100%; text-align:right;">'.number_format(-1*$sp2,2,',','.').'</div>]]></cell>';
      20. echo '</row>';
      21. }
      22. echo '</rows>';
      Display All
    • Hi Volker,

      did you solve your problem yet ?

      I just wonder about this sentence:

      I have a php-script which is on an lubuntu server the same server as the palo-database. Each time I trie to get data from the palo-database I get an error 500.


      do you run the script on the apache server of the Palo Suite ? Or an external one ?

      are you sure that your php palo library is correctly registered ? What returns phpinfo() ?

      please advise,
      laloune

      Post hoc, non est propter hoc