PHP Warning: include_once(./assets/libraries/SimpleImage-master/vendor/claviska/simpleimage/src/claviska/SimpleImage-Class.php): failed to open stream: No such file or directory in /home/screenshotly/public_html/assets/includes/functions_one.php on line 7442.
PHP Warning: include_once(): Failed opening './assets/libraries/SimpleImage-master/vendor/claviska/simpleimage/src/claviska/SimpleImage-Class.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /home/screenshotly/public_html/assets/includes/functions_one.php on line 7442.
Nothing to do with virtualmin but to do with your installed app ⊠it can not find the resource you need, perhaps you need to ```cd`` to the app directory before you run it so any relative paths are correct. That said some apps will add the full path to resources rather than relative. Donât forget running programs via a cron the user environment can be different and you may need to add some environment variables to your cron setup
yes sir i use wowonder script and the cron is ready from the wowonder company and i installed it as they described in the documents but when i run it i found no output message so someone advised me to add vvv in the last of the command to know what is the problem, then i found this error
â>â is used to output to a file and then â-vvvâ I dont recognise this php switch.
I am not an expert.
this seems a path issue. Either the code is faulty or you need to add the folder the PHP should run from, I forget what it is called.
Navigate the root folder of the public_html and run the command manually. forget about cron for now, you need to see to get the command running first be setting it on a schedule.
Setup a local xampp and xdebug setup and then do a stack.code trace, you will soon see what is going on (p.s. I cant help with this but you tube can).
Is this file design to be run by the CLI or by cURL?
Is this file actually designed to be run by cron?
I think you need to see help of the developers for this one.
The information that you have given is very limited but I think he developers of this library are better to ask.
Itâs normally convention to name a php script with the word cron in it as a cli script, however there are a few out there that will run in any fashion you want the coder has tested the SAPI and run code according to that result.
Php excutable is normally /bin/php
Just use which php to find out on your system
what should i do then ? all i need is help to setup this command as the developer told me
i installed it correctly as u see so i want to check if it work or no can u help with that ?
Stop piping the output to null then you can read the errors/output, if any, but as this is not an error with virtualmin you need to get help from the people who coded the script in the first place they should be able to advise once they see the error you are getting
Assuming that is the error that the cron shows, my guess is that the OP is not changing to the directory (mentioned earlier) so the cron job may have to be cd /home/user/public_html && php cronjob.php I reread the post and the âmissingâ file path begins with a dot which will look for the file in the directory below where the script was envoked cron jobs have no environment so therefore will have no path set and most probably runs from / so the is no file as include_once('./assets/libraries/SimpleImage-master/vendor/claviska/simpleimage/src/claviska/SimpleImage-Class.php') as it will be looking in the / directory and not the users public_html directory which is where the file resides. I will code something up tomorrow to prove POC
Yes itâs What you did ! The first can clearly NOT work considering â./assets/â Means âassets/â (So a folder inside the current folder) and there are no âassetsâ folder in the current âincludesâ folder
Still âLibrariesâ and âIncludesâ are both in the same folder but you said yourself it doesnât work too when you replaced the first by the second.
But âSimpleImage-Class.phpâ seems in a very deep folder so I come back to my suggestion 2) are you sure there are the right permission to access it. What if you copy paste âSimpleImage-Class.phpâ in the âIncludesâ folder and then replace the include_once with:
include_once("SimpleImage-Class.php");
Then we do not have enough clues about what is inside functions_one.php and the
âon line 7442â indicate everything before works (And after too). So it may simply be a typo somewhere. We might need to see the source (what is before the âinclude_onceâ ?)