Date: 07/01/00
- Next message: Gary Regan: "RE: [PHP-DEV] PHP 4.0 Bug #5319: postgres.h, libpq-fe.h, libpq/libpq-fs.hmissing"
- Previous message: Mike Robinson: "RE: [PHP-DEV] PHP 4.0 Bug #5319: postgres.h, libpq-fe.h, libpq/libpq-fs.hmissing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: pete <email protected>
Operating system: Linux 2.2.16/Redhat 6.2
PHP version: 4.0.1
PHP Bug Type: mSQL related
Bug description: msql_connect not working
The msql_connect function does not seem to be returning valid links; however, the msql_pconnect function works.
When running this script:
$conn = msql_connect();
echo "After msql_connect, \$conn=$conn<br>";
msql_select_db("mydb", $conn);
echo "After msql_select_db, \$conn=$conn<br>";
$res = msql_query("SELECT * FROM Collection", $conn);
echo "rows: ".msql_NumRows($res)."<br>";
The output I get is this:
After msql_connect, $conn=1
Warning: Supplied argument is not a valid mSQL-Link resource in xxx.html on line 23
After msql_select_db, $conn=1
Warning: Supplied argument is not a valid mSQL-Link resource in xxx.html on line 25
When running the same script, but replacing msql_connect with msql_pconnect, this is the output:
After msql_connect, $conn=Resource id #3
After msql_select_db, $conn=Resource id #3
rows: 287
Note that in the first case, echoing the mSQL link identifier resulted in an integer, while the second time a string was displayed ("Resource id #3")
PHP is running as a CGI under Roxen 2.0. I get the same result when running as an Apache 1.3.12 module on the same system.
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Gary Regan: "RE: [PHP-DEV] PHP 4.0 Bug #5319: postgres.h, libpq-fe.h, libpq/libpq-fs.hmissing"
- Previous message: Mike Robinson: "RE: [PHP-DEV] PHP 4.0 Bug #5319: postgres.h, libpq-fe.h, libpq/libpq-fs.hmissing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

