Page 1 of 1

undefined function mysqli_connect() (Win7/32) 1.7.7 [SOLVED]

PostPosted: 10. November 2011 18:05
by argolux
hello,
it's several time that I'm trying to import database from another pc using XAMPP 1.7.7 and phh 5.3.8.
My problem is this:
when I import .sql file and script file on my pc, I obtain follow message:
Fatal error: Call to undefined function mysqli_connect() in C:\xampp\htdocs\prova\categoria.php on line 44

This message of FATAL ERROR appear in every script that I try to view on my browser (mozilla firefox)!!

It's important to say that EXPORTING PC has same configuration of my PC (IMPORTING PC): same S.O. (win 7 32bit) - same antivurus (avast free) - same XAMPP 1.7.7., there aren't problems in EXPORTING PC.

Any errors in php.ini??

Help me please!!
Thanks for response

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 18:30
by Altrea
Please check in your phpinfo() if the mysqli extension is successful activated.

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 18:56
by argolux
How can active mysqli extension??

Thanks

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 19:15
by Altrea
You should first check if it is activated. mysqli is activated by default with XAMPP 1.7.7.

If it is not activated, open your php.ini file and search for the extension
Code: Select all
extension=php_mysqli.dll

if there is a semicolon in front of the line or the whole line is missing, mysqli is deactivated.
Check also if the .dll file is existent in your \xampp\php\ext\ folder.

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 19:52
by argolux
Hi dear Altrea

mysqli is actived
Image

.dll are present in xampp

Image

Ho can solve problem?? :?

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 20:03
by Altrea
without your output from phpinfo() about mysqli ( which you can find at the xampp Administration Page or directly by url http://localhost/xampp/phpinfo.php ) we can't say anything about if it is activated or not.

Maybe there are some informations about that in the \xampp\apache\logs\error.log file too.

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 21:12
by argolux
tell me please how can send you http://localhost/xampp/phpinfo.php, in this way you can check e solve my problem!!

Can you check error.lof please??
http://www.mediafire.com/?i9zgu5zfdhea04q

Thx

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 21:26
by argolux
Check phpinfo.php from here please:

http://www.mediafire.com/?jraraf1i32nhobz

thanks

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 21:34
by Altrea
argolux wrote:Can you check error.lof please??
http://www.mediafire.com/?i9zgu5zfdhea04q


here is the reason for your errors:
error.log wrote:[Thu Nov 10 20:12:53 2011] [notice] Digest: done
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_bz2.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_bz2.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_mbstring.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_mbstring.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_exif.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_exif.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_gd2.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_gd2.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_gettext.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_gettext.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_imap.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_imap.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_mysql.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_mysql.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_mysqli.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_mysqli.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_pdo_mysql.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_pdo_mysql.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_pdo_odbc.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_pdo_odbc.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_pdo_sqlite.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_pdo_sqlite.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_soap.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_soap.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_sockets.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_sockets.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_sqlite.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_sqlite.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_sqlite3.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_sqlite3.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp\\php\\ext\\php_xmlrpc.dll' - Dispositivo non pronto.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_xmlrpc.dll' - Dispositivo non pronto.
in <b>Unknown</b> on line <b>0</b><br />
PHP Warning: Cannot open 'D:\\xampp\\php\\extras\\browscap.ini' for reading in Unknown on line 0


None of your extensions can be loaded.
Please open your php.ini file and search for
Code: Select all
extension_dir =


Check if the path is correct to your php extension dir.
in my case for example the line is
Code: Select all
extension_dir = "C:\xampp\php\ext"


If it is not correct, correct it and reastart your Apache.
And please check if the line is more then once in your php.ini.

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 21:57
by argolux
Big Altrea....problem solved

It's like porn for programmers 8)

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 10. November 2011 22:09
by Altrea
You're very welcome :D

But why is the path wrong. Have you installed XAMPP to another directory and later on moved it?
If so, then please execute your setup_xampp.bat file once to correct other paths too.

Or did you copy the php.ini from another instance?

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 13. November 2011 09:44
by argolux
Hi Altrea,
sorry for delay....yes my php.ini comes from antoher instance.

Re: FATAL ERROR undefined function mysqli_connect() XAMPP 1.

PostPosted: 13. November 2011 09:58
by Sharley
Thanks for your feedback. 8)

Please start a new topic for your phpMyAdmin issue, only one issue per topic:
viewtopic.php?f=16&t=48331

I will now close this topic and mark it is solved.

Best wishes. :)