Computer Vision Libraries for PHP
Someone's written a php interface to OpenCV - https://github.com/mgdm/OpenCV-for-PHP, though I haven't tested it. 

As you've tagged face detection I'll also mention that someone has written a php interface specifically to the face detection functionality of openCV too; http://www.xarg.org/project/php-facedetect/

Alternatively you could try (and this would probably offer more flexibility);

[Note: this is just a short list; searching e.g. "python image processing" will give more options] 

Python


OpenCV bindings
scipy.ndimage
Scikit-image


Java


OpenCV bindings
ImageJ api


C++


OpenCV
CImg


The top answer to this question also has a good discussion, though I'd be careful about using Matlab in this instance as you might fall foul of their licence restrictions.