My computer is a Windows 10 64 bit.
I tried to run my PHP code, steps:
- Downloaded php.net.
Set the environment variables path as instructed. Ran the command line like this: https://imgur.com/a/Q9zs9mL
Microsoft Windows [Version 10.0.17134.345] (c) 2018 Microsoft Corporation. All rights reserved. C:\Users\Mai Do>php -S localhost:4000 PHP 7.2.10 Development Server started at Mon Oct 22 21:04:32 2018 Listening on http://localhost:4000 Document root is C:\Users\Mai Do Press Ctrl+C to quit.
Created a PHP file, first with NetBeans
- Saved the file in the root directory folder named "php1" (try to be different from my root name)
- Typed in browser:
localhost:4000/php1/input.php
- Object not found 404 page.
- Tried multiple times with different php file. same thing.
- Switch to Atom. Same thing.
- Moved the file to htdocs folder. Same thing
- Download Xampp. Turn on the Apache and MySQL. XAMP ver 3.2.2 control panel shows up. Both Button turn to Green. Still not found.
This SO page PHP not working in XAMPP says:
If you're trying to connect via your IP then your router must be stopping it so you have to sort the settings out. I don't know your router make/model you better off asking their support forums.
I am thinking there might be a server config problem. Like this one has a similar issue: Apache2 not working with routes PHP which leads to this: https://docs.bolt.cm/3.0/howto/making-sure-htaccess-works
"Editing the apache2.conf and setting 'AllowOverride All' on , finally works." ???
I am not sure if that is the right problem either. Can someone walk me through it? Bless you.