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

Fatal error when exporting a large table as PHP array #16771

Closed
liviuconcioiu opened this issue Mar 27, 2021 · 2 comments
Closed

Fatal error when exporting a large table as PHP array #16771

liviuconcioiu opened this issue Mar 27, 2021 · 2 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@liviuconcioiu
Copy link
Contributor

Describe the bug

A fatal error is given (the maximum execution time is exceeded), when exporting a large table as PHP array, and the table is not exported. Also, when exporting small tables array() should be changed to [].

To Reproduce

Steps to reproduce the behavior:

  1. Select a large table
  2. Click on Export
  3. Scroll down to Format
  4. Select PHP array
  5. Click on Go
  6. Wait until the maximum execution time is exceeded and the error is saved in the exported file.

Expected behavior

The table should be exported as a PHP array.

Server configuration

  • Operating system: Windows
  • Web server: nginx/1.19.8
  • Database version: 5.7.32
  • PHP version: 8.0.3
  • phpMyAdmin version: 5.2.0-dev+20210326.fe41637a0d

Client configuration

  • Browser: Firefox
  • Operating system: Windows

Additional context

<?php
/**
 * Export to PHP Array plugin for PHPMyAdmin
 * @version 5.2.0-dev+20210326.fe41637a0d
 */

/**
 * Database `db`
 */
<br />
<b>Fatal error</b>:  Maximum execution time of 300 seconds exceeded in <b>Z:\nginx-1.19.8\html\phpMyAdmin-5.2.0-dev\libraries\classes\Plugins\Export\ExportPhparray.php</b> on line <b>243</b><br />
@williamdes williamdes added the Bug A problem or regression with an existing feature label Mar 31, 2021
@williamdes williamdes added this to Needs triage in issues via automation Mar 31, 2021
@williamdes williamdes moved this from Needs triage to Medium priority in issues Mar 31, 2021
@williamdes
Copy link
Member

Confirmed on a very large database, tested with 30k rows and it did work fine
But with 6M rows 😄 ..

@williamdes
Copy link
Member

Just exported 7 127 129 rows generating 3,6 GiB (3 871 595 917 octets) of valid data

php -l /home/williamdes/voie\ \(1\).php
No syntax errors detected in /home/williamdes/voie (1).php

Will publish the patch soon

@williamdes williamdes self-assigned this Apr 23, 2021
@williamdes williamdes added this to the 5.1.1 milestone Apr 23, 2021
williamdes added a commit that referenced this issue Apr 23, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Medium priority to Closed Apr 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature
Projects
issues
  
Closed
Development

No branches or pull requests

2 participants