Hi Mike 
 
I am using the same book and am very much a newbie also, I had loads of 
problems just like your having. The best way I think just to set it up and run 
programs is to use Easyphp. You can get it at www.easyphp.org. It will install 
everything for you (php, mysql + apache) in one package. 
 
Hope this helps
 
Vikas
[EMAIL PROTECTED] wrote:

php-db Digest 7 Feb 2005 14:55:25 -0000 Issue 2811

Topics (messages 38485 through 38486):

Newbie Setup Trouble
38485 by: Mike Rondeau

mysqli connection problem
38486 by: Denis Gerasimov

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
php-db@lists.php.net


----------------------------------------------------------------------


> ATTACHMENT part 2 message/rfc822 
To: php-db@lists.php.net
From: "Mike Rondeau" 
Date: Sun, 6 Feb 2005 17:57:17 -0800
Subject: Newbie Setup Trouble

Hello,

I have just begun study of using PHP, MySQL and Apache server. Right now 
I'm following a book, "PHP and MySQL For Dummies" and am having trouble 
already. I must be a REAL dummy! I have installed all 3 programs but 
something is not right somewhere. Being so new to this I am having a real 
time trying to figure out which program is messed up. Certain things work, 
but others don't.

For instance, my book told me how to make a phpinfo.php page, which works 
fine. But it also tells me to create some other pages to test if PHP and 
MySQL are working or not. I followed the scripts provided exactly but keep 
getting syntax errors, even though the script is just what the authors 
wrote. For instance, it said to make a page and call it mysql_up.php. Here's 
the script for it:





$host="localhost";
$user="blablablabla";
$password="blablabla";

mysql_connect($host,$user,$password);
$sql="show status";
$result = mysql_query($sql);
if ($result == 0)
{
echo "Error " . mysql_errno() . ": "
. mysql_error() . "";
}
else
{
?>


Variable_nameValue

for ($i = 0; $i < mysql_num_rows($result); $i++) {
echo "";
$row_array = mysql_fetch_row($result);
for ($j = 0; $j < mysql_num_fields($result); $j++)
{
echo "" . $row_array[$j] . "";
}
echo "";
}
?>






But when I open it in my browser I get this error:

Fatal error: Call to undefined function mysql_connect() in C:\Program 
Files\Apache Group\Apache2\htdocs\mysql_up.php on line 10

Could anyone of you smart people point me in the right direction? I'd be 
pulling my hair out if I had any left :)



I can't make any progress with this study until I know my 3 programs are 
talking to eachother properly, but my book gives no info on this error.

Thanks a millionfold for any advice, and I appologise for the length of 
this post.

Sincerely,
Mike Rondeau 


> ATTACHMENT part 3 message/rfc822 
From: "Denis Gerasimov" 
To: 
, "MySQL General List" ,
"PHP General List" 

Date: Mon, 7 Feb 2005 17:52:50 +0300
Subject: mysqli connection problem


Hello,

This question was asked many times, but I can't find a good answer.
I am getting this error message while trying to connect to MySQL server (PHP
+ PEAR::DB_DataObject):

"Can't connect to local MySQL server through socket '' (111)"

(notice '' - is that right?)

Does anyone have any ideas about how to get rid of this error?

Configuration:
* RedHat Enterprise Linux AS3
* Apache 2.0.46
* PHP 5.0.2
* MySQL 4.1.9, mysqli ext.

Thanks!

                
---------------------------------
 ALL-NEW Yahoo! Messenger - all new features - even more fun!  

Reply via email to