[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Php and MySQL

Posted on 2005-04-08
10
Medium Priority
?
1,539 Views
Last Modified: 2013-12-12
Hi Experts,

I'm trying to install PunBB. But, when i'm trying to save the DB settings in 127.0.0.1/forum/install.php... i got this error: "This PHP environment doesn't have MySQL support built in. MySQL support is required if you want to use a MySQL database to run this forum. Consult the PHP documentation for further assistance."

The specs:
Platform: WindowsXP
Server: Apache (last version)
PHP: php4.1
forum: PunBB (last version)

do i need to add something in php.ini? or in httpd.conf?

thanks you for any suggestions..

Mart.
0
Comment
Question by:m_renaud
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 9

Expert Comment

by:AlanJDM
ID: 13735345
You need to install MySQL and configure Apache and PHP to use it.


Alan
0
 
LVL 9

Expert Comment

by:AlanJDM
ID: 13735356
Download of MySQL can be found here....

http://dev.mysql.com/downloads/index.html


Alan
0
 
LVL 7

Accepted Solution

by:
Promethyl earned 1200 total points
ID: 13735537
# From Mysql.org:

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.

Ok. So...

LXXIX. MySQL Functions
Introduction

These functions allow you to access MySQL database servers. More information about MySQL can be found at http://www.mysql.com/.

Documentation for MySQL can be found at http://dev.mysql.com/doc/.
Requirements

In order to have these functions available, you must compile PHP with MySQL support.
Installation

By using the --with-mysql[=DIR] configuration option you enable PHP to access MySQL databases.

In PHP 4, the option --with-mysql is enabled by default. To disable this default behavior, you may use the --without-mysql configure option. Also in PHP 4, if you enable MySQL without specifying the path to the MySQL install DIR, PHP will use the bundled MySQL client libraries. In Windows, there is no DLL, it's simply built into PHP 4. Users who run other applications that use MySQL (for example, auth-mysql) should not use the bundled library, but rather specify the path to MySQL's install directory, like so: --with-mysql=/path/to/mysql. This will force PHP to use the client libraries installed by MySQL, thus avoiding any conflicts.

In PHP 5, MySQL is no longer enabled by default, nor is the MySQL library bundled with PHP. Read this FAQ for details on why.

    Note: Windows users will need to enable php_mysql.dll inside of php.ini and either copy libmysql.dll into the Windows system directory, or make it available to the PATH.

    This will fix "Unable to load dynamic library './php_mysql.dll'" errors.

For compiling, simply use --with-mysql=[DIR] where [DIR] points to your MySQL installation directory.

This MySQL extension doesn't support full functionality of MySQL versions greater than 4.1.0. For that, use MySQLi.

If you would like to install the mysql extension along with the mysqli extension you have to use the same client library to avoid any conflicts.

Warning

Crashes and startup problems of PHP may be encountered when loading this extension in conjunction with the recode extension. See the recode extension for more information.

... end quote.

I believe the WIndows version comes with the dll, you just uncomment the appropriate line in php.ini under Windows. On linux, a configure, make clean, make, make install is required.

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:m_renaud
ID: 13735762
i'm sorry i forgot to tell you that MySQL4.1 is installed!! :|
0
 
LVL 3

Assisted Solution

by:AndyWHV
AndyWHV earned 800 total points
ID: 13736336
like Promethyl already said...

check that mysql.dll is uncommented in your php.ini

just open your php.ini in an editor search for mysql.dll
and uncomment it.

before:
#extension = mysql.dll;

after:
extension = mysql.dll;

after you did this, mysql support should be enabled.
you can check it in phpinfo
0
 
LVL 3

Author Comment

by:m_renaud
ID: 13741169
Hi AndyWHV,

there is no "#extension = mysql.dll;" is the php.ini file...
but only ";extension=php_mysql.dll"

thks!
0
 
LVL 3

Author Comment

by:m_renaud
ID: 13741182
and i'm sorry... i'm using php5 not php4 (i'm so dumb!)..

thks again!
0
 
LVL 7

Expert Comment

by:Promethyl
ID: 13741191
Remove the ; before the "extension=php_mysql.dll", save the file. Restart apache or IIS (whichever webserver you may happen to have) and give it a shot!
0
 
LVL 3

Author Comment

by:m_renaud
ID: 13741731
Yes it's what i have done...
but i had to add  extension_dir = "C:\PHP\ext" in the php.ini file.
now it's work!!!

thank you to each of you...
i'll split the points!!

Thks again

Mart.

0
 
LVL 7

Expert Comment

by:Promethyl
ID: 13741821
Thank you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month18 days, 14 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question