HELP: Connection issues PHP/MySQL

A

Anonymous

Guest
try
Code:
<?php
phpinfo();
?>

and see if mysql module is enabled.
otherwise u need to enable it in the php.ini file
 
okej... first question: what versions of php and mysql,
second question: did u configure Apache to use PHP?

If you use PHP5 -- you will need to load mysql or mysqli module to use databases...

php_mysql.dll is for MySQL<=4.0
php_mysqli.dll is for MySQL >= 4.1

Please chck that and would be good if we get more info
 
Or you may use php_mysql.dll as well as PHP5 has support for both and there is a very easy way to configure mysql to work with old dlls as well..
 
Hi, I just started playing with php and can't connect it to mysql. I'm missing the php_mysql.dll (also php_mysqli.dll), it's not in the extensions folder (I downloaded php-4.4.0-Win32.zip from php.net) ... is it suppose to be there? I have enabled php_mysqli.dll and now when I start apache I get this message:

Unknown(): Unable to load dynamic library '.php_mysql.dll - The specified module could not be found

:help: Thanks very much in advance!
 
download the PECL extentions zip as well: however its a bit weird that mysql library is not there. mysqli will NOT be there as its only for PHP5
 
Thanks for your reply Alexei :)

There is no PECL zip file in php.net for php 4, so I dowoloaded the one for php 5. The dll files are not there either! I'm looking for php_mysql.dll and libmySQL.dll. Right now I'm using the libmySQL.dll file that came with mySQL, because it didn't came with the php4 download.

Summarzing: php_mysql.dll and libmySQL.dll are NOT included in the php-4.4.0-Win32.zip file that can be downloaded from php.net. I think I need those files so it doesn't show the message "Unknown(): Unable to load dynamic library '.php_mysql.dll - The specified module could not be found " when I start Apache. I don't know what to do, I'm just about to give up :-x
 
okey: well...
libmysql.dll comes ONLY with MySQL server

# PHP 4.4.0 zip package [6,807Kb] - 11 Jul 2005
(CGI binary plus server API versions for Apache, Apache2 (experimental), ISAPI, NSAPI, Servlet and Pi3Web. MySQL support built-in, many extensions included, packaged as zip)
md5: bf5dfbda3cbf90609eaac8865145e052

Pecl Extentions are not yet released for 4.4.0


In case you want to use PECL extentions for PHP5 you HAVE to use php5 as well: extentions will ONLY work with the php version they are built for
 
Thanks Alexei. What I don't understand is why when I activate extension=php_mysql.dll (in php.ini) and afterwards I re-start apache, I get the message: "Unknown(): Unable to load dynamic library '.php_mysql.dll - The specified module could not be found "

How can I fix this?? Thanks very much for your patience! :)
 
Error message problem solved ... getting closer! :D

This is what I did: I got rid of PHP 4 and installed PHP 5. I still got the same message, but I copied php_mysqli.dll and php_mysqli.dll in the windows folder and now the message is no longer showing. (I couldn't do that with PHP 4 because those files are not included in the zip package)

BUT, I created a db in mysql, did a test, and just showed a blank page, not even an error message ... what is happening now??? The test query is this:

<?
$db=mysql_connect("localhost","root","*****");
mysql_select_db("prueba",$db);
$query="SELECT * FROM tabla1";
$result=mysql_query($query);
$table=mysql_field_table($result,0)
echo $table;
?>
Any ideas? Thanks very much! :)
 
OK, getting frustrated again ... :-x

This is what I found out: if I add "phpinfo();" at the begining of the script the browser still shows a blank page. BUT, if I eliminate the last "echo $table;" it DOES show the phpinfo() table. If I substitute "echo $table:" by any other echo line like "echo "whatever";", the blank page shows again.

I just started with php and I'm completelly lost ... please help! Thanks very much.
 
hmmz... this is VERY weird..
i think it would be good if you tell us about your server configuration.. also you might need to post your php.ini file.. Im using Apache 2 and php 5.0.4 and therefore am able to configure where my php.ini is placed (in php root folder in my case)

but by default it has to be in c:\Windows folder... dont forget to copy php5ts.dll or what ever it is called to the windows folder as well.
On windows systems it is really hard for the OS to find the Extentions if they are not in the folders defined in PATH variable. What you can do is define C:\PHP in Windows PATH variable and will solve most of the problems.

I hope you followed the guide on http://www.php.net on how to install everything
 
... dont forget to copy php5ts.dll or what ever it is called to the windows folder as well.

THAT WAS IT!!! :D

Thank you VERY MUCH Alexei! :) :? :D
 
Tip for newbies (like me):

The browser will also show a blank page if you just specify the "localhost":

e.g.: $db=mysql_connect("localhost");

You need to specify also the other two parameters:

$db=mysql_connect("localhost","root","password");
 
1;WHat to do in the php.ini file in the WINDOWS folder?

2;I have the ZIP file of php_mysql.dll and libmySQL.dll, where shall i put these files?

3; still the same error found, if I will use the mysqli_connect FATAL ERROR is the result, if mysql_connect, Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client


I use PHP5
MySQL 4.1
Apache 1.3

Need reply please....
 
Back
Top