php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5930 call to undefined function
Submitted: 2000-08-02 21:43 UTC Modified: 2000-09-03 16:33 UTC
From: porter at hispeed dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: Solaris 2.7
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: porter at hispeed dot com
New email:
PHP Version: OS:

 

 [2000-08-02 21:43 UTC] porter at hispeed dot com
I have compiled php4 with the sfio library. Everything compiled fine, except I did get an error for for the number of params in file.c

#if MISSING_FCLOSE_DECL
extern int fclose();
#endif

I changed this to 
#if MISSING_FCLOSE_DECL
extern int fclose();
#endif

then everything compiled fine.

when I try and run the following test script.

<?php $fp=fopen("test.txt","w"); fclose($fp); ?> 

I get the following.
Fatal error: Call to undefined function: fopen() in /usr/local/www/htdocs/norwinddesigns/test3.php on line 2

http://www.norwinddesigns.com:8080/test.php
contains my phpinfo output.
 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-03 11:19 UTC] stas@php.net
Am I senile or your two examples are the same? What to what you propose to change?
 [2000-08-03 18:28 UTC] porter at hispeed dot com
Yes the second example  should read this.

#if MISSING_FCLOSE_DECL
extern int fclose(FILE *);
#endif

 [2000-08-03 18:34 UTC] stas@php.net
Well, fcolse prototype seems broken indeed, fixed that. Now, how could you get fopen undefined, escapes me.. Could you try a clean CVS build and verify it happens there?
 [2000-08-03 22:53 UTC] porter at hispeed dot com
I still get the Undefined function fopen().
Call to undefined function: fopen() in /usr/local/www/htdocs/norwinddesigns/test4.php on line 1

We are providing individual access_logs for 1000 customers ,because of a limitation in stdio for solaris I am using sfio. With out it I can only have 332 log files and have a hope for php to work at all.

www.norwinddesigss.com/test4.php 
	?php $fp=fopen("test.txt","w"); fclose($fp); ?>

www.norwinddesigsn.com/test.php (phpinfo script) 
 [2000-08-03 22:54 UTC] porter at hispeed dot com
Opps thats port 8080 for those urls.
 [2000-08-03 23:05 UTC] porter at hispeed dot com
Here is a truss of my httpd when a php request comes in.

fcntl(833, F_SETLKW, 0x000C4288) (sleeping...)
fcntl(833, F_SETLKW, 0x000C4288)                = 0
accept(18, 0xEFFFF788, 0xEFFFF80C) (sleeping...)
accept(18, 0xEFFFF788, 0xEFFFF80C)              = 3
fcntl(833, F_SETLKW, 0x000C42AC)                = 0
sigaction(SIGUSR1, 0xEFFFF580, 0xEFFFF680)      = 0
getsockname(3, 0xEFFFF7C8, 0xEFFFF80C)          = 0
setsockopt(3, 6, 1, 0xEFFFF6FC, 4)              = 0
read(3, " G E T   / t e s t 4 . p".., 4096)     = 333
sigaction(SIGUSR1, 0xEFFFD478, 0xEFFFD578)      = 0
time()                                          = 965336724
stat("/usr/local/www/htdocs/norwinddesigns/test4.php", 0x0010B178) = 0
umask(077)                                      = 022
umask(022)                                      = 077
chdir("/usr/local/www/htdocs/norwinddesigns")   = 0
open("/usr/local/www/htdocs/norwinddesigns/test4.php", O_RDONLY) = 5
pathconf(".", _PC_PATH_MAX)                     = 1024
stat64("./", 0xEFFFE3D0)                        = 0
stat64("/usr/local/www/htdocs/norwinddesigns", 0xEFFFE338) = 0
ioctl(5, TCGETA, 0xEFFFEF6C)                    Err#25 ENOTTY
fstat64(5, 0xEFFFD3E8)                          = 0
llseek(5, 0, SEEK_CUR)                          = 0
read(5, " < ? p h p   $ f p = f o".., 8192)     = 49
read(5, 0x004309D8, 8192)                       = 0
ioctl(5, TCGETA, 0xEFFFD514)                    Err#25 ENOTTY
close(5)                                        = 0
umask(022)                                      = 022
poll(0xEFFFD560, 1, 0)                          = 0
write(3, " H T T P / 1 . 1   2 0 0".., 314)     = 314
time()                                          = 965336724
write(20, " 2 0 7 . 6 7 . 2 3 2 . 2".., 133)    = 133
shutdown(3, 1)                                  = 0
poll(0xEFFFD3D8, 1, 2000)                       = 1
read(3, 0xEFFFF500, 512)                        = 0
close(3)                                        = 0
sigaction(SIGUSR1, 0xEFFFF580, 0xEFFFF680)      = 0
fcntl(833, F_SETLKW, 0x000C4288) (sleeping...)?

I notice Err#25 ENOTTY


I got this out of ioctl

     ENOTTY     fildes is not associated with a STREAMS dev-
                    ice that accepts control functions.
 [2000-08-04 10:33 UTC] stas@php.net
Why did you do --disable-url-fopen-wrapper?
 [2000-08-04 20:55 UTC] porter at hispeed dot com
I did it because I was getting an error with url_scanner.c when I tryied compiling on 8/3/00. today I didn't get the error with the url_scanner, but I still am getting the Undefined function error with sfio....
 [2000-08-04 22:52 UTC] porter at hispeed dot com
I did it because I was getting an error with url_scanner.c when I tryied compiling on 8/3/00. today I didn't get the error with the url_scanner, but I still am getting the Undefined function error with sfio....
 [2000-08-14 12:19 UTC] porter at hispeed dot com
So does anyone have an idea of how to get around this problem.
 [2000-09-03 16:33 UTC] zeev@php.net
Fixed in 4.0.2 (user report)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 04:01:30 2024 UTC