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 not finding my NetPBM modules

Discussion in 'General Discussion' started by schwim, Aug 21, 2008.

  1. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Hi there guys,

    I installed netpbm via rpm through WHM. Running a whereis on the modules, shows them in /usr/bin(yay!). Problem is, Gallery is still stating that they can't be found(boo!).

    Chirpy's services have been run on the server, so I guess it might be a case of not running scripts outside of allowed paths, but I would have thought /usr/bin would be an ok path.

    any ideas?

    thanks,
    json
     
  2. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    I've chmodded pnm* to 755. I've disabled PHP's open basedir restriction.

    I still can't get it to be recognized through PHP(via the gallery script).

    I'm at a complete loss and unfortunately, 4 of the sites I need to move pronto from a dying server require these modules.

    Any help would be greatly appreciated.

    thanks,
    json
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    I think Gallery uses the exec() function in PHP. Do you have the exec() function disabled in PHP?
     
  4. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    Ding Ding!

    That was it :)

    Is there a way to enable it per account(for instance in .htaccess), or is it a blanket feature?

    What are your opinions concerning the vulnerabilities of having it enabled?

    thanks,
    json
     
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Are you running PHP through apache (mod_php) or as CGI (suphp)?
     
  6. schwim

    schwim Well-Known Member

    Joined:
    Aug 2, 2006
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
    It's through apache.

    thanks,
    json
     
  7. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Unfortunately there's not a way to set this on a per user basis if PHP is running through mod_php (that I am aware of anyway).

    As far as enabling the exec() function, that is a decision that is completely up to you. If you want my advice, I would advise against enabling it server-wide. It can open the door to various PHP shell scripts on your server. If you are absolutely sure that all of the scripts on each and every account on your server is up-to-date and will be kept up-to-date, then the concerns over enabling the exec() function are lessened.

    If you were running PHP in a CGI environment with suphp, then you would be able to assign a custom php.ini file for a particular account or a particular path on an account. Then you could enable the exec() function for that particular area of the server, while still having it disabled in the server-wide php.ini and disabled by default. This is how I operate all of my servers. I don't have a specific problem enabling certain function for certain paths on some accounts, I just don't want them enabled by default on all accounts.
     
Loading...

Share This Page