Totally Zenned
- Join Date:
- Aug 2007
- Location:
- Gijón, Asturias, Spain
- Posts:
- 2,879
- Plugin Contributions:
- 7
Auto update of SESSION_WRITE_DIRECTORY not always working
While chasing my tail investigating an unrelated issue I noticed this constant was not being updated.
I had several development copies of my shop (in addition to the real one) installed on the same server including one in a subdirectory, and was exporting/importing the databases between them.
This code checks for the existence of the cache directory as defined by the db constant:
if (!file_exists(SESSION_WRITE_DIRECTORY) || !is_writable(SESSION_WRITE_DIRECTORY)) {
since in my case, this directory did exist and was writeable (albeit elsewhere on the server), the constant never got updated to the correct path inside the directory structure of that particular instance of the shop.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...