Bug #31255
closed
CF: Could not create directory
Added by Steffen Gebert almost 13 years ago.
Updated almost 7 years ago.
Description
Installing TYPO3 in a directory, where the web server user has no write permissions at all ends up with a RuntimeException:
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Could not create directory!' in t3lib/class.t3lib_div.php:2909
Stack trace:
#0 t3lib/cache/backend/class.t3lib_cache_backend_filebackend.php(201): t3lib_div::mkdir_deep('/var/www/typo3t...')
#1 t3lib/cache/backend/class.t3lib_cache_backend_filebackend.php(99): t3lib_cache_backend_FileBackend->createFinalCacheDirectory('/var/www/typo3t...')
#2 t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php(63): t3lib_cache_backend_FileBackend->setCache(Object(t3lib_cache_frontend_PhpFrontend))
#3 t3lib/cache/frontend/class.t3lib_cache_frontend_phpfrontend.php(45): t3lib_cache_frontend_AbstractFrontend->__construct('cache_phpcode', Object(t3lib_cache_backend_FileBackend))
#4 [internal function]: t3lib_cache_frontend_PhpFrontend->__construct('cache_phpcode', Object(t3lib_cache_backend_FileBackend))
#5 /var/www/typo3_sr in t3lib/cache/backend/class.t3lib_cache_backend_filebackend.php on line 203
The bad thing is that modern browsers dont't show that Exception, but show just a Server Error page.
If possible, we should check, whether the directory is writable and then output a message, which finds its way to the user!
In doubt I'm fine with taking this from the 4.6.0 target.
Files
- Target version set to 4.6.0
Few things missing:
- Exceptions should be caught in a callee few levels outside the CF
- Redirection after creating ENABLE_INSTALL_TOOL is wrong, it redirects to
install/
subdirectory of typo3/install/
- Priority changed from Must have to Should have
- Target version changed from 4.6.0 to 4.6.1
Mmh,
if a system is already set up and this error is thrown, I'd say there is the install tool that comes with checks for those things. From a production perspective I'd not handle this error in the cf.
Since this message is much more likely to be thrown in the install tool during first installation, the issue occurs because the install tool is interweaved with the default TYPO3 bootstrap, so the autoloader is instantiated and wants to create the cache file. At the moment we can not solve this issue systematically.
So, best solution at the moment is probably to catch the error at a higher level in the install process itself and write a happy little error message that at least typo3temp/ must be writable to continue.
To be precise: It's before the install process. Before even detecting that we have to redirect to the Install Tool.
- Target version changed from 4.6.1 to 4.6.2
- Target version deleted (
4.6.2)
With typo3 version 4.6.8,
under OS X (10.6.8) the solution is to
cd /Library/WebServer/Documents/(sitedirectory)
sudo chgrp -R _www fileadmin typo3temp typo3conf uploads
Would be good to add to the INSTALL.txt file that
under OS X (at least 10.6)
the apache server root directory is /Library/WebServer/Documents
and the group of the apache web server included with OS X is _www
- Status changed from New to Resolved
- Target version set to 6.2.0
- % Done changed from 0 to 100
- Is Regression set to No
The "folder structure" in 6.2 install tool takes care of this permission issue now.
- Status changed from Resolved to Closed
Also available in: Atom
PDF