Thanks for your anser. So, I typed your command line in my IN folder and I got this:
bash: !: event not found
Update: I am in the process of migrating to Ubuntu from AlmaLinux. That might fix a lot of issues, since packages seem a lot easier to get for IN dependencies ans such, and most guides seem designed for it instead of RHEL distros. I’ll report back if I still have issues then. Thanks!
Is there something missing then? Since a few versions, I have the same “event not found” error on Ubuntu 22.04.1 when running snappdf convert
I’m also unable to view PDF files in the application.
Thanks. The event not found error is because of the exclamation mark in the example. The snappdf executable seems to be working. I’ll not further hijack this thread for the other issue.
I have moved my IN installation on a new Ubuntu 20.04 server and I made sure to install all the missing debian dependencies listed on GitHub (including the ones specifically listed for Ubuntu 20.04):
FYI, the download command works fine as a user (everything is installed inside the logic of a cPanel account, if that changes anything). Here is what I get when executing the dl command with my user:
./vendor/bin/snappdf download --force
Starting download. Revision: 1089757
Download completed. Extracting the zip archive.
Archive extracted.
Completed! 1089757-Linux_x64 currently in use.
If I try to run the same command as www-data (assuming the syntax is correct), I get an error:
sudo -u www-data ./vendor/bin/snappdf download --force
Could not determine path to lookup PHP setting for based on arguments
I also tried to recursively transfer the whole IN installation to www-data:www-data ownership, add my user to the www-data group and change the files permissions to 0664, but then I would get a 403 error trying to access IN in the frontend. Reverting the ownership to my username and keeping the www-data groupchanged nothing either for snappdf, except now IN runs fine again.
As for the Chrome headless not running, I gorgot to add the dot in the syntax before the executable, so here is what I get with it (with the up-to-date version of Chrome):
Thanks, but I’m not sure if that’s the issue, because chrome did download fine during the previous steps (without referencing php explicitly): here is a screenshot from .vendor/beganovich/snappdf/versions/1089252-Linux_x64/chrome-linux
SnapPDF itself runs fine (I can make it download chrome, I can display the help, etc.). It seems like the issue is with the bash commands and the executing of chrome and I really don’t know enough about Linux to troubleshoot this one, but it seems like I did a by-the-book setup and configuration without any luck.
I read that setting + H to turn off bash history expansion or something like that could help. Any idea about this one?
I did try to set permissions for Chrome under www-data (which did not help), but I could not find the right php folder to just force www-data do run SnapPDF itself to download the Chrome binary. I keep getting errors, either permission errors, or 404, or “command not found”… The cPanel file structure is, hmm, a bit confusing.
My cron jobs are setup with just the “php” command without referencing its path and they work fine that way when ran as the cPanel user (I double-checked by running them manually outside of cron), so that didn’t help in itself, but… the “built-in” cPanel documentation in the cron jobs page says this:
Now that’s much more straightforward than the convolulted schema I posted above.
Since my IN subdomain is running php 8.2, I used the following path: usr/local/bin/ea-php82. I also made sure to st the www-data user to the charleo group (the default cPanel group with the same name as my user). Here’s what I got:
Thanks for pointing to this. Can you elaborate on what’s happening? I am not familiar with Fork Bomb Protection on WHM, but I have full access to it (I rent a VPS) so I can do what needs to be done. I had kind of abandoned the hope of getting Snappdf working on my server (I just resort to Hosted PDF instead), but if you managed to make it work, could you share some additional details about the whole thing please?
please help me i got the same issue !
i was generating pdf with phantomjs forever and it just stopped working so i tried to switch to snappdf and i get 500: Server Error !
just followed the indication here to see if i could get something but it still doesn’t works !
where can i get invoiceninja logs ?
thanks