lushak Posted November 27, 2017 Share Posted November 27, 2017 Pls Sir, I actually need quick guide as to how to fix this cos I believe I have done everything rightly ranging from placing my files in the right directory and loading from URL. Each time I load the index.php, I always get this: "An error occurred in script 'C:\MAMP\htdocs\e_commerce\mysql.inc.php' on line 16:mysqli_connect(): Headers and client library minor version mismatch. Headers:50541 Library:50634Array( [0] => Array ( [function] => my_error_handler [args] => Array ( [0] => 2 [1] => mysqli_connect(): Headers and client library minor version mismatch. Headers:50541 Library:50634 [2] => C:\MAMP\htdocs\e_commerce\mysql.inc.php [3] => 16 [4] => Array ( [_GET] => Array ( ) [_POST] => Array ( ) [_COOKIE] => Array ( [PHPSESSID] => hc3cgb04kipakka908nrnkf3h2 ) [_FILES] => Array ( ) [_SERVER] => Array ( [UNIQUE_ID] => WhyC1n8AAAEAABSI6a0AAAA6 [HTTP_HOST] => localhost [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; rv:58.0) Gecko/20100101 Firefox/58.0 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_COOKIE] => PHPSESSID=hc3cgb04kipakka908nrnkf3h2 [HTTP_CONNECTION] => keep-alive [HTTP_UPGRADE_INSECURE_REQUESTS] => 1 [HTTP_CACHE_CONTROL] => max-age=0 [PATH] => C:\Python34\;C:\Python34\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2007b\bin;C:\Program Files\MATLAB\R2007b\bin\win32;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\;C:\ProgramData\ComposerSetup\bin;;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Microsoft VS Code Insiders\bin;C:\Users\goodnews\AppData\Roaming\Composer\vendor\bin [SystemRoot] => C:\Windows [COMSPEC] => C:\Windows\system32\cmd.exe [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY [WINDIR] => C:\Windows [SERVER_SIGNATURE] => [SERVER_SOFTWARE] => Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2e mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.0.13 mod_perl/2.0.8 Perl/v5.16.3 [SERVER_NAME] => localhost [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/MAMP/htdocs [SERVER_ADMIN] => testemail@test.com [SCRIPT_FILENAME] => C:/MAMP/htdocs/e_commerce/index.php [REMOTE_PORT] => 51745 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /e_commerce/ [SCRIPT_NAME] => /e_commerce/index.php [PHP_SELF] => /e_commerce/index.php [REQUEST_TIME_FLOAT] => 1511817942.29 [REQUEST_TIME] => 1511817942 ) [live] => [contact_email] => dekalusha@gmail.com [_SESSION] => Array ( ) ) ) ) [1] => Array ( [file] => C:\MAMP\htdocs\e_commerce\mysql.inc.php [line] => 16 [function] => mysqli_connect [args] => Array ( [0] => localhost [1] => root [2] => root [3] => ecommerce1 ) ) [2] => Array ( [file] => C:\MAMP\htdocs\e_commerce\index.php [line] => 15 [args] => Array ( [0] => C:\MAMP\htdocs\e_commerce\mysql.inc.php ) [function] => require )) An error occurred in script 'C:\MAMP\htdocs\e_commerce\mysql.inc.php' on line 16:mysqli_connect(): (HY000/2003): Can't connect to MySQL server on 'localhost' (10061)Array( [0] => Array ( [function] => my_error_handler [args] => Array ( [0] => 2 [1] => mysqli_connect(): (HY000/2003): Can't connect to MySQL server on 'localhost' (10061) [2] => C:\MAMP\htdocs\e_commerce\mysql.inc.php [3] => 16 [4] => Array ( [_GET] => Array ( ) [_POST] => Array ( ) [_COOKIE] => Array ( [PHPSESSID] => hc3cgb04kipakka908nrnkf3h2 ) [_FILES] => Array ( ) [_SERVER] => Array ( [UNIQUE_ID] => WhyC1n8AAAEAABSI6a0AAAA6 [HTTP_HOST] => localhost [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; rv:58.0) Gecko/20100101 Firefox/58.0 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_COOKIE] => PHPSESSID=hc3cgb04kipakka908nrnkf3h2 [HTTP_CONNECTION] => keep-alive [HTTP_UPGRADE_INSECURE_REQUESTS] => 1 [HTTP_CACHE_CONTROL] => max-age=0 [PATH] => C:\Python34\;C:\Python34\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2007b\bin;C:\Program Files\MATLAB\R2007b\bin\win32;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\;C:\ProgramData\ComposerSetup\bin;;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Microsoft VS Code Insiders\bin;C:\Users\goodnews\AppData\Roaming\Composer\vendor\bin [SystemRoot] => C:\Windows [COMSPEC] => C:\Windows\system32\cmd.exe [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY [WINDIR] => C:\Windows [SERVER_SIGNATURE] => [SERVER_SOFTWARE] => Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2e mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.0.13 mod_perl/2.0.8 Perl/v5.16.3 [SERVER_NAME] => localhost [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/MAMP/htdocs [SERVER_ADMIN] => testemail@test.com [SCRIPT_FILENAME] => C:/MAMP/htdocs/e_commerce/index.php [REMOTE_PORT] => 51745 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /e_commerce/ [SCRIPT_NAME] => /e_commerce/index.php [PHP_SELF] => /e_commerce/index.php [REQUEST_TIME_FLOAT] => 1511817942.29 [REQUEST_TIME] => 1511817942 ) [live] => [contact_email] => dekalusha@gmail.com [_SESSION] => Array ( ) ) ) ) [1] => Array ( [file] => C:\MAMP\htdocs\e_commerce\mysql.inc.php [line] => 16 [function] => mysqli_connect [args] => Array ( [0] => localhost [1] => root [2] => root [3] => ecommerce1 ) ) [2] => Array ( [file] => C:\MAMP\htdocs\e_commerce\index.php [line] => 15 [args] => Array ( [0] => C:\MAMP\htdocs\e_commerce\mysql.inc.php ) [function] => require )) An error occurred in script 'C:\MAMP\htdocs\e_commerce\mysql.inc.php' on line 19:mysqli_set_charset() expects parameter 1 to be mysqli, boolean given Array( [0] => Array ( [function] => my_error_handler [args] => Array ( [0] => 2 [1] => mysqli_set_charset() expects parameter 1 to be mysqli, boolean given [2] => C:\MAMP\htdocs\e_commerce\mysql.inc.php [3] => 19 [4] => Array ( [_GET] => Array ( ) [_POST] => Array ( ) [_COOKIE] => Array ( [PHPSESSID] => hc3cgb04kipakka908nrnkf3h2 ) [_FILES] => Array ( ) [_SERVER] => Array ( [UNIQUE_ID] => WhyC1n8AAAEAABSI6a0AAAA6 [HTTP_HOST] => localhost [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; rv:58.0) Gecko/20100101 Firefox/58.0 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_COOKIE] => PHPSESSID=hc3cgb04kipakka908nrnkf3h2 [HTTP_CONNECTION] => keep-alive [HTTP_UPGRADE_INSECURE_REQUESTS] => 1 [HTTP_CACHE_CONTROL] => max-age=0 [PATH] => C:\Python34\;C:\Python34\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2007b\bin;C:\Program Files\MATLAB\R2007b\bin\win32;C:\Windows\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\;C:\ProgramData\ComposerSetup\bin;;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Microsoft VS Code Insiders\bin;C:\Users\goodnews\AppData\Roaming\Composer\vendor\bin [SystemRoot] => C:\Windows [COMSPEC] => C:\Windows\system32\cmd.exe [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY [WINDIR] => C:\Windows [SERVER_SIGNATURE] => [SERVER_SOFTWARE] => Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2e mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.0.13 mod_perl/2.0.8 Perl/v5.16.3 [SERVER_NAME] => localhost [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/MAMP/htdocs [SERVER_ADMIN] => testemail@test.com [SCRIPT_FILENAME] => C:/MAMP/htdocs/e_commerce/index.php [REMOTE_PORT] => 51745 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /e_commerce/ [SCRIPT_NAME] => /e_commerce/index.php [PHP_SELF] => /e_commerce/index.php [REQUEST_TIME_FLOAT] => 1511817942.29 [REQUEST_TIME] => 1511817942 ) [dbc] => [live] => [contact_email] => dekalusha@gmail.com [_SESSION] => Array ( ) ) ) ) [1] => Array ( [file] => C:\MAMP\htdocs\e_commerce\mysql.inc.php [line] => 19 [function] => mysqli_set_charset [args] => Array ( [0] => [1] => utf8 ) ) [2] => Array ( [file] => C:\MAMP\htdocs\e_commerce\index.php [line] => 15 [args] => Array ( [0] => C:\MAMP\htdocs\e_commerce\mysql.inc.php ) [function] => require ))" Link to comment Share on other sites More sharing options...
Larry Posted December 1, 2017 Share Posted December 1, 2017 This issue happens when the client MySQL library (e.g., used by PHP) doesn't match the MySQL version. It really surprises me that this would be an issue with MAMP, however. Did you install PHP or MySQL separately, either before or after you installed MAMP? Link to comment Share on other sites More sharing options...
Recommended Posts