|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
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
$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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-11 04:21 UTC]
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]
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 11 09:06:03 2022 UTC