ifx_connect and Apache 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I've installed the following components under Solaris 9 :

Apache 2.0.54
PHP 5.0.4
Informix server 9.40.UC6
Client SDK 2.81.UC2R1

I can connect to my database using php CLI with the following script :

<html>
<head>
 <title>PHP Informix</title>
</head>
<body>
<?php
       printf("<br><H3>Tableau des facultés extrait de SYLVIA</H3><br>");
$conn_id = ifx_connect ("sylvia@unil","xxxxxx","xxxxxx") or die (ifx_error());
       print("Conn_id = ".$conn_id);
       $res_id = ifx_query("select semimmatpos from general", $conn_id);
       if (! $res_id) {
printf("AGV 1:Can't select orders : %s\n<br />%s<br />\n", ifx_error());
         ifx_errormsg();
         die;
       }
       ifx_htmltbl_result($res_id, "border=\"1\"");
       ifx_free_result($res_id);
       ifx_close($conn_id);
?>
</body>
</html>

The result is :

$ php -f /siaweb/inter/noauth/php/test/Sy/dh.php
<html>
<head>
 <title>PHP Informix</title>
</head>
<body>
<br><H3>Tableau des facultés extrait de SYLVIA</H3><br>Conn_id = Resource id #4<table border="1"><tr><th>Semimmatpos</th></tr>
<tr><td>130</td></tr>
</table>
</body>
</html>



When I try to execute this same script through Apache2 with my browser, I get the following answer :


     Tableau des facultés extrait de SYLVIA



*Warning*: ifx_connect() [function.ifx-connect <https://applicationsinterd.unil.ch/inter/noauth/php/test/Sy/function.ifx-connect>]: E [SQLSTATE= in */d1/siaweb/inter/noauth/php/test/Sy/dh.php* on line *8*
E [SQLSTATE=


As you can see, there is no SQL Error code and it doesn't work !!

Any idea ?

Thanks in advance.

Daniel


--

###########################################################################
Daniel HENCHOZ             ///  WEB       : http://www.danielhenchoz.ch
Computer center           ///   EMAIL     : Daniel.Henchoz@xxxxxxx
University of Lausanne   ///    MOBILE/SMS: ++41 79 206.51.81
College Propedeutique 2 ///     FAX       : ++41 21 692.22.05
1015 LAUSANNE          ///      PHONE     : ++41 21 692.22.20
SWITZERLAND           ///
###########################################################################



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux