[php] tmp niet accessible?

Pagina: 1
Acties:
  • 34 views sinds 30-01-2008

  • dog4life
  • Registratie: Juli 2001
  • Niet online
Met dit script:
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
$temp = tmpfile();
fwrite($temp, "writing to tempfile");
//fclose($temp); // this removes the file
$tmpfname = tempnam ("/tmp", "FOO");

$handle = fopen($tmpfname, "w");
fwrite($handle, "writing to tempfile");
fclose($handle);

// Hier gebeurt nog niks
// unlink($tmpfname);
?>

krijg ik de volgende meldingen:

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 734 is not allowed to access /tmp/FOOCe1gbL owned by uid 48 in /home/virtual/site203/fst/var/www/html/tmp.php on line 7

Warning: fopen(/tmp/FOOCe1gbL): failed to open stream: Inappropriate ioctl for device in /home/virtual/site203/fst/var/www/html/tmp.php on line 7

Warning: fwrite(): supplied argument is not a valid stream resource in /home/virtual/site203/fst/var/www/html/tmp.php on line 8

Warning: fclose(): supplied argument is not a valid stream resource in /home/virtual/site203/fst/var/www/html/tmp.php on line 9

Ik heb de safe mode aangezet, maar het lijtk erop dat mijn tmp dir niet toegankelijk is? Ik heb chmod a=+rwx uitgevoerd op /tmp, maar dat helpt niks. Ik heb dit testscript gemaakt omdat ik in een ander script (tikiwiki 1.7) dezelfde melding over /tmp krijg. Iemand enig idee hoe ik dit kan oplossen? Ik ben aardig aan het einde van mijn Latijn.

Het gekke is dat ik wel sessies kan starten, en die worden ook opgeslagen in /tmp. Daarom snap ik er ook niks meer van |:(

  • curry684
  • Registratie: Juni 2000
  • Laatst online: 13-08 16:46

curry684

left part of the evil twins

En anders doen we even Googlen en vinden we de PHP manual entry over safe_mode:
When safe_mode is on, PHP checks to see if the owner of the current script matches the owner of the file to be operated on by a file function.
Je mag me mailen als je het hiermee niet gefixed krijgt, nu op slot :+

Professionele website nodig?


  • curry684
  • Registratie: Juni 2000
  • Laatst online: 13-08 16:46

curry684

left part of the evil twins

Staat trouwens zelfs letterlijk in de error:
Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 734 is not allowed to access /tmp/FOOCe1gbL owned by uid 48
:Z

Professionele website nodig?


Dit topic is gesloten.