You magnificent bastard, THAT WORKED!gwenthehen wrote:I have managed to resolve this problem. I did three things:
1) Update OpenCart to 2.0.3.1
2) Update the server's hosts file so point the website's domain back to the server IP (the domain wasn't live at the time)
3) Update the admin/config.php file so that both the https links are using http rather than https (I don't have an SSL installed currently).
That seemed to fix it. If anyone needs any more info please post back and I'll do what I can to help.
Specifically #2 modifying the hosts file.
So in my case the webserver is NATed, if I resolve my domain name from the cmd line on the server, it comes back with the public IP and due to routing restrictions that can only be reached from outside, hence the fcgid timeout when curl was trying to reach mydomain.com/whatever. I added "private_ip mydomain.com" to the hosts file and now it works!
YES, I FOUND A SOLUTION.
I did not read all the posts, so this might be already presented, but first post presenting the problem had same argument as me. Sorry if this is the case.
So, I debug the issue, as it is indeed a CURL problem.
I posted the url and it echoed just: index.php?route=api/customer&api=api%2Fcustomer
The domain was MISSING, so it's normal CURL doesn't worked.
So I looked closer in the function aoi() from admin/controller/sales/order.php and found the pb here:
the $url came empty from this "if".
So, THE SOLUTION, set you $url in you config files or in your admin if you use several stores.
OR hardcode it to test if I'm right.
Hope this helps.
I did not read all the posts, so this might be already presented, but first post presenting the problem had same argument as me. Sorry if this is the case.
So, I debug the issue, as it is indeed a CURL problem.
I posted the url and it echoed just: index.php?route=api/customer&api=api%2Fcustomer
The domain was MISSING, so it's normal CURL doesn't worked.
So I looked closer in the function aoi() from admin/controller/sales/order.php and found the pb here:
Code: Select all
if ($store_info) {
$url = $store_info['ssl'];
} else {
$url = HTTPS_CATALOG;
}
So, THE SOLUTION, set you $url in you config files or in your admin if you use several stores.
OR hardcode it to test if I'm right.
Hope this helps.
Can you be more specific what to do?
I have tried all kind of things at this moment and none of them seems to work.
I have tried all kind of things at this moment and none of them seems to work.
I just tried by reading all the blogs...
I resolved like this
Admin config.php ---> modify https to https for the URLs while you can retain HTTPS_SERVER AND HTTPS_CATALOGUE.
Once modified to https my entire admin is working on non ssl protocol and it could allow me to edit the orders easily.
New issue found is it is not allowing to add a new product in edit order.. Need to work on..
Hope the above helps...
I resolved like this
Admin config.php ---> modify https to https for the URLs while you can retain HTTPS_SERVER AND HTTPS_CATALOGUE.
Once modified to https my entire admin is working on non ssl protocol and it could allow me to edit the orders easily.
New issue found is it is not allowing to add a new product in edit order.. Need to work on..
Hope the above helps...
I have same problem.....
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Error: Table 'demo_789987.oc_api_session' doesn't exist<br />Error No: 1146<br />INSERT INTO `oc_api_session` SET api_id = '1', token = 's9oEyjCWwy34FIJ38s6cGKuRR672cO69', session_name = 'temp_session_566bcfd9273c1', session_id = 'aa997c0e8476ca6c399a58488dd8a04b', ip = '217.174.49.156', date_added = NOW(), date_modified = NOW() in <b>/home/demo/public_html/website-studio.eu/system/library/db/mysqli.php</b> on line <b>41</b>{"success":"Success: API session successfully started!","token":"s9oEyjCWwy34FIJ38s6cGKuRR672cO69"}
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Error: Table 'demo_789987.oc_api_session' doesn't exist<br />Error No: 1146<br />INSERT INTO `oc_api_session` SET api_id = '1', token = 's9oEyjCWwy34FIJ38s6cGKuRR672cO69', session_name = 'temp_session_566bcfd9273c1', session_id = 'aa997c0e8476ca6c399a58488dd8a04b', ip = '217.174.49.156', date_added = NOW(), date_modified = NOW() in <b>/home/demo/public_html/website-studio.eu/system/library/db/mysqli.php</b> on line <b>41</b>{"success":"Success: API session successfully started!","token":"s9oEyjCWwy34FIJ38s6cGKuRR672cO69"}
After searching in lot of forums, found this solution and it worked for me:
In the admin panel of your shop go to:
Admin > Settings > Users > API
There should be one user with name like:
XrpeYEWrFHOcqB1phjBXdUCRO1A3sCvDpgmTGBcJ7G6WuYIMKXCrIJUpzvFPfimWT6LHQLisTYz0nuOy7ZK
if there is not, create one and give her reasonably complicated name like in the example.
Then you have to check out your database (using phpMyAdmin helps a lot) where keeps your store data.
1. Find the api table which contains the API user, commonly named oc_api and check the api_id of this user.
2.Find table setting (by default OpenCart instalation it's named oc_setting) and find key config_api_id.
3.Set the value field to the same number as the api_id you had found in the api table.
Problem should be solved.
In my OpenCart 2.0.3.1 installation the value was set to 0 while the api_id was 3.
In the admin panel of your shop go to:
Admin > Settings > Users > API
There should be one user with name like:
XrpeYEWrFHOcqB1phjBXdUCRO1A3sCvDpgmTGBcJ7G6WuYIMKXCrIJUpzvFPfimWT6LHQLisTYz0nuOy7ZK
if there is not, create one and give her reasonably complicated name like in the example.
Then you have to check out your database (using phpMyAdmin helps a lot) where keeps your store data.
1. Find the api table which contains the API user, commonly named oc_api and check the api_id of this user.
2.Find table setting (by default OpenCart instalation it's named oc_setting) and find key config_api_id.
3.Set the value field to the same number as the api_id you had found in the api table.
Problem should be solved.
In my OpenCart 2.0.3.1 installation the value was set to 0 while the api_id was 3.
Please try edit the file: admin/config.php
find the code:
define('HTTPS_CATALOG', 'https://yoursite.com/');
change to:
define('HTTPS_CATALOG', 'http://yoursite.com/');
change "https" to "http"
find the code:
define('HTTPS_CATALOG', 'https://yoursite.com/');
change to:
define('HTTPS_CATALOG', 'http://yoursite.com/');
change "https" to "http"
I had similar issue, while editing order I had error: the solution was to switch off maintenance mode
Code: Select all
unexpected end of input
spawacz_rider wrote: ↑Sun Dec 07, 2014 4:35 amHi
I have just install new version of open cart 2.0.1.1
And i have similar problem to version 2.0.1.0
I can't edit orders when i press on Continue buton nothing is happening
But this time I don't have any pop-up with errors on Chrome and IE
but on Firefox i have SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
deleting order is not possibile as well
The php error log is clear from any faults.
Any idea?
I'm not php master I just have average level of html5 and css.
Please help
This is the answer ladies n gentlemen:
I had this particular issue. Once an order is created, I, the Admin, couldn't edit the order. It's not a bug or anything. It's a security update which opencart implemented via user/api, and is called during several operations on site, ie Order Additions, Deletions or Modifications.
For it to work for you, ask your host to disable mod_security for urls with "admin", or urls containing your IP Address, or check if your htaccess can overide and disable it from there.
You can also exclude per request/method type 'POST' or 'GET'.
Please note, Latest mod_sec is mod_security2
Guess am happy after I found out the real issue.
Who is online
Users browsing this forum: No registered users and 282 guests