I'm deploying Symfony2 for the first time on a shared hosting.
I get different errors:
FIrst one when I try to acces the website by its normal url:
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "C:/wamp/www/SocProNetbeans/app/logs/prod.log" could not be opened: fopen(C:/wamp/www/SocProNetbeans/app/logs/prod.log) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory' in /home/stijnxk59/domains/stijnxk59.fiftynine.axc.nl/app/cache/prod/classes.php:4987 Stack trace: #0 /home/stijnxk59/domains/stijnxk59.fiftynine.axc.nl/app/cache/prod/classes.php(4931): Monolog\Handler\StreamHandler->write(Array) #1 /home/stijnxk59/domains/stijnxk59.fiftynine.axc.nl/app/cache/prod/classes.php(4856): Monolog\Handler\AbstractProcessingHandler->handle(Array) #2 /home/stijnxk59/domains/stijnxk59.fiftynine.axc.nl/app/cache/prod/classes.php(5056): Monolog\Handler\AbstractHandler->handleBatch(Array) #3 /home/stijnxk59/domains/stijnxk59.fiftynine.axc.nl/app/cache/prod/classes.php(5361): Monolog\Handler\FingersCrossedHandler->handle(Array) #4 /home/stijnxk59/domains/stijnxk59.fiftynine.axc.nl/app/cache/prod/cl in /home/stijnxk59/domains/stijnxk59.fiftynine.axc.nl/app/cache/prod/classes.php on line 4987
Second one is that I don't receive some background images in development mode
You need to give write permissions for the two following folders :
app/logs
app/cache
Have a look at symfony configuration and setup doc.
Related
I have just deployed my application on the server. If I use APP_ENV=dev, everything works fine but if I use APP_ENV=prod, I get the following error:
Fatal error: Uncaught Twig\Error\LoaderError: The
"/home/httpd/vhosts/example.com/httpdocs/api_tapalle\vendor\symfony\framework-bundle/Resources/views"
directory does not exist
("/home/httpd/vhosts/example.com/httpdocs/api_tapalle\vendor\symfony\framework-bundle/Resources/views").
in
/home/httpd/vhosts/example.com/httpdocs/api_tapalle/vendor/twig/twig/src/Loader/FilesystemLoader.php:106
Stack trace: #0
/home/httpd/vhosts/example.com/httpdocs/api_tapalle/var/cache/prod/ContainerTP5linE/srcApp_KernelProdContainer.php(471):
Twig\Loader\FilesystemLoader->addPath('/home/httpd/vho...',
'Framework') #1
/home/httpd/vhosts/example.com/httpdocs/api_tapalle/var/cache/prod/ContainerTP5linE/srcApp_KernelProdContainer.php(729):
ContainerTP5linE\srcApp_KernelProdContainer->getTwigService() #2
/home/httpd/vhosts/example.com/httpdocs/api_tapalle/var/cache/prod/ContainerTP5linE/srcApp_KernelProdContainer.php(346):
ContainerTP5linE\srcApp_KernelProdContainer->getSensioFrameworkExtra_View_ListenerService() #3 /home/httpd/vhosts/y in /home/httpd/vhosts/example.com/httpdocs/api_tapalle/vendor/twig/twig/src/Loader/FilesystemLoader.php
on line 106
Since I have this error, I have used php bin/console cache:clear -e prod to clear the cache and then uploaded var and vendor directories again.
The weird thing is that vendor\symfony\framework-bundle/Resources/views and vendor/twig/twig/src/Loader/FilesystemLoader.php exist on the server!
Why do I get this error?
updlas the project with all the cache production, dont make a cache clear
I am very new to Wordpress. I uploaded data to cpanel, but when I tried to borrows the link to display the website I get this message when I look at the error log.
Error establishing a database connection
There were the below two error messages. I hope somebody can help me.
PHP Warning: require(/home/.../public_html/wp-includes/load.php): failed to open stream: No such file or directory in /home/.../public_html/wp-settings.php on line 19
PHP Fatal error: require(): Failed opening required '/home/.../public_html/wp-includes/load.php' (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in /home/.../public_html/wp-settings.php on line 19
Most likely you have a bad (incomplete) file upload.
Try to upload again your Wordpress installation.
I'm using vichuploader for storing avatars. Eveyrhing is working fine on my local server but during file update in production server throw such error:
request.CRITICAL: Uncaught PHP Exception Symfony\Component\HttpFoundation\File\Exception\FileException: "Unable to create the "kernel.root_dir/../image/avatar/4" directory" at /home/xxx/xxxx.com/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php line 110 {"exception":"[object] (Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException(code: 0): Unable to create the \"kernel.root_dir/../image/avatar/4\" directory at /home/xxx/xxx.com/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php:110)"} []
I use symfony 3 on OVH shared hosting, does anyone have idea what is wrong?
You have not permission to create files in directory /image/avatar
When I try do deploy my website on the server I have this error :
Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to write in the cache directory (/home/e120223/public_html/ReclyZone/app/cache/prod) ' in /home/e120223/public_html/ReclyZone/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:597 Stack trace: #0 /home/e120223/public_html/ReclyZone/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(510): Symfony\Component\HttpKernel\Kernel->buildContainer() #1 /home/e120223/public_html/ReclyZone/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(133): Symfony\Component\HttpKernel\Kernel->initializeContainer() #2 /home/e120223/public_html/ReclyZone/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(182): Symfony\Component\HttpKernel\Kernel->boot() #3 /home/e120223/public_html/ReclyZone/web/app.php(16): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #4 {main} thrown in /home/e120223/public_html/ReclyZone/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php on line 597
I have already clear cache but nothing works, do you have an idea ?
chmod -R 777on the cache directory to give permission to read AND write
The problem is that you don't have permission to write in that cache directory.
I would change the default cache directory to a writable folder.
See the official documentation http://symfony.com/doc/current/configuration/override_dir_structure.html#override-cache-dir
I'm developping a symfony2 website. I'm using apache2.2.
Everything works fine in dev environment.
But when i want to try it on the prod environment, it goes :
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or
file "/var/www/domain/app/logs/prod.log" could not be opened:
fopen(/var/www/domain/app/logs/prod.log) [function.fopen]: failed to open stream: No
such file or directory' in /var/www/myapp/app/cache/prod/classes.php on line 4799
Why is it trying to write in /var/www/domain since my application is in /var/www/myapp ?
I tried to modify the config_prod.yml to no result.
Any idea ?
Thanks
#Boris Guéry it was a cache problem, you were right, but i couldn't use de command line to clear it. I had to use rm -rf in the shell.
Thanks