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???



on What ?Any idea???
I don't use Forum Mail, to reach me, contact: jti@jacob.ch
-
Server Q & A Basic Information on Code + Settings
http://www.everyauction.info/serverinfo.html
Demoversion OpenCart LIGHT v.1.5.6.5
http://www.jti.li/shop/
1'400+ FREE OC Extensions - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
-
I don't use Forum Mail, to reach me, contact: jti@jacob.ch
-
Server Q & A Basic Information on Code + Settings
http://www.everyauction.info/serverinfo.html
Demoversion OpenCart LIGHT v.1.5.6.5
http://www.jti.li/shop/
1'400+ FREE OC Extensions - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
-
Hi IP_CAMIP_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
admin.png (35.24 KiB) Viewed 6066 times
try to upload.png (122.69 KiB) Viewed 6066 times
@chris.dempseychris.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.
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.chris.dempsey wrote: ↑Mon Oct 02, 2017 8:11 pmTurns 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.
Agreed, that's the sense I used for forward and back slash in my post above.Just curious... first, \ is backslash and / is [forward] slash, right?
Code: Select all
define('DIR_IMAGE', 'C:\inetpub\vhosts\domain.co.uk\httpdocs\oc2/image/');
Code: Select all
if (!is_file(DIR_IMAGE . $filename) || substr(str_replace('\\', '/', realpath(DIR_IMAGE . $filename)), 0, strlen(DIR_IMAGE)) != DIR_IMAGE) {
Code: Select all
if (!is_file(DIR_IMAGE . $filename)) {
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!chris.dempsey wrote: ↑Wed Oct 04, 2017 2:14 amAgreed, that's the sense I used for forward and back slash in my post above.Just curious... first, \ is backslash and / is [forward] slash, right?
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.The missing images and blank media manager in admin presented following update to 2.3.0.2.Code: Select all
define('DIR_IMAGE', 'C:\inetpub\vhosts\domain.co.uk\httpdocs\oc2/image/');
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 fromtoCode: Select all
if (!is_file(DIR_IMAGE . $filename) || substr(str_replace('\\', '/', realpath(DIR_IMAGE . $filename)), 0, strlen(DIR_IMAGE)) != DIR_IMAGE) {
fixed the frontend display. It also made me think about the slash direction. I changed image.php back to default.Code: Select all
if (!is_file(DIR_IMAGE . $filename)) {
To resolve the issue I updated DIR_IMAGE to use only forward slashesCode: Select all
define('DIR_IMAGE', 'C:/inetpub/vhosts/domain.co.uk/httpdocs/oc2/image/');
Users browsing this forum: No registered users and 6 guests