Log in | Register | Lost password

Bottom
Problem with PHP tempnam function
  • Posted: 08.04.2003, 21:14
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Hello,

    We've just installed Photoshare and are running into what looks like a php bug.

    First, it's PHP 4.2.2
    It's an Ensim server, so it's safe mode, openbasedir

    The problem is on line 496 of pnuserapi.php. That line is:

    Code

    $tmpfilename = tempnam($tmpdir, 'IMG');


    That function "should" create a temp file in the directory specified by tmpdir, but it's not. Its trying to create the file in /tmp and the openbasedir won't allow that.

    I've echo'ed the falue of $tmpdir just above that line and it's correctly set.

    I believe this might be an PHP issue, but I like to know if anyone can come up with a work around?

    Thanks,

    Frank
  • Posted: 08.04.2003, 23:12
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    *please* read the docs and the post on the frontpage. This is a configuration issue with the module.
    Next time read through some posts on the forum first please.
  • Posted: 08.04.2003, 23:22
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    smooc,

    Respectfully, I believe I have read and followed all the doc. I will double check agian.

    The directories are below the open base dir directory and permissions are correct.

    Frank
  • Posted: 08.04.2003, 23:35
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    ok,

    the function you are stating is using the dir you specified in the ADMIN section as temp dir. It seems as if this is currently /tmp which probably does not reside underneath your OPEN_BASEDIR.

    So you need to check your settings

  • Posted: 14.04.2003, 15:51
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    I also have this problem.


    Look in the following topic. http://www.elf…wthread&tid=58
  • Posted: 14.04.2003, 18:01
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    My above statement *still* applies. Temporary data still needs to be written.

Template courtesy of Designs By Darren.