apache1.3.9+php4+informix on linux 6.0 , ifx_connect() error
Posted in 1999
Topics: Installation, Setup & Upgrades, Platform-Specific Issues
Hi,i'm a beginner of php programming. I have installed apache1.3.9+php4+informix . I have an error on my first php programming , so difficult for me to solve. Following source is part of php surce,i guess make a error.(line number + source) -------------------------------------------------- 9 $HandleDB = ifx_connect("stores7@tipsdb","jay","jay5771"); 10 if($op1 == "next") 11 szQuery = "select custor_num,fname,lname,company from customer where customer_num >= ".$RecNo1; 12 else 13 $szQuery = "select customer_num,fname,lname,company from customer where customer_num <= ".$RecNo1." order by customer_num desc"; 14 15 $HandleCR = ifx_prepare($szQuery,HandleDB,IFX_SCROLL); 16 if(!$HandleCR) 17 { 18 printf("cannot prepare(%s),(%s)\\n", ifx_error(),ifx_errormsg()); 19 ifx_close($HandleDB); 20 return $ArrCustomer; 21 } -------------------------------------------------- error status is followed. -------------------------------------------------- Warning: Informix: Too many open links (0) in /usr/local/apache/htdocs/jay/customer.html on line 9 Warning: ifx_query : 0 (type -1) is not a Informix link index in /usr/local/apache/htdocs/jay/customer.html on line 15 cannot prepare(E [SQLSTATE=),() Warning: ifx_close : 0 (type -1) is not an Informix link index in /usr/local/apache/htdocs/jay/customer.html on line 19 -------------------------------------------------- i think there was no error when compiling & installing apache1.3.9+php4+informix. Help me!!, please. added the html file created by phpinfo() function. (configurations of my system.)
=?euc-kr?B?sei1v8f2?= wrote: > > Hi,i'm a beginner of php programming. > I have installed apache1.3.9+php4+informix . > I have an error on my first php programming , > so difficult for me to solve. > Following source is part of php surce,i guess make a error.(line > number + > source) > -------------------------------------------------- > 9 $HandleDB = ifx_connect("stores7@tipsdb","jay","jay5771"); How and where do you error check the $HandleDB is valid? > 10 if($op1 == "next") > 11 szQuery = "select custor_num,fname,lname,company > from customer > where customer_num >= ".$RecNo1; > 12 else > 13 $szQuery = "select customer_num,fname,lname,company > from customer > where customer_num <= ".$RecNo1." > order by customer_num desc"; Why does szQuery on 11 not have the $ prefix that is on line 13, or vice versa? > 14 > 15 $HandleCR = ifx_prepare($szQuery,HandleDB,IFX_SCROLL); > 16 if(!$HandleCR) > 17 { > 18 printf("cannot prepare(%s),(%s)\\n", > ifx_error(),ifx_errormsg()); > 19 ifx_close($HandleDB); > 20 return $ArrCustomer; > 21 } > -------------------------------------------------- > error status is followed. > -------------------------------------------------- > Warning: Informix: Too many open links (0) in > /usr/local/apache/htdocs/jay/customer.html on line 9 It sounds like you've got a connect problem on line 9. > Warning: ifx_query : 0 (type -1) is not a Informix link index in > /usr/local/apache/htdocs/jay/customer.html on line 15 This is probably failing because HandleDB is not valid. > cannot prepare(E [SQLSTATE=),() > Warning: ifx_close : 0 (type -1) is not an Informix link index in > /usr/local/apache/htdocs/jay/customer.html on line 19 Ditto. > -------------------------------------------------- > > i think there was no error when compiling & installing > apache1.3.9+php4+informix. > Help me!!, please. > > added the html file created by phpinfo() function. > (configurations of my system.) -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
=?euc-kr?B?sei1v8f2?= wrote: > > Hi,i'm a beginner of php programming. > I have installed apache1.3.9+php4+informix . > I have an error on my first php programming , > so difficult for me to solve. > Following source is part of php surce,i guess make a error.(line > number + > source) > -------------------------------------------------- > 9 $HandleDB = ifx_connect("stores7@tipsdb","jay","jay5771"); > 10 if($op1 == "next") And, further to my previous analysis, since you are using Apache, the problem is probably related to the environment variables you do (or, much more likely, don't) have set while Apache is running. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
In article <37E1D0EE.7FE6@earthlink.net>, jleffler@earthlink.net wrote: > =?euc-kr?B?sei1v8f2?= wrote: > > > > Hi,i'm a beginner of php programming. > > I have installed apache1.3.9+php4+informix . > > I have an error on my first php programming , > > so difficult for me to solve. > > Following source is part of php surce,i guess make a error.(line > > number + > > source) > > -------------------------------------------------- > > 9 $HandleDB = ifx_connect("stores7@tipsdb","jay","jay5771"); > > 10 if($op1 == "next") > > And, further to my previous analysis, since you are using Apache, > the problem is probably related to the environment variables you > do (or, much more likely, don't) have set while Apache is running. I am totally new to doing PHP/informix stuff myself. What env variables should be set in Apache for this to work properly? Just getting started, I have not been able to get an ifx_connect() to work yet. I put in a bogus username and I got the same errors, so I'm not even getting to the DB server. Here are my errors after a simple $db_id = ifx_connect("db@dbhost_se","chuck","secret"); (even thought the warning refers to ifx_pconnect): Warning: ifx_pconnect : E [SQLSTATE=IX 000 SQLCODE=-461] in /home/apache/sslhtdocs/itug_98/testdb.php3 on line 7 Unable to load locale categories. TIA, Chuck Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.