Post by oc_ms » Sat Sep 02, 2017 3:53 am

Hello opencart users!

I have created a sym link (ln -s) under "upload/images/catalog" to an image directory within the server. I can access it in the shell without any problems. If I go to the file manager to upload an image to a product I can see the directory. But when I click on it, no files within the directory are shown.

Has anyone an idea how to access "sym link"-directories?

Best regards,

Holger

Newbie

Posts

Joined
Thu Jun 05, 2014 3:25 am

Post by yodapt » Sat Sep 02, 2017 4:21 am

What permissions have you set to those folders?

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by oc_ms » Sat Sep 02, 2017 4:49 am

> What permissions have you set to those folders?

Hello yodapt!

Permissions are set to 777 just to except the permission problem.

Bye,

Holger

Newbie

Posts

Joined
Thu Jun 05, 2014 3:25 am

Post by yodapt » Sat Sep 02, 2017 4:55 am

Try +x or a+x

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by haxcop » Sat May 16, 2020 6:43 am

HI guys interested on this particular topic. I have tried using this approach but doesn't seems to work ok OC 3.x
I have also renamed the DIR_IMAGE directly to the folder I want to try but at this instance what I get is only broken links images
any ideas to properly use this approach to storage the images, Is possible ?...

Save Time and the hassle of the legal stuff on your site with this Amazing Guys of
Iubenda http://bit.ly/2xKZBKh


New member

Posts

Joined
Tue Jan 14, 2014 9:38 pm
Location - Dublin

Post by straightlight » Sat May 16, 2020 7:44 am

haxcop wrote:
Sat May 16, 2020 6:43 am
HI guys interested on this particular topic. I have tried using this approach but doesn't seems to work ok OC 3.x
I have also renamed the DIR_IMAGE directly to the folder I want to try but at this instance what I get is only broken links images
any ideas to properly use this approach to storage the images, Is possible ?...
Ensure your DIR_IMAGE 's sub-folders also matches your sub-folder names on the database aside from the permission issues. As for the folder permissions themselves, ensure to apply those changes from FTP.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by haxcop » Sat May 23, 2020 5:55 am

straightlight wrote:
Sat May 16, 2020 7:44 am
haxcop wrote:
Sat May 16, 2020 6:43 am
HI guys interested on this particular topic. I have tried using this approach but doesn't seems to work ok OC 3.x
I have also renamed the DIR_IMAGE directly to the folder I want to try but at this instance what I get is only broken links images
any ideas to properly use this approach to storage the images, Is possible ?...
Ensure your DIR_IMAGE 's sub-folders also matches your sub-folder names on the database aside from the permission issues. As for the folder permissions themselves, ensure to apply those changes from FTP.
thanks for your reply.

In fact, I did - my paths are like this

DIR_IMAGE, '/my/other/path/images/[same as the default]'
the permissions and group/owner of the folders and files are the same as original
now in regards of the Database. could you please explain a bit better?
in the db tables where images are found remains intact as it should be for example:
catalog/pics/31882.jpg
and match the same folder structure

Thanks

Save Time and the hassle of the legal stuff on your site with this Amazing Guys of
Iubenda http://bit.ly/2xKZBKh


New member

Posts

Joined
Tue Jan 14, 2014 9:38 pm
Location - Dublin

Post by straightlight » Sat May 23, 2020 8:46 am

now in regards of the Database. could you please explain a bit better?
Ensure your image field values in the product table follows the same sub-folders path as well as in your product_image table.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by opencartmart » Sat May 23, 2020 2:51 pm

oc_ms wrote:
Sat Sep 02, 2017 3:53 am
I have created a sym link (ln -s) under "upload/images/catalog" to an image directory within the server. I can access it in the shell without any problems. If I go to the file manager to upload an image to a product I can see the directory. But when I click on it, no files within the directory are shown.
You can not see images from symlink because it converts to the real path before serving and OC ensures images are serving from the `catalog` directory

One workaround could be removing `realpath()` function from files `admin/controller/common/filemanager.php`, `admin/model/tool/image.php`and `catalog/model/tool/image.php`
Though you may face other repercussions as the function `realpath()` is intended to resolve `relative to absolute` path as well. So use your own risk.

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
Who is online

Users browsing this forum: No registered users and 25 guests