php-general Digest 7 Nov 2010 09:04:16 -0000 Issue 7025

Topics (messages 309355 through 309356):

PHP importing CVS data with field mapping
        309355 by: Don Wieland

ignore_repeated_errors has no effect
        309356 by: Simon Marchi

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hi gang,

I have a need to to allow users to import into my web app via PHP. Is there any functions or javascripts out there will allow user to pick a cvs file, bring up a file mapping UI, then process data based on mapping and insert into mySQL DB.

Any help or resources would be appreciated.

Don

--- End Message ---
--- Begin Message ---
Hi !
My problem is the following. Due to crappy code by one of my users,
PHP entered an infinite loop generating an error, causing very high
load on the server and gigantic log files.
The lines at fault were the following

while(strlen(trim($ligne))==0 && !feof($fic))
    $ligne = fgets($fic,1024);

where $fic is not a valid file resource. The generated error is an
almost infinite amount of:

[Fri Nov 05 03:28:33 2010] [error] [client 66.249.65.124] PHP Warning:
 feof() expects parameter 1 to be resource, boolean given in
/home/comites/interne/polymond/nova_html/polysuisse2004/photo/gallerie.php
on line 52
[Fri Nov 05 03:28:33 2010] [error] [client 66.249.65.124] PHP Warning:
 fgets() expects parameter 1 to be resource, boolean given in
/home/comites/interne/polymond/nova_html/polysuisse2004/photo/gallerie.php
on line 53

However, I did set ignore_repeated_errors to On, as well as
ignore_repeated_source. I checked that the settings is effective in
phpinfo().

Does anybody have an idea why I still get these repeated errors ?

Thanks !

Simon

--- End Message ---

Reply via email to