Ajax post works in localhost, but does not in web host

So my issue is: I built a simple app in PHP with AJAX and it’s working fine in both of my local machines (WAMP and LAMP). But when I send it to a web server, I got the (500 internal server error) message. Below is my AJAX script:

type: 'POST',
url: BASEPATH+'/ajax/login',
data: formData = new FormData(this),
processData: false,
contentType: false,
async: false,
cache: false,

FYI: BASEPATH is a var I use to work in localhost and web server. When it’s in localhost, BASEPATH = ‘apps/version’. When it’s in web server, I change it to empty (”), since my app is in the root folder.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s