Post by JBaptista68 » Fri Sep 04, 2009 4:40 am

I installed it on my staging hosting server and everything seems to be fine. I would be interested to know what didn't work with Xampp though.

Newbie

Posts

Joined
Thu Sep 03, 2009 10:27 am

Post by JNeuhoff » Sat Sep 05, 2009 12:49 am

I installed it on my staging hosting server and everything seems to be fine. I would be interested to know what didn't work with Xampp though.
Maybe the problem was because of using PHP 5.30. Can you try the following error handler in file admin/model/tool/export.php on your XAMPP server:

Code: Select all

// Error Handler
function error_handler_for_export($errno, $errstr, $errfile, $errline) {
	$config =& Registry::get('config');
	$log =& Registry::get('log');
	
	switch ($errno) {
		case E_NOTICE:
		case E_USER_NOTICE:
			$errors = "Notice";
			break;
		case E_WARNING:
		case E_USER_WARNING:
			$errors = "Warning";
			break;
		case E_ERROR:
		case E_USER_ERROR:
			$errors = "Fatal Error";
			break;
		default:
			$errors = "Unknown";
			break;
	}
		
	if (($errors=='Warning') || ($errors=='Unknown')) {
		return true;
	}

	if ($config->get('config_error_display')) {
		echo '<b>' . $errors . '</b>: ' . $errstr . ' in <b>' . $errfile . '</b> on line <b>' . $errline . '</b>';
	}
	
	if ($config->get('config_error_log')) {
		$log->write('PHP ' . $errors . ':  ' . $errstr . ' in ' . $errfile . ' on line ' . $errline);
	}

	return true;
}
I don't have a PHP 5.30 system, so if you can test it and let me know whether it fixes the problem, then I can fix it.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by kdmp » Wed Sep 09, 2009 4:24 am

I guess I would be hijacking this thread....but definitely an issue with the Import/Export for 1.3.2.

Running OpenCart 1.3.2 with the 08/20 1.3.2 import/export module. When I try to export I receive no errors. It takes a couple of seconds and then tosses the export to be downloaded. It takes literally no time because the file downloaded is 0kb. There is nothing in it.

I will add that this worked with the 1.2.9 import/export release for 1.2.9, but since going through the updgrade process to 1.3.2 I haven't been able to get it to work. Any ideas what would prevent this from building the excel sheet?

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

Post by JNeuhoff » Wed Sep 09, 2009 4:34 am

Need more details from you. For example, are there any messages in the error log? And are you using the correct matching version of the Export/Import module? Merely upgrading OpenCart to 1.3.2 won't do it, you also need to install correct version of the Export/Import module. Also, what version of PHP are you using? On what server?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by kdmp » Wed Sep 09, 2009 10:01 am

Hi Jeff,
JNeuhoff wrote:Need more details from you. For example, are there any messages in the error log?
kdmp wrote:When I try to export I receive no errors.
This included the error log. Sorry I didn't mention that I checked the error log.
JNeuhoff wrote:And are you using the correct matching version of the Export/Import module?
kdmp wrote:Running OpenCart 1.3.2 with the 08/20 1.3.2 import/export module.

JNeuhoff wrote:Also, what version of PHP are you using? On what server?
I am running PHP 5.2.6 on a Linux server (CentOS) Apache 2.

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

Post by JNeuhoff » Wed Sep 09, 2009 6:00 pm

I am running PHP 5.2.6 on a Linux server (CentOS) Apache 2
This should be fine. In order to narrow it down, maybe you could the following: Create a file called phpinfo.php with this in it:

Code: Select all

<?php phpinfo(); ?>
and upload this file to your server's admin directory. Then refer to it in your web browser and it will display your PHP configuration. Important settings to watch out for are 'memory_limit', 'upload_max_filesize' and some others. Also, I assume you got the PHP PEAR library pre-installed.

You could also do a complete backup of your database via PhPMyAdmin and send it to me, this way I might be able to replicate the problem on my Linux server and resolve it.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by kdmp » Wed Sep 09, 2009 8:11 pm

Hey Jeff,

memory_limit is 64M
upload_max_filesize 5M

Perl is installed and packaged with my server installation.

I will have to ask my clients approval for the database. I may be only to send the product/category tables only - not the entire database. I will send you a PM shortly.

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

Post by Qphoria » Wed Sep 09, 2009 9:25 pm

It amuses me how many times people refer to "J. Neuhoff" as "Jeff". His name is not Jeff :P

Anyway, I too have been running into deprecation issues with some of my contribs for things like ereg in 5.3. If you want them to go away, you can disable them at the error_reporting level.

Try this at line 68 in the admin/index.php file:

Code: Select all

if(PHP_VERSION_ID >= 50300) {
    set_error_handler('error_handler',E_ALL & ~E_DEPRECATED | E_STRICT);
} else {
    set_error_handler('error_handler',E_ALL);
}

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by kdmp » Thu Sep 10, 2009 2:19 am

LOL. All the letters are there for Jeff and then some! I am not sure where Jeff came from...sorry Jneuhoff!

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

Post by madimar » Fri Oct 09, 2009 2:13 am

Hi guys, I had similar issues (fresh OC install on XAMPP) and... I solved changing the error handler in export.php as specified by J!
Maybe the problem was because of using PHP 5.30. Can you try the following error handler in file admin/model/tool/export.php on your XAMPP server:
Many thanks!!!!

