Error with Function get_magic_quotes_gpc() is deprecated

http://informations.epizy.com (DOOMNEZEU)

Error Message : Function get_magic_quotes_gpc() is deprecated

on php for
http://informations.epizy.com

Other Information

get_magic_quotes_gpc() has been useless ever since PHP 5.4.0

Although magic_quotes_gpc is flagged as dreprecated the default value is still “ON”. So you will explicitly have to put

magic_quotes_gpc = Off

into your php.ini. Commeting out the magic_quotes_gpc-line will not turn magic_quotes_gpc off.

I CANT DUE THIS, HOW TO FIX THIS?? THIS ERROR IS FROM TODAY MORNING!maybee you can fix this in php !!!

I guess we can’t help you with this because we and you can’t edit the php.ini.

Find Alter PHP Config menu on your CPanel,then choose your site (sub)domain.
alter_php_config

1 Like

As I see it, this is a bug in your website, because:

  • Checking for magic quotes shouldn’t be necessary anymore because the functionality was removed from PHP long ago (with PHP 5.4 in 2012).
  • A deprecation “error” is a notice to warn the software developer that a function may be removed in the future. The function still works, which should be all fine. However, this deprecation notice seems to cause your website code to crash, presumably due to bad error handling.

The reason this didn’t break before is because we upgraded from PHP 7.3 to 7.4 this week. The get_magic_quotes_gpc() was deprecated in PHP 7.4, which is why this notice is now.

As a workaround, you can downgrade your account to PHP 5.6.

But ideally, the script developer should handle deprecation errors correctly, and not crash when hitting them, and maybe remove the get_magic_quotes_gpc() function completely (depending on which versions of PHP the script should support).

5 Likes

Thanks for replays. But the problem is not solved until now. I try it all your advice, but dsn’t work. I will try to see in my local server, to see the problem. I will see you soon!!!

Yes, Your local server may not be on the version of php the free hosting servers are on, as on your local server you can have a very old php version. So check the PHP versions match.

1 Like

Comment get_magic_quotes_gpc() function call in your code.

I repeat again, “I try it all your advices”, but dsn’t work.
I try it all the php, 5,4 , 5,5 and 7. The result was the same.
In my local site i can make what i want, and work just fine with php 7, but this not solve my problem, online. I will try find a solution, in the near future. Anyway thanks for replays.

Please note that changing the PHP version can take a few minutes to apply. Try changing the PHP version to 5.6, then wait for half an hour and then try again.

3 Likes

Ok changed in 5.6 are now. Now must to wait, a few hours. Thanks a lot. Yours work are the best!!!

After few hours, the site dsnt work at all. Anyway this is it!

Please just remember that this is a temporary workaround. PHP 5 won’t stay around forever. You have a working site now while you are working to get your site compatible with PHP 7.4. Please don’t wait until your site breaks without a chance of any workaround to get it up to date.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.