Basic Problem Facing towards..
Hallo Everyone, I'm facing this basic problem for connecting the Mysql4.01 Database using Php5; The browser shows the following error; mysql_connect(localhost, root) or -- Fatal error: Call to undefined function mysql_connect() in D:\Program Files\Apache Group\Apache2\htdocs\mass\connect.php on line 25 Can someone plz help me to sort out this problem. Thanx in advance Regards Shiva ps:- login.php ? if ($submit = Login) { mysql_connect(localhost, root,123sw) or die (Could not connect to database); mysql_select_db(user) or dir (Could not select database); $result=mysql_query(select * from user where username='$username') or die (cant do it); while ($row=mysql_fetch_array($result)) { if ($row[password]==$password ) { printf(Successfully Logged In!); }else{ print(Nope); } } } ? create_entry.php ?php mysql_connect(localhost, root,123sw) or die (Could not connect to database); mysql_select_db(user) or dir (Could not select database); if ($submit = = Register) { $query = insert into user (username, password) values ('$username', '$password'); mysql_query($query) or die (mysql_error()); ? h3You are now registered/h3 a href=index.htmlGo back to main page/a ?php } else { include(not.html); } ? index.html html head h2 User Login /h2 form method=post action=/login.php /head body b br Username br /b input type=text size=15 name=username br b UserPassword /b br input type=text size=15 name=password br input type=submit name=submit value=Login input type=reset name=reset value=Clear br a href=/Register.htmlRegister/a /form /body /html register.html html head h2 User Registration /h2 form method=post action=create_entry.php /head body b br Username br /b input type=text size=15 name=username br b UserPassword /b br input type=password size=15 name=password br input type=submit name=submit value=Register input type=reset name=reset value=Clear /form /body /html
Re: Basic Problem Facing towards..
It seems that you PHP was compiled without mysql-support ... please take a look at the php-documentation. Shiva wrote: Hallo Everyone, I'm facing this basic problem for connecting the Mysql4.01 Database using Php5; The browser shows the following error; mysql_connect(localhost, root) or -- Fatal error: Call to undefined function mysql_connect() in D:\Program Files\Apache Group\Apache2\htdocs\mass\connect.php on line 25 Can someone plz help me to sort out this problem. Thanx in advance Regards Shiva ps:- login.php ? if ($submit = Login) { mysql_connect(localhost, root,123sw) or die (Could not connect to database); mysql_select_db(user) or dir (Could not select database); $result=mysql_query(select * from user where username='$username') or die (cant do it); while ($row=mysql_fetch_array($result)) { if ($row[password]==$password ) { printf(Successfully Logged In!); }else{ print(Nope); } } } ? create_entry.php ?php mysql_connect(localhost, root,123sw) or die (Could not connect to database); mysql_select_db(user) or dir (Could not select database); if ($submit = = Register) { $query = insert into user (username, password) values ('$username', '$password'); mysql_query($query) or die (mysql_error()); ? h3You are now registered/h3 a href=index.htmlGo back to main page/a ?php } else { include(not.html); } ? index.html html head h2 User Login /h2 form method=post action=/login.php /head body b br Username br /b input type=text size=15 name=username br b UserPassword /b br input type=text size=15 name=password br input type=submit name=submit value=Login input type=reset name=reset value=Clear br a href=/Register.htmlRegister/a /form /body /html register.html html head h2 User Registration /h2 form method=post action=create_entry.php /head body b br Username br /b input type=text size=15 name=username br b UserPassword /b br input type=password size=15 name=password br input type=submit name=submit value=Register input type=reset name=reset value=Clear /form /body /html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Basic Problem Facing towards..
I found the below from Php Documentation * Php Manual.Chm * Windows users may enable the extension php_mysql.dll inside php.ini. Also, copy libmySQL.dll into the appropriate %SYSTEMROOT% directory, just like you do with every other bundled DLL from the dll directory My question is : How do I install or enable Mysql-support in Php5? Is there any syntax or command which has to be included in Php.ini; OR any other way to enable mysql-support; I'm using Apache 2, Windows XP , Mysql 4.1, php5; Thank you, Regards Shiva - Original Message - From: Hagen Hoepfner [EMAIL PROTECTED] To: Shiva [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, November 19, 2004 3:26 PM Subject: Re: Basic Problem Facing towards.. It seems that you PHP was compiled without mysql-support ... please take a look at the php-documentation. Shiva wrote: Hallo Everyone, I'm facing this basic problem for connecting the Mysql4.01 Database using Php5; The browser shows the following error; mysql_connect(localhost, root) or -- Fatal error: Call to undefined function mysql_connect() in D:\Program Files\Apache Group\Apache2\htdocs\mass\connect.php on line 25 Can someone plz help me to sort out this problem. Thanx in advance Regards Shiva ps:- login.php ? if ($submit = Login) { mysql_connect(localhost, root,123sw) or die (Could not connect to database); mysql_select_db(user) or dir (Could not select database); $result=mysql_query(select * from user where username='$username') or die (cant do it); while ($row=mysql_fetch_array($result)) { if ($row[password]==$password ) { printf(Successfully Logged In!); }else{ print(Nope); } } } ? create_entry.php ?php mysql_connect(localhost, root,123sw) or die (Could not connect to database); mysql_select_db(user) or dir (Could not select database); if ($submit = = Register) { $query = insert into user (username, password) values ('$username', '$password'); mysql_query($query) or die (mysql_error()); ? h3You are now registered/h3 a href=index.htmlGo back to main page/a ?php } else { include(not.html); } ? index.html html head h2 User Login /h2 form method=post action=/login.php /head body b br Username br /b input type=text size=15 name=username br b UserPassword /b br input type=text size=15 name=password br input type=submit name=submit value=Login input type=reset name=reset value=Clear br a href=/Register.htmlRegister/a /form /body /html register.html html head h2 User Registration /h2 form method=post action=create_entry.php /head body b br Username br /b input type=text size=15 name=username br b UserPassword /b br input type=password size=15 name=password br input type=submit name=submit value=Register input type=reset name=reset value=Clear /form /body /html
Re: Basic Problem Facing towards..
Perhapts this can help: http://www.phpdiscuss.com/article.php?id=24847group=php.windows Shiva wrote: I found the below from Php Documentation * Php Manual.Chm * Windows users may enable the extension php_mysql.dll inside php.ini. Also, copy libmySQL.dll into the appropriate %SYSTEMROOT% directory, just like you do with every other bundled DLL from the dll directory My question is : How do I install or enable Mysql-support in Php5? Is there any syntax or command which has to be included in Php.ini; OR any other way to enable mysql-support; I'm using Apache 2, Windows XP , Mysql 4.1, php5; Thank you, Regards Shiva - Original Message - From: Hagen Hoepfner [EMAIL PROTECTED] To: Shiva [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, November 19, 2004 3:26 PM Subject: Re: Basic Problem Facing towards.. It seems that you PHP was compiled without mysql-support ... please take a look at the php-documentation. Shiva wrote: Hallo Everyone, I'm facing this basic problem for connecting the Mysql4.01 Database using Php5; The browser shows the following error; mysql_connect(localhost, root) or -- Fatal error: Call to undefined function mysql_connect() in D:\Program Files\Apache Group\Apache2\htdocs\mass\connect.php on line 25 Can someone plz help me to sort out this problem. Thanx in advance -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Basic Problem Facing towards..
http://www.yohng.com/phpm/phpm.htm#_Toc42628370 Enabling MySQL API support for Microsoft Windows When running Microsoft Windows, you may run into several issues with PHP itself and MySQL. While C compiler is an essential part of most POSIX- compatible operating systems, Windows system typically doesn't contain any compiler installed. Anyway, compiling PHP under Windows is pain, if you never did this before; so consider downloading Win32-precompiled version from PHP site. The Win32-precompiled version is available for download from official PHP site, and contains MySQL support integrated. I couldnt find any Win32-Precompiled Version from Php.net; Thank you, Regards Shiva ps:- http://dev.mysql.com/doc/mysql/en/PHP_problems.html Still i couldnt fix the problem. 21.3.1 Common Problems with MySQL and PHP a.. Error: Maximum Execution Time Exceeded This is a PHP limit; go into the `php.ini' file and set the maximum execution time up from 30 seconds to something higher, as needed. It is also not a bad idea to double the RAM allowed per script to 16MB instead of 8MB. b.. Error: Fatal error: Call to unsupported or undefined function mysql_connect() in .. This means that your PHP version isn't compiled with MySQL support. You can either compile a dynamic MySQL module and load it into PHP or recompile PHP with built-in MySQL support. This is described in detail in the PHP manual. c.. Error: undefined reference to `uncompress' This means that the client library is compiled with support for a compressed client/server protocol. The fix is to add -lz last when linking with -lmysqlclient. - Original Message - From: Hagen Hoepfner [EMAIL PROTECTED] To: Shiva [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, November 19, 2004 4:34 PM Subject: Re: Basic Problem Facing towards.. Perhapts this can help: http://www.phpdiscuss.com/article.php?id=24847group=php.windows Shiva wrote: I found the below from Php Documentation * Php Manual.Chm * Windows users may enable the extension php_mysql.dll inside php.ini. Also, copy libmySQL.dll into the appropriate %SYSTEMROOT% directory, just like you do with every other bundled DLL from the dll directory My question is : How do I install or enable Mysql-support in Php5? Is there any syntax or command which has to be included in Php.ini; OR any other way to enable mysql-support; I'm using Apache 2, Windows XP , Mysql 4.1, php5; Thank you, Regards Shiva - Original Message - From: Hagen Hoepfner [EMAIL PROTECTED] To: Shiva [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, November 19, 2004 3:26 PM Subject: Re: Basic Problem Facing towards.. It seems that you PHP was compiled without mysql-support ... please take a look at the php-documentation. Shiva wrote: Hallo Everyone, I'm facing this basic problem for connecting the Mysql4.01 Database using Php5; The browser shows the following error; mysql_connect(localhost, root) or -- Fatal error: Call to undefined function mysql_connect() in D:\Program Files\Apache Group\Apache2\htdocs\mass\connect.php on line 25 Can someone plz help me to sort out this problem. Thanx in advance -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Basic Problem Facing towards..
Shiva wrote: http://www.yohng.com/phpm/phpm.htm#_Toc42628370 Enabling MySQL API support for Microsoft Windows When running Microsoft Windows, you may run into several issues with PHP itself and MySQL. While C compiler is an essential part of most POSIX- compatible operating systems, Windows system typically doesn't contain any compiler installed. Anyway, compiling PHP under Windows is pain, if you never did this before; so consider downloading Win32-precompiled version from PHP site. The Win32-precompiled version is available for download from official PHP site, and contains MySQL support integrated. I couldnt find any Win32-Precompiled Version from Php.net; To enable MySQL in PHP, you need to uncomment the extension line for mysql in php.ini. Then, PHP needs to be able to find two files: php_mysql.dll and libmysql.dll. Janet -- Janet Valade -- janet.valade.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]