Zend Framework

Problem if /tmp Dir not readable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.0
  • Fix Version/s: 1.8.2
  • Component/s: Zend_Cache
  • Labels:
    None

Description

My Serverprovider hasn't set the Variables used in Zend_Cache_Backend->getTmpDir() so the returned value is '/tmp'. This directory isn't writeable an so i get Errors – i don't even use Zend_Cache, just wanted to use Zend_Date.

As a quickfix i added $_ENV['TMPDIR'] = session_save_path() but i think this should be fixed in Zend_Cache_Backend.
Probably it could be tested if /tmp is writeable and if not use session_save_path? I don't know...

Issue Links

Activity

Hide
Christiaan Kras added a comment -

I have the same issue: http://framework.zend.com/issues/browse/ZF-6668
Hadn't seen this issue yet although I did do a few searches.

Show
Christiaan Kras added a comment - I have the same issue: http://framework.zend.com/issues/browse/ZF-6668 Hadn't seen this issue yet although I did do a few searches.
Hide
Fabien MARTY added a comment -

just commited something better into SVN trunk

can you try it ?

(you have only to take the Backend.php file from SVN trunk)

Show
Fabien MARTY added a comment - just commited something better into SVN trunk can you try it ? (you have only to take the Backend.php file from SVN trunk)
Hide
Markus added a comment -

Seems to work for me!
But i have to mention, that there is another problem with session (Zend_Application_Resource_Session) since 1.8.1 so i don't know if it works in my normal usage – currently i have a workaround for session management.

Show
Markus added a comment - Seems to work for me! But i have to mention, that there is another problem with session (Zend_Application_Resource_Session) since 1.8.1 so i don't know if it works in my normal usage – currently i have a workaround for session management.
Hide
Marc Bennewitz (private) added a comment -

Hi

why you do not only use the php function "sys_get_temp_dir" and why you check if it exists ?
The function is available since php 5.2.1 and zend framework version is 5.2.4
-> http://framework.zend.com/manual/en/requirements.html#requirements.version

And if the systems temp dir is not writable this is a wrong configured (or crashed) system

Show
Marc Bennewitz (private) added a comment - Hi why you do not only use the php function "sys_get_temp_dir" and why you check if it exists ? The function is available since php 5.2.1 and zend framework version is 5.2.4 -> http://framework.zend.com/manual/en/requirements.html#requirements.version And if the systems temp dir is not writable this is a wrong configured (or crashed) system
Hide
Thomas Weidner added a comment -

The method I referred to in the second issue does use this method additionally.
BUT: You can not only refer to this method alone as it is possible that this method does not return correct informations. This is due OS dependency. Therefor additional checks are also provided which make sure that the path can be detected even if sys_* does not work properly.

Show
Thomas Weidner added a comment - The method I referred to in the second issue does use this method additionally. BUT: You can not only refer to this method alone as it is possible that this method does not return correct informations. This is due OS dependency. Therefor additional checks are also provided which make sure that the path can be detected even if sys_* does not work properly.
Hide
Marc Bennewitz (private) added a comment -

Are you sure? I could not find where the problem occurs ?
And why it have to check first if the function exists ?

Show
Marc Bennewitz (private) added a comment - Are you sure? I could not find where the problem occurs ? And why it have to check first if the function exists ?
Hide
Fabien MARTY added a comment -

Zend_Cache works as a standalone component with php < 5.2 thanks to this additional test

merged into 1.8 branch

Show
Fabien MARTY added a comment - Zend_Cache works as a standalone component with php < 5.2 thanks to this additional test merged into 1.8 branch
Hide
Christiaan Kras added a comment -

As I mentioned in ZF-6668 the getTmpDir() method fails when it decides to use the directory from the tmpname() test. The directory taken from it should be checked with _isGoodTmpDir().

Show
Christiaan Kras added a comment - As I mentioned in ZF-6668 the getTmpDir() method fails when it decides to use the directory from the tmpname() test. The directory taken from it should be checked with _isGoodTmpDir().
Hide
Fabien MARTY added a comment -

just added this additionnel test into 1.8 branch and trunk (thanks)

Show
Fabien MARTY added a comment - just added this additionnel test into 1.8 branch and trunk (thanks)

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: