Page 1 of 1

Mysql connection problem

Posted: Thu Aug 10, 2006 5:53 am
by joe28778
hi,
i'm migrating from easyphp to use PHP/MySQL and Apache as different units. i have install everything and the are all working fine. the problem occurs when i'm trying to connect to MySql from PHP as i used to do with easyPHP it gives me a fatal error " Class 'mysqli' not found in". i even tried the "mysql_connection()" but still does found that function. i'm stuck here.

Posted: Thu Aug 10, 2006 7:13 am
by volka
which version of php do you use?

Code: Select all

<?php echo phpversion(), ' : ', php_sapi_name(); ?>

Mysql connection problem

Posted: Thu Aug 10, 2006 7:22 am
by joe28778
thanks for your reply. i'm using:
php 5.1.4
apache2handler

Posted: Thu Aug 10, 2006 8:12 am
by volka
If it is a unix/linux/similar system check your distribution wether there is an extra package for mysql/mysqli.
If it is a win32 system check wether you have a directory called ext in your php directory.

Then run the script <?php phpinfo(); ?> and see which php.ini is used.
Open this file with a texteditor.
Search for the line ;extension=php_mysqli. (followed by so or dll)
remove the semicolon and save the file
restart your apache webserver.

An error about libmysql.dll might occur.
If so: windows needs to find this dll for the process that runs php. Therefore the dll has to be in one of some specific locations.
If you have mysql installed on the same win32 system, search for libmysql.dll in the mysql directory and copy it to the apache\bin directory (httpd.exe should be there as well). Then restart the apache again.

thanks

Posted: Thu Aug 10, 2006 10:01 am
by joe28778
thanks very much for your help, it's working now

Re: thanks

Posted: Mon Aug 14, 2006 4:41 am
by joe28778
everything is working fine now nut i now experiencing problem with classes. every class that i include in my code opens as text code instead of exetutable code. i ran the same classes using Easyphp and they worked but after migrating none of them is working. i need some help