Question

I'm having an issue. I've been trying for 2 days to solve but until now I didn't have success :

The Problem :

I have a RSS Parser that is fully functional on Localhost but on Hostgator domain it does not allow to make request. Is there something else I can do?

I already tried headers :

  header('Access-Control-Allow-Origin: *');  
  header('content-type: application/json; charset=utf-8');

Changed file permissions on the server, changed .htaccess ( same headers above and other more ) and then, I came here : )

Any of you had this problem ? Thanks already !

Pastebin of the PHP AJAX_getNews

Pastebin of the News class

Edit: Actually it is forbidden to me to even access the file directly, ajax calls returns forbidden also.

Was it helpful?

Solution

What do you mean, it doesn't allow you to make the request? What actual error are you getting?

What file permissions did you give it? People tend to put 777 permissions on PHP files, thinking of mod_php setups, but HostGator's suPHP actually refuses to run in this case. IIRC neither the .php file nor any directory in its path can be group- or world- writeable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top