Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    654

    Default Is there a way to make php ignore ini_set ?

    Hi,

    I'd like to silently ignore the ini_set command on one server - is this possible? If I disable the function, the script I'm using wont run. Its on our own server so no customers would be affected.

    Why would I want to do this?

    A script I'm using has hard coded the memory_limit variable and it is ioncube protected so I cant edit it to change the limit. The number of records pulled out of the database by the script is so many that it is forcing the hard coded memory limit to be exceeded and the script is failing.

    I need the ini_set command to be ignored by PHP rather than dissallowed so that the script can use more memory based on the limit in the server's php.ini and work correctly. Its a temporary fix until I can get in touch with the developer to make the changes to the script.

    I've had a good old search around and come up with nothing so I'm trying this forum as a last resort.

  2. #2
    Member
    Join Date
    Feb 2005
    Posts
    9

    Default

    suhosin can do this.

    http://www.hardened-php.net/suhosin/...n.memory_limit

    from the above documentation it sounds like it will prevent a script lowering the limit (although I suspect it was developed to prevent a script raising it).

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jan 2006
    Posts
    654

    Default

    Excellent, thank you I will give that a go.

Similar Threads & Tags
Similar threads

  1. ini_set or htaccess memory_limit kills php processing
    By mrlugal in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 12-22-2010, 05:40 PM
  2. enabling ini_set()
    By Chriz1977 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-14-2009, 11:25 AM
  3. should i enable ini_set() ?
    By tyuuu in forum New User Questions
    Replies: 0
    Last Post: 09-28-2008, 12:28 PM
  4. Make cpbackup ignore server load
    By iUnknown in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-14-2008, 08:32 AM
  5. Make counter ignore reload
    By casey in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-07-2003, 08:54 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube