Project

General

Profile

Actions

Bug #31255

closed

CF: Could not create directory

Added by Steffen Gebert over 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
Start date:
2011-10-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

31255.diff (1.31 KB) 31255.diff Steffen Gebert, 2011-10-25 12:07

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Feature #11771: Check for write-permissions before installationClosedAlexander Opitz2010-12-29

Actions
Has duplicate TYPO3 Core - Bug #32306: Install tool fails silently if typo3temp is not writableRejected2011-12-05

Actions
Has duplicate TYPO3 Core - Bug #32842: Missing write permissions cause HTTP 500 errorClosed2011-12-27

Actions
Actions #1

Updated by Steffen Gebert over 12 years ago

  • Target version set to 4.6.0
Actions #2

Updated by Steffen Gebert over 12 years ago

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/
Actions #3

Updated by Steffen Gebert over 12 years ago

  • Priority changed from Must have to Should have
  • Target version changed from 4.6.0 to 4.6.1
Actions #4

Updated by Christian Kuhn over 12 years ago

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.

Actions #5

Updated by Steffen Gebert over 12 years ago

To be precise: It's before the install process. Before even detecting that we have to redirect to the Install Tool.

Actions #6

Updated by Chris topher over 12 years ago

  • Target version changed from 4.6.1 to 4.6.2
Actions #7

Updated by Xavier Perseguers about 12 years ago

  • Target version deleted (4.6.2)
Actions #8

Updated by Yan Guy about 12 years ago

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

Actions #9

Updated by Christian Kuhn over 10 years ago

  • 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.

Actions #10

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF