Welcome Guest, Not a member yet? Register   Sign In
Function set_magic_quotes_runtime() is deprecated
#1

[eluser]coolcom[/eluser]
Hello

A few days ago I started to get this message on my website:

Code:
A PHP Error was encountered

Severity: 8192

Message: Function set_magic_quotes_runtime() is deprecated

Filename: codeigniter/CodeIgniter.php

Line Number: 60
A PHP Error was encountered

Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: libraries/Loader.php

Line Number: 255

http://vindinghoved-kursuscenter.dk/

I have tried downloading the the latest version of codeigniter but when i overwrite the system folder and the index file I end up with a blank page and no idea where to solve this.

Please help me Smile
#2

[eluser]Kip zonder Kop[/eluser]
Change the first line of index.php in something like:

Code:
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));

and you'll be all right I guess.

From the PHP manual

Quote:Warning

This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.

If this just started a few days ago, your PHP version must have been upgraded.
#3

[eluser]BrianDHall[/eluser]
To fully 'fix' the issue, delete your whole application directory and install the newest version of CI. Then you can copy over your customized files (config, controllers, etc) and your error should go away.

CI 1.7.2 supports php 5.3, but 1.7.1 uses features that became officially deprecated as of PHP 5.3, as Kip points out.

I had a similar problem to you when I tried to upgrade CI version, not sure what caused it but fully deleting, reinstalling, and copying over my files fixed it.
#4

[eluser]coolcom[/eluser]
Even though i put in:

error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));

I still get the blank page.

What else can i do to locate the error?
#5

[eluser]coolcom[/eluser]
I have tried to install PHP 6 on my local server and now i am getting an erro message:

Fatal error: Non-static method CI_Base::CI_Base() cannot be called statically, assuming $this from incompatible context in C:\AppServ\www\vindinghoved\application\libraries\Controller.php on line 109

This is line 109:

CI_Base::__construct();

What is wrong?
#6

[eluser]BrianDHall[/eluser]
Oh, I wouldn't try to mess with PHP6 unless you have a really tight grasp on what you are doing - it is no where near production ready, nor supported by CI/EllisLabs.

With that said, I have no idea what that could mean...
#7

[eluser]coolcom[/eluser]
I really need an solution for this because currently my website cannot be shown
#8

[eluser]coolcom[/eluser]
I just found out the server runs PHP 5.3 instead of 6.

But it still the same error Sad

No one who knows a solution?
#9

[eluser]n0xie[/eluser]
Make sure you upgraded to the latest version of CI (1.7.2 as of today).

A white page usually means one of two things:
- there is a database error
- error reporting is forced to off on a live environment and there is an error

Did you:
- Check your config files are all correct.
- Copy the whole application to a local environment where you have PHP5.3 running and see if you can replicate the problem making sure error reporting is on.
- Enabled logging to see if CI says something is wrong.
- Make sure this is correct:
Quote:C:\AppServ\www\vindinghoved\application\libraries\Controller.php
since it looks like a it should be a system folder, not the application folder.
#10

[eluser]coolcom[/eluser]
The error reporting was forced to off but i have switched it to on now and i am getting this:

Fatal error: Non-static method CI_Base::CI_Base() cannot be called statically, assuming $this from incompatible context in C:\AppServ\www\vindinghoved\application\libraries\Controller.php on line 109




Theme © iAndrew 2016 - Forum software by © MyBB