Mysql Problems
Moderator: General Moderators
Mysql Problems
Im running my IIS on my windows XP machine and I have recently installed PHP and MySql. However when I attempt to open a database:
$db=mysql_connect("localhost", "root","**EDITED**");
I recive an error:
Fatal error: Call to undefined function mysql_connect()
When I looked further by using phpinfo() I am not able to find any mention of MySql. I have tried reinstalling MySql, and nothing has changed. Any idea of what my problem is??
Thanks!
-Colin J
$db=mysql_connect("localhost", "root","**EDITED**");
I recive an error:
Fatal error: Call to undefined function mysql_connect()
When I looked further by using phpinfo() I am not able to find any mention of MySql. I have tried reinstalling MySql, and nothing has changed. Any idea of what my problem is??
Thanks!
-Colin J
What version of PHP did you install?
If you downloaded version 5, note that the mysql libraries are no longer included. Here's the link.
http://www.php.net/manual/en/migration5.databases.php
If you downloaded version 5, note that the mysql libraries are no longer included. Here's the link.
http://www.php.net/manual/en/migration5.databases.php
There were some changes in PHP 5 regarding databases (MySQL and SQLite).
In PHP 5 the MySQL client libraries are not bundled, because of license problems and some others. For more information, read the FAQ entry.
There is also a new extension, MySQLi (Improved MySQL), which is designed to work with MySQL 4.1 and above.
Since PHP 5, the SQLite extension is built-in PHP. SQLite is an embeddable SQL database engine and is not a client library used to connect to a big database server (like MySQL or PostgreSQL). The SQLite library reads and writes directly to and from the database files on disk.
I found the error as addressed by MySql
Site http://dev.mysql.com/doc/mysql/en/php-problems.html
"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. "
How do I "recompile PHP with built-in MySQL support"?
Thanks!
-Colin J
Site http://dev.mysql.com/doc/mysql/en/php-problems.html
"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. "
How do I "recompile PHP with built-in MySQL support"?
Thanks!
-Colin J
If you don't know anything about compiling, I would suggest you downgrade to PHP4, which has support for MySQL.
You can check out this link on how to compile it on a Windows system. I only took a glance and I think it does not teach you how to compile it with MySQL support.
http://www.php.net/manual/en/install.wi ... ilding.php
You can check out this link on how to compile it on a Windows system. I only took a glance and I think it does not teach you how to compile it with MySQL support.
http://www.php.net/manual/en/install.wi ... ilding.php
- Mastermind
- Forum Commoner
- Posts: 36
- Joined: Thu Mar 10, 2005 2:38 am
- Location: CDO,Philippines
- Contact:
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: