Hi
Does the query return data when executed not through a browser but
directly on the database?
If yes, how much time does it take to return the data. I believe default
time out for apache is 30 seconds.
So maybe it's a webserver setting that needs to be increased.
Jack
-Original Message-
From: Don Myers [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 3:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Need help with a OpenLink ODBC driver error again
Ok this time I checked the SQL select syntax! So I hope it's not
something that easy again (Well actually easy would be nice)
The other day I Posted a email question about getting a 37000 sql error
but my sql syntax was wrong. Yes I felt stupid but this time I corrected
the syntax and I am still getting an error but, the error is that the
web browser times-out trying to get the page. (Nothing displayed and a
browser error
Could not open the page ³http://127.0.0.1/tests/odbc.php² because
Safari could not load any data for this location.
I get the same type of thing with Internet Explorer.
Here is a recap.
I am using iodbc from openlink on OS X and everything seems fine. I can
get and display tables with:
$results = odbc_tables($conn) or die(P.odbc_errormsg());
odbc_result_all($results) or die(ppulling result error);
(full syntax below)
But when I switch to
$results = odbc_exec($conn,$sql) or die(p captured
.odbc_errormsg());
odbc_result_all($results) or die(ppulling result error);
I get an:
Could not open the page ³http://127.0.0.1/tests/odbc.php² because
Safari could not load any data for this location.
Any ideas? Why tables work but SQL Select doesn't?
Also I have a 5 user openlink license. how do I reset the connections
after I get 5 errors because I think the connections are not dropped
when PHP gets an error? The only way I can get to 5 lic. Limit to reset
is to restart os x? Sudo apachectl restart doesn't seem to work either?
Full Syntax:
?
odbc_close_all();
putenv(DYLD_LIBRARY_PATH=/usr/lib/libiodbc.dylib);
putenv(ODBCINSTINI=/Library/ODBC/odbcinst.ini);
putenv(ODBCINI=/Library/ODBC/odbc.ini); //odbc.ini contains your DSNs.
$dsn=DSNname; // this is a valid DSN can be tested in odbctest
$user=name;
$password=password;
$sql=SELECT * FROM tblDepartments;
$conn=odbc_connect($dsn,$user,$password) or die (pcouldn't
connect);
echo connected to DSN: $dsn;
echo BRbSQL:/b $sqlBR;
//$results = odbc_exec($conn,$sql) or die(p captured
.odbc_errormsg()); $results = odbc_tables($conn) or
die(P.odbc_errormsg());
odbc_result_all($results) or die(ppulling result error);
echo closing connection $conn;
odbc_close($conn);
odbc_close_all();
?
Don Myers
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php