The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
MySql, php3 problems
Discuss MySql, php3 problems in the PHP Development forum on Dev Shed. MySql, php3 problems PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

October 3rd, 1999, 04:12 AM
|
|
Guest
|
|
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-
|

October 3rd, 1999, 05:58 AM
|
|
Guest
|
|
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
|

October 3rd, 1999, 04:12 PM
|
|
Guest
|
|
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-
|

October 3rd, 1999, 07:49 PM
|
|
Guest
|
|
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).
|

October 13th, 1999, 03:48 AM
|
|
Guest
|
|
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 ?
|

October 18th, 1999, 01:29 AM
|
|
Guest
|
|
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.
|

October 18th, 1999, 02:18 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
Hi there!
Thanks for all your reply's..
I got it running now.
regards
------------------
-ulrik-
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|