Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help! New zone required!


pbicho

Recommended Posts

Hi! I´m from Portugal and my shipping module (ctt expresso) doesn´t work. I think it´s because the zone doesn´t exist. So I want to upgrade with the world zones contrib. but don´t now where to import the sql file.

It shouldn´t be that difficult but I just can´t get it done:/ Cau someone help???

Link to comment
Share on other sites

Hi! I´m from Portugal and my shipping module (ctt expresso) doesn´t work. I think it´s because the zone doesn´t exist. So I want to upgrade with the world zones contrib. but don´t now where to import the sql file.

It shouldn´t be that difficult but I just can´t get it done:/ Cau someone help???

 

 

Ok, I found out how to upload it but now it shows this error on phpmyadmin:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

What should I do?

Thanks

Link to comment
Share on other sites

  • 2 weeks later...
Ok, I found out how to upload it but now it shows this error on phpmyadmin:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

What should I do?

Thanks

To fix this

 

In admin/includes/classes find split_page_results.php and - BACK IT UP then find the lines

 

 

CODE

$offset = ($max_rows_per_page * ($current_page_number - 1));
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

change to

 

 

CODE

$offset = ($max_rows_per_page * ($current_page_number - 1));
 if ($offset < 0)
{
$offset = 0;
}
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

 

MySQL 4.1.xx handles negatives correctly (by forcing an error) in the code above unlike earlier versions of MySQL.

 

NOTE - I have NOT asked you to change catalog/includes/classes/split_page_results.php - If you have a problem on the catalog side you may want to try the same change in that file - I did and it went wrong so the change to my catalog/includes/classes/split_page_results.php file is a little more elaborate and I will share that here if it becomes an issue - but for now it seems people will mostly have a problem with empty files on the admin side.

 

Change (catalog/includes/classes/split_page_results.php around line 67) from:

 

CODE

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

 

to:

 

CODE

$this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;

 

 

Both on the catalog side and the admin side changing $offset to max($offset, 0) is the "official" fix.

This fix is found by Charles Kangethe

That I have test success.

Have fun!

Link to comment
Share on other sites

Hi! Thanks a lot for your reply ;)

 

To fix this

 

In admin/includes/classes find split_page_results.php and - BACK IT UP then find the lines

 

 

CODE

$offset = ($max_rows_per_page * ($current_page_number - 1));
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

change to

 

 

CODE

$offset = ($max_rows_per_page * ($current_page_number - 1));
 if ($offset < 0)
{
$offset = 0;
}
$sql_query .= " limit " . $offset . ", " . $max_rows_per_page;

 

 

I´ve done these changes... But still the same error appears,

 

Then I checked these other changes you mentioned:

 

 

Change (catalog/includes/classes/split_page_results.php around line 67) from:

 

CODE

$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

 

to:

 

CODE

$this->sql_query .= " limit " . max($offset, 0) . ", " . $this->number_of_rows_per_page;

 

 

 

...and realized that they were already there :blink:

 

 

 

Basically I´m still not being able to upload the new "world_zones" file :angry:

 

I have the shop almost all configurated and can´t put it to run because of this error :blink:

 

Any more tips???

Thanks a lot again.

Paulo Bicho

Link to comment
Share on other sites

Hi again...

 

This is exactly what appears when I try to import the file it might help:

Error

There is a chance that you may have found a bug in the SQL parser. Please examine your query closely, and check that the quotes are correct and not mis-matched. Other possible failure causes may be that you are uploading a file with binary outside of a quoted text area. You can also try your query on the MySQL command line interface. The MySQL server error output below, if there is any, may also help you in diagnosing the problem. If you still have problems or if the parser fails where the command line interface succeeds, please reduce your SQL query input to the single query that causes problems, and submit a bug report with the data chunk in the CUT section below:

----BEGIN CUT----

eNrtzcFOwzAMBmCf8xQ+7LhGddbCFk6lhDHRraUpA3EbWhGTRhntJgFPT+AZOP6SFf2O/cmursva

ci6cGy7cyrKwYYmTRJRvwoSU8uvwPVpsLQ8f+8OmH9pe73fP+vB6YJFUJmzieBqFMlOWMyvnNp08

8b59m/FILb/8XWE50aKNiYbjpttu+q269zWXfszZ3K2aMa9duPWw63ju8tuSRc9UtcwsGy0h60RV

N9Xv0rj0llNt9ISLXXf6VEW2mltuu+h0fImm6u/WFdVUUkVMDWV0SQW5kBd0HV5HjyH5MPGh+6Z3

6qilgS6AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/gP9AHKMVko=

----END CUT----

----BEGIN RAW----

 

ERROR: C1 C2 LEN: 1 2 10441

STR: �

 

SVN: $Id: sqlparser.lib.php 11513 2008-08-28 16:17:53Z lem9 $

MySQL: 4.1.22-standard

USR OS, AGENT, VER: Win GECKO 1.9

PMA: 2.11.9.4

PHP VER,OS: 5.2.3 Linux

LANG: en-utf-8

SQL: D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S�

----END RAW----

 

 

SQL query:

 

D�R�O�P� �T�A�B�L�E� �I�F� �E�X�I�S�T�S� �z�o�n�e�s�;

 

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'D' at line 1

 

Thanks again!!

Paulo Bicho

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...