I have an application developed in Zend Framework 1.11. I use Zend_OpenId to create a single sign on with partner websites. This has been functioning fine until I upgraded my version of PHP to 5.3.13. I now get the error stated below:
Error: Cannot access storage directory /root/tmp/
I have tracked this down to Zend_OpenId_Consumer_Strorage_File. The temp directory is getting set by getenv(‘TMP’) which returns /root/tmp. If i override this by hard coding the tmp directory to /tmp my OpenId SSO app works again.
I have a second server which the app works on, but it is running an earlier version of PHP 5.3. Testing getenv(‘TMP’) returns false on that server, so Zend looks in /tmp.
Is it possible to either:
a) Override the storage directory in Zend?
b) Disable getenv on the server running 5.3.13 so that it returns false and so Zend looks in /tmp and not /root/tmp?
Thanks to Aurimas for his comment. For those of you interested in the answer who may have a similar problem I have overridden the constructor: