|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-04-07 00:52 UTC] sniper@php.net
[2001-04-26 04:46 UTC] cardinal@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 20:00:02 2025 UTC |
<?php // If the opendir call is before the connect, an associative array // is NOT returned from mysql_fetch_assoc() - the closedir does not // seem to have any effect on this phenomena. // // It does NOT matter if the code is contained within the if() or // not. If the opendir() call occurs before the mysql_connect() // call, I get a farkled array from mysql_fetch_assoc(). // // Changing the database and/or tables queried does not seem to // make a difference to the bug. // Change the 0 to 1 below to see this bug if (1) { $bizarrevar = opendir("/etc/"); closedir($bizarrevar); unset($bizarrevar); } $dblink = mysql_connect("localhost","user","password"); mysql_select_db("dbname", $dblink); $qresult = mysql_query("SELECT * FROM comment", $dblink); while ($rx = mysql_fetch_assoc($qresult, $dblink)) { while (list($k,$v) = each($rx)) { print(" $k = $v<BR>\n"); } } ?> ------------- End Script ------------ Data from phpinfo(): PHP was copmpiled with './configure' '--with-mysql' '--with-apache=../apache' '--enable-track-vars' Virtual dir support is disabled Apache Info: Apache Version Apache/1.3.19 Apache Release 10319100 Apache API Version 19990320 Loaded Modules mod_php4, mod_setenvif, mod_auth, mod_access, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core MySQL Info: Active Persistent Links 0 Active Links 0 Client API version 3.23.22-beta MYSQL_INCLUDE MYSQL_LFLAGS MYSQL_LIBS mysql.allow_persistent On On mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket no value no value mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited If you need additional information, please feel free to contact me via email at marshall@myself.com :) Thanks