Reply to Re: [PHP] problem connecting php and mysql

Your name:

Reply:


Posted by Prathaban Mookiah on 10/26/55 11:14

Hi,

I had this same problem and I followed the the following instructions found in
the online manual on installing PHP for windows:

================

If you've run other versions of PHP in the past and are having trouble
upgrading to PHP5, particularly in loading the dynamic link library
'php_mysql.dll' (despite following all the guidance in this documentation),
try the following:

1.) REMOVE old copies of 'libmysql.dll' from your WINDOWS and
WINDOWS\system32 folders (check BOTH places).

2.) Verify that your System Path is correctly configured to search the 'C:
\PHP5' and 'C:\PHP5\ext'. To do this on WinXP, go to your Control Panel, open
System, click Advanced tab, click on Environment Variables, under (lower pane)
'System variables', select 'Path', and then click Edit. Your system path
should look something like:

%SystemRoot%\system32;%SystemRoot%; C:\Program Files\MySQL\MySQL Server 4.
1\bin;C:\PHP5;C:\PHP5\ext;

Because the system path checks the Windows and System32 folders for dll's
*before* checking the PHP folder, old copies of php_mysql.dll will load up
first and foul your PHP initialization if you don't remove them.

===============

Hope this helps.

Prathap

---------- Original Message -----------
From: rahot man <rahot1983@gmail.com>
To: php-general@lists.php.net
Sent: Tue, 26 Apr 2005 11:11:38 +0530
Subject: [PHP] problem connecting php and mysql

> I have windows server 2003, PHPv5.0.3, Mysql v4.1 and IIS 6 and i am
> working in Macromedia Dreamweaver MX2004
>
> i am unable to connect to the mysql server. but my php files are running
> fine and my mysql server is also running fine.
>
> i) i had changed the php.ini-dist file to php.ini.
> ii)i uncommented the extensions of php_mysql.dll in php.ini file
> iii)i set the extensions_dir to
> extension_dir = "D:\PHP\php-5.0.3\ext\" in php.ini file
> iv)i had copied the libmysql.dll in windows\system32 and windows\system
> v)i also copied the php_mysql.dll to D:\PHP\
>
> i wrote the following code:
> <?php
> $dbhost = "localhost";
> $dbusername = "root";
> $dbpassword = "admin";
> $dbname = "test";
> $connect = @mysql_connect ( $dbhost,$dbusername,$dbpassword ) or
> die ("Could not connect ".mysql_error());
> mysql_select_db($dbname,$connect) or
> die("Could not select database".mysql_error());
> ?>
>
> but after all these i am still getting the error
> Fatal error: Call to undefined function mysql_connect() in
> D:\PHP\teknohub\new.php on line 14
>
> please help me to solve this problem out
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
------- End of Original Message -------

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация