#33561 [NEW]: fputcsv() not found
| From: | cakersq at gmail dot com | Date: | Mon, 04 Jul 2005 03:56:48 +0000 |
| Subject: | #33561 [NEW]: fputcsv() not found | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-81345@lists.php.net to get a copy of this message | ||
From: cakersq at gmail dot com
Operating system: Windows XP
PHP version: 5.0.4
PHP Bug Type: Filesystem function related
Bug description: fputcsv() not found
Description:
------------
Using either the precombiled php-cgi.exe file or using it as an Apache2
module, when I run any script that calls the function fputcsv(), it
reports function not found.
My PHP.INI File is the recommended one, with a change to enable automatic
end of line detection.
Reproduce code:
---------------
Sample from PHP 5.0.4 Manual, but it fails with any script I write.
<?php
$list = array (
'aaa,bbb,ccc,dddd',
'123,456,789',
'"aaa","bbb"'
);
$fp = fopen('file.csv', 'w');
foreach ($list as $line) {
fputcsv($fp, split(',', $line));
}
fclose($fp);
?>
Expected result:
----------------
The array should be put into a Comma Separated File.
Actual result:
--------------
The browser reports:
Fatal error: Call to undefined function fputcsv() in test.php on line 9
--
Edit bug report at http://bugs.php.net/?id=33561&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33561&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33561&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33561&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33561&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33561&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33561&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33561&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33561&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33561&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33561&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33561&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33561&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33561&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33561&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33561&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33561&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33561&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33561&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33561&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33561&r=mysqlcfg