June 21st, 2012, 02:40 PM
PHP warning suhosin
I am wondering what normally triggers this warning, it is spaming my logs on new php files I write I am attempting to write php 5 object oriented code but this problem keep occuring.
What it is that I need to watch for to avoid writing suhosin requiring code. Rolling back the version of PHP is not a option. I've been trying to figure out what causes this error.
PHP Warning: PHP Startup: Suhosin Extension does not officially support PHP 5.2 and below anymore, because it is discontinued. Use it at your own risk.
Last edited by TaronDcross; June 21st, 2012 at 03:37 PM.
Reason: simple grammar fix
June 21st, 2012, 03:12 PM
As a guess, are you using PHP version 5.2 or lower?
Comments on this post
I ♥ ManiacDan & requinix
This is a sig, and not necessarily
a comment on the OP:
don't be a help vampire
June 21st, 2012, 03:34 PM
I put in a support ticket about a min ago asking my webhost to update and address that problem, it would appear that indeed my development/production server is running that.
Originally Posted by ptr2void
June 22nd, 2012, 08:39 AM
The support won't fix it because "if they upgrade to a later version of php" it will affect other users.......
Originally Posted by TaronDcross
Is there really a difference between php 5.2.17 and php 5.3.x or 5.4.4? if they upgraded it that might cause compatibility issues with code? So my host tells me I need to upgrade my hosting to VPS which means 20$ a month for hosting just to get a non-broke suhosin php version......
So a little help I'd like to link them official proof that they can make the upgrade without "adversely affecting users"
June 22nd, 2012, 04:43 PM
Yes, there is. They don't just bump the version numbers because the feel like it. The version numbers are of the form Major.Minor.Patch. A bump in the Major number means there are major changes which are likely cause issues or be incompatible with older code. A bump in the minor version means there are be significant changes which may cause issues to poorly written code. A bump in the patch number means small bug fixes/improvements that should not have any impact on existing code.
Originally Posted by TaronDcross
There is no such thing, because the host is correct in saying that upgrading PHP may adversely impact other clients.
For some details of changes made and the impact upgrading might have, view the migration guides in the manual. There is a whole section detailing changes that may break existing code:
5.2.x -> 5.3.x
5.3.x -> 5.4.x
Is your host the one that enabled Suhosin, or did you enable it yourself? If your host enabled it then they probably should fix it, or at least disable the warning if possible. If your the one that enabled it, then disable it and forget it.
Recycle your old CD's, don't just trash them
If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
June 23rd, 2012, 06:37 AM
Changing hosts is also an option ...
Comments on this post
without exception, there is no rule ...
Handmade Irish Jewellery
Targeted Advertising Cookie Optout (TACO) extension for Firefox
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones
09 F9 11 02
9D 74 E3 5B
D8 41 56 C5
63 56 88 C0
Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
-- Jamie Zawinski
- the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...
BIT COINS ANYONE
June 23rd, 2012, 07:29 PM
That is the option I will be taking, because they won't disable suhosin even through they're the ones who enabled it, they won't backdate suhosin to be compatible with php 5.2.17, nor will they upgrade php 5 to 5.3.x or later.
Originally Posted by Axweildr
June 24th, 2012, 09:21 AM
this to get around warning a wise idea?
is using this line of code wise?
Does this only deal with the suhosin while leaving other warnings such as when I use deprecated functions that I will be informed in the log file?
error_reporting(E_ALL ^ E_SUHOSIN);
June 24th, 2012, 10:41 AM
I've never seen that before, but if it works my guess would be that it would not suppress any of the normal PHP notices, warnings or errors.
June 24th, 2012, 10:50 AM
The main reason I ask is I want to make sure I am coding best practice style still even if I use it.
that line appears to work. my host hasn't been very helpful I just guessed that maybe trying that for the warnings from SUHOSIN would fix error log problem. My host supposedly disabled the SUHOSIN for me but I was still getting the errors go figure. I will move to a new host later if I have to use that in every file I write I am on a project with a friend we'll probably open source but it's a milestones based project management tool. I was getting really annoyed by the warnings spamming the error log bad enough I have to manually dl and open the error_log file with notepad (yes thats my own problem not hosts that I have to open it with notepad to read it) but I don't like then having zillions of lines that I have to sort through each time to find the real error over their bad server settings. So now that I can finnally ignore the warnings from suhosin I am going to move on probably faster since the error will always be one of a very few errors listed.
June 24th, 2012, 10:59 AM
Is E_SUHOSIN actually a valid constant? ie is it defined?
June 24th, 2012, 11:38 AM