By xron25
Hi, I’m running a ubuntu lamp stack, I have a js script which requires via ajax a php file, when I run the script It throws a 404 error can’t find the php file. However when I click the path it says it has 404’d on it downloads the php file it should be running? Therefore the path is correct?
This is the contents of an inspection: Remote Address: 192.11.11.11:8000 Request URL:http://192.11.11.11:8000/chat/store.php Request Method:POST Status Code:404 Not Found Response Headers view source Connection:keep-alive Content-Length:28 Content-Type:text/html; charset=utf-8 Date:Mon, 30 Nov 2015 11:10:22 GMT X-Content-Type-Options:nosniff X-Powered-By:Express Request Headers view source Accept:/ Accept-Encoding:gzip, deflate Accept-Language:en-US,en;q=0.8 Connection:keep-alive Content-Length:45 Content-Type:application/x-www-form-urlencoded; charset=UTF-8 Host:192.11.11.11:8000
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
If, when you click the link to the PHP script, it’s downloading the PHP file, then you’re not properly setup to serve/execute PHP files or; the directory from which the PHP file is being served, for one reason or another, is not allowing PHP files to be executed from that directory.
To dive in further, we’d need to take a look at your Apache VirtualHost configuration for the domain. If you’ll paste your VirtualHost in a PasteBin and post that link in a response, I’d be more than happy to take a look at it for you :-).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.