Forums / General Questions / Logs folder not being written to since 2014

Logs folder not being written to since 2014

Started by suedouglas on 3 Mar 2017, 5:46 PM · Views: 743

Results 1 to 7 of 7
3 Mar 2017, 5:46 PM
#1
suedouglas avatar

suedouglas

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Logs folder not being written to since 2014

I'm running on version 1.5.4

Getting: WARNING: An Error occurred, please refresh the page and try again.

I'm having problems with the /logs folder not being written to since 2014, I'm getting an error message on an INSERT statement to the database from a .php file despite writing it as many different ways that I can find in other zen cart .php files. The error I'm getting is WARNING: An Error occurred, please refresh the page and try again. (I have looked at all the forum posts with this error message and it says to look at the /logs file) I also have a /cache file (not sure why, because I'm on 1.5.4), but that's not being written to today either.
The permissions on the /logs file was 755 (which is probably OK?) but I tried changing the permissions to 777 and I'm still not getting a file being written to in that folder today either . I've tried going to admin/tools/store_manager and purging the /logs folder and I get an HTTP 500 error message when I try and do that!

Has anyone got any idea as to why the /logs myDebug file isn't being created/written to please?

Thanks

3 Mar 2017, 6:02 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Logs folder not being written to since 2014

Well, would suggest reverting back to 755 if able, then look in includes/configure.php and admin/includes/configure.php at the DIR_FS_LOGS constant (if present) compare the path of that constant to that of your DIR_FS_CATALOG constant. They should look relatively the same except the _LOGS one will include the folder logs at the end. If the right side includes the constant DIR_FS_CATALOG that is fine, as long as the information that follows and is appended "makes sense" or is a continuation of the previous constant. (use substitution to "see" what the final result is.)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Mar 2017, 7:08 PM
#3
suedouglas avatar

suedouglas

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Re: Logs folder not being written to since 2014

mc12345678:

Well, would suggest reverting back to 755 if able, then look in includes/configure.php and admin/includes/configure.php at the DIR_FS_LOGS constant (if present) compare the path of that constant to that of your DIR_FS_CATALOG constant. They should look relatively the same except the _LOGS one will include the folder logs at the end. If the right side includes the constant DIR_FS_CATALOG that is fine, as long as the information that follows and is appended "makes sense" or is a continuation of the previous constant. (use substitution to "see" what the final result is.)

Thanks for the quick response!
-the /includes/config.php is: define('DIR_FS_LOGS', '/home1/thedesig/public_html/logs');

-the /admin/includes/config.php is: define('DIR_FS_CATALOG', '/home4/thedesig/public_html/');

The only thing I can see that's different is that one has /home1/ and the other is /home4/
Is that what the problem is? That they should both be either /home1/ or both be /home4/?

Thanks

3 Mar 2017, 7:22 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Logs folder not being written to since 2014

suedouglas:

Thanks for the quick response!
-the /includes/config.php is: define('DIR_FS_LOGS', '/home1/thedesig/public_html/logs');

-the /admin/includes/config.php is: define('DIR_FS_CATALOG', '/home4/thedesig/public_html/');

The only thing I can see that's different is that one has /home1/ and the other is /home4/
Is that what the problem is? That they should both be either /home1/ or both be /home4/?

Thanks
One or both is wrong, generally speaking.

Understand, some hosts have a sort of "floating" root directory, but will identify in their support area what should be used for php paths. Ie. At some points in time home1 may be correct, but to support server loading things may transition over to home4. But if the host suggested path is used, it wouldn't matter because they would all be accessible at any time, regardless of where the host internally stored things.

Consistency is ideal. :)

I'd try setting logs to home4 and then attempt an error condition. Be sure both store and admin are same.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

3 Mar 2017, 7:25 PM
#5
suedouglas avatar

suedouglas

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Re: Logs folder not being written to since 2014

Also forgot this one ...

-the /admin/includes/config.php is: define('DIR_FS_LOGS', '/home4/thedesig/public_html/logs');

So it looks like the admin file has /home4/ and the other has /home1/

3 Mar 2017, 7:26 PM
#6
suedouglas avatar

suedouglas

New Zenner

Join Date:
Nov 2008
Posts:
45
Plugin Contributions:
0

Re: Logs folder not being written to since 2014

OK thanks I'll try that!

Thanks

3 Mar 2017, 7:32 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Logs folder not being written to since 2014

BTW, the cache folder is part of the system.
In times past it was used for caching data as well as receiving the mydebug logs; however, that was transitioned in the early days of ZC 1.5.x so that logs would be in one place and the cache would still be used as applicable, but be separate.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...