Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when importing an excel to fill product stocks #29106

Open
alihusseinc opened this issue Mar 28, 2024 · 9 comments
Open

Error when importing an excel to fill product stocks #29106

alihusseinc opened this issue Mar 28, 2024 · 9 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@alihusseinc
Copy link

Bug

When I try to import an Excel to fill product stocks, I get a 500 error page

s

sx

Dolibarr Version

No response

Environment PHP

No response

Environment Database

No response

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

@alihusseinc alihusseinc added the Bug This is a bug (something does not work as expected) label Mar 28, 2024
@JonBendtsen
Copy link
Contributor

which version of dolibarr? What kind of setup do you have? PHP version, database version, ...

What does the dolibarr.log file contain?

@alihusseinc
Copy link
Author

dolibarr 19.0.1,php 8.2.12, phpMyAdmin 5.2.1, xampp
dolibarr.log

@JonBendtsen
Copy link
Contributor

okay, and your webservers log file? what does that say?

@alihusseinc
Copy link
Author

[Thu Mar 28 13:19:38.538505 2024] [php:warn] [pid 3156:tid 1900] [client ::1:59511] PHP Warning: file_get_contents(): Unable to find the wrapper "zip" - did you forget to enable it when you configured PHP? in C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Security\XmlScanner.php on line 152, referer: http://localhost/
[Thu Mar 28 13:19:38.541540 2024] [php:warn] [pid 3156:tid 1900] [client ::1:59511] PHP Warning: file_get_contents(zip://C:\xampp\htdocs\dolibarr\documents\import\temp\20240328171935-teste.xlsx#xl/worksheets/sheet1.xml): Failed to open stream: No such file or directory in C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Security\XmlScanner.php on line 152, referer: http://localhost/
[Thu Mar 28 13:19:38.542541 2024] [php:error] [pid 3156:tid 1900] [client ::1:59511] PHP Fatal error: Uncaught ValueError: XMLReader::XML(): Argument #1 ($source) cannot be empty in C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Xlsx.php:206\nStack trace:\n#0 C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Xlsx.php(206): XMLReader->XML('', NULL, 12)\n#1 C:\xampp\htdocs\dolibarr\core\modules\import\import_xlsx.modules.php(310): PhpOffice\PhpSpreadsheet\Reader\Xlsx->listWorksheetInfo('C:/xampp/htdocs...')\n#2 C:\xampp\htdocs\dolibarr\imports\import.php(836): ImportXlsx->import_read_record()\n#3 {main}\n thrown in C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Xlsx.php on line 206, referer: http://localhost/

@JonBendtsen
Copy link
Contributor

[Thu Mar 28 13:19:38.538505 2024] [php:warn] [pid 3156:tid 1900] [client ::1:59511] PHP Warning: file_get_contents(): Unable to find the wrapper "zip" - did you forget to enable it when you configured PHP? in C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Security\XmlScanner.php on line 152, referer: http://localhost/

Are php-zip package installed?

[Thu Mar 28 13:19:38.541540 2024] [php:warn] [pid 3156:tid 1900] [client ::1:59511] PHP Warning: file_get_contents(zip://C:\xampp\htdocs\dolibarr\documents\import\temp\20240328171935-teste.xlsx#xl/worksheets/sheet1.xml): Failed to open stream: No such file or directory in C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Security\XmlScanner.php on line 152, referer: http://localhost/

Maybe it can not find that file because it doesn't have the zip thing?

[Thu Mar 28 13:19:38.542541 2024] [php:error] [pid 3156:tid 1900] [client ::1:59511] PHP Fatal error: Uncaught ValueError: XMLReader::XML(): Argument #1 ($source) cannot be empty in C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Xlsx.php:206\nStack trace:\n#0 C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Xlsx.php(206): XMLReader->XML('', NULL, 12)\n#1 C:\xampp\htdocs\dolibarr\core\modules\import\import_xlsx.modules.php(310): PhpOffice\PhpSpreadsheet\Reader\Xlsx->listWorksheetInfo('C:/xampp/htdocs...')\n#2 C:\xampp\htdocs\dolibarr\imports\import.php(836): ImportXlsx->import_read_record()\n#3 {main}\n thrown in C:\xampp\htdocs\dolibarr\includes\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Xlsx.php on line 206, referer: http://localhost/

@alihusseinc
Copy link
Author

alihusseinc commented Mar 28, 2024

aaa
This is my php.ini

@JonBendtsen
Copy link
Contributor

aaa This is my php.ini

Yes, but is it also actually installed in your OS?

@alihusseinc
Copy link
Author

I think that if as I would in this case??

@frederic34
Copy link
Member

fixed here #29011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

3 participants