localhost/php/apache

garrensilverwing

New Member
Messages
148
Reaction score
0
Points
0
i got sick of uploading all the files i make with php to my site just to test them so i wanted to set up apache php and mysql on my computer so i can just check them by typing localhost into my browser well i installed everything but it seems now that PHP isnt working all i get is an actual index of the files in the directory not the page it is supposed to be :( i think my configuration is wrong ;(
 

acellec

New Member
Messages
29
Reaction score
0
Points
0
i got sick of uploading all the files i make with php to my site just to test them so i wanted to set up apache php and mysql on my computer so i can just check them by typing localhost into my browser well i installed everything but it seems now that PHP isnt working all i get is an actual index of the files in the directory not the page it is supposed to be :( i think my configuration is wrong ;(

isnt it the directory where you put your file is

D:\xampp\htdocs\xampp
and when you check the page is

http://localhost/xampp/ your php file?
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
acellec, I don't know if he has xampp installed, but I definitely recommend it highly :)

If you installed Apache, PHP, and MySQL all separately, you need to edit your configuration files for Apache and PHP, methinks. I would recommend uninstalling everything and downloading xampp ;)

The other thing is you have to start the Apache and MySQL service.

You try doing a ping from the command line:

ping localhost:80
ping localhost:3306

If there's no reply, there's no APache or MySQL
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
ping localhost:80
ping localhost:3306
I once made this mistake. ping uses ICMP, which doesn't have ports. You can telnet to port 80. You can also run tcpview to see which ports are bound by which executables. For anyone who hasn't seen them before, Russinovich and Cogswell's Sysinternals utilities are invaluable.

If you're getting a directory index when index.php is present, it's probably because the server isn't configured to look for index.php when a URL refers to a directory. Look for DirectoryIndex in the server configuration and add 'index.php' at the start of the list of file names.
 

garrettroyce

Community Support
Community Support
Messages
5,611
Reaction score
249
Points
63
I once made this mistake. ping uses ICMP, which doesn't have ports. You can telnet to port 80. You can also run tcpview to see which ports are bound by which executables. For anyone who hasn't seen them before, Russinovich and Cogswell's Sysinternals utilities are invaluable.

If you're getting a directory index when index.php is present, it's probably because the server isn't configured to look for index.php when a URL refers to a directory. Look for DirectoryIndex in the server configuration and add 'index.php' at the start of the list of file names.

Oops, you're right.
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
XAMPP, is, from what i've seen, easier to modify and there are more addons: there is one for tomcat, one for perl one for python.
 
Top