Deprecated problem because of PHP version (SOLVED)

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Deprecated problem because of PHP version (SOLVED)

Postby LEDFanCDN » 06. October 2011 19:22

OK now I have another problem because PHP version is causing my vbulletin to display error messages.

On my forum I see this (forum loads but with these messages above):
Code: Select all
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 49
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 101
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 105
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 113
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 124
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 128
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 136
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 205
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 383
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\class_core.php on line 2552


and for my admin panel which does not load at all, just the login screen but then just displays the same error messages:
Code: Select all
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 49
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 101
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 105
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 113
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 124
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 128
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 136
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 205
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\init.php on line 383
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\dispo\forum\includes\class_core.php on line 2552

[/code]

I tried modifying the php.ini file

display_errors = On
to
display_errors = OFF

and
error_reporting = E_ALL | E_STRICT
to
error_reporting = E_ALL & ~E_DEPRECATED

but nothing works.

What's my next step? Is there a way to downgrade my PHP version before 5.3 or I need to unistall XAmpp and use version 1.7.0?
LEDFanCDN
 
Posts: 7
Joined: 06. October 2011 04:47

Re: Deprecated problem because of PHP version

Postby Altrea » 06. October 2011 19:23

Do you have restarted Apache after the change in the php.ini?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Deprecated problem because of PHP version

Postby LEDFanCDN » 07. October 2011 01:14

Sorry I forgot to say that, yes I did.
LEDFanCDN
 
Posts: 7
Joined: 06. October 2011 04:47

Re: Deprecated problem because of PHP version

Postby Altrea » 07. October 2011 01:41

Please check the error_reporting level with the phpinfo() function which can be found in your XAMPP Administration page (http://localhost/xampp/)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Deprecated problem because of PHP version

Postby LEDFanCDN » 07. October 2011 01:58

OK. I just checked and I have a value of 22527 for both the Local and Master values.
LEDFanCDN
 
Posts: 7
Joined: 06. October 2011 04:47

Re: Deprecated problem because of PHP version

Postby Altrea » 07. October 2011 02:51

This Value is okay. 22527 is the value for E_ALL & ~E_DEPRECATED

So, two possibilities:
- your site will be sended from your Browsercache. please clear your Browsercache to eliminate this possibility.
- your error_reporting level will be overwritten by a .htaccess rule or a php setting. So, please check your .htaccess files (if any of them exists) and search your sourcecodes for the error_reporting function. Most common this will be used in a very central file like index.php. I recommend to use an editor like Notepad++ to scan the sourcecode of multiple files for that.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Deprecated problem because of PHP version

Postby LEDFanCDN » 07. October 2011 03:11

Altrea wrote:So, two possibilities:
- your site will be sended from your Browsercache. please clear your Browsercache to eliminate this possibility.

Cleared all cache and tried with Firefox, Opera, Safari and Chrome; same results

Altrea wrote:- your error_reporting level will be overwritten by a .htaccess rule or a php setting. So, please check your .htaccess files (if any of them exists) and search your sourcecodes for the error_reporting function. Most common this will be used in a very central file like index.php. I recommend to use an editor like Notepad++ to scan the sourcecode of multiple files for that.

I have no .htaccess file as it's a local server only. I only use .htaccess when I put my site online. I used a local site first to test my forum then I move it online.

Could you also give me some answers to my first two questions? Can I use another version of php with Xampp 1.7.7? If so, how do I do this? Finally, if none of these soltuions work, I guess that I should uninstall this version and use 1.7.0, no?

Thanks for your support.
LEDFanCDN
 
Posts: 7
Joined: 06. October 2011 04:47

Re: Deprecated problem because of PHP version

Postby Sharley » 07. October 2011 03:16

Before resorting to installing an older version try this setting which has helped some users with this problem and may allow you to move forward for now and by the time a new PHP version deprecates this setting, hopefully your scripts author may have cleaned up the code and issued an upgrade:

error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR

This give just errors not messages.

Same issue with a user selected fix:
viewtopic.php?f=16&t=48404

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Deprecated problem because of PHP version

Postby LEDFanCDN » 07. October 2011 03:28

Great! This worked, no more error lines are showing on top of my screen and I now can access my Admin Panel!

Many thanks to both of you!
LEDFanCDN
 
Posts: 7
Joined: 06. October 2011 04:47

Re: Deprecated problem because of PHP version

Postby Altrea » 07. October 2011 03:32

That are good news :D
But i would recommend you to clean your code to get rid of the messages completely. Otherwise it will not work with later PHP versions.
Or id thats a script by anyone else in the internet, search for a newer version of it.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 107 guests