opencart error like this in server - opencart

/ the below errors shows in opencart server hosting problem please find the output how to modify these error in opencart config file
fopen(/home/ganeshk2334/public_html/test2/system/cache/cache.language.1469448162): failed to open stream: No such file or directory in /home/ganeshk2334/public_html/test2/system/library/cache/file.php on line49Warning: flock() expects parameter 1 to be resource, boolean given in /home/ganeshk2334/public_html/test2/system/library/cache/file.php on line 51Warning: fwrite() expects parameter 1 to be resource, boolean given in/home/ganeshk2334/public_html/test2/system/library/cache/file.php on line 53Warning: fflush() expects parameter 1 to be resource, boolean given in /home/ganeshk2334/public_html/test2/system/library/cache/file.php on line55Warning: flock() expects parameter 1 to be resource, boolean given in /home/ganeshk2334/public_html/test2/system/library/cache/file.php on line 57Warning: fclose() expects parameter 1 to be resource, boolean given in/home/ganeshk2334/public_html/test2/system/library/cache/file.php on line 59Warning: fopen(/home/ganeshk2334/public_html/test2/system/cache/cache.currency.1469448162): failed to open stream: No such file or directory in/home/ganeshk2334/public_html/test2/system/library/cache/file.php on line 49Warning: flock() expects parameter 1 to be resource, boolean given in /home/ganeshk2334/public_html/test2/system/library/cache/file.php on line51Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/ganeshk2334/public_html/test2/system/library/cache/file.php on line 53Warning: fflush() expects parameter 1 to be resource, boolean given in/home/ganeshk2334/public_html/test2/system/library/cache/file.php on line 55Warning: flock() expects parameter 1 to be resource, boolean given in /home/ganeshk2334/public_html/test2/system/library/cache/file.php on line57Warning: fclose() expects parameter 1 to be resource, boolean given in /home/ganeshk2334/public_html/test2/system/library/cache/file.php on line 59

Open the websites files, go to system > cache and delete all the items in here, reload a page on the website and all your cache files should be repopulated with zero to no errors.

Related

How can I fix an Opencart 3 page loading error?

The following problem sometimes occurs when the page loads and also on the admin page. The error is not permanent and will disappear after the page is refreshed. What could be the problem and how could I fix it?
This is an error message:
Warning: fopen(/web/htdocs4/wallartdecorhu/home/www/system/storage/cache/cache.store.1604651378): failed to open stream: No such file or directory in /web/htdocs4/wallartdecorhu/home/www/system/library/cache/file.php on line 28Warning: flock() expects parameter 1 to be resource, boolean given in /web/htdocs4/wallartdecorhu/home/www/system/library/cache/file.php on line 30Warning: filesize(): stat failed for /web/htdocs4/wallartdecorhu/home/www/system/storage/cache/cache.store.1604651378 in /web/htdocs4/wallartdecorhu/home/www/system/library/cache/file.php on line 32Warning: fread() expects parameter 1 to be resource, boolean given in /web/htdocs4/wallartdecorhu/home/www/system/library/cache/file.php on line 32Warning: flock() expects parameter 1 to be resource, boolean given in /web/htdocs4/wallartdecorhu/home/www/system/library/cache/file.php on line 34Warning: fclose() expects parameter 1 to be resource, boolean given in /web/htdocs4/wallartdecorhu/home/www/system/library/cache/file.php on line 36
Keep a backup of system/library/cache/file.php and then download system/library/cache/file.php from https://github.com/opencart/opencart/blob/master/upload/system/library/cache/file.php and replace the old one.

GDAL gdalbuildvrt throws error:- CalledProcessError: Command returned non-zero exit status 1

I am mosaicking about 50 image tiles in a .img format. The file paths are arranged in an ascending order in a text file. I want to use gdalbuildvrt to build virtual dataset mosaic. Since the each file is about 1.5 GB in size, the mosaic would be ~75GB.
As I run the gdalbuildvrt in my python script or in command line.
The formats which I have tried are shown below:
os.system("gdalbuildvrt -input_file_list text1.txt text1VRT.vrt")
What can be the reason for this error?
On running the subprocess.check_call() function, the following error is shown:
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command returned non-zero exit status 1
Is it that the gdalbuildvrt function cannot be found?
I resolved the issue, the problem was that the input file text1.txt had the list of files not on separate lines. So when reading the .txt file, it was reading the whole file contents as a single file name, thereby running out of the memory buffer.
Second issue - non zero exit status 1 was because the text file with list of path has quotation marks that were being read by gdalbuidvrt and thus making the file path invalid.

IDQ input parameter file error

In IDQ infacmd I am trying to execute multiple wf with source input parameter file, The first infacmd gets success but the second infacmd mapping fails because of input parameter is taking the default value not the assigned value.
I have got resolved it, I have created a parameter in workflow level and assigned the mapping parameter to wf parameter and called the wf level parameter in the infacmd . It just done my work.

