Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-27-2012, 12:35 AM   PM User | #1
lilmousiee
New Coder

 
Join Date: Nov 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
lilmousiee is an unknown quantity at this point
Smile Class 'mysqli' not found

Ok I researched EVERYWHERE on the Internet and I just can't get this to work.

In my php.ini under my WAMP php folder, I have this (enabling the extensions):

Code:
;extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll      
;extension=php_oci8_11g.dll 
;extension=php_openssl.dll
Error:

Code:
Fatal error: Class 'mysqli' not found in C:\wamp\www\Elvonica\class\Database.php on line 11
I have both the .dll's enabled.
And then there is this crazy libmysqli.dll or something you're suppose to put somewhere.. I searched my whole C:/ directory for that file and it didn't find anything. I even searched for "lib" "mysql". Nothing. :/
Then they said phpinfo(); should have a MySqlI section and I can't find any so I have a feeling I don't even have mysqli extension or something. But when I look under the ext folder in the php folder of WAMP, both files are there and I have them enabled in the php.ini.

So what am I doing wrong? Thank you soooo much for anyone who can help me solve this!!
lilmousiee is offline   Reply With Quote
Old 02-27-2012, 02:24 AM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
libmysql.dll isn't required as of 5.3+. If you are on a 5.3+ system then it is not required.
Has the path to your PHP installation directory been added to the system path? All ext needs is php_mysqli.dll.
Check the apache error logs. During startup it will likely trigger an error indicating that it cannot find / load php_mysql.dll.
Fou-Lu is offline   Reply With Quote
Old 03-01-2012, 05:34 PM   PM User | #3
lilmousiee
New Coder

 
Join Date: Nov 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
lilmousiee is an unknown quantity at this point
Yes I have 5.3+. I know you don't need that file anymore. Is that why I can't find it anywhere on my C: drive?
And how do you check your system path? Which file is that in? php.ini?

The only error the Apache error log is throwing is this:
Quote:
[Thu Mar 01 12:31:57 2012] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico
lilmousiee is offline   Reply With Quote
Old 03-01-2012, 05:42 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
System path is an OS directive. You can check your environment or echo %PATH% on a CLI.

Run a phpinfo() and look for the loaded php.ini. Is that the one you have modified?
Also, as daft as this may sound I assumed you restarted apache after the change?
Fou-Lu is offline   Reply With Quote
Old 03-02-2012, 03:44 AM   PM User | #5
lilmousiee
New Coder

 
Join Date: Nov 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
lilmousiee is an unknown quantity at this point
Quote:
Originally Posted by Fou-Lu View Post
System path is an OS directive. You can check your environment or echo %PATH% on a CLI.

Run a phpinfo() and look for the loaded php.ini. Is that the one you have modified?
Also, as daft as this may sound I assumed you restarted apache after the change?
Yes the one I have is this:
Quote:
Loaded Configuration File C:\wamp\bin\apache\Apache2.2.21\bin\php.ini
And that php.ini file in the Apache bin looks like this:

Quote:
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
That's the include_path stuff. I don't know what to do there.
But here is the extensions as well:

Quote:
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
extension=php_mbstring.dll
;extension=php_exif.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_ming.dll
;extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_oci8_11g.dll
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_phar.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sqlite3.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
lilmousiee is offline   Reply With Quote
Old 03-02-2012, 02:13 PM   PM User | #6
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
include_path does not require configuring. What of extension_dir, is that pointing at the path to PHP extensions?
also, you haven't verified that the apache has been restarted.
Fou-Lu is offline   Reply With Quote
Old 03-04-2012, 04:40 PM   PM User | #7
lilmousiee
New Coder

 
Join Date: Nov 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
lilmousiee is an unknown quantity at this point
In the php.ini file, the extension_dir is pointing towards this:

Quote:
extension_dir = "c:/wamp/bin/php/php5.3.9/ext/"
I checked the ext directory inside the php5.3.9 folder and it has the mysqli and mysqli dll files in there. Sooooo I don't know. :/ Everything seems to be working well, but it won't find it for some odd reason.

And yes, I restarted Apache. Well I restarted Wamp services.. I think that would restart Apache as well.
lilmousiee is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 +1. The time now is 03:01 AM.


Advertisement
Log in to turn off these ads.