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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC