Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Error Exporting (categories, products, orders, etc)  (Read 5722 times)

Offline janna

  • Newbie
  • *
  • Posts: 8
  • Karma: +2/-0
    • View Profile
Error Exporting (categories, products, orders, etc)
« 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

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5819
  • Karma: +274/-2
    • View Profile
Re: Error Exporting (categories, products, orders, etc)
« Reply #1 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

Offline janna

  • Newbie
  • *
  • Posts: 8
  • Karma: +2/-0
    • View Profile
Re: Error Exporting (categories, products, orders, etc)
« Reply #2 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?

Offline janna

  • Newbie
  • *
  • Posts: 8
  • Karma: +2/-0
    • View Profile
Re: Error Exporting (categories, products, orders, etc)
« Reply #3 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

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5819
  • Karma: +274/-2
    • View Profile
Re: Error Exporting (categories, products, orders, etc)
« Reply #4 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

Offline janna

  • Newbie
  • *
  • Posts: 8
  • Karma: +2/-0
    • View Profile
Re: Error Exporting (categories, products, orders, etc)
« Reply #5 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

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5819
  • Karma: +274/-2
    • View Profile
Re: Error Exporting (categories, products, orders, etc)
« Reply #6 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  ;)

Offline janna

  • Newbie
  • *
  • Posts: 8
  • Karma: +2/-0
    • View Profile
Re: Error Exporting (categories, products, orders, etc)
« Reply #7 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."

Offline Gordon Taylor

  • Global Moderator
  • Full Member
  • *****
  • Posts: 150
  • Karma: +28/-1
    • View Profile
    • Natural Handcrafted Soaps
Re: Error Exporting (categories, products, orders, etc)
« Reply #8 on: April 06, 2015, 06:28:42 PM »
Good information, thanks for the update!

 

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.