Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL and PHP 5.0.2

Status
Not open for further replies.

ph34rhk

Technical User
Joined
Nov 9, 2004
Messages
9
Location
US
I've installed PHP 5.0.2 and MySQL 4.1.7, and I did the phpinfo(), but the mysql category isn't showing up. I've read the documentation on php.net, and found this

--with-mysqli=mysql_config_path/mysql_config configuration

but I don't know what to do with it. Do I do something with the command line, or the ini... or what? If the answer is out somewhere in simplified terms, I hope you wouldn't mind posting the link, or if you can help your response would be greatly appreicated.

Thanks
 
There are two MySQL function families, the standard MySQL functions and the improved MysQL function. The standard MySQL functions are used to communicate with MySQL versions below 4.1, the improved functions for MySQL 4.1 and higher.

If you are specifically referencing "--with-mysqli", we're talking about the improved family, and if the function is available will appear in a "mysqli" section of a phpinfo() page.

I recommend you start with the PHP manual pages on the two function families: improved MySQL and standard MySQL


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Interesting, sleipnir.

Is the improved interface only available in PHP5? I haven't messed with 5 yet and I haven't seen much discussion of the interface in the PHP 4 venues.
 
Interesting. Is the improved interface only available in PHP5? This is only the second time I've heard it mentioned.
 
According to the manual, the mysqli_* function family has been available since 4.1.

The problem is that the MySQL communication libraries changed significantly between MySQL 4.0 and MySQL 4.1. This is also related to the problems with Zend's not bundling the communications drivers with their PHP distributions.

It wasn't too much of a problem previously, as MySQL 4.1 was rated (by MySQL, AB) as gamma-revision software so not many were using it. But MySQL has now released 4.1 in a production version beginning with 4.1.7.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Sorry, I forgot to mention that I am trying to do this under Windows Server 2003.
 
Are you compiling the software on that machine, or using precompiled executables?

The instruction

--with-mysqli=mysql_config_path/mysql_config configuration

only applies when compiling the software from source.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Yeah, I noticed that after I posted. I'm using precomiled executables.
 
In that case, you need the MySQL dll and configure PHP to use it through the use of an "extension" statement in php.ini.

I know the Win32 binaries zip file has both php_mysql.dll and php_mysqli.dll in it.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I referenced the php_mysqli.dll in the php.ini folder, and now when I try to load my page I get the following error:

"PHP Startup: Unable to load dynamic library 'C:\php\ext\php_mysqli.dll' - Access is denied"

There are no special permissions or anything on this file, I'm pretty sure that I referenced the directory for extensions properly. I restarted IIS, and still get the same error.
 
There's not much under installation in the mysqli section of the manual. But the mysql section includes:

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.


Where does the dll reside?


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
It is located in the Windows system directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top