There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Apache 2.0.58 and PHP 5.1.4


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
Alien56's Avatar
Member with 44 posts.
 
Join Date: Jun 2006
13-Jun-2006, 05:27 PM #1
Apache 2.0.58 and PHP 5.1.4
Recently I installed Apache 2.0.58 and PHP 5.1.4 and I edited the Apache config file include these lines:

LoadModule php5_module c:\php5\php5apache2.dll
AddType application/x-httpd-pph .phtml .html

The file where you test php with the <? phpinfo(); ?> command works and it tells me all the php information but when I try to use php files from examples in a book a bought I just get blank pages, why is that?
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
13-Jun-2006, 06:02 PM #2
That should be
AddType application/x-httpd-php .phtml .html

Then PHP will process pages ending in .phtml and .html. What's the extension on the pages that aren't working?
Alien56's Avatar
Member with 44 posts.
 
Join Date: Jun 2006
13-Jun-2006, 06:25 PM #3
Sorry typed that line wrong what I really had was

AddType application/x-httpd-php .php .phtml .html

And the pages that arent working are the .php ones.

Also when I type http://localhost shouldn't the files show up there and not the apache page, because I have to type http://localhsot/filename.htm to get the page I'm looking for.

Last edited by Alien56 : 13-Jun-2006 07:30 PM.
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
13-Jun-2006, 06:57 PM #4
It still needs to be
AddType application/x-httpd-php .php .phtml .html

Set Options +Indexes in httpd.conf (take out any Options -Indexes settings) to turn on directory listings.
Alien56's Avatar
Member with 44 posts.
 
Join Date: Jun 2006
13-Jun-2006, 07:37 PM #5
Can you tell me about where in the httpd.conf file the option indexs are located and an example of one line.
Sequal7's Avatar
Computer Specs
Distinguished Member with 2,369 posts.
 
Join Date: Apr 2001
Location: Around the corner!
Experience: Including today?
14-Jun-2006, 01:04 AM #6
Do you want file indexing on? (meaning that if there is no index.php index.asp, index.htm, index.html etc.. page in the directory it will show a folder list of the contained files? (kinda like windows explorer)To turn on directory browsing, go to this line (yours may be different depending on your Apache install and OS)

<Directory "/usr/local/apache/htdocs">
Options FollowSymLinks MultiViews
</Directory>

And ADD the word "Indexes" to the Options, like this:

<Directory "/usr/local/apache/htdocs">
Options Indexes FollowSymLinks MultiViews
</Directory>
Save the document and restart the Apache server. Then when you type http://localhost you will see the contents of the folder if there is no html document.

Or, do you mean that you want your site page to show by tying http://localhost
If so, look for the commented line
# DirectoryIndex:
below that you will see;
<IfModule dir_module>
DirectoryIndex index.htm index.html
</IfModule>
type your file names into that, example is;
<IfModule dir_module>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml home.php home.htm home.html home.php4 home.php3
</IfModule>
Again save and restart Apache server, Then if you have a page called index.php (or any you just added) in your site root folder, and you type http://localhost your page will show, instead of the contents of the folder..
__________________
Good Luck on your fix

My real hobby..JoyCo
My real Job..(Second Hobby) IAFF Local 1865
Like the sites? My hobby is the one that created them!
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:34 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.