0

So I'm trying to figure out a website error for my friend. Unfortunately, I'm not that good at PHP and unfortunately his website is...ancient. I tried referring to other questions here, but as my code example looks a tad different, I'm worried about messing something up.

Right now, the site is permanently down with the following error:

Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /customers/1/f/7/WEBSITEDOMAIN.COM/httpd.www/includes/framework.php:21 Stack trace: #0 /customers/1/f/7/WEBSITEDOMAIN.COM/httpd.www/index.php(22): require_once() #1 {main} thrown in /customers/1/f/7/WEBSITEDOMAIN.COM/httpd.www/includes/framework.php on line 21

So, I referred to the website files, oddly enough, there are four framework.php files but I assume some of them might be irrelevant. All of them contain the following code somewhere around line 21:

@set_magic_quotes_runtime( 0 );
@ini_set('zend.ze1_compatibility_mode', '0');

So, my idea is, remove it all, or just the first line as the error message refers to. This is what the other questions on SO hinted at, as the first line is completely irrelevant with the newest php version. However, as this is a business website I'm also hesitant to mess around, even more so as the owner understands nothing about code.

Any pointers for a complete newbie? (Websitedomain.com is an example address)

Thanks

Benjamin
  • 1
  • 1
  • 1
  • Check PHP version... set_magic_quotes_runtime has been removed in PHP 7 – Adam Nov 15 '18 at 16:21
  • Ah I should have mentioned this. The issue comes from the website being forced over to 7.2. So I understand the issue comes from magic_quotes being completely excluded in the new version, just unsure on how to fix this. – Benjamin Nov 15 '18 at 16:23
  • Call to undefined function set_magic_quotes_runtime() is your clue... it's native PHP: http://php.net/manual/en/function.set-magic-quotes-runtime.php but isn't in the latest version... so that's more than likely your issue. – Adam Nov 15 '18 at 16:23
  • Ahh, I would comment it out, and test the website.. see what it affects... it's being set to FALSE so worth removing it and seeing whats happens... – Adam Nov 15 '18 at 16:24
  • 3
    As `@set_magic_quotes_runtime( 0 );` turns it off. I would assume that removing those lines would do no harm ___Famous last words :)___ – RiggsFolly Nov 15 '18 at 16:25

0 Answers0