Jump to content

Prestashop webservice 404 Not Found


wallink

Recommended Posts

Hello.

I have set up my prestashop 1.4 installation and everything works fine.

I know want to use the webservice feature, but I can't get it to work.

I have fixed all warnings and generated a key as well as enabled the different resources I want.

If my shop is located at http://myurl/prestashop and that works as it should and I then goes to:

http://myurl/prestashop/api

Then I only get 404 Not Found!

What do I need to do?

Link to comment
Share on other sites

If I go to http://myurl/prestashop/0/webservice/dispatcher.php I get 404 Not Found but when I go to http://myurl/prestashop/webservice/dispatcher.php, firefox asks me for username and password.

When I try my admin login I just get the following response:

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


<![CDATA[internal error]]>



1. What username and password?
2. is it still url rewrites that doesn't work?

thx

Link to comment
Share on other sites

  • 2 weeks later...
If I go to http://myurl/prestashop/0/webservice/dispatcher.php I get 404 Not Found but when I go to http://myurl/prestashop/webservice/dispatcher.php,'>http://myurl/prestashop/webservice/dispatcher.php, firefox asks me for username and password.

When I try my admin login I just get the following response:

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


<![CDATA[internal error]]>



1. What username and password?
2. is it still url rewrites that doesn't work?

thx


Hello,
When you active the webService (in the backoffice) an username is automaticaly generated. So, the username asked when you go on http://myurl/prestashop/webservice/dispatcher.php the username is the generated username. There are not password.

if the urlRewriting is activated, the API adress is : http://myurl/prestashop/api

best regards,
Mikael
(Sorry for my English, I'm french .... anybody is perfect lol )
Link to comment
Share on other sites

  • 2 years later...

I have installed mod_rewrite:

@a2enmod rewrite@

@/etc/init.d/apache2 restart@

 

But error.log does returns an error:

@ File does not exist: /var/www/api@

 

Any ideas why?

 

Make sure AllowOverride is enabled in the VirtualHost section for your website (/etc/apache2/sites-enabled/000-default on some systems). If it's set to None the .htaccess won't be able to enable rewrite:

		<Directory /var/www/>
			Options Indexes FollowSymLinks MultiViews
			AllowOverride ALL
			Order allow,deny
			allow from all
	</Directory>

  • Like 1
Link to comment
Share on other sites

  • 9 months later...

hello!!

 

I am using prestashop 1.6 and I am trying to use the web service. At first I had the same problem as you did (error 404). then I used the url that you suggested above, that one with the dispatcher and as a result I got an xml tree, but the xlinks are not working as links, I mean I can not click on them. When I copy-paste them, then I get again an error 404... I think there is something to do with the api, I am not quite sure :/  

 

 

 

Any thoughts or suggestions will be appreciated!! :):D

thank you in advance

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

  • 1 year later...

Make sure AllowOverride is enabled in the VirtualHost section for your website (/etc/apache2/sites-enabled/000-default on some systems). If it's set to None the .htaccess won't be able to enable rewrite:

<Directory /var/www/>
				Options Indexes FollowSymLinks MultiViews
				AllowOverride ALL
				Order allow,deny
				allow from all
		</Directory>

Dear,

 

You are right, I forgot this step :)

and do service apache2 restart|reload

 

Prestashop 1.6

 

Regards,

 

Yves

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

  • 10 months later...
  • 2 weeks later...
Hi,

 

I spend 2 hours on this problem and I solved it by htaccess on the root directory.

 

I saw that line alone : 

RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

 

I just add this before :

RewriteCond %{HTTP_HOST} ^yoururl.com$

 

Now it works

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