Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 3rd, 2005, 07:13 PM
Registered User
Join Date: Apr 2005
Location: Clayton, NC, .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP script for MySQL yields white screen


When I try to execute the script below from my company's intranet server, I get a white screen. When I run it on a different web server, it works. Does anyone know why this might be? Is it a "port" that I need to open?

I'm also using PHP5 and MySQL 4.1.13a-nt (I think) on the server where I'm having the problem.

It's working on my personal website's server with PHP 4.3.11 and MySQL 4.0.25 standard.

Here's the script. Thanks in advance!! Josh

$link_id = mysql_connect("localhost", "phpuser", "phppass");
$result = mysql_list_dbs($link_id);
$num_rows = mysql_num_rows($result);

while($db_data = mysql_fetch_row($result)) {
        echo $db_data[0]. "<BR>";
        $result2 = mysql_list_tables($db_data[0]);
        $num_rows2 = mysql_num_rows($result2);
        while($table_data = mysql_fetch_row($result2)) echo "--" . $table_data[0]. "<BR>";
        echo "==> $num_rows2 table(s) in " . $db_data[0] . "<P>";

Josh Gilliam
Reply With Quote
  #2 (permalink)  
Old November 18th, 2005, 03:21 AM
Friend of Wrox
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul

I recommend you using mysql_fetch_array() lieu mysql_fetch_row().

To know about errors, just use ini_set('display_errors', '1'); in top of code.

Support Indian students' finances http://scholarship.mediasworks.com/
Reply With Quote
  #3 (permalink)  
Old November 30th, 2005, 01:33 PM
Friend of Wrox
Join Date: Jul 2003
Location: South San Francisco, CA, USA.
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post

On your personal server you are using 3.23/4.0 mysql version.
The password field number of characters on the old version is 16 byte compared
to 4.1 mysql version of 39/40 byte. When connecting to a mysql database,
your password is always encrypted to the number to bytes for that mySql server. Try on your new version 'localhost', 'root', ''. This is the administrator's default. When you are connected, delete and create your old username and password.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intermittent Freeze Crystal 8 to White Screen SyraJohn Crystal Reports 4 March 3rd, 2007 11:13 AM
login screen in struts and mysql database mill3prog7@yahoo.co.in Struts 1 May 4th, 2006 09:07 AM
Screen Size and Java Script srotondo Classic ASP Professional 5 December 20th, 2004 07:24 PM
How to script search form in PHP/MYSQL javabeans PHP How-To 0 January 12th, 2004 03:53 AM
Call and run CGI script from a PHP script ... how? dbruins BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 June 10th, 2003 03:09 PM

All times are GMT -4. The time now is 07:29 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.