Problem in Import a .csv file

QuestionsProblem in Import a .csv file
Carlos asked 2 years ago

I have a problem when I try to import a .csv file in the framework. when enable the display_error i get the next message in the third step :

Fatal error: Uncaught Error: Call to undefined function each() in /homepages/0/d821217699/htdocs/yuc2024/lib2/inc/adodb/adodb.inc.php:1104 Stack trace: #0 /homepages/0/d821217699/htdocs/yuc2024/lib2/inc/import/step3.php(122): ADOConnection->Execute(”, Array) #1 /homepages/0/d821217699/htdocs/yuc2024/lib2/inc/jqgrid_dist.php(2324): include_once(‘/homepages/0/d8…’) #2 /homepages/0/d821217699/htdocs/yuc2024/admin/nivel6tempb.php(128): jqgrid->render(‘list1’) #3 {main} thrown in /homepages/0/d821217699/htdocs/yuc2024/lib2/inc/adodb/adodb.inc.php on line 1104

3 Answers
Mike answered 2 years ago

I don’t use imports, so I’ve never tested them. But that error message is for a deprecated function (line 1104). I don’t know if that’s the cause or not, but it seems reasonable.

Each() was deprecated in PHP 7.2.

It may require an update or you may have to edit the adodb.inc page to see if you can replace the each() function with foreach().

Of course, support may have a better option or a solution as well.

Thanks

Mike

Carlos answered 2 years ago

Hello Mike. Your solution solve the problem, I change the function each() to foreach() and the import .csv file works fine.

Thank you so much  🙂

Abu Ghufran Staff answered 2 years ago

Thanks Mike for the reply.

For a more proper fix, Download latest version of php adodb from github and override the the lib/inc folder.

You can get latest from: https://github.com/ADOdb/ADOdb/tags and extract it in lib/inc folder. Remove old ‘adodb’ folder and rename the extracted folder to ‘adodb’.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

0 + 20 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?