AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: janna on March 30, 2015, 04:54:15 PM

Title: Error Exporting (categories, products, orders, etc)
Post by: janna on March 30, 2015, 04:54:15 PM
I'm having issues when I try to export categories or products or any single item from the data available for export.

The error log contains the following info:

2015-03-30 18:55:34 - warning:  AbanteCart core v.1.2.1 file_get_contents(): Filename cannot be empty in <b>/home/betrlife/public_html/wowdefault/core/lib/targz.php</b> on line <b>171</b>

2015-03-30 18:55:34 - App Error:  AbanteCart core v.1.2.1 Error: cannot to pack /home/betrlife/public_html/wowdefault/admin/system/backup/export_30032015_185526.tar.gz in /home/betrlife/public_html/wowdefault/core/lib/data.php on line 1455

2015-03-30 18:55:34 - warning:  AbanteCart core v.1.2.1 file_get_contents(/home/betrlife/public_html/wowdefault/admin/system/backup/export_30032015_185526.tar.gz): failed to open stream: No such file or directory in <b>/home/betrlife/public_html/wowdefault/core/lib/data.php</b> on line <b>265</b>

I increased php memory as well as execution time but it didn't  help.

I looked the lines/files specified in the errors and compared the code to files on GiHub and they match.

This is a clean installation with just sample data at this point. PHP 5.4; AbanteCart 1.2.1; apache 2.2.27

Interestingly, I can actually do a "Backup" just not the export to CSV/Txt
Title: Re: Error Exporting (categories, products, orders, etc)
Post by: Basara on March 31, 2015, 06:05:26 AM
Possibly there is no TAR GZIP support on your php configuration.

Also, check the error log and see if you have error  "Error: Could not load library targz"

Check that you have file core/lib/targz.php present
Title: Re: Error Exporting (categories, products, orders, etc)
Post by: janna on April 01, 2015, 09:20:09 AM
Thank you for the reply.

I can confirm that targz.php is present in core/lib
Also, there are no errors in the log related to loading the library. And I think the PHP config is OK based on the PHP info file I generated.

The interesting thing is I can perform a backup from System > Data > Backup/Restore. But when I do an export from System > Data > Import/Export, I see an error message (see screen capture). Even more oddly, I think the CSV exports are in the backups folder.

It appears the export is creating a .tar file in admin>system>backup and extracting  it to a directory while displaying an error message. Any idea what the normal behavior of the CSV export should be?
Title: Re: Error Exporting (categories, products, orders, etc)
Post by: janna on April 01, 2015, 11:17:39 AM
PS I just noticed that the older sites on AbanteCart 1.1.4 export. .tar.gz files which my browser allows me to download whereas the new version (1.2.1) does just .tar which the browser won't download and which produces the error. Not sure if this helps ID the issue
Title: Re: Error Exporting (categories, products, orders, etc)
Post by: Basara on April 03, 2015, 06:25:26 AM
Hi, janna.

Possibly you have permissions issue with some folders in you installation. That's why script can not create tar.gz
Try to change permissions for
Code: [Select]
admin/system/temp
admin/system/backup
folders
Title: Re: Error Exporting (categories, products, orders, etc)
Post by: janna on April 03, 2015, 02:50:12 PM
The permissions are 755 on both *same as old installation.
I installed on a different host and had no issues. I'm sending this to the host for further troubleshooting.

thanks
Title: Re: Error Exporting (categories, products, orders, etc)
Post by: Basara on April 06, 2015, 05:10:40 AM
The permissions are 755 on both *same as old installation.
I installed on a different host and had no issues. I'm sending this to the host for further troubleshooting.

thanks

Please reply with solution. This will help other users  ;)
Title: Re: Error Exporting (categories, products, orders, etc)
Post by: janna on April 06, 2015, 05:02:11 PM
According to the host:
"The "phar" extension was not enabled in your account which is used to create archives using PHP."
Title: Re: Error Exporting (categories, products, orders, etc)
Post by: Gordon Taylor on April 06, 2015, 06:28:42 PM
Good information, thanks for the update!