I"m used the 2.3 version and older but now i installed same server he 3.0.2.0 version of OC,
Is I try install or just upload any OCMOD zip or xml I got an error message like this:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/data1/S5-053/piac/parna/xxxxxxx.hu/admin/controller/marketplace/installer.php</b> on line <b>95</b>{"text":"Installing","next":"http:\/\/xxxxxxx.hu\/admin\/index.php?route=marketplace\/install\/install&user_token=yswS6xQqwkGPGY611mUiVEql5p8NMnUZ&extension_install_id=2"}
The hosting provider say the curl or other server module workinhg fine.
I"m looking any solution but i nothing fount until this time
The folders permission is ok.
I hope anybody can help me here.
Thanks
Laszkris
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Hello,straightlight wrote: ↑Tue Nov 14, 2017 5:36 amSee if this solution solves the issue: viewtopic.php?f=198&t=191871#p702931
I'm having the same issue as that other fellow (same version, same error on the same line). I tried replacing the files as suggested in that link am now get these errors:
Code: Select all
2017-11-17 18:39:42 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/***.com/httpdocs/store/admin/controller/marketplace/installer.php on line 80
2017-11-17 18:39:42 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/***.com/httpdocs/store/admin/controller/marketplace/installer.php on line 95
2017-11-17 18:39:42 - PHP Warning: move_uploaded_file(/var/www/vhosts/***.com/oc_storage/marketplace/DwxCxePI9R.tmp): failed to open stream: No such file or directory in /var/www/vhosts/***.com/httpdocs/store/admin/controller/marketplace/installer.php on line 154
2017-11-17 18:39:42 - PHP Warning: move_uploaded_file(): Unable to move '/tmp/phpCUO7B9' to '/var/www/vhosts/***.com/oc_storage/marketplace/DwxCxePI9R.tmp' in /var/www/vhosts/***.com/httpdocs/store/admin/controller/marketplace/installer.php on line 154
find:
Code: Select all
foreach ($files as $file) {
if (is_file($file) && (filectime($file) < (time() - 5))) {
unlink($file);
}
if (is_file($file)) {
$json['error'] = $this->language->get('error_install');
break;
}
}
Code: Select all
if (is_resource($files)) {
foreach ($files as $file) {
if (is_file($file) && (filectime($file) < (time() - 5))) {
unlink($file);
}
if (is_file($file)) {
$json['error'] = $this->language->get('error_install');
break;
}
}
}
Code: Select all
foreach ($directories as $directory) {
if (is_dir($directory) && (filectime($directory) < (time() - 5))) {
// Get a list of files ready to upload
$files = array();
$path = array($directory);
while (count($path) != 0) {
$next = array_shift($path);
// We have to use scandir function because glob will not pick up dot files.
foreach (array_diff(scandir($next), array('.', '..')) as $file) {
$file = $next . '/' . $file;
if (is_dir($file)) {
$path[] = $file;
}
$files[] = $file;
}
}
rsort($files);
foreach ($files as $file) {
if (is_file($file)) {
unlink($file);
} elseif (is_dir($file)) {
rmdir($file);
}
}
rmdir($directory);
}
if (is_dir($directory)) {
$json['error'] = $this->language->get('error_install');
break;
}
}
Code: Select all
if (is_resource($directories)) {
foreach ($directories as $directory) {
if (is_dir($directory) && (filectime($directory) < (time() - 5))) {
// Get a list of files ready to upload
$files = array();
$path = array($directory);
while (count($path) != 0) {
$next = array_shift($path);
// We have to use scandir function because glob will not pick up dot files.
foreach (array_diff(scandir($next), array('.', '..')) as $file) {
$file = $next . '/' . $file;
if (is_dir($file)) {
$path[] = $file;
}
$files[] = $file;
}
}
rsort($files);
foreach ($files as $file) {
if (is_file($file)) {
unlink($file);
} elseif (is_dir($file)) {
rmdir($file);
}
}
rmdir($directory);
}
if (is_dir($directory)) {
$json['error'] = $this->language->get('error_install');
break;
}
}
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I also made those changes in 3.0.2, as you told us.. but now I'm getting another error when trying to upload and install an ocmod zip extension:straightlight wrote: ↑Sun Nov 19, 2017 1:21 amIn admin/controller/marketplace/installer.php file,
find:
it uploads only about 50% and then stops and says: can't find this file !
The error text is not in a popup window
This error message does not exist among the core of Opencart. What is the exact and precise error message you are receiving upon upload? Since it is also uploading at 50%, in this case, what does the most recent access log error entry reports about? More information needed.it uploads only about 50% and then stops and says: can't find this file !
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
ok, I had other Admin language and I translated the error text.straightlight wrote: ↑Sun Dec 31, 2017 4:14 amWhat is the exact and precise error message you are receiving upon upload? Since it is also uploading at 50%, in this case, what does the most recent access log error entry reports about? More information needed.
Now, in English it is: Install file could not be found!
Attachments
ocmod Capture.JPG (61.96 KiB) Viewed 5784 times
Then, from your admin - > systems - > settings - > edit settings - > FTP tab's upload path points to: public_html/ . Clear your OC admin dashboard cache as well as your admin - > extensions - > modifications - > refresh button.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
yes it isstraightlight wrote: ↑Sun Dec 31, 2017 4:35 amEnsure your system/storage folder is outside your public_html folder.
already did thatThen, edit your config.php and admin/config.php file's DIR_STORAGE new destination
?as well from your .htaccess file (if found in your .htaccess file).
what to edit in htaccess file ?
I find only this line: RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
How shall I change it ?
I don't have such setting.. I think it was in Opencart 2..?Then, from your admin - > systems - > settings - > edit settings - > FTP tab's upload path points to: public_html/ .
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
thanx.
For the record.. after the 50% install attempt, the extension remains down in the list..
Attachments
50% install attempt Capture.JPG (74.46 KiB) Viewed 5757 times
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The hosting gave us a lot of support, but didn't find anything.
I think it's an error from moving the storage outside the public folder.
I don't now what was not modified during that move and where
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The hosting company says there are no SSH problems, also no problem with the tmp folder: the zip ocmod file is uploaded to the tmp folder, but with the unzipping seems to be a problem and an error occurs -can;t create a tmp file in /storage/uploads/ (where the permissions also seem to be ok).
Remember, the install process starts, but breaks at 50%.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
the hosting company installed a second instance of Opencart 3 on the same site, but didn't move the storage folder (we still receive the popup to move..).straightlight wrote: ↑Fri Jan 05, 2018 5:46 amThere are no frequent reports about installing an OCMod once the storage folder is outside the public_html folder normally.
Without moving the storage folder, the extensions can all be uploaded, installed and also work properly..
Something went wrong during the storage moving.. an error occured. But I don't know now where to look and fix it.
Shall I try a re-installation of Opencart ?
If everything is working as it should, there is no need to reinstall the platform.Without moving the storage folder, the extensions can all be uploaded, installed and also work properly..
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
well, it didn't work as it should, 'cause I could not install any ocmod Extension.straightlight wrote: ↑Sat Jan 06, 2018 6:00 amIf everything is working as it should, there is no need to reinstall the platform.
So, I reinstalled the whole Opencart 3.0.2.
Important: I didn't do the automatic move of the storage folder -I moved the folder manually.
Now everything works (..for the moment), I can install extensions, etc.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 224 guests