Post by renemilone » Fri Jan 06, 2017 3:35 pm

Hello,

I'm a new user of Opencart version 2.3.0.2.
I encounter several problems :
When I upload an image in the image manager, I have this error message : Warning : file could not be uploaded for an unknown reason !
But I can add image in the /image/catalog/ folder by ftp with filezilla.

The other problem is about extension installer. When I try to upload a *.ocmd.zip file, the loading bar is red and stops at about 20% and I get the message : File could not be found.

Has anyone any idea of ​​the solution?

Thank you very much.

Newbie

Posts

Joined
Thu Nov 03, 2011 11:13 pm

Post by opencartmart » Fri Jan 06, 2017 4:26 pm

Seems permission issue on system/storage/upload directory.

Enable error reporting of php for getting detail error. Add following line in admin/index.php and try again to install. It will print the error.

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by paulfeakins » Fri Jan 06, 2017 6:37 pm

Have you double-checked your FTP settings in the admin?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by IP_CAM » Fri Jan 06, 2017 9:22 pm

Many OC-2 extensions cannot be installed, as they should, by the OC-installer. You should therefore analyze each one of those extensions first, if they consist of a single xxx.ocmod.xml file only (possibly also with an empty Subdirectory, and a xxx.txt file, you better unzip those extensions on your PC, and then, install the unzipped xxx.ocmod.xml ONLY. And if the File contained itself is NOT titled xxx.ocmod.xml, rename it, to include xxx.OCMOD.xml, and try to install it again.

It's a trail & error game, lately, like everything else around here, so, don't give up ! And if you cannot achieve it, come back here and inform us, what the exact content of such an Extension is, to possibly get more info on this. But since the NOTIFICATION Routine does not work anymore around here, don't expect someone to reply fast, it's a trail and error Game as well, to find postings again, waiting for a reply ... :crazy:
Good Luck! ;)
Ernie

PS: But make sure, to have something like one of those below installed first:
https://www.opencart.com/index.php?rout ... n_id=22308
---
https://www.opencart.com/index.php?rout ... n_id=18892
---
https://www.opencart.com/index.php?rout ... n_id=19862
Last edited by IP_CAM on Sat Jan 07, 2017 12:32 am, edited 1 time in total.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by renemilone » Fri Jan 06, 2017 11:36 pm

Thank you for your answers.

Yes I checked my ftp setting.

I will look at all your solutions and I will give you a feedback.
thank you very much.

Newbie

Posts

Joined
Thu Nov 03, 2011 11:13 pm

Post by renemilone » Sat Jan 07, 2017 7:17 am

Hi Opencartmart,
opencartmart wrote:Seems permission issue on system/storage/upload directory.

Enable error reporting of php for getting detail error. Add following line in admin/index.php and try again to install. It will print the error.

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

The code was in place in admin/index.php

Here is the error code when I try to load an image into the image manager :
2017-01-06 17:03:55 - PHP Warning: is_file() expects parameter 1 to be a valid path, array given in /home/cours/public_html/boutique/admin/controller/common/filemanager.php on line 525

And this is the 525 line code : if (!empty($this->request->files['file']['name']) && is_file($this->request->files['file']['tmp_name'])) {

Do you have an idea ?

Thank you

Newbie

Posts

Joined
Thu Nov 03, 2011 11:13 pm

Post by renemilone » Sat Jan 07, 2017 7:42 am

IP_CAM wrote:Many OC-2 extensions cannot be installed, as they should, by the OC-installer. You should therefore analyze each one of those extensions first, if they consist of a single xxx.ocmod.xml file only (possibly also with an empty Subdirectory, and a xxx.txt file, you better unzip those extensions on your PC, and then, install the unzipped xxx.ocmod.xml ONLY. And if the File contained itself is NOT titled xxx.ocmod.xml, rename it, to include xxx.OCMOD.xml, and try to install it again.

It's a trail & error game, lately, like everything else around here, so, don't give up ! And if you cannot achieve it, come back here and inform us, what the exact content of such an Extension is, to possibly get more info on this. But since the NOTIFICATION Routine does not work anymore around here, don't expect someone to reply fast, it's a trail and error Game as well, to find postings again, waiting for a reply ... :crazy:
Good Luck! ;)
Ernie

PS: But make sure, to have something like one of those below installed first:
https://www.opencart.com/index.php?rout ... n_id=22308
---
https://www.opencart.com/index.php?rout ... n_id=18892
---
https://www.opencart.com/index.php?rout ... n_id=19862

Thank you IP_CAM,

I have tried the extensions that you suggested to me and I have checked the names of the files.
I still encounter the same problem: file not found!

Newbie

Posts

Joined
Thu Nov 03, 2011 11:13 pm

Post by IP_CAM » Sat Jan 07, 2017 9:42 am

You would not have to test all extensions mentioned, just install one of them, because
they likely all do the same, and if you still where unable to upload a Mod, even according
to my advises above, you must have been doing something wrong. ::)

