khaled_akkad — 2011-04-04T14:51:51-04:00 — #1
I'm trying to setup apache v2.2.17 win 32, php v5.2.17 Win32 VC6 and mysql v5.5.10 win 32 on a winxp sp3 computer.
Up till now php is working with well with apache as I write in a .php file
<?php phpinfo(); ?> [\\code] and this results in the beautiful php information page.
Mysql runs well alone as I can read and write data from the mysql workbench v5.2.33b win32. I setup the odbc connector v5.1.8 win32.
The problem is with php and mysql.
I downloaded php_5.2.0_mysql_5.0.27-win32.zip and php_5.2.0_mysqli_5.0.27-win32.zip. I copied both php_mysql.dll and php_mysqli.dll into the php\\ext directory and made sure that they are in the php.ini file "extension=php_mysql.dll extension=php_mysqli.dll".
I also copied the libmysql.dll file from the MySQL\\MySQL Server 5.5\\lib directory and put it in the php\\ext directory and the windows\\system 32 directory.
After doing all of that I still don't see neither the mysql nor the mysqli parts in the phpinfo and when i run any code with the
<?php mysql_connect(); ?> [\code] mysql_connect() function i have the error Fatal error: Call to undefined function mysqli_connect() in D:\setup\Apache Software Foundation\Apache2.2\htdocs\sls\ContentManagement\authentication.php on line 20
can anyone help?
cups — 2011-04-04T16:28:06-04:00 — #2
Can you confirm, did you restart apache between changes to the php.ini file?
khaled_akkad — 2011-04-04T16:54:57-04:00 — #3
thanks for the fast reply cups..i did restart the apache server...actually i restarted the whole pc to make sure after restarting the server a couple of times did no result
cups — 2011-04-04T17:22:03-04:00 — #4
> ... when i run any code with the
<?php mysql_connect(); ?>
mysql_connect() function i have the error Fatal error: Call to undefined function mysqli_connect() in D:\setup\Apache Software Foundation\Apache2.2\htdocs\sls\ContentManagement\authentication.php on line 20
Can you confirm, are you having problems calling:
<?php mysql_connect(); ?>
<?php mysqli_connect(); ?>
I must admit I do not use mysqli, so apart from trying to establish you are not making a really basic error, I cannot advise you any more - apart from sending you to read the manual page again.
It worries me a bit though that you now seem to have more than one version of PHP running on your server. Check your HDD and see how many php.ini files you have installed, if more than one then by a process of elimination (rename the php.ini files as you find them) establish which one is REALLY being picked up by PHP (or inspect the output of phpinfo() VERY closely.
Otherwise, I'm out.
khaled_akkad — 2011-04-04T17:33:54-04:00 — #5
i tried both...and even if it was a syntax mistake in the php code that doesn't explain why mysql don't show in the phpinfo()
i've revised everything maaany times its getting very frustrating..i think it's an error in the files..i've been at this stupid thing for the last 6 hrs
btw..is there a website where i can get php_mysql.dll that is version 5.5 as the mysql server i have?
cups — 2011-04-05T04:15:50-04:00 — #6
Mysqli_* functions are native to PHP5+ IIRC.
mysql_* functions have had to be carefully installed since PHP5.
So which is it that you want to use, mysqli or mysql?
If anyone wants to chip in to this thread, please do, I don't use mysqli.
khaled_akkad — 2011-04-05T04:20:16-04:00 — #7
although a lot of sources say that mysqli functions are more suitable for php versions 5 and more, i want to use mysql...i used it before and it worked..but now it doesn't
khaled_akkad — 2011-04-05T04:24:06-04:00 — #8
sorry for being a nuisance
but i wanted to know a website other than DLL Files for free download where i can redownload php_mysql.dll again.
venkat6134 — 2011-04-05T05:09:12-04:00 — #9
you can enable the dll extensions in the php.ini file.
By default in php.ini file, they are like
You can enable this, by removeing this ';' as,
Then restart the server..