Get PHP Coding Help for Beginners | Troubleshooting Tips

  • Thread starter Thread starter sean1234
  • Start date Start date
  • Tags Tags
    Coding Php
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting issues related to running PHP code on a web server, specifically for beginners. Participants explore problems with code execution, server setup, and configuration requirements.

Discussion Character

  • Technical explanation, Troubleshooting, Homework-related

Main Points Raised

  • One participant expresses difficulty in getting their PHP code to display on a webpage and mentions errors encountered when using XAMPP.
  • Another participant inquires whether a web server running PHP is set up, suggesting it as a prerequisite.
  • A participant suggests accessing the PHP file through a web browser using a specific URL format, indicating the need for the file to be placed in the Apache site root.
  • It is noted that if the PHP file interacts with SQL, MySQL must also be installed and configured properly.
  • Another participant points out that Apache needs PHP installed and may require configuration adjustments to process .php files correctly.

Areas of Agreement / Disagreement

The discussion includes multiple perspectives on the necessary setup for running PHP code, with no consensus reached on the specific steps to resolve the issues presented.

Contextual Notes

Participants mention various configurations and installations required for PHP and SQL, but do not clarify specific versions or configurations that may be necessary, leaving some assumptions unaddressed.

sean1234
Messages
40
Reaction score
0
I am just starting out with this and am having trouble getting the code to translate to a webpage. It is not really clear as to how this is to be done. I have created a basic program in notepad, saved it as .php and have attempted to open in IE but get a message that says something about not having the proper devices to run it.

Also I have attempted to run it through XAMPP, but have received errors about SQL syntax or something along those lines. I would appreciate any input on this matter.
 
Last edited:
Computer science news on Phys.org
I installed apache on my computer though I am still seeing these problems. Should I be able to run the program through IE with Apache?
 
You should drop the php file in your Apache site root and access it via IE as http://localhost/myphpfile.php

If the PHP file uses SQL you also need to have MySQL installed and configured.
 
Last edited by a moderator:
Apache also needs to have PHP installed and you may have to add some stuff to the Apache config file so it knows to use PHP to interpret .php files.
 

Similar threads

Replies
15
Views
11K
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 21 ·
Replies
21
Views
6K
  • · Replies 24 ·
Replies
24
Views
4K
  • · Replies 6 ·
Replies
6
Views
7K
Replies
7
Views
3K
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
5
Views
1K