#33561 [Opn->Bgs]: fputcsv() not found

From: Date: Mon, 04 Jul 2005 10:56:22 +0000
Subject: #33561 [Opn->Bgs]: fputcsv() not found
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368923@lists.php.net to get a copy of this message
ID: 33561 Updated by: nlopess@php.net Reported By: cakersq at gmail dot com -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: Windows XP PHP Version: 5.0.4 New Comment: This a bug in the functable script. There is already other bug opened to track the problem. Jakub has made the patch and we are waiting for Harmut to apply it. Previous Comments: ------------------------------------------------------------------------ [2005-07-04 09:58:27] derick@php.net But the docs say "PHP 5" and not "PHP 5.1". ------------------------------------------------------------------------ [2005-07-04 09:43:26] sniper@php.net That function was added for PHP 5.1. ------------------------------------------------------------------------ [2005-07-04 05:56:46] cakersq at gmail dot com 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 this bug report at http://bugs.php.net/?id=33561&edit=1

« previous php.doc (#969368923) next »