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.

Virtual php.ini?

Discussion in 'General Discussion' started by paralard, Jun 8, 2005.

  1. paralard

    paralard Well-Known Member

    Joined:
    Mar 2, 2003
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Austin Texas
    I have a client who is trying to do the following.....

    First his question..... in broken english

    "Can you tell me where is the directory pointed by upload_tmp_dir in php.ini file? I need to access this directory with in File manager (from CPanel)."


    And what he is trying to do

    upload_tmp_dir string
    The temporary directory used for storing files when doing file upload. Must be writable by whatever user PHP is running as. If not specified PHP will use the system's default.



    Can this be done? Is it a bad idea? (of course I will not give him access to the php.ini) Does each user have its own copy of the php.ini?

    Any help would be great.

    Thanks
     
  2. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    usually its /tmp and php has write access to it.
     
  3. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    I'd suggest asking the client why they need to be able to view /tmp (assuming this is the php upload directory) through cPanel's file manager.

    Firstly /tmp is often used to store a number of things aside from php uploads, and so letting a user view the contents of this would not be a good idea.

    Secondly files uploaded through php are only present in /tmp whilst the script to which files are being posted is executing - once the script finishes executing the files will be deleted. Therefore from a php perspective, being able to view /tmp is of little or no use.

    If your client merely wants to be able to view files that are uploaded through php, they could utlise the php function move_uploaded_file() to move files, upon successful upload, from /tmp to somewhere within their own home directory i.e. somewhere through which they could view the files using cPanel's file manager.
     
  4. amal

    amal Well-Known Member

    Joined:
    Nov 22, 2003
    Messages:
    155
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Nope, but a user can override the default values in php.ini using .htaccess entries in his public_html directory
     
Loading...

Share This Page