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
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.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 18:01:31 2024 UTC