LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-12-2003, 10:38 AM   #1
cmfarley19
Member
 
Registered: Nov 2002
Location: Central VA
Distribution: Ubuntu/Debian
Posts: 228

Rep: Reputation: 32
PHP/MySql Error


Some time ago I had written a simple PHP/MySql address book application. It worked quite well. The last time I reformatted and reinstalled a new distro, I forgot to back up the db before hand so it is gone. I am trying to reverse engineer the db from the code and am pretty close. I am getting an error when bring up the page that I am unsure about.

Warning: Address is not in a.b.c.d form in /var/www/html/phpscripts/ip.php on line 46

Here are lines 45 & 46:
PHP Code:
if(!(@ mysql_select_db($dbName$connection )))
        
showerror(); 
showerror() is a function contained in an include file. It is the only function in the include file.
Here is error.inc:
PHP Code:
<?
    
function ShowError()
    {
        die( 
"Error ".mysql_errno()." : ".mysql_error());
    }
?>
The function should just display the MySQl error code and error info.

Any thoughs?
 
Old 05-12-2003, 10:55 AM   #2
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Rep: Reputation: 30
Has your ip address and/or your hostname changed since? If so, that could explain the error...
 
Old 05-12-2003, 10:57 AM   #3
cmfarley19
Member
 
Registered: Nov 2002
Location: Central VA
Distribution: Ubuntu/Debian
Posts: 228

Original Poster
Rep: Reputation: 32
They have.
How does that explain the error?
 
Old 05-12-2003, 11:05 AM   #4
vous
Member
 
Registered: Mar 2003
Location: Macondo
Distribution: Mandrake 9.1, 10.1, SuSE 8.1 pro, 10.1, Red Hat 8.0/9.0
Posts: 380

Rep: Reputation: 30
Your connection may not be in the a.b.c.d format it is expecting, or it might be using names/ip that are not valid anymore for starters. Have you doubled checked that the connection is using the right parameters?
 
Old 05-12-2003, 12:26 PM   #5
cmfarley19
Member
 
Registered: Nov 2002
Location: Central VA
Distribution: Ubuntu/Debian
Posts: 228

Original Poster
Rep: Reputation: 32
Your advice made me examine the error a little more closely. This was not trelated to PHP/MySql at all, but a small syntax error.

Problem solved.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
php-mysql error jkmartha Linux - Newbie 4 04-29-2005 04:40 AM
php, mysql error Alexander.s Programming 6 04-26-2005 04:51 PM
Error connecting to MySQL from PHP anindyanuri Linux - Software 18 04-24-2005 09:30 AM
PHP-MySQL Weird Error Fordor Slackware 2 02-24-2005 12:01 PM
PHP 4.3.1 Make Error with MYSQL SForsgren Linux - Software 2 05-23-2003 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration