Using PHPUnit: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
(Created page with "== Errors and fixes == === mysqli no such file or directory === Run a unit test that makes a database connection and receive <syntaxhighlight lang="text"> mysqli::mysqli()...")
 
No edit summary
Line 1: Line 1:
== Errors and fixes ==
== Testing URLs ==
 
TODO: document Selenium installation, configuration, and basic usage.<ref>[https://phpunit.de/manual/current/en/selenium.html PHPUnit and Selenium] - PHPUnit documentation</ref>
 
== Installation/Configuration errors and fixes ==


=== mysqli no such file or directory ===
=== mysqli no such file or directory ===

Revision as of 04:31, 16 September 2015

Testing URLs

TODO: document Selenium installation, configuration, and basic usage.[1]

Installation/Configuration errors and fixes

mysqli no such file or directory

Run a unit test that makes a database connection and receive

mysqli::mysqli(): (HY000/2002): No such file or directory

First Google results suggested making sure that the mysql extension was compiled into PHP. I don't think this was the actual issue.

I installed PHP using homebrew, according to these instructions. This version of PHP comes with MySQL compiled into it, but I think that PHP that comes installed on the Mac most likely does also.

The issue ended up being that the MySQL connection was configured to use localhost as the host name. locahost for the PHP CLI resolves to something very different than when running on the development web server. [2]

Notes

See also

Footnotes