Post by TG1313 » Sat Feb 22, 2020 1:15 am

1. Just upgraded OC from 2.1.0.2 to 3.0.3.2
2. Only updated config.php and admin/config.php (but no changes to DIR_IMAGE in both) . Did not change anything in .htaccess
3. Checked actual DB tables and see all image links seem to be correct
4. But don't see any product images on my website (www.linencasa.com) . Source shows "<img src (unknown)...
5. When try to load a new photo in opencart admin (products photo), Image Manager is empty and gives me an error "Warning: Directory does not exist!" when I try create a new folder
6. I can access my images directly when constructing an URL, for example: https://www.linencasa.com/image/catalog ... s/test.jpg
7. I use (and used before as well) Default Store Theme (can be seen in System/Settings on General tab
8. I did followed upgrade instructions from OC manual and made sure I have all permissions (step #7 - Goto Admin->Users->User Groups and Edit the Top Adminstrator group. Check All boxes.)

Config.php:

Code: Select all

// DIR
define('DIR_APPLICATION', '/home2/linencas/public_html/catalog/');
define('DIR_SYSTEM', '/home2/linencas/public_html/system/');
define('DIR_LANGUAGE', '/home2/linencas/public_html/catalog/language/');
define('DIR_TEMPLATE', '/home2/linencas/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/home2/linencas/public_html/system/config/');
define('DIR_IMAGE', '/home2/linencas/public_html/image/');
define('DIR_STORAGE', '/home2/linencas/public_html/system/storage/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
admin/config.php:

Code: Select all

// DIR
define('DIR_APPLICATION', '/home2/linencas/public_html/admin/');
define('DIR_SYSTEM', '/home2/linencas/public_html/system/');
define('DIR_LANGUAGE', '/home2/linencas/public_html/admin/language/');
define('DIR_TEMPLATE', '/home2/linencas/public_html/admin/view/template/');
define('DIR_CONFIG', '/home2/linencas/public_html/system/config/');
define('DIR_IMAGE', '/home2/linencas/public_html/image/');
define('DIR_STORAGE', '/home2/linencas/public_html/system/storage/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
define('DIR_CATALOG', '/home2/linencas/public_html/catalog/');
.htaccess (i left my version from OC 2.1.0.2)

Code: Select all

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Please let me know if any other information is needed. Thank you so much for the help!
Last edited by straightlight on Sat Feb 22, 2020 3:40 am, edited 1 time in total.

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm

Post by straightlight » Sat Feb 22, 2020 3:43 am

So far, what I am noticing is your storage being located inside your public_html folder while it should be located outside. FAQ: viewtopic.php?f=134&t=215776#p717782 . The .htaccess file may also not be updated in compliance to what the v3.x releases now provides.

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
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by TG1313 » Sat Feb 22, 2020 4:52 am

I tried to move Storage outside but it gave me even more errors so i decided to put everything back and deal with one problem at a time. I also read in forums here that having Storage outside is not a requirement (yet) for now for OC 3 to work. and I will just have to deal with a popup every time I login to Admin panel.
Am i wrong here?

As for .htaccess i also tried to copy lines from a new one (came with OC 3 upgrade):

I changed (what i have from OC 2):

Code: Select all

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
to (what came with OC 3 upgrade):

Code: Select all

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
And was getting even more issues. I believe I coulnt even load Admin at that time or website... or both...
I can try again and provide an error I was getting if you think I am on a right path and should do this change..

Please advise.
Thank you so much!
Last edited by straightlight on Sat Feb 22, 2020 5:05 am, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm

Post by straightlight » Sat Feb 22, 2020 5:07 am

Please add the code tags when showing lines of codes.

When you moved the storage folder outside of the public_html folder, did you edited your DIR_STORAGE's paths in both config.php files as well? As for the error messages, what are they showing?

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
Opencart.com Administrator / Quality Assurance Analyst / Programmer / Opencart Tester


Legendary Member

Posts

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

Post by TG1313 » Sat Feb 22, 2020 5:30 am

Since i tried so much stuff yesterday going from one issue to another. i tried it again now.
I moved "storage" folder with all sub-folders to the same level where my "public_html" is.
Then changed both configs:

config.php:

// HTTPS
define('HTTPS_SERVER', 'https://www.linencasa.com/');

// DIR
define('DIR_APPLICATION', '/home2/linencas/public_html/catalog/');
define('DIR_SYSTEM', '/home2/linencas/public_html/system/');
define('DIR_LANGUAGE', '/home2/linencas/public_html/catalog/language/');
define('DIR_TEMPLATE', '/home2/linencas/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/home2/linencas/public_html/system/config/');
define('DIR_IMAGE', '/home2/linencas/public_html/image/');
define('DIR_STORAGE', '/home2/linencas/storage/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');

admin/config.php:

// HTTPS
define('HTTPS_SERVER', 'https://www.linencasa.com/admin/');
define('HTTPS_CATALOG', 'https://www.linencasa.com/');

// DIR
define('DIR_APPLICATION', '/home2/linencas/public_html/admin/');
define('DIR_SYSTEM', '/home2/linencas/public_html/system/');
define('DIR_LANGUAGE', '/home2/linencas/public_html/admin/language/');
define('DIR_TEMPLATE', '/home2/linencas/public_html/admin/view/template/');
define('DIR_CONFIG', '/home2/linencas/public_html/system/config/');
define('DIR_IMAGE', '/home2/linencas/public_html/image/');
define('DIR_STORAGE', '/home2/linencas/storage/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
define('DIR_CATALOG', '/home2/linencas/public_html/catalog/');

And do NOT see any issues. Logged into Admin - popup is NOT showing up anymore.
All seems working as it was before i moved the storage..

Except the main issue - images still not showing up...

Is it .htaccess I need to fix now? See it attached (I renamed it to *.txt so I can attach it here).

Thank you.

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm

Post by sw!tch » Sat Feb 22, 2020 7:14 am

What permissions do you have on the image folder (755 ) ?

Backup and [ learn how to recover ] before you make any changes.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by TG1313 » Sat Feb 22, 2020 7:18 am

correct. 755.

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm

Post by sw!tch » Sat Feb 22, 2020 7:18 am

Anything in your error log?

If your server doesn't have enough memory to generate a cache of the image, it might be a reason they are not showing up.

I would also check and see if your owner/group permission are correct on the image folder.

Otherwise double check your paths.

Backup and [ learn how to recover ] before you make any changes.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by TG1313 » Sat Feb 22, 2020 7:28 am

the one that located in public_html, I do not see anything but lines from couple hours ago:

21-Feb-2020 02:37:39 UTC] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /home3/linencas/public_html/system/library/log.php on line 31

I went through a couple pages on my website, clicked on images, but nothing new appeared in the error log...
Please direct if I am doing this wrong..

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm

Post by sw!tch » Sat Feb 22, 2020 7:28 am

Your path is wrong.

Code: Select all

/home3/linencas/public_html/
You have /home2/ in your code examples above, yet your error log is reporting /home3/
Last edited by sw!tch on Sat Feb 22, 2020 7:32 am, edited 1 time in total.

Backup and [ learn how to recover ] before you make any changes.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by TG1313 » Sat Feb 22, 2020 7:32 am

I see it now... Could you please help me understand what is home2 and home3 and where do i find what's installed where...

I see my admin/error.log also talks about home3:

Code: Select all

[21-Feb-2020 02:38:31 UTC] PHP Warning:  fopen(/home2/storage/logs/error.log): failed to open stream: No such file or directory in /home3/linencas/public_html/system/library/log.php on line 22
[21-Feb-2020 02:38:31 UTC] PHP Warning:  fwrite() expects parameter 1 to be resource, bool given in /home3/linencas/public_html/system/library/log.php on line 31
[21-Feb-2020 02:38:31 UTC] PHP Warning:  fwrite() expects parameter 1 to be resource, bool given in /home3/linencas/public_html/system/library/log.php on line 31
[21-Feb-2020 02:38:31 UTC] PHP Warning:  fwrite() expects parameter 1 to be resource, bool given in /home3/linencas/public_html/system/library/log.php on line 31
[21-Feb-2020 02:38:31 UTC] PHP Warning:  fwrite() expects parameter 1 to be resource, bool given in /home3/linencas/public_html/system/library/log.php on line 31
[21-Feb-2020 02:38:31 UTC] PHP Fatal error:  Uncaught Error: Class 'Scssc' not found in /home3/linencas/public_html/admin/controller/startup/sass.php:9
Stack trace:
#0 /home3/linencas/public_html/system/engine/action.php(79): ControllerStartupSass->index()
#1 /home3/linencas/public_html/system/engine/router.php(67): Action->execute(Object(Registry))
#2 /home3/linencas/public_html/system/engine/router.php(46): Router->execute(Object(Action))
#3 /home3/linencas/public_html/system/framework.php(165): Router->dispatch(Object(Action), Object(Action))
#4 /home3/linencas/public_html/system/startup.php(104): require_once('/home3/linencas...')
#5 /home3/linencas/public_html/admin/index.php(19): start('admin')
#6 {main}
  thrown in /home3/linencas/public_html/admin/controller/startup/sass.php on line 9
Last edited by straightlight on Sun Mar 01, 2020 4:31 pm, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm

Post by sw!tch » Sat Feb 22, 2020 7:33 am

Updated my reply above with additional explanation.

In short its the path to your user folder. Unless these error logs are from another server you migrated from, your path is incorrect.

So in your config.php, try changing home2 to home3 and it should resolve your issues.

Backup and [ learn how to recover ] before you make any changes.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by TG1313 » Sat Feb 22, 2020 7:44 am

WOW. Updated both config.php and admin/config.php and it works now!!!
I see all images again.

Could you please explain again what are those home2 and home3? how/where are they defined?
I know you said "its the path to your user folder" but could you please dummie it down for me?

Thank you so so much again!

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm

Post by sw!tch » Sat Feb 22, 2020 7:52 am

Its assigned by the web server, basically its the path to your own specific folder/user account.. You can usually find this in your cPanel account. You can google for more info , but that's the gist of it.

Backup and [ learn how to recover ] before you make any changes.


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by TG1313 » Sat Feb 22, 2020 8:00 am

Thank you! I tried to find this in cPanel (bluehost) with no luck but I'll try again. Thank you so much again!!!!!

Newbie

Posts

Joined
Fri Feb 21, 2020 1:12 pm
Who is online

Users browsing this forum: No registered users and 3 guests