ODBC problem!

From: Date: Tue, 18 Jul 2000 04:00:38 +0000
Subject: ODBC problem!
Groups: php.db 
Request: Send a blank email to php-db+get-1225@lists.php.net to get a copy of this message
hello all: Now i am working on a project that i use freebsd+Apache+PHP as web server, Linux+oracle8i as db server(this is temp,i will transfter it to oracle on solaris). From someone said, i use openlink's multi-tier odbc product. Depend on the openlink's support,i successfully install the odbc for freebsd and can use php get data from oracle. But when i compile php with apache, and after run some times php program by www, there will be a httpd process hold the cpu time,and i cant kill that process unless i restart apache. php source: php source: putenv("LD_LIBRARY_PATH=/usr/local/openlink/lib"); putenv("ODBCINSTINI=/usr/local/openlink/bin/odbcinst.ini"); putenv("LIBPATH=/usr/local/openlink/lib"); putenv("SHLIB_PATH=/usr/local/openlink/lib"); putenv("PATH=$PATH:/usr/local/openlink/bin"); putenv("ODBCINI=/usr/local/openlink/bin/odbc.ini"); $dsn="DSN=oracle"; $user="system"; $password="manager"; $sql="select * from users"; if($conn_id=odbc_connect("$dsn","$user","$password")){ if($result=odbc_do($conn_id,$sql)){ odbc_result_all($result,"border=1 width=50%"); odbc_free_result($result); } else{ echo "can not execute '$sql'"; } odbc_close($conn_id); } else{ echo "can not connect to DSN:$dsn"; } result by top: last pid: 57981; load averages: 0.97, 1.82, 3.11 up 3+10:28:35 19:43:21 41 processes: 2 running, 39 sleeping CPU states: 100% user, 0.0% nice, 0.0% system, 0.0% interrupt, 0.0% idle Mem: 10M Active, 29M Inact, 11M Wired, 3024K Cache, 6153K Buf, 6588K Free Swap: 133M Total, 8640K Used, 124M Free, 6% Inuse PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 57968 nobody 105 0 3140K 2140K RUN 3:19 99.02% 99.02% httpd 250 root 2 0 1400K 580K select 0:36 0.00% 0.00% nmbd 97 root 2 0 408K 156K select 0:11 0.00% 0.00% routed And i use top program investigate the difference between the httpd with odbc and httpd without odbc. why httpd with openlink state is : 87710 nobody 2 0 2844K 1908K poll 0:00 0.00% 0.00% httpd and httpd with other componet is: 87735 nobody 2 0 2228K 1740K accept 0:00 0.00% 0.00% httpd It is strang that the httpd's state is different,one is poll another is accept. The openlink's supporter said that he cant help me any longer and said that maybe i just need help from apache or php newsgroup, so i write this mail here, hope can get help! thank you very much! sky sky@51job.com

« previous php.db (#1225) next »