Max

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by kdmp » Fri Oct 09, 2009 10:44 pm

JNeuhoff wrote:
I just did a new install of 1.3.2, and the import/export gives me all kinds of errors. I added the permission to Top Admin, which works fine. Then I click Export, and get many many errors.
It looks you havn't installed to latest matching release of the Export/Import for 1.3.2 which now uses its own error handler. You are probably using a wrong version of the Export/Import module.
Hi J,

I do have a question about the 1.3.2 error handler.

Why is it that if I leave it alone in export.php I receive a corrupted XLS file, but if I replace it with this:

Code: Select all

// Error Handler
function error_handler_for_export($errno, $errstr, $errfile, $errline) {
	$config =& Registry::get('config');
	$log =& Registry::get('log');
	
	switch ($errno) {
		case E_NOTICE:
		case E_USER_NOTICE:
			$errors = "Notice";
			break;
		case E_WARNING:
		case E_USER_WARNING:
			$errors = "Warning";
			break;
		case E_ERROR:
		case E_USER_ERROR:
			$errors = "Fatal Error";
			break;
		default:
			$errors = "Unknown";
			break;
	}
		
	if ($config->get('config_error_display')) {
		echo '<b>' . $errors . '</b>: ' . $errstr . ' in <b>' . $errfile . '</b> on line <b>' . $errline . '</b>';
	}
	
	if ($config->get('config_error_log')) {
		$log->write('PHP ' . $errors . ':  ' . $errstr . ' in ' . $errfile . ' on line ' . $errline);
	}

	return true;
}
I no longer receive a corrupted error, but just receive a blank sheet? Either way the size of the file indicates that it is not exporting to the sheet. Just the file is created and sent on it's way.

Kevin Davidson
Purolator Shipping Module
Canpar Shipping Module
VQMod - Paypal Transaction ID to Payment Details


Active Member

Posts

Joined
Thu Jun 04, 2009 10:40 am
Location - Ontario, Canada

Post by shaunyf » Sat Oct 10, 2009 9:55 pm

Hi,

I too am struggling with the import / export tool :-[ . On export I get the following error messages with the binary output that was destined for the xls file being displayed on a blank web page. I'm using 1.2.3.

I'm a newbie to php & opencart, running my site locally under xampp.

Any ideas?

thanks in advance,
Shaun

Code: Select all

Unknown: Assigning the return value of new by reference is deprecated in C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer\Workbook.php on line 191Unknown: Assigning the return value of new by reference is deprecated in C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer\Workbook.php on line 200Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer\Workbook.php:191) in C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer.php on line 68Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer\Workbook.php:191) in C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer.php on line 69Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer\Workbook.php:191) in C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer.php on line 70Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer\Workbook.php:191) in C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer.php on line 71Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer\Workbook.php:191) in C:\xampplite\htdocs\OpenCart\admin\Spreadsheet\Excel\Writer.php 

Newbie

Posts

Joined
Sat Oct 10, 2009 9:40 pm

Post by shaunyf » Mon Oct 12, 2009 5:59 am

Given up with xls import /export!

Instead I created ODBC link to database and used MS Access to write directly into the tables. Seems like a much nicer solution!

Shaun

Newbie

Posts

Joined
Sat Oct 10, 2009 9:40 pm

Post by sbaselice » Fri Oct 23, 2009 8:55 am

I tried to fix my error with import / export by just adding an opc_measurement_class table to my DB, because there was no measurement class table on my installation. That did not work because it is unrecognized. Is there a way to add the measurement_class table so th ecport can work? Will need this later anyway.

When I export now I get

Error: Unknown column 'p.measurement_class_id' in 'on clause'<br />Error No: 1054<br />SELECT p.product_id, pd.name, GROUP_CONCAT( DISTINCT CAST(pc.category_id AS CHAR(11)) SEPARATOR "," ) AS categories, p.quantity, p.model, m.name AS manufacturer, p.image AS image_name, p.shipping, p.price, p.sort_order, p.date_added, p.date_modified, p.date_available, p.weight, wc.unit, p.length, p.width, p.height, p.status, p.tax_class_id, p.viewed, pd.language_id, ua.keyword, pd.description, pd.meta_description, p.stock_status_id, mc.unit AS measurement_unit FROM `opc_product` p LEFT JOIN `opc_product_description` pd ON p.product_id=pd.product_id AND pd.language_id=1 LEFT JOIN `opc_product_to_category` pc ON p.product_id=pc.product_id LEFT JOIN `opc_url_alias` ua ON p.product_id=SUBSTR( ua.query, 1, LENGTH( 'product_id=' ) ) = 'product_id=' AND p.product_id = SUBSTR( ua.query, LENGTH( 'product_id=' ) +1, LENGTH( ua.query ) - LENGTH( 'product_id=' ) ) LEFT JOIN `opc_manufacturer` m ON m.manufacturer_id = p.manufacturer_id LEFT JOIN `opc_weight_class` wc ON wc.weight_class_id = p.weight_class_id AND wc.language_id=1 LEFT JOIN `opc_measurement_class` mc ON mc.measurement_class_id=p.measurement_class_id AND mc.language_id=1 GROUP BY p.product_id ORDER BY p.product_id, pc.category_id;

Newbie

Posts

Joined
Tue Oct 20, 2009 12:12 am
Who is online

Users browsing this forum: No registered users and 8 guests