Author |
|
spiffy
Joined: 11 Jun 2008 Posts: 5
|
Posted: Wed 11 Jun '08 10:44 Post subject: installing apache and php |
|
|
hello, i'm trying to install apache and php, just so that i can view php files on my computer.
i'm using windows xp, and i've downloaded and installed apache 2.2 and php 5 with the help of a tutorial. the apache is working, but when i put a php file in the htdocs folder, it doesn't work. it's just blank.
how can i fix this?
also, after it is fixed... is there a way to have php files work in other folders on my computer? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 11 Jun '08 11:13 Post subject: |
|
|
Please read Basic PHP Troubleshooting
if there is still a problem or a question please post again. |
|
Back to top |
|
spiffy
Joined: 11 Jun 2008 Posts: 5
|
Posted: Wed 11 Jun '08 11:19 Post subject: |
|
|
according to that, the problem is either an error in the script, or the wrong file extension. i know that the file extension is .php, and i know that the script is correct, as it is simply,
<?php
phpinfo();
?> |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 11 Jun '08 11:44 Post subject: |
|
|
How did you configure apache to parse PHP? |
|
Back to top |
|
spiffy
Joined: 11 Jun 2008 Posts: 5
|
Posted: Wed 11 Jun '08 11:46 Post subject: |
|
|
um, i didn't, as far as i know. all i did was what was in this tutorial:
http://blogspot.fluidnewmedia.com/?p=272
...just downloaded and installed
i know nothing about this stuff. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 11 Jun '08 13:47 Post subject: |
|
|
which version of apache do you use? which os?
Please post the PHP part from your httpd.conf
What is in your error.log about that? |
|
Back to top |
|
spiffy
Joined: 11 Jun 2008 Posts: 5
|
Posted: Wed 11 Jun '08 14:18 Post subject: |
|
|
apache 2.2.8 on windows xp media center.
i don't know what part is the php part of httpd.conf. ...is it this?
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Program Files/PHP/"
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
my error.log says this...
Starting the Apache2.2 service
The Apache2.2 service is running.
] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Tue Jun 10 21:32:31 2008] [notice] Server built: Jan 18 2008 00:37:19
[Tue Jun 10 21:32:31 2008] [notice] Parent: Created child process 3904
[Tue Jun 10 21:32:31 2008] [notice] Child 3904: Child process is running
[Tue Jun 10 21:32:31 2008] [notice] Child 3904: Acquired the start mutex.
[Tue Jun 10 21:32:31 2008] [notice] Child 3904: Starting 64 worker threads.
[Tue Jun 10 21:32:31 2008] [notice] Child 3904: Starting thread to listen on port 80.
[Tue Jun 10 21:32:43 2008] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Tue Jun 10 21:32:43 2008] [notice] Child 3904: Exit event signaled. Child process is ending.
[Tue Jun 10 21:32:44 2008] [notice] Child 3904: Released the start mutex
[Tue Jun 10 21:32:45 2008] [notice] Child 3904: All worker threads have exited.
[Tue Jun 10 21:32:45 2008] [notice] Child 3904: Child process is exiting
[Tue Jun 10 21:32:45 2008] [notice] Parent: Child process exited successfully.
The Apache2.2 service is restarting.
Starting the Apache2.2 service
The Apache2.2 service is running.
] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Tue Jun 10 21:32:56 2008] [notice] Server built: Jan 18 2008 00:37:19
[Tue Jun 10 21:32:56 2008] [notice] Parent: Created child process 2960
[Tue Jun 10 21:32:56 2008] [notice] Child 2960: Child process is running
[Tue Jun 10 21:32:56 2008] [notice] Child 2960: Acquired the start mutex.
[Tue Jun 10 21:32:56 2008] [notice] Child 2960: Starting 64 worker threads.
[Tue Jun 10 21:32:56 2008] [notice] Child 2960: Starting thread to listen on port 80.
[Tue Jun 10 21:33:42 2008] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Tue Jun 10 21:33:42 2008] [notice] Child 2960: Exit event signaled. Child process is ending.
[Tue Jun 10 21:33:43 2008] [notice] Child 2960: Released the start mutex
[Tue Jun 10 21:33:44 2008] [notice] Child 2960: All worker threads have exited.
[Tue Jun 10 21:33:44 2008] [notice] Child 2960: Child process is exiting
[Tue Jun 10 21:33:44 2008] [notice] Parent: Child process exited successfully.
[Tue Jun 10 21:33:47 2008] [notice] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Tue Jun 10 21:33:47 2008] [notice] Server built: Jan 18 2008 00:37:19
[Tue Jun 10 21:33:47 2008] [notice] Parent: Created child process 3004
[Tue Jun 10 21:33:48 2008] [notice] Child 3004: Child process is running
[Tue Jun 10 21:33:48 2008] [notice] Child 3004: Acquired the start mutex.
[Tue Jun 10 21:33:48 2008] [notice] Child 3004: Starting 64 worker threads.
[Tue Jun 10 21:33:48 2008] [notice] Child 3004: Starting thread to listen on port 80.
[Tue Jun 10 21:38:18 2008] [notice] Parent: Received restart signal -- Restarting the server.
[Tue Jun 10 21:38:18 2008] [notice] Child 3004: Exit event signaled. Child process is ending.
[Tue Jun 10 21:38:19 2008] [notice] Child 3004: Released the start mutex
[Tue Jun 10 21:38:19 2008] [notice] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Tue Jun 10 21:38:19 2008] [notice] Server built: Jan 18 2008 00:37:19
[Tue Jun 10 21:38:19 2008] [notice] Parent: Created child process 4084
[Tue Jun 10 21:38:20 2008] [notice] Child 4084: Child process is running
[Tue Jun 10 21:38:20 2008] [notice] Child 4084: Acquired the start mutex.
[Tue Jun 10 21:38:20 2008] [notice] Child 4084: Starting 64 worker threads.
[Tue Jun 10 21:38:20 2008] [notice] Child 4084: Starting thread to listen on port 80.
[Tue Jun 10 21:38:20 2008] [notice] Child 3004: All worker threads have exited.
[Tue Jun 10 21:38:20 2008] [notice] Child 3004: Child process is exiting
[Wed Jun 11 01:24:31 2008] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Jun 11 01:24:31 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Wed Jun 11 01:24:31 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Jun 11 01:24:31 2008] [notice] Parent: Created child process 1944
[Wed Jun 11 01:24:32 2008] [notice] Child 1944: Child process is running
[Wed Jun 11 01:24:32 2008] [notice] Child 1944: Acquired the start mutex.
[Wed Jun 11 01:24:32 2008] [notice] Child 1944: Starting 64 worker threads.
[Wed Jun 11 01:24:32 2008] [notice] Child 1944: Starting thread to listen on port 80. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 11 Jun '08 14:51 Post subject: |
|
|
That is ok, but you need to say apache it has so parse the PHP files.
So you have to add one more line before #END PHP....
add:
AddType application/x-httpd-php .php |
|
Back to top |
|
spiffy
Joined: 11 Jun 2008 Posts: 5
|
Posted: Wed 11 Jun '08 14:56 Post subject: |
|
|
well, i added that, and it still doesn't work. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|