Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

PHP 5.0 and MYSQL

 
   Database Forums (Home) -> PHP RSS
Next:  using applet it is throwing exception  
Author Message
Peter W Johnson

External


Since: Aug 16, 2005
Posts: 2



(Msg. 1) Posted: Mon Aug 15, 2005 11:55 pm
Post subject: PHP 5.0 and MYSQL
Archived from groups: alt>php (more info?)

Hi Guys,

I have just upgrade my FC3 to FC4 and included was php 5.0. This apparently
doesn't have the mysql client files that php 4.0 used to. I have enabled the
mysql.so module in the mysql.ini file in /etc/php.d but still cannot get
mysql to talk to php. Is there anything else I can try other than configure
php from tarballs rather than rpm's?

Cheers

Peter.

 >> Stay informed about: PHP 5.0 and MYSQL 
Back to top
Login to vote
Michael Phipps

External


Since: Jul 24, 2005
Posts: 2



(Msg. 2) Posted: Tue Aug 16, 2005 12:55 am
Post subject: Re: PHP 5.0 and MYSQL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> Hi Guys,
>
> I have just upgrade my FC3 to FC4 and included was php 5.0. This
> apparently doesn't have the mysql client files that php 4.0 used to. I
> have enabled the mysql.so module in the mysql.ini file in /etc/php.d but
> still cannot get mysql to talk to php. Is there anything else I can try
> other than configure php from tarballs rather than rpm's?
>

Don't you mean get PHP to talk to MySQL?

What PHP code are you using to test the MySQL connection?

 >> Stay informed about: PHP 5.0 and MYSQL 
Back to top
Login to vote
Peter W Johnson

External


Since: Aug 16, 2005
Posts: 2



(Msg. 3) Posted: Tue Aug 16, 2005 3:55 am
Post subject: Re: PHP 5.0 and MYSQL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sorry Michael,

How about communicate between them!

This is the code I am using:-

<?php
$dbcnx = mysql_connect("localhost", "user", "password");
mysql_select_db("maintable");
$result = mysql_query("SELECT * FROM test");
while ($data = mysql_fetch_array($result)) {
do something
}
?>

This works fine on my FC3 machine but not on the FC4 machine.

Cheers

Peter


"Michael Phipps" wrote in message

>> Hi Guys,
>>
>> I have just upgrade my FC3 to FC4 and included was php 5.0. This
>> apparently doesn't have the mysql client files that php 4.0 used to. I
>> have enabled the mysql.so module in the mysql.ini file in /etc/php.d but
>> still cannot get mysql to talk to php. Is there anything else I can try
>> other than configure php from tarballs rather than rpm's?
>>
>
> Don't you mean get PHP to talk to MySQL?
>
> What PHP code are you using to test the MySQL connection?
>
>
>
 >> Stay informed about: PHP 5.0 and MYSQL 
Back to top
Login to vote
Good Man

External


Since: Sep 04, 2003
Posts: 99



(Msg. 4) Posted: Wed Aug 17, 2005 3:57 pm
Post subject: Re: PHP 5.0 and MYSQL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Peter W Johnson" wrote in


> Sorry Michael,
>
> How about communicate between them!
>
> This is the code I am using:-
>
> <?php
> $dbcnx = mysql_connect("localhost", "user", "password");
> mysql_select_db("maintable");
> $result = mysql_query("SELECT * FROM test");
> while ($data = mysql_fetch_array($result)) {
> do something
> }
> ?>
>
> This works fine on my FC3 machine but not on the FC4 machine.

it sure must be hard to debug anything if you don't have any error
messages!

line 2 should be
@ $dbcnx = mysql_connect("localhost", "user", "password") or die ("There
is an error - ".mysql_error()."!");

ask what the error is! it will make fixing it a whole lot easier.

an early guess is that your current mysql setup is using the old mysql
password format while your new setup is expecting a new-style mysql
password.
 >> Stay informed about: PHP 5.0 and MYSQL 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
mySQL and PHP - Greetings - Right to the point: I'm using mySQL and PHP on a webhost, and WordPress. ...and I'm very very very new to this stuff. Wordpress is what I'm using to make it easy for my pops to post articles. My index.php uses some code to pull from the..

New to PHP/MySQL - I'm new to PHP and MySQL. I've done a bit of web design but only basic HTML. Many years ago I did do a bit of foxbase/DBase programming and even some VB macros in excel. (probably no use now!) I'm looking to develop simple websites that require user..

--with-mysql ? - Hi I'm trying to link php-4.4.2 with mysql install in special directory, like /usr/newsystem/mysql, but whatever options I try, php always gets linked to version in /usr/local/lib. I've tried several options: --with-mysql=/usr/newsystem/mysql..

PHP--MYSQL--SQL--HELP! - hi pls u used mysql_fetch_row(), and i hve the following table fetched as an example, pls could somone show me how i get "data7" if thats is only what i want to access? thnx lots. ------------------------------ | field1 | field2 | fiel...

PHP & MySQL help - I'm trying to find some code snips that will help those that use my FTP. I'd like to index a drive...say F:\ into the DB; but any search on the front-end will 'relative' the finds to a path w/out the full path (or WHATEVER 'prefix' I define to leave..
   Database Forums (Home) -> PHP All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]