Post by stefap7 » Mon Sep 19, 2016 9:51 pm

Hi,

I installed the opencart 2.3 from softaculous and I saw the all images not showing! I checked in console from browser if the src is correct, but is empty. Any idea??? ??? ??? ???

Newbie

Posts

Joined
Mon Sep 19, 2016 9:40 pm

Post by IP_CAM » Tue Sep 20, 2016 7:09 am

Any idea???
on What ?

you did not show any usable info so far :-\
how do your config.php File Links and Path's and your
.htaccess File RewriteBase / Line look like, and what's your Site-Url !?

Without such information, it's all just guessing...
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 sachin6609 » Mon Jan 02, 2017 5:32 pm

HIi IP_CAM

I have same issue

i have install the OC version 2.3.0.2

The Image folder which on the root folder permission is 755

Now all working fine but my problem is as below

1 - in admin when i try to upload any images like product , logo or banner the images the popup is open thean when i select any image the waring occurs that say "Warning: Directory does not exist!" then nothing happen

2 - the img src shows the empty path in console

Can you help me plz

Thanks

sachin

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by IP_CAM » Tue Jan 03, 2017 4:26 am

http://www.angliaclipperservices.com/im ... he/[u]data[/u]/blades-logo-480x480r.jpg
well, this means, that you probably 'upgraded' your former OC Version, and now, the cached Logo would exist, located in another Subdirectory, called:
http://www.angliaclipperservices.com/im ... [u]catalog[/u]/blades-logo-480x480r.jpg

meaning, that the new Image Sub is called:
shop/image/catalog/....
and the Image Cache Sub:
shop/image/cache/catalog/....
and no longer:
shop/image/data/....
and:
shop/image/cache/data/....

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 sachin6609 » Tue Jan 03, 2017 1:34 pm

IP_CAM wrote:http://www.angliaclipperservices.com/im ... he/[u]data[/u]/blades-logo-480x480r.jpg
well, this means, that you probably 'upgraded' your former OC Version, and now, the cached Logo would exist, located in another Subdirectory, called:
http://www.angliaclipperservices.com/im ... [u]catalog[/u]/blades-logo-480x480r.jpg

meaning, that the new Image Sub is called:
shop/image/catalog/....
and the Image Cache Sub:
shop/image/cache/catalog/....
and no longer:
shop/image/data/....
and:
shop/image/cache/data/....

Good Luck ;)
Ernie
Hi IP_CAM

Thanks a lot for replay

will i have install the fresh OC version 2.3.0.2 in my localhost and all works fine

Then i just move my site on the server where i got this problem

i am using the 1and1 hosting server where only this problem is occures

in my localhost all works perfectly

i have attach to screenshot for more clear idea to you plz can you check any help me

so can you tell me is there any server issue??

Thanks

Sachin

Attachments

admin.png

admin.png (35.24 KiB) Viewed 10393 times

try to upload.png

try to upload.png (122.69 KiB) Viewed 10393 times


Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by chris.dempsey » Mon Oct 02, 2017 8:11 pm

@Sachin did you manage to resolve the issue?

I am experiencing the same symptoms under slightly different circumstances and am struggling to identify the cause.

Would appreciate any insight you can offer if you managed to resolve the issue.

Update Turns out forward slashes cannot be used in paths in the config files in OC 2.3.0.2. My server accepts forward slashes in the paths generated during installation of 1.5.x (the installer ends up with a mix of back and forward slashes) hence I didn't immediately identify it as an issue when checking the config files.

New member

Posts

Joined
Wed Apr 04, 2012 6:43 pm

Post by sachin6609 » Tue Oct 03, 2017 2:04 pm

chris.dempsey wrote:
Mon Oct 02, 2017 8:11 pm
@Sachin did you manage to resolve the issue?

I am experiencing the same symptoms under slightly different circumstances and am struggling to identify the cause.

Would appreciate any insight you can offer if you managed to resolve the issue.

Update Turns out forward slashes cannot be used in paths in the config files in OC 2.3.0.2. My server accepts forward slashes in the paths generated during installation of 1.5.x (the installer ends up with a mix of back and forward slashes) hence I didn't immediately identify it as an issue when checking the config files.
@chris.dempsey

Nap Still Not

Thanks

Sachin

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by MrPhil » Wed Oct 04, 2017 1:32 am