So, you'll need to show something, or better, get one of the known Pro's around here, to
have a look, one cannot guess on an error message, unaware of, how your Software is
installed and works.
Good Luck, nothing personal ! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by opencartmart » Sat Jan 07, 2017 1:15 pm

renemilone wrote:
Here is the error code when I try to load an image into the image manager :
2017-01-06 17:03:55 - PHP Warning: is_file() expects parameter 1 to be a valid path, array given in /home/cours/public_html/boutique/admin/controller/common/filemanager.php on line 525
Is the line number correct? Or have you modified admin/controller/common/filemanager.php? Because in original file there is no line number 525?

XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart


Active Member

Posts

Joined
Wed Oct 02, 2013 3:59 am

Post by renemilone » Sat Jan 07, 2017 1:39 pm

IP_CAM wrote:You would not have to test all extensions mentioned, just install one of them, because
they likely all do the same, and if you still where unable to upload a Mod, even according
to my advises above, you must have been doing something wrong. ::)

So, you'll need to show something, or better, get one of the known Pro's around here, to
have a look, one cannot guess on an error message, unaware of, how your Software is
installed and works.
Good Luck, nothing personal ! ;)
Ernie
Thank you very much IP_CAM,

Indeed there must be a problem.
I used the services of an opencart developer to upgrade my opencart from 1.4 to 2.3.
And I will contact him to check these problems.

thank you so much.

Newbie

Posts

Joined
Thu Nov 03, 2011 11:13 pm

Post by renemilone » Sat Jan 07, 2017 1:44 pm

opencartmart wrote:
renemilone wrote:
Here is the error code when I try to load an image into the image manager :
2017-01-06 17:03:55 - PHP Warning: is_file() expects parameter 1 to be a valid path, array given in /home/cours/public_html/boutique/admin/controller/common/filemanager.php on line 525
Is the line number correct? Or have you modified admin/controller/common/filemanager.php? Because in original file there is no line number 525?
thank you very much opencartmart
No I have not modified anything in this file.
As I said above, it is not me who did the upgrade of the version and I will contact the person who made it.

Newbie

Posts

Joined
Thu Nov 03, 2011 11:13 pm

Post by renemilone » Sat Jan 07, 2017 2:02 pm

renemilone wrote:
opencartmart wrote:
renemilone wrote:
Here is the error code when I try to load an image into the image manager :
2017-01-06 17:03:55 - PHP Warning: is_file() expects parameter 1 to be a valid path, array given in /home/cours/public_html/boutique/admin/controller/common/filemanager.php on line 525
Is the line number correct? Or have you modified admin/controller/common/filemanager.php? Because in original file there is no line number 525?
thank you very much opencartmart
No I have not modified anything in this file.
As I said above, it is not me who did the upgrade of the version and I will contact the person who made it.
I upload the file with this post

Attachments

admin/controller/common/filemanager.php


Newbie

Posts

Joined
Thu Nov 03, 2011 11:13 pm

Post by IP_CAM » Sun Jan 08, 2017 12:23 am

renemilone wrote:I used the services of an opencart developer to upgrade my opencart from 1.4 to 2.3.
Well, that at least explains a lot, you should have mentioned before, that it has NOT been a clean Install, then, we would not have wasted so much time, just to find out ... ! :-\
Good Luck !
Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by pm-netti » Wed Jan 11, 2017 4:45 pm

FTP do double file lines.

I did upload to subfolder for renemilone.
This was 2 bugs in file admin/controller/common/filemanager.php

Line 39:

Code: Select all

if (substr(str_replace('\\', '/', realpath($directory . '/' . $filter_name)), 0, strlen(DIR_IMAGE . 'catalog')) == DIR_IMAGE . 'catalog') {
need changed;

Code: Select all

if (is_dir( DIR_IMAGE . 'catalog')) {
line 224:

Code: Select all

if (!is_dir($directory) || substr(str_replace('\\', '/', realpath($directory)), 0, strlen(DIR_IMAGE . 'catalog')) != DIR_IMAGE . 'catalog') {
need changed:

Code: Select all

if (!is_dir($directory) ) {
Strange? ;)

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by pm-netti » Wed Jan 11, 2017 8:46 pm

Contínue...... :)

Just I fixed 6 bugs from file admin/controller/extension/installer.php
Lines 229, 377, 422 and 518:

Code: Select all

if (!is_file($file) || substr(str_replace('\\', '/', realpath($file)), 0, strlen(DIR_UPLOAD)) != DIR_UPLOAD) {
need changed:

Code: Select all

     if (!is_file($file)) {
Lines 268 and 548:

Code: Select all

	if (!is_dir($directory) || substr(str_replace('\\', '/', realpath($directory)), 0, strlen(DIR_UPLOAD)) != DIR_UPLOAD) {
need changed:

Code: Select all

      if(!is_directory($directory)){

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by elcopdoo » Wed Jan 25, 2017 7:00 am

@ pm-netti
Can You gather all bugfixes for 2.3.0.2 release (OCMOD and files) in one place?
That would be nice...

New member

Posts

Joined
Sun Oct 12, 2014 9:13 pm
Who is online

Users browsing this forum: No registered users and 189 guests