This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Timezone error
#1

Greetings,

Just installed the program successfully, so far so good!

However in my dashboard I have "There are errors that need attention soon"

In the error reporting, it says:

[11-Apr-2020 06:10:12 UTC] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in *************************************/comments/system/library/task.php on line 30

In my "Settings/System" I have my timezone properly set (America/New York)

If anyone could advise on how to fix this, thank you in advance. Huh
Reply
#2

Hi thanks for reporting this. It appears to be a bug with Commentics which can only happen when your PHP installation doesn't set a default timezone. You might want to speak to your host about that so they can set it using their server's php.ini file to 'UTC' at least. In any case I've attached the /system/startup.php file containing a fix. If you replace your /system/startup.php file with it then it should resolve everything. Please let me know.


Attached Files
.php startup.php Size: 7.62 KB  Downloads: 11

Have you completed the interview?
Reply
#3

(11-Apr-2020, 12:09 PM)Steven Wrote:  Hi thanks for reporting this. It appears to be a bug with Commentics which can only happen when your PHP installation doesn't set a default timezone. You might want to speak to your host about that so they can set it using their server's php.ini file to 'UTC' at least. In any case I've attached the /system/startup.php file containing a fix. If you replace your /system/startup.php file with it then it should resolve everything. Please let me know.

Thanks for the reply.

I replaced the file, the error is still there in the admin panel, and when I click reset to clear the error log it says "403 Forbidden, you do not have permission to access this file" and it reset the connection to the server. Huh
Reply
#4

Replaced the file you provided with the original that was uploaded with the package, and if I click reset to clear the log file it STILL says "403 Forbidden, you do not have permission to access this file" and it reset the connection to the server again.
Reply
#5

Okay it sounds like your server is accidentally flagging the action of resetting the log as suspicious. Your server probably has something like 'mod_security' enabled and it's flagging a false positive. So you'd need to raise that issue with your host. If you want to clear the log file yourself manually then either delete or empty this file:

/system/logs/errors.log

Have you completed the interview?
Reply
#6

Well it's giving me fits ... (Aside from the timezone error)

On install, everything passed. Worked like a charm.

In settings, I have approval turned off. I had two different friends test it, only one went through and in admin panel it says I have 1 comment pending approval. I click approve and it takes me to a blank page. It won't add the comment to the page. The other person said when she hit submit comment it hesitated then did nothing, then she got a message "Safari cannot open the page because the network connection was lost

If I try to make a comment, in both Chrome and Firefox, I click submit and the button shades out and then nothing happens, and it resets my connection to the server and then I'm unable to even get in the admin panel. Everything passed and my server meets every requirement (except the timezone error) but even with the error my time is correct in my admin panel. It's not urgent, I'm just testing the page and making sure I have it right before opening it to the public. I really like it so far, and if I can get it working I will gladly upgrade.
Reply
#7

(11-Apr-2020, 06:55 PM)Steven Wrote:  Okay it sounds like your server is accidentally flagging the action of resetting the log as suspicious. Your server probably has something like 'mod_security' enabled and it's flagging a false positive. So you'd need to raise that issue with your host. If you want to clear the log file yourself manually then either delete or empty this file:

/system/logs/errors.log

Deleted the file, now it's a new error:

[11-Apr-2020 15:22:21 America/New_York] PHP Warning:  escapeshellcmd() has been disabled for security reasons in /var/www***************************.com/comments/3rdparty/swift_mailer/lib/classes/Swift/Transport/MailTransport.php on line 259

The mail is set to PHP Swift but it doesn't send emails to my Gmail address at all

I can't get up with my host ... they are actually located in the same area of Washington state where the first cases of Coronavirus broke out in the nursing home so they are all on lockdown like the rest of us LOL
Reply
#8

LMAO I hit the reset button to clear the log in the admin panel and it cleared the log and the "errors that need attention soon" message is gone. Deleting the file as you told me fixed the issue apparently. But I'm still perplexed why it doesn't work for my friends who are testing it for me.
Reply
#9

Even though approval is turned off, a comment may sometimes still need approval due to things like uploading an image or swearing etc. These settings can be customised in Settings -> Processor.

If you go to Settings -> Email -> Setup you can change the method to PHP Basic. This will still use PHP mail but without the benefits of Swift Mailer.

When your friend posted a comment, it probably tried to send you an email about it which crashed the application due to the above Swift Mailer issue. When you posted a comment you were probably logged into the admin area so it knows not to send you an email so no Swift Mailer issue would have occurred.

Have you completed the interview?
Reply
#10

We are close LOL

All error messages are gone. The only issue is the comments needing approval and not approving. It takes me to a blank page when I click approve. My friend did try to upload a meme so I'll work on those settings. We're almost there LOL thanks for your help I appreciate it.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by CommiC
13-Aug-2012, 09:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)