Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP script works on HP-UX, but not on SuSE Linux.

Status
Not open for further replies.

jxfish2

Technical User
Jan 24, 2002
183
US
The following "write-to-file" routine works on HP-UX, but not on SuSE Linux:

<?php
$record = &quot;${name}:${age}:${race}:${gender}:${status}\n&quot;;
$fp = fopen(&quot;/tmp/form.out&quot;,&quot;a&quot;);
fputs($fp,$record,strlen($record));
fflush($fp);
fclose($fp);
?>

Any explanations as to why it works on HP-UX, and not on Linux, would be greatly appreciated...

TIA

Joe
 
The following error messages appear on the SuSE Linux machine, when I attempt to access it via http:

Note: /tmp/form.out was created by the php script itself, and I've checked the file itself... It is owned properly, with fairly open permissions... In fact, I opened it up all the way, and I still get the messages...

Warning: SAFE MODE Restriction in effect. The script whose uid is 500 is not allowed to access /tmp/form.out owned by uid 0 in /home/~user/public_html/form.php on line 99

Warning: fopen(&quot;/tmp/form.out&quot;,&quot;a&quot;) - Inappropriate ioctl for device in /home/~user/public_html/form.php on line 99

Warning: Supplied argument is not a valid File-Handle resource in /home/~user/public_html/form.php on line 100

Warning: Supplied argument is not a valid File-Handle resource in /home/~user/public_html/form.php on line 101

Warning: Supplied argument is not a valid File-Handle resource in /home/~user/public_html/form.php on line 102

Warning: SAFE MODE Restriction in effect. The script whose uid is 500 is not allowed to access /tmp/form.out owned by uid 0 in /home/~user/public_html/form.php on line 107

Any help in debugging this, would be greatly appreciated...

TIA

Joe F.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top