Hi,
Here is a message when I put the code in index.php
Warning: putenv() [function.putenv]: Safe Mode warning: Cannot set environment variable 'TZ' - it's not in the allowed list.
Damn!![]()
Hi,
Here is a message when I put the code in index.php
Warning: putenv() [function.putenv]: Safe Mode warning: Cannot set environment variable 'TZ' - it's not in the allowed list.
Damn!![]()
All good now, got the hosting provider to allow it and now it is working.
Thanks for your top support!![]()
Glad you got it sorted
You may have other problems in the future
Quoting from What are the Server requirements to run Zen Cart?
"safe_mode off recommended, also for security reasons "
Dear Gilby,
I have tried to apply your mod to a new zen cart installation on my server that has about 7h diference.
According to your instructions, for the Zen Cart 1.3.9h we only need to:
(on the 139gh folder)
Edit the files
- YOUR_RENAMED_ADMIN\includes\extra_configures\time_zone_fix.php (add the desired time zone - in my case was Africa\Luanda)
- Rename the folders YOUR_RENAMED_ADMIN to the same name as my admin folder on the server.
- Copy the file NEW_ADMIN_LIKE_SERVER\includes\extra_configures\time_zone_fix.php
After that, test the Admin area to see if the date is corrected according to desired timezone.
As you refer, until this step we should be abble to see the change on the server, if not, we should stop. This is my problem. I have not tested the remmaing steps because did not worked for me for admin area. There is no change on the server.
Went to "Environment variables" and looked for the TZ variable and it does not exists.
So I need to ask you:
- Don't we need to REPLACE any file on the server?
- I see that the file "time_zone_fix.php" that we should copy to the server is a new one and nothing is replaced... how will Zencart read from this new file?
- Where is this file called from?
- Do we need to rename the file "time_zone_fix.php" to anything else?
I believe I missed something.
Sorry for my English.
Regards
Paulo
Check the server.
Is the file time_zone_fix.php
in the correct directory?
YOUR_NEW_ADMIN_NAME\includes\extra_configures
If not move it there
If it is then you have probably edited it incorrectly.
Post a copy here
Dear gilby,
Thank, you so much for the reply.
I have verified and it is everything instructed and the file was copied to the correct folders on the server.
Attached is a copy of the file screenshot.
I think I have missed something since I do not understand how will the system read the contents of the file "time_zone_fix.php"...
Where is it called from?
Regards
Paulo
It looks fine to me!
Maybe the php version on your server doesn't support that region?
You could also try a different time zone to see if that works?
All files in the extra_configures directory are auto loaded by zen cart so it automatically loads each time you access an admin page.
If it loads correctly you will find it listed at the botton
of the "Evironment Variables" in admin->version
Last edited by gilby; 11 Feb 2012 at 01:22 PM.
Hi gilby,
Thank you once again. I found that the TZ envinonment is not being loaded on my php version.
I will try to contact support to see how can they solve this issue.
Anyway, perhaps later I will request your help once more.
Thank you once again
Have a agreat weekend
Paulo