SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: ini_set php

  1. #1
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ini_set php

    hi,

    when i set ini_set('memory_limit', '5M') it does not take any effect in my server but it works fine in my localhost.

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2006
    Location
    Wigan, Lancashire. UK
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by divinequran View Post
    when i set ini_set('memory_limit', '5M') it does not take any effect in my server but it works fine in my localhost.
    I believe there were changes to the memory_limit setting around version 5.2.1, prior to which it couldn't be changed by ini_set()
    ---
    Development Projects:
    PHPExcel
    PHPPowerPoint

  3. #3
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i use php 4 version, it is said that my server supports php5 and as well as php4

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Did you restart the server? (not the hardware I mean stop/start apache)

  5. #5
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, i did it in my localhost, how do i restart my server only hosting provider have to do it. but is it necessary to restart server if i do so in coding?

  6. #6
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    I am sorry, my previous reply was misleading, you only need to stop start if you change a value in the php.ini file.

    Whether ini_set() will work on shared hosting may well depend on if the hosting company allows ini_set to be overridden in scripts. I would doubt it, I think you may need to contact their support to check for yourself.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •