Answer the question
In order to leave comments, you need to log in
How to deploy Symfony 2 project on shared hosting ?
Good evening.
I have a working project written in Symfony2. I would like to upload it to some free hosting, see how it will be.
But I'm new to this stuff and it doesn't work at all.
Constantly throws some errors.
In general, I uploaded the folders: app, bin, src, vendor, component to the root, and put everything that was in the web folder into public_html.
When I go to the site I get a lot of errors
Warning: is_dir(): open_basedir restriction in effect. File(/var/www/hw_5/Symfony/app/cache/prod/sessions) is not within the allowed path(s): (/home/u397346631:/tmp:/var/tmp:/opt/php-5.5/ pear) in /home/u397346631/app/cache/prod/classes.php on line 317
Warning: mkdir(): open_basedir restriction in effect. File(/var/www) is not within the allowed path(s): (/home/u397346631:/tmp:/var/tmp:/opt/php-5.5/pear) in /home/u397346631/app/cache/ prod/classes.php on line 318
Warning: ini_set(): open_basedir restriction in effect. File(/var/www/hw_5/Symfony/app/cache/prod/sessions) is not within the allowed path(s): (/home/u397346631:/tmp:/var/tmp:/opt/php-5.5/ pear) in /home/u397346631/app/cache/prod/classes.php on line 320
Warning: is_file(): open_basedir restriction in effect. File(/var/www/hw_5/Symfony/app/cache/prod/appProdUrlMatcher.php) is not within the allowed path(s): (/home/u397346631:/tmp:/var/tmp:/opt/php- 5.5/pear) in /home/u397346631/app/bootstrap.php.cache on line 2796
Warning: is_dir(): open_basedir restriction in effect. File(/var/www/hw_5/Symfony/app/cache/prod/annotations) is not within the allowed path(s): (/home/u397346631:/tmp:/var/tmp:/opt/php-5.5/ pear) in /home/u397346631/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php on line 67
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/hw_5/Symfony/app/logs/prod.log" could not be opened: failed to open stream: Operation not permitted' in /home /u397346631/app/cache/prod/classes.php:4939 Stack trace: #0 /home/u397346631/app/cache/prod/classes.php(4804): Monolog\Handler\AbstractProcessingHandler->handle(Array) #2 /home/u397346631/app/cache/prod/classes.php(5014): Monolog \Handler\AbstractHandler->handleBatch(Array) #3 /home/u397346631/app/cache/prod/classes.php(5256): Monolog\Handler\FingersCrossedHandler->handle(Array) #4 /home/u397346631/app/ cache/prod/classes.php(5363): Monolog\Logger->addRecord(500, 'Uncaught PHP Ex...',Array) #5 /home/u397346631/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php(104): Monolog\Logger->critical('Uncaught PHP Ex...', Array) #6 /home/u397346631/vendor/symfony/symfony/src/Symfony/Compon in /home/u397346631/app/cache/prod/classes.php on line 4939
/var/www/hw_5/Symfonyif there is no such thing on the server.
ContextErrorException: Warning: is_file(): open_basedir restriction in effect. File(/var/www/hw_5/Symfony/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventSubscriberInterface.php) is not within the allowed path(s): (/home/u397346631:/tmp:/var /tmp:/opt/php-5.5/pear) in /home/u397346631/vendor/symfony/symfony/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php line 80
/var/www/hw_5/Symfony
Answer the question
In order to leave comments, you need to log in
If it's not difficult, write a step-by-step guide on how to upload a Symfony 2 project to shared hosting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question