Warning Messages on homepage


Ritzarolli
Asked:
2013-06-18 3:59 pm EST

Hits: 968
I noticed a few days ago that my website has been showing some weird error messages in the background. I am not sure what to do to get rid of them. All of the content on my pages seem to be running fine. I am using Indexhibit also, so I am unsure if it is a problem there or with something in my cPanel. This is a portion of what I am seeing:


Warning: set_magic_quotes_runtime() [function.set-magic-quotes-runtime]: 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 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/marisa8/public_html/ndxz-studio/defaults.php on line 16

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/marisa8/public_html/ndxz-studio/defaults.php on line 16

Has anyone else had this problem?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User

0

Arn
Staff
17,855 Points
2013-06-18 4:55 pm EST
Hello Ritzarolli,

Thanks for the question! The main issue circles around error reporting. The main error had to do with the timezone setting not set. I set it to Central time (based on your account) in the PHP.INI file. Here's an article that explains this issue: Setting the Timezone in PHP.INI. I added date.timezone="America/Louisville" in the PHP.INI file to set the timezone.

After that, the remaining errors were as follows:

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/marisa8/public_html/ndxz-studio/defaults.php on line 16
Deprecated: Assigning the return value of new by reference is deprecated in /home/marisa8/public_html/ndxz-studio/common.php on line 73
Deprecated: Assigning the return value of new by reference is deprecated in /home/marisa8/public_html/ndxz-studio/common.php on line 93

Deprecation errors are non-fatal errors that basically indicate a function that will no longer be available in the next iteration of PHP (in this case). In order to remove these errors, you would need to go back into the PHP.INI, search for error handling, and simply change the setting so that you don't see those errors pop up. I have changed so that only fatal errors and user-generated errors will appear.

So, at this time when you bring up your website, you should no longer see the error messages appearing! I hope this helps! Let us know if you require any further assistance!

Regards,
Arnel C.

You must login before you can post a comment about this answer.

Thanks so much Arnel!
Ritzarolli
8 Points
2013-06-18 9:20 pm EST
Great info... this works - thanks! One thing to add is that if you have a shopping cart integrated to your site, you may need to copy php.ini from the root of your site to the root folder of the shopping cart. Otherwise, you may still see deprecated erros on your cart pages.

-Dan
NanoNinja2
3 Points
2014-01-28 10:08 pm EST
(Keeping in mind i have added to the top of my php.ini: date.timezone = "America/Toronto")

I hope this is correct and won't interfere with the server in the states.

To continue:
Following these steps i have reduce my errors appearing on my main page to this:

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/jdwebb5/public_html/ndxz-studio/defaults.php on line 16

Deprecated: Assigning the return value of new by reference is deprecated in /home/jdwebb5/public_html/ndxz-studio/common.php on line 73

Deprecated: Assigning the return value of new by reference is deprecated in /home/jdwebb5/public_html/ndxz-studio/common.php on line 93

But I am at a loss to correctly change the PHP.INI file and correctly alter the error handling. I don't code so even knowing for certain which part of the ini file is instruction / code to edit is a bit of a challenge. I know I'm close to solving this any help would be appreciated, thanks!

Dave
Webb4567
3 Points
2014-09-01 4:47 pm EST
Hello Webb4567,

It appears that the code on your site was written for an older version of PHP which is causing these errors. To eliminate them, you may want to change your PHP version.
JeffMa
9,576 Points
Staff
2014-09-02 2:03 pm EST
Hello,

The php.ini describes the different error reporting settings in it. All you need to do is find the one that gives messages but not warnings, and uncomment it by removing the pound sign '#' in front of it. Be sure to comment the other setting by placing a pound sign in front of it.

Kindest Regards,
Scott M
Scott
20,328 Points
Staff
2014-09-02 2:12 pm EST
Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!