DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th November 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Default PHP with mysqli?

Hi everyone,
I am getting the following error from php -v
Code:
[disappearedng@192 /usr/home/disappearedng]$ php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 
'/usr/local/lib/php/20060613-debug/php_mysqli.so' - Cannot open 
"/usr/local/lib/php/20060613-debug/php_mysqli.so" in Unknown on line 0
And in php.ini under /usr/local/etc/, I have uncommented the extension of mysqli in extension=php_mysqli.so.

I have installed the php-mysqli port.

I tried to load my web page which gives me

Fatal error: Class 'mysqli' not found in

Any idea why php is not loading mysqli?
Reply With Quote
  #2   (View Single Post)  
Old 5th November 2008
disappearedng disappearedng is offline
Shell Scout
 
Join Date: May 2008
Posts: 128
Default

Ok I installed the php-extensions with mysqli installed.

However, I am still unable to load mysqli with the following error:


Fatal error: Class 'mysqli' not found in /usr/home/disappearedng/eclipse-workspace/Ajax_Building_Responsive_Web_Applications/foundations/mysql/index.php on line 13
Reply With Quote
  #3   (View Single Post)  
Old 5th November 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

You don't need to manually add extensions to /usr/local/etc/php.ini, the ports system automaticlly adds extensions to /usr/local/etc/php/extensions.ini, you just need to restart your webserver and it works (You did restart your webserver, right?)

Quote:
I have uncommented the extension of mysqli in extension=php_mysqli.so.
I think you uncommented extension=php_mysql.dll, which is only for MS Windows systems.

You can check if the mysqli extension is loaded with this PHP code:
Code:
var_dump(extension_loaded('mysqli'));
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:30 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick