Bug #8093
Error using /tmp on hosting servers
Status:
Bug resolved
Priority:
Normal
Assignee:
Category:
Database & API changes
Target version:
Start date:
17/02/2016
Due date:
% Done:
100%
Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?
Description
On some hosting servers, the use of the /tmp folder is prohibited. Because of that, some errors are returned that obviously show that we should find an alternative solution. This seems to be limited to Doctrine, though:
Notice: Undefined offset: 0 in /var/www/web558/html/chamilo/main/inc/lib/database.lib.php on line 311 Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/www/web558/html/:/home/www/web558/phptmp/:/home/www/web558/files/:/home/www/web558/atd/:/usr/local/php5.5/lib/php/:/usr/local/php5.5/pear/) in /var/www/web558/html/chamilo/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php on line 294 Fatal error: Uncaught exception 'Doctrine\Common\Proxy\Exception\UnexpectedValueException' with message 'Your proxy directory "/tmp" must be writable' in /var/www/web558/html/chamilo/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php:40 Stack trace: #0 /var/www/web558/html/chamilo/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php(295): Doctrine\Common\Proxy\Exception\UnexpectedValueException::proxyDirectoryNotWritable('/tmp') #1 /var/www/web558/html/chamilo/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php(220): Doctrine\Common\Proxy\ProxyGenerator->generateProxyClass(Object(Doctrine\ORM\Mapping\ClassMetadata), '/tmp/__CG__Cham...') #2 /var/www/web558/html/chamilo/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php(119): Doctrine\Common\Proxy\AbstractProxyFactory->getProxyDefinition('Chamilo\\CoreBun...') #3 /var/www/web558/html/chamilo/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(2682): Doctrine\Common\Proxy\Abstra in /var/www/web558/html/chamilo/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php on line 40
I imagine there would be some available setting to allow Doctrine to use another folder (like app/cache/) but I don't know where it is and how we can properly change that setting without altering the vendor directory...
Associated revisions
History
Updated by Julio Montoya almost 4 years ago
- Status changed from Assigned to Needs more info
- Assignee changed from Julio Montoya to Yannick Warnier
Updated by Yannick Warnier almost 4 years ago
- Status changed from Needs more info to Bug resolved
- Assignee changed from Yannick Warnier to Julio Montoya
- % Done changed from 90 to 100
Tested and approved (although at some point it was breaking some stuff, but that seems to be solved now).
Setting cache dir and dev = false (Doctrine will try to use a cache strategy) see #8093