PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 3rd, 1999, 05:12 AM
Ulrik N
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I have just installed MySql and php3 on my RedHat6.0, and everything seems ok… But this is the error message I get.
I think it must be a configuration problem, but I fail to see where..

Fatal error: Call to unsupported or undefined function mysql_connect() in /home/httpd/html/test.php3 on line 11

Here is the script:

<?php

mysql_connect("localhost", "webuser", "");
$query = "SELECT name, phone FROM mytable";
$result = mysql_db_query("example", $query);

if($result) {
echo "Found these in the db:<ul>";
while ($r = mysql_fetch_array($result)) {
$name = $r["name"];
$phone = $r["phone"];
echo "<li>$name, $phone";
}
echo "</ul>";
} else { echo "No data found!"; }
mysql_free_result($result);

?>


------------------
-ulrik-

Reply With Quote
  #2  
Old October 3rd, 1999, 06:58 AM
Ulf Wendel
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Ulrik,
have you compiled php with mysql support? Check it with phpinfo() and if there's nothing about mysql go for a customized php interpreter.

Ulf

Reply With Quote
  #3  
Old October 3rd, 1999, 05:12 PM
Ulrik N
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Err..
No MySql was mentioned in the phpinfo(). So I guess I don’t have any support for it.
But what is it that you say that I need?(customized php interpreter)? And where do I get It?


------------------
-ulrik-

Reply With Quote
  #4  
Old October 3rd, 1999, 08:49 PM
jpenix
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
MySQL support is included in the PHP package, but you have to specify that it be compiled in. (during PHP 'configure' stage: ./configure --with-apache=/path/to/apache --with-mysql=/path/to/mysql).

If you're using binary RPMs, you should probably uninstall those and do a fresh install of PHP/Apache straight from the source tarballs (downloaded from respective websites).

Reply With Quote
  #5  
Old October 13th, 1999, 04:48 AM
Gianni
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
hello there
I have the same proble, but I'm running php,mysql and apache on an NT machine

any ideas ?

Reply With Quote
  #6  
Old October 18th, 1999, 02:29 AM
rycamor
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Ulrik,

I recognize the script you are trying to run. You probably got it at:

http://www.sfu.ca/~yzhang/linux/webdb/

If you follow carefully all of Ying Zhang's instructions about compiling Apache, PHP, and MySQL, it works every time. Give it a try, but be careful not to miss a step.

Reply With Quote
  #7  
Old October 18th, 1999, 03:18 AM
Ulrik N
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Hi there!

Thanks for all your reply's..
I got it running now.

regards

------------------
-ulrik-

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > MySql, php3 problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT