Tagphp

Use Homebrew PHP with Mac OS X built-in Apache

To use the version of PHP you installed with Homebrew, you will need to change the PHP extension that Apache is loading. If you are using the built-in version of Apache this will use the built-in version of PHP even after you have installed PHP with brew. brew install php56 You need to edit the Apache config file /etc/apache2/httpd.conf and search for libphp5.so vim /etc/apache2/httpd.conf Then...

Late Static Binding namespace resolution in PHP

If you try to get the namespace of the child class that you are in using the __NAMESPACE__ keyword, you will have the same problem that you do using functions like get_class() in that you will get the namespace (or class) where the current method you are calling is defined. $namespace = __NAMESPACE__; $class = get_class(); You can use get_called_class() to resolve this for Late Static Binding...

Concrete5 “Fatal error: Class ‘View’ not found”

Concrete5 may present you with the confusing error “Fatal error: Class ‘View’ not found”, which looks like a Loader issue but often it is not. When moving between different servers, the database permissions may not be quite right, which will cause this to happen. If you check that the user that Concrete5 is using has access to the database and the correct credentials, then...