Click Start to the right of the "Apache" heading to start your Apache web server. You should see the indicator to the right of "Apache" turn green.
If you encounter an error and Apache doesn't start, do the following: [1] X Research source Click Config next to the "Apache" heading, then click Apache httpd. Note Apache's second port. This is the port to the right of the first port number. If you edited the "httpd. Open a web browser. You can use any web browser e. Click the address bar. It's at the top of the browser. If there's any text in the address bar, delete it before proceeding.
Enter the address of the PHP script you want to check. Type in localhost: and your Apache server's second port number e. Make sure you include ". Doing so will load your PHP script in your browser. If the script is working, you should see the page load without any problems. If your script has errors, they will manifest in a number of different visual ways. Look for elements of your page that failed to load correctly to discern errors. Method 2. Open your PHP document. You'll use your computer's PHP-editing software e.
Select your document's contents. Copy the contents. Paste in your copied code. Select a PHP version. Click Execute code. It's below the "Run on PHP version" drop-down box. Doing so runs your PHP code and displays the results in the "Result" text box below the Execute code button.
Review any errors. In the "Result" text box, you should see your code's appearance. Each error will be reported as belonging to a specific line e. You can view each line's number by looking on the left side of the "Your script" window.
Errors will also appear as red-and-white "X" icons to the left of the pertinent lines in the "Your code" text box. Include your email address to get a message when this question is answered. You Might Also Like How to. How to. About This Article. Written by:. Co-authors: 5. Viewed k times. Improve this question. Ky Leggiero Ky Leggiero Without Apache there to toss out request errors you'll be handicapped as far as debugging.
Using VirtualBox to run a VM that replicates the production environment and versions on your local development box is pretty common practise these days: it allows you to run PHP , MySQL, etc in a sandbox on your development machine — Mark Baker. Add a comment. Active Oldest Votes. Improve this answer. WD40 1 1 gold badge 6 6 silver badges 16 16 bronze badges.
Eugen Dimboiu Eugen Dimboiu 2, 2 2 gold badges 27 27 silver badges 32 32 bronze badges. Yes , you just need to install php on your system and the server is bundled with php 5. This worked well for me on Mac, thanks! Is there such thing as a portable MySQL? This is just for testing scripts and other simple stuff - it's not a fully fledged server — Eugen Dimboiu.
Show 1 more comment. Randall 2, 1 1 gold badge 18 18 silver badges 21 21 bronze badges. Attila Fulop Attila Fulop 6, 2 2 gold badges 42 42 silver badges 49 49 bronze badges. Wow, that's odd. You're right, it seems it doesn't work properly on windows. See: stackoverflow. Uchiha Itachi Uchiha Itachi 2 2 gold badges 9 9 silver badges 15 15 bronze badges.
I really dont think so. Jentel Jentel 2 2 silver badges 17 17 bronze badges. Per the project description Lucky Lucky 4, 2 2 gold badges 6 6 silver badges 16 16 bronze badges. Poniros Poniros 9 9 bronze badges. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
0コメント