#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Location
    Virginia
    Posts
    46
    Rep Power
    3

    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.
    Code:
    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.
    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.
    Last edited by TaronDcross; June 21st, 2012 at 03:37 PM. Reason: simple grammar fix
  2. #2
  3. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,551
    Rep Power
    2337
    As a guess, are you using PHP version 5.2 or lower?

    Comments on this post

    • Axweildr agrees : :rolleyes:
    I ♥ ManiacDan & requinix

    This is a sig, and not necessarily a comment on the OP:
    Please don't be a help vampire!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Location
    Virginia
    Posts
    46
    Rep Power
    3
    Originally Posted by ptr2void
    As a guess, are you using PHP version 5.2 or lower?
    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.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Location
    Virginia
    Posts
    46
    Rep Power
    3
    Originally Posted by TaronDcross
    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.
    The support won't fix it because "if they upgrade to a later version of php" it will affect other users.......

    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"
  8. #5
  9. Wiser? Not exactly.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    5,953
    Rep Power
    4033
    Originally Posted by TaronDcross
    Is there really a difference between php 5.2.17 and php 5.3.x or 5.4.4?
    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.

    I'd like to link them official proof that they can make the upgrade without "adversely affecting users"
    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
  10. #6
  11. 'fie' on me, allege-dly
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2003
    Location
    in da kitchen ...
    Posts
    12,889
    Rep Power
    6444
    Changing hosts is also an option ...

    Comments on this post

    • kicken agrees
    --Ax
    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
    Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ...
    BIT COINS ANYONE
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Location
    Virginia
    Posts
    46
    Rep Power
    3
    Originally Posted by Axweildr
    Changing hosts is also an option ...
    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.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Location
    Virginia
    Posts
    46
    Rep Power
    3

    this to get around warning a wise idea?


    is using this line of code wise?
    Code:
    error_reporting(E_ALL ^ E_SUHOSIN);
    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?
  16. #9
  17. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    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.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Location
    Virginia
    Posts
    46
    Rep Power
    3
    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.
  20. #11
  21. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    Is E_SUHOSIN actually a valid constant? ie is it defined?
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  22. #12
  23. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,690
    Rep Power
    1958

IMN logo majestic logo threadwatch logo seochat tools logo