The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP function

Discussion in 'General Discussion' started by tripper, Feb 20, 2007.

  1. tripper

    tripper Member

    Joined:
    Feb 11, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    N.W. Iowa
    Hello,

    I had to enable the php dl() function for a client, in the php.ini file to enable_dl = on

    Is there a way to enable the function for just this one particular domain via
    the .htaccess or httpd.conf within the VirtualHost directive instead of globablly ??

    thx's
    Mickalo
     
  2. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    You can try adding a php.ini under the public_html directory for that user.
     
  3. tripper

    tripper Member

    Joined:
    Feb 11, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    N.W. Iowa
    you mean put a copy of the global php.ini file, with the dl() function enabled, within their public_html folder ??

    Mickalo
     
  4. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    I believe that should work.. worth a try
     
  5. tripper

    tripper Member

    Joined:
    Feb 11, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    N.W. Iowa
    we'll give it a try and see what happens.

    thx's
    Mickalo
     
  6. theswing0

    theswing0 Registered

    Joined:
    Feb 22, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    php.ini in /public_html/ folder

    did it work?

    Neil.
     
  7. tripper

    tripper Member

    Joined:
    Feb 11, 2007
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    N.W. Iowa
    no, unfortunately not.

    Mickalo
     
  8. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Recent versions of PHP disabled the ability to have custom php.ini files in home directories..
    so that might be the reason it didn't work..
     
  9. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The custom php.ini file will only work if you are running phpsuexec.

    Probably the best solution is to just add the library to your main php.ini file, making it unnecessary for the dl() function to be used. I don't know what libraries is attempting to be called, but I have run into issues where a website needs the Ioncube loader and the message states that the script is unable to load ioncube because the dl() function is disabled. I just add the ioncube libraries into the main php.ini file, making it available for all accounts, and this resolves this issue.

    If the library you are trying to load is of a questionable nature, then I would not recommend doing this. Of course, if the library is of questionable nature, I wouldn't recommend loading it period.
     
Loading...

Share This Page