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.
Mysql connection problem
Moderator: General Moderators
which version of php do you use?
Code: Select all
<?php echo phpversion(), ' : ', php_sapi_name(); ?>Mysql connection problem
thanks for your reply. i'm using:
php 5.1.4
apache2handler
php 5.1.4
apache2handler
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.
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.
Re: thanks
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