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.

Can't find the /usr folder

Discussion in 'General Discussion' started by Luciel, Nov 10, 2005.

  1. Luciel

    Luciel Active Member

    Joined:
    Oct 13, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Ok so i have a problem with oscommerce (i get this error: FATAL ERROR: register_globals is disabled in php.ini, please enable it!) tech support told me to edit a file in the /usr folder in my dedicated folder, so i login via ssh using putty with root account, thing is, the /usr folder is knowhere to be found, i'm kinda lost here :/
     
  2. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator

    I am by NO MEANS an expert lol, so use at your own risk. If I had this problem I see a couple of ways of solving it. You modify or create a .htaccess file in the oscommerce folder and put
    Code:
    register_globals=On
    in it.

    Or in SSH you could type
    Code:
    locate php.ini
    and see where your php.ini file is and set register_globals to on. Mine is located at /usr/local/Zend/etc/php.ini

    Good Luck
     
  3. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Hello,

    You can't override the php.ini settings with .htaccess when running PHP as cgi/phpsuexec.
     
  4. Luciel

    Luciel Active Member

    Joined:
    Oct 13, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Ok. i'll try the second option when i get home as i'm at uni right now and rather not access my server using root account from a foreign computer. I'll post with the results, another thing that's happening since the server restore is a couple of scripts dont work anymore, one is the phpnuke CPmail which lets users create and access horde or neomail mail, once you try to create an account or login you just get a blank page and it worked fine before, another one that doesn't work now and worked before is a flash based chat. just doesn't load. any ideas?
     
  5. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    This is somewhat odd as if you're logging in as root you should be able to see the /usr directory.

    When you log in via SSH, you will be taken to the current user's starting directory, which for the user 'root' would normally be /root. If you're not too familiar with SSH, you may not have spotted this. After logging in as root, try to type the command cd /usr and see what happens. You should find that it takes you to /usr. If not, please post back the error you get, as well as the OS you're running.

    Alternatively, if you want to fiddle with any PHP settings and you do have phpsuexec enabled, you can create local php.ini files to do your bidding. This can contain more or less any settings you would otherwise place in the main global php.ini. As far as I recall (I have a spot of flu right now so my brain is not quite on form) such local php.ini files will only affect scripts running in the same directory as the php.ini file. This may also include all subdirectories, although my brain is not up to making an absolute decision on this point right now.

    For example if you created a file /home/user/public_html/php.ini, all PHP scripts within the given user's public_html directory would use the settings in the local php.ini file in preference of the global php.ini.
     
  6. Luciel

    Luciel Active Member

    Joined:
    Oct 13, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    what if i put only one setting that directory based php.ini, will the other settings in the global php.ini also work on that directory? (meaning it will only overwrite specified?)
     
  7. Luciel

    Luciel Active Member

    Joined:
    Oct 13, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    any suggestions?
     
  8. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    In general, local php.ini settings will override global php.ini settings. And yes, a local php.ini can contain just one instructions, or as few as you like.

    This, though, will only be relevant if you have phpsuexec enabled.
     
  9. Luciel

    Luciel Active Member

    Joined:
    Oct 13, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    ok, what will the specific instruction that i would have to put in a php.ini in this particular folder?
     
  10. Luciel

    Luciel Active Member

    Joined:
    Oct 13, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    anyone please? :eek:
     
  11. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    register_globals = On
     
  12. tuxdesk

    tuxdesk Well-Known Member

    Joined:
    Oct 1, 2005
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
  13. Luciel

    Luciel Active Member

    Joined:
    Oct 13, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    alright so finally figured how to get to the usr/lib folder...

    So i downloaded php.ini edited it and uploaded yet when i go to my oscommerce site i still get:

    FATAL ERROR: register_globals is disabled in php.ini, please enable it!

    Maybe the change is not instant? if not, what's going wrong :confused:

    I now think phpsuexec isn't activated, is it possible to activate via cpanel/whm ? this could be thing that makes certain scripts not work anymore?
     
    #13 Luciel, Nov 16, 2005
    Last edited: Nov 16, 2005
  14. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    After editting the (correct) php.ini you will need to restart Apache if PHP is running in CLI mode.

    Changes are, as I have noticed, immediate if running in CGI mode.
     
  15. Luciel

    Luciel Active Member

    Joined:
    Oct 13, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    ok ill restart apache and see what happens
     
  16. Luciel

    Luciel Active Member

    Joined:
    Oct 13, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    ah great it works! haha, cheers buddy! :D
     
Loading...

Share This Page