I have installed Wkhtmltopdf and I have this error when I execute him "/var/chroot/wkhtmltox-jessie-amd64: Permission denied". I search in Google but I have not found how to do ... repertory have this permission "drwxr-xr-x root root" and i execute him in web-server (apache) and Symfony.
Error :
The exit status code '126' says something went wrong:
stderr: "sh: 1: /var/chroot/wkhtmltox-jessie-amd64: Permission denied
"
stdout: ""
Can you help me ?
I encountered the same problem on the server; it was weird that the local version was happily doing its job.
After changing the generated file's destination folder permissions without any luck, I realised that the problem whas caused by the binary path in config.yml. I changed it from:
/opt/wkhtmltox/bin/wkhtmltopdf.exe
to:
/opt/wkhtmltox/bin/wkhtmltopdf
Now all it's ok.
PS: if you don't keep wkhtmltopdf in the vendor's file (my case), create a knp_snappy config in config_prod.yml; the paths are different from local to prod version.
Here is the official documenation of KnpLabs Bundle for more info.
Good luck ! (in case you needed any 'after 1 year and 11 months' answear)
Install library Wkhtmltopdf on custom folder in the user directory for linux or mac save this route and set in your config
This solution working in production server
This error is because var and opt folder you can't write any content if not root user
if you use net core or .net, use:
sudo chmod 777 -R <Directorio que contiene el wkhtmltopdf>
the error is caused because the program does not have writing permissions
Related
I'm setting up a silverstripe(4) project using LAMP with AWS and I am new to the programming world.
I'm having trouble with after entering the php dev/build.
This error comes up:
error-log.ERROR: Uncaught Exception Exception: "Error writing server configuration file ".htaccess"" at /var/www/alsoherdaughter/vendor/silverstripe/assets/src/Flysystem/AssetAdapter.php line 157 {"exception":"[object] (Exception(code: 0): Error writing server configuration file \".htaccess\" at /var/www/alsoherdaughter/vendor/silverstripe/assets/src/Flysystem/AssetAdapter.php:157)"}
Not sure what I have done wrong. I have looked about for information/resolutions but not having much luck.
You should be able to (temporarily at least) solve any permission issue with:
chmod 777 /var/www/alsoherdaughter/ -R
(in a Linux terminal)
I mentioned temporarily. If you don't have ownership to the items at hand, it's possible the above chmod will be overwritten again by some other process operating by someone else.
You might be able to permanently solve it with:
chown /var/www/alsoherdaughter/ YOUR_USERNAME_HERE
when I open firebase CLI I get this error :
Let's make sure your Firebase CLI is ready...
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at ChildProcess.<anonymous> (C:\snapshot\firepit\welcome.js:115:27)
at ChildProcess.emit (events.js:311:20)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:311:20)
at Pipe.<anonymous> (net.js:668:12)
I am using windows 10 pro
The comment on the original question was the solution for me. My "Downloads" folder is hosted on D: and the installer assumes C:
(how to solve Firebase CLI error on start up)
A solution that helped me after transferring the exe to C has failed, is deleting the folder:
C:\Users\{YOUR_PROFILE_NAME}\.cache\firebase
Hope this helps anyone
That is nothing to worry about, it only appears because the CLI by default assumes it is in the C directory.
So, copying the CLI exe to any other directory would show this message but, you can still use all the CLI functionalities as you wish.
Like what I did here using firebase init
The solution :
leave the exe name as: "firebase-win.exe" and you can move it to whatever folder you want
The detailed explanation:
i moved the executable i downloaded ("firebase-tools-instant-win.exe") to folder: c:\firebase\bin
and it works without any error,
but for some reason if i rename the exe file to something like: "firebase.exe" or "fbcli.exe" it will throw the json error and will not download the .cache folder correctly
but if i rename the exe name to: "firebase-win.exe" it works no matter what folder i put it in,
when checking C:\Users{YOUR_PROFILE_NAME}.cache\firebase\runtime\shell.bat
if the exe name is: "firebase.exe" (Not working) then the content is:
#echo off
"C:\firebase\bin\firebase.exe" C:\Users\{YOUR_PROFILE_NAME}\CACHE~1\firebase\runtime\shell.js %*
if the exe name is: "firebase-win.exe" (working) then the content is:
#echo off
"C:\firebase\bin\FIREBA~1.EXE" C:\Users\shaybc\.cache\firebase\runtime\shell.js %*
so i simply left the exe name: "firebase-win.exe"
valid names worked for me:
fireb-win.exe
firebase-win.exe
firebase-w.exe
fire-base.exe
fbcli-win.exe
...
Install Firebase using npm:
npm install firebase
source:
https://firebase.google.com/docs/web/setup
I got this warning as well, but when I tried to init, serve, and deploy, it worked just fine. Good luck!
I deployed a symfony 3.4 project from my local machine (Windows 10) to a cloud server (Digital Ocean) based on Ubuntu.
I spent 2 days trying to resolve this (i think) routing problem:
"request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader..."
Locally, on localhost with XAMPP, it works perfect.
The project runs ok on the login (is like a backend user app), with the register ok But when it tries to pass the login, it needs to load the initial dashboard with some includes (like nav_side.html.twig) and the server response is error 500.
How can i fix it?
Thanks a lot for your response...i'm a little bit desperate. :)
I made composer update, i deleted the cache folder, but the error is still there.
request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader: "Unable to
find template "Backe ndBundle:includes:nav_side.html.twig"
(looked into: /var/www/onecup/app/Resources/views,
/var/www/onecup/vendor/s
ymfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form) in
"BackendBundle:Dashboard:index.html.twig" at line 7." at
/var/www/onecup/vendor/twig/twig/lib/Twig/Loader/Filesystem.php line
234 {"exception":"[object] (Twig_Err or_Loader(code: 0):
Unable to find template \"BackendBundle:includes:nav_side.html.twig\"
(looked into: /var/www/ onecup/app/Resources/views,
/var/www/onecup/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form)
in \"BackendBundle:Dashboard:index.html.twig\" at line 7. at
/var/www/onecup/vendor/twig/twig/lib/Twig/Loader/Fil
esystem.php:234)"} []
#Flying was right: examine your code and try to find possible case inconsistences in directory / filenames. e.g. "file" and "File". Windows filesystem is case-insensitive, but Ubuntu filesystem is case-sensitive.
So, i changed the Includes to includes and that's all.
Thanks a lot!! :)
I'm learning Symfony2, really cool stuff. But I do run into some trouble when I want to try and visit the production environment. I have followed the Symblog Tutorial that is located here: http://tutorial.symblog.co.uk/
I have cleared the cache and I visit http://symfony.dev/ I have running locally. The page remains totally blank and this error is in the log:
Fatal error: Uncaught exception 'Doctrine\ORM\ORMException' with message 'Unknown Entity namespace alias 'DSBlogBundle'.'
in /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php:236
Stack trace:
#0 /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php(194): Doctrine\ORM\ORMException::unknownEntityNamespace('DSBlogBundle')
#1 /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(554): Doctrine\ORM\Configuration->getEntityNamespace('DSBlogBundle')
#2 /Applications/MAMP/htdocs/symfony/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(194): Doctrine\ORM\Mapping\ClassMetadataFactory->getFqcnFromAlias('DSBlogBundle', 'Blog')
#3 /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(295): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getMetadataFor('DSBlogBundle:Bl...')
#4 /Applications/MAMP/htdocs/symfony/vendor in /Applications/MAMP/htdocs/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php on line 236
What I don't get is that the 'Unknown Entity namespace alias 'DSBlogBundle' is perfectly "known" in the development environment. Does anyone know what I am missing? Any help is much appreciated! Thank you!
Couple possibilities I can think of:
1) If your code functions properly in the development environment, then it could be a cache problem and/or a permissions problem. Make sure your files are readable by the user/process associated with your web server and make sure the prod cache directory is writable by that user so it can generate the necessary files. What I generally do is run the clear cache console command AS that user to avoid unexpected cache problems, like this (on linux):
sudo -u www-user php app/console cache:clear --env=prod
If you're developing on linux, you must be logged in as either root or another user with administrator privileges to run a command as a user other than yourself.
2) You may have configurations defined in the dev environment that don't exist in the prod environment. Double check the files in your app/config folder. My first guess would have been that the DSBlogBundle wasn't correctly defined in app/AppKernel.php but I believe that's environment independent so it couldn't work in dev but not prod.
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