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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

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: Sat Apr 20 01:01:28 2024 UTC