OpenCart dashboard error - fopen(): open_basedir restriction in effect

I have this OpenCart error on the dashboard page below...
Warning: fopen(): open_basedir restriction in effect.
File(/var/www/vhosts/domainname.com/shop/download/test) is not within the allowed path(s):
(/var/www/vhosts/Cloud2.chrisames.co.uk/:/tmp/) in
/var/www/vhosts/domainname.com/shop/admin/controller/common/home.php on line 99Warning:
fopen(/var/www/vhosts/domainname.com/shop/download/test): failed to open stream:
Operation not permitted in
/var/www/vhosts/domainname.com/shop/admin/controller/common/home.php on line 99Warning:
fwrite() expects parameter 1 to be resource, boolean given in
/var/www/vhosts/domainname.com/shop/admin/controller/common/home.php on line
101Warning: fclose() expects parameter 1 to be resource, boolean given in
/var/www/vhosts/domainname.com/shop/admin/controller/common/home.php on line
103Warning: file_exists(): open_basedir restriction in effect.
File(/var/www/vhosts/domainname.com/shop/download/test) is not within the allowed
path(s): (/var/www/vhosts/Cloud2.chrisames.co.uk/:/tmp/) in
/var/www/vhosts/domainname.com/shop/admin/controller/common/home.php on line
105Warning: sprintf(): Too few arguments in
/var/www/vhosts/domainname.com/shop/admin/controller/common/home.php on line 106
any help most appreciated :)
Use FileZilla Client (freeware, download and install it https://filezilla-project.org/download.php?type=client or download from here http://sourceforge.net/projects/filezilla/ )... and then Chmod the directories and the files...
Set directories 755, files 644. (Servers have their own rules on permissions, but those are nowadays usual.)
That will fix it for you

How to capture ping's return value in C++

Does anyone know, how to capture ping's return value in c++? According to this link:
ping should return 0 on success, 1 on failure such as unknown host, illegal packet size, etc. and 2 On a unreachable host or network.
In C++ I called ping with the system (), e.g. int ret = system("ping 192.168.1.5");.
My problem is, that ret's value is 0 or 1. It will never 2! If I think correctly, this is because, this return value I get, is the system functions return value, not ping's. So how could i get ping's return vlaue?
Thanks in advance!
kampi
Edit:
Right now i use this system("ping 192.169.1.5 > ping_res.txt"); but i don't want to work with files (open, and read them), that's why i want to capture, th return value , if possible :)
If you are on Windows, it might be better to use IcmpSendEcho2 directly to implement the ping functionality in your application.
A simple solution would be pipe the output of ping to to a file and read it.
E.g.
system("ping 192.169.1.5 > ping_res.txt");
And read ping_res.txt to get the info you need.
From man 3 system on Linux:
RETURN VALUE
The value returned is -1 on error (e.g. fork(2) failed), and the return status of the command otherwise. This latter return status is in the format specified in wait(2).
Then from man 2 wait on Linux:
If status is not NULL, wait() and waitpid() store status information in the int to which it points. This integer can be inspected with the following macros (which take the integer itself as an argument, not a pointer to it, as is done in wait() and wait- pid()!):
WIFEXITED(status)
returns true if the child terminated normally, that is, by calling exit(3) or _exit(2), or by returning from main().
WEXITSTATUS(status)
returns the exit status of the child. This consists of the least significant 8 bits of the status argument that the child specified in a call to exit(3) or _exit(2) or as the argument for a return statement in main(). This macro should only be employed if WIFEXITED returned true.
From sys/wait.h on Linux:
# define WEXITSTATUS(status) __WEXITSTATUS(__WAIT_INT(status))
From bits/waitstatus.h on Linux:
/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */
#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
In other words, you will wan to use these macros if you are using Linux. Are you using HP-UX? I notice you link to information for HP-UX. If so, what does your man 3 system page say?
Also, keep in mind that system invokes "sh -c command" and you will receive the return value of sh:
EXIT STATUS
The following exit values shall be returned:
0 The script to be executed consisted solely of zero or more blank lines or comments, or both.
1-125 A non-interactive shell detected a syntax, redirection, or variable assignment error.
127 A specified command_file could not be found by a non-interactive shell.
Otherwise, the shell shall return the exit status of the last command it invoked or attempted to invoke (see also the exit utility in Special Built-In Utilities).
What return value do you find if you attempt, e.g., system("exit 203");?
So you just want to know the return value: i.e. "0 on success, 1 on failure such as unknown host, illegal packet size, etc. and 2 On a unreachable host or network." I think using ping is an overkill in this case. Writing to file and reading from it is apparently a little bit ugly.
I think you should just try **open()**ing a connection to the host on port 7 (Echo). Then you would get the information that ping return value would tell you. If you further want to get response durations, you can measure it yourself by sending arbitrary data to the host on echo port. It would take some time to write the code but i think it's worth for flexibility and accuracy.