php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10797 tmpfile() Does not work in version PHP4 only in PHP3
Submitted: 2001-05-10 13:24 UTC Modified: 2001-05-11 04:24 UTC
From: jsh at so dot estec dot esa dot nl Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.0.5 OS: Solaris 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jsh at so dot estec dot esa dot nl
New email:
PHP Version: OS:

 

 [2001-05-10 13:24 UTC] jsh at so dot estec dot esa dot nl
<?php
$MAIL_SERVER = "some.mail.server.com";
$FORWARD_TMP = tmpfile();

$connect = ftp_connect("$MAIL_SERVER");

ftp_fget($connect, "$FORWARD_TMP", ".forward", FTP_ASCII);

?>

Following code above give this error message:

Warning: Supplied argument is not a valid File-Handle resource in /export1/www/docs/users/jsh/testtmp.php on line 7

In PHP3 it works on Solaris 2.6

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-11 04:21 UTC] andi@php.net
ftp_fget($connect, "$FORWARD_TMP", ".forward", FTP_ASCII);
You are passing the file pointer resource as a string "$FORWARD_TMP". This is incorrect. You should pass it as a regular variable without the double quotes. i.e. $FORWARD_TMP
 [2001-05-11 04:24 UTC] andi@php.net
Reclassify
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 00:01:29 2025 UTC