chris.dempsey wrote:
Mon Oct 02, 2017 8:11 pm
Turns out forward slashes cannot be used in paths in the config files in OC 2.3.0.2. My server accepts forward slashes in the paths generated during installation of 1.5.x (the installer ends up with a mix of back and forward slashes) hence I didn't immediately identify it as an issue when checking the config files.
Just curious... first, \ is backslash and / is [forward] slash, right? Some ignorant people swap names*. Second, what is the underlying server operating system: Linux/Unix or Windows? I've found that in general, paths that go through a server layer generally accept both \ and / separators, while paths that go directly to OS routines often require one or the other.

* Every time I hear some moron on the radio give a URL and say "backslash" for "/", I grind my teeth down a little more. I think my dentist is bribing radio stations to do that!

User avatar
Active Member

Posts

Joined
Wed May 10, 2017 11:52 pm

Post by chris.dempsey » Wed Oct 04, 2017 2:14 am

Just curious... first, \ is backslash and / is [forward] slash, right?
Agreed, that's the sense I used for forward and back slash in my post above.

Server is Windows 2012 R2, I experienced the issue under PHP 5.6.31 and 7.0.22.

Reason I missed this to begin with is the DIR_IMAGE value generated by the Opencart 1.5.6.4 installer has mixed slashes. It worked without issue.

Code: Select all

define('DIR_IMAGE', 'C:\inetpub\vhosts\domain.co.uk\httpdocs\oc2/image/');
The missing images and blank media manager in admin presented following update to 2.3.0.2.

Copy/pasting the DIR_IMAGE value into Windows Explorer directly on the server opens the image directory - the OS seems to accept mixed slashes (presuming Explorer doesn't fix it silently in the background?).

I did find updating the resize function in catalog/model/tool/image.php from

Code: Select all

if (!is_file(DIR_IMAGE . $filename) || substr(str_replace('\\', '/', realpath(DIR_IMAGE . $filename)), 0, strlen(DIR_IMAGE)) != DIR_IMAGE) {
to

Code: Select all

if (!is_file(DIR_IMAGE . $filename)) {
fixed the frontend display. It also made me think about the slash direction. I changed image.php back to default.

To resolve the issue I updated DIR_IMAGE to use only forward slashes

Code: Select all

define('DIR_IMAGE', 'C:/inetpub/vhosts/domain.co.uk/httpdocs/oc2/image/');

New member

Posts

Joined
Wed Apr 04, 2012 6:43 pm

Post by davidcropley » Mon Feb 11, 2019 3:04 am

chris.dempsey wrote:
Wed Oct 04, 2017 2:14 am
Just curious... first, \ is backslash and / is [forward] slash, right?
Agreed, that's the sense I used for forward and back slash in my post above.

Server is Windows 2012 R2, I experienced the issue under PHP 5.6.31 and 7.0.22.

Reason I missed this to begin with is the DIR_IMAGE value generated by the Opencart 1.5.6.4 installer has mixed slashes. It worked without issue.

Code: Select all

define('DIR_IMAGE', 'C:\inetpub\vhosts\domain.co.uk\httpdocs\oc2/image/');
The missing images and blank media manager in admin presented following update to 2.3.0.2.

Copy/pasting the DIR_IMAGE value into Windows Explorer directly on the server opens the image directory - the OS seems to accept mixed slashes (presuming Explorer doesn't fix it silently in the background?).

I did find updating the resize function in catalog/model/tool/image.php from

Code: Select all

if (!is_file(DIR_IMAGE . $filename) || substr(str_replace('\\', '/', realpath(DIR_IMAGE . $filename)), 0, strlen(DIR_IMAGE)) != DIR_IMAGE) {
to

Code: Select all

if (!is_file(DIR_IMAGE . $filename)) {
fixed the frontend display. It also made me think about the slash direction. I changed image.php back to default.

To resolve the issue I updated DIR_IMAGE to use only forward slashes

Code: Select all

define('DIR_IMAGE', 'C:/inetpub/vhosts/domain.co.uk/httpdocs/oc2/image/');
I struggled this all day while migrating my site from Ubuntu to Windows server 2016. I tried with backslashes and doublechecked everything but in the end like you say it worked by adding the C:/ at the beginning and just using forward slashes for everything! Thanks for the tip off!

New member

Posts

Joined
Thu Jul 12, 2012 2:18 am
Who is online

Users browsing this forum: No registered users and 71 guests