Jump to content

Getting error 500 when adding product with webservice


Recommended Posts

When sending this to webservice I get 500 internal error, anybody knows why?
(I have just downloaded the xml for product #1 and removed the ID)

<?xml version="1.0" encoding="UTF-8"?>


<![CDATA[1]]>
<![CDATA[1]]>
<![CDATA[2]]>
<![CDATA[2]]>
<![CDATA[]]>
<![CDATA[]]>
<![CDATA[37]]>
<![CDATA[]]>
<![CDATA[]]>
<![CDATA[]]>
<![CDATA[0]]>
<![CDATA[]]>
<![CDATA[]]>
<![CDATA[1]]>
<![CDATA[2]]>
<![CDATA[1]]>
197.58
<![CDATA[0.00]]>
<![CDATA[70.000000]]>
<![CDATA[0]]>
<![CDATA[0]]>
<![CDATA[0.000000]]>
<![CDATA[]]>
<![CDATA[0]]>
<![CDATA[0]]>
<![CDATA[0]]>
<![CDATA[0.5]]>
<![CDATA[0]]>
<![CDATA[0]]>
<![CDATA[0]]>
<![CDATA[0]]>
<![CDATA[1]]>
<![CDATA[1]]>
<![CDATA[new]]>
<![CDATA[1]]>
<![CDATA[1]]>
<![CDATA[0]]>
<![CDATA[0]]>
<![CDATA[800]]>
<meta_description>
<![CDATA[]]>
</meta_description>
<meta_keywords>
<![CDATA[]]>
</meta_keywords>
<meta_title>
<![CDATA[]]>
</meta_title>
<link_rewrite>
<![CDATA[ipod-nano]]>
</link_rewrite>

<![CDATA[iPod Nano]]>


<![CDATA[in stock]]>


<![CDATA[]]>


<![CDATA[
Curved ahead of the curve.

For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass design and you won't want to put iPod nano down.

Great looks. And brains, too.

The new Genius feature turns iPod nano into your own highly intelligent, personal DJ. It creates playlists by finding songs in your library that go great together.

Made to move with your moves.

The accelerometer comes to iPod nano. Give it a shake to shuffle your music. Turn it sideways to view Cover Flow. And play games designed with your moves in mind.]]>


<![CDATA[
New design. New features. Now in 8GB and 16GB. iPod nano rocks like never before.]]>




<![CDATA[1]]>


<![CDATA[2]]>




<![CDATA[37]]>


<![CDATA[38]]>


<![CDATA[39]]>


<![CDATA[40]]>


<![CDATA[41]]>


<![CDATA[42]]>


<![CDATA[44]]>


<![CDATA[45]]>





Link to comment
Share on other sites

Thanks for your reply. Sorry, I was not specific. The error actually comes from the Prestashop system an not the web server, so it cannot be the reasons in your link.

This is the exact error I'm getting from the web service. Any ideas why?

HTTP RETURN
<?xml version="1.0" encoding="UTF-8"?>


<![CDATA[internal error]]>


Link to comment
Share on other sites

I changed the permissions as below, but it did not help. Do you know any other file that needs to change?

root@ubuntu:/var/www# chmod 755 config/ upload/ download/ tools/smarty/compile/
root@ubuntu:/var/www# chmod -R 755 img/ mails/ modules/ themes/prestashop/lang/ translations/

Link to comment
Share on other sites

None of the folders in your site should be set to 777, if there are still 777 folders (include the root itself, change it to 755.

Next step is to check the server log, as it should have more information about the error.

Link to comment
Share on other sites

  • 1 month later...
  • 3 years later...

try to delete encode url function from PSWebServiceLibrary.php #222
 

the line #222 shold be like this:
 
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => 'xml='.$xml));
Link to comment
Share on other sites

  • 2 months later...
  On 8/25/2014 at 8:20 PM, hllvd said:

 

try to delete encode url function from PSWebServiceLibrary.php #222

 

the line #222 shold be like this:

 

$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => 'xml='.$xml));

 

 

 

still getting the error 500,

 

my new product addition API script  works fine on localhost , but  not on server

Edited by rajlaskar (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...