Post by savo9 » Thu Sep 24, 2015 9:50 pm

Has anyone found a solution with this while still using Heart Internet as their hosting provider?




Mon Sep 02, 2013 3:00 am

Post by AnalogDan » Wed Sep 30, 2015 10:00 am

gwenthehen wrote:I have managed to resolve this problem. I did three things:

1) Update OpenCart to
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.
You magnificent bastard, THAT WORKED!

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 I added "private_ip" to the hosts file and now it works!



Mon Sep 28, 2015 9:07 pm

Post by vasileVas » Fri Oct 02, 2015 4:05 pm


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;
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.



Thu Aug 27, 2015 9:59 pm

Post by Rob Assink » Sat Oct 03, 2015 4:48 am

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.

New member


Wed Dec 17, 2014 11:00 pm

Post by hpmon » Sat Oct 03, 2015 4:55 am

vasileVas wrote:YES, I FOUND A SOLUTION.
I'm an idiot and know very little about coding, can you hold my hand and do a step by step of what you did?



Sat Aug 29, 2015 2:24 am

Post by rmandiga » Tue Nov 10, 2015 9:03 am

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...



Fri Oct 16, 2015 9:43 pm

Post by rmandiga » Tue Nov 10, 2015 9:04 am

All working as expected after admin config file is set to http.

My frontend is still on SSL.



Fri Oct 16, 2015 9:43 pm

Post by Daniel » Wed Dec 02, 2015 8:33 pm

i dont think your using more like the previous version.

Project Owner & Developer.

User avatar


Fri Nov 03, 2006 6:57 pm

Post by sotio » Sat Dec 12, 2015 3:42 pm

I have same problem.....

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data


<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 = '', date_added = NOW(), date_modified = NOW() in <b>/home/demo/public_html/</b> on line <b>41</b>{"success":"Success: API session successfully started!","token":"s9oEyjCWwy34FIJ38s6cGKuRR672cO69"}



Sat Dec 12, 2015 3:41 pm

Post by Yotzo » Sun Dec 13, 2015 10:05 pm

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:

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 installation the value was set to 0 while the api_id was 3.



Sun Dec 13, 2015 9:46 pm

Post by giannis121 » Tue Feb 16, 2016 2:20 pm

Please try edit the file: admin/config.php
find the code:
define('HTTPS_CATALOG', '');
change to:
define('HTTPS_CATALOG', '');

change "https" to "http"



Mon Feb 15, 2016 4:39 pm

Post by wilek666 » Wed Mar 30, 2016 3:33 am

I had similar issue, while editing order I had error:

Code: Select all

unexpected end of input
the solution was to switch off maintenance mode

User avatar
New member


Sun Dec 07, 2014 2:26 am
Location - Warsaw, Poland

Post by patric_mutwiri » Tue Jun 20, 2017 6:03 pm

spawacz_rider wrote:
Sun Dec 07, 2014 4:35 am

I have just install new version of open cart
And i have similar problem to version

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.


Tue Jun 20, 2017 6:00 pm
Who is online

Users browsing this forum: No registered users and 35 guests