473,569 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using PHP on home page, index.php not working

13 New Member
I've built a website and some of the pages are php pages (e.g. SomePage.php). It all works fine; both the html pages and the php pages come up and work just fine.

I then made a change to the main index.html file and made it so that it's an index.php file instead, and it has some php code embedded in it, not much different than any of the other php pages on my site.

But when I try to go to that index.php file, as the first file to bring up for the site, it fails to bring up the page but instead pops up an Open File dialog, asking if I want to Open or Save the index.php file. It's as if the server is not recognizing index.php as being a php file that needs the normal php pre-processing on the server side. I used to get similar problems (popping up the Open File dialog) with the other php pages before I had my server properly set up with Apache and php and such. But all of that is indeed properly set up. The OTHER php pages come up OK. It's just the very first, index.php page, that doesn't come up correctly.

What am I doing wrong?

Is there a standard way for making it bring up the first page as a php file?

[ I had posted this yesterday but somehow it disappeared from the forum.]
Jun 12 '07 #1
3 1998
ronnil
134 Recognized Expert New Member
have you checked that there are no whitespaces in the .php extension? (know this sounds stupid, but sometimes they sneak in anyways)

You're running apache and php right?

i guess you have setup index.php in the DirectoryIndex setting in httpd.conf....
Jun 12 '07 #2
Motoma
3,237 Recognized Expert Specialist
Do you have PHP installed on the server?
Care to post your PHP code?
Jun 12 '07 #3
pbmods
5,821 Recognized Expert Expert
Make sure you have the following lines in your httpd.conf file:

Expand|Select|Wrap|Line Numbers
  1. LoadModule php5_module        modules/libphp5.so
  2. AddType application/x-httpd-php .php
  3.  
Jun 14 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1787
by: R. Gregg Reed | last post by:
I'm trying to intergrate a cgi affiliate tracking system into a php website. When someone pays using PayPal it's supposed to direct them to one page if the payment is a success or another if payment failed. This is the code: if($action == order && $order_n != "") { include "engine/card_process.pml";
8
2206
by: Vic Spainhower | last post by:
Hello, I'm just getting starting in php and MySQL and I've got my application working correctly on my local windows XP computer. Now, when I publish to my ISP it's not going so well, which is also a Windows server. I'm using form variables to control navigating to different pages when a page is reloaded. As I said no problem on my machine...
6
1789
by: Lars Eighner | last post by:
I suppose this is a meta-html question, but it seems to go directly to an authoring issue. Which order of next, home (menu, index, main, contents), prev links do you prefer, and why? 1. next | home | prev or
12
2549
by: Charlie King | last post by:
As I understand it, the use of FIR* to replace heading tags with images in visually enabled CSS browsers is now frowned upon on the basis that some screen readers will *nor* read back text that is marked up by CSS to be invisible or hidden. So... If I want to replace headings with images (because my client wants to use his specific font...
5
3357
by: NewbieSupreme | last post by:
I installed Apache 2.0.58, tested it, got the "working" page. Installed MySQL 5.0.22, and didn't really see how to test that, but there is a mysql process running in the task manager. Ran through the PHP 5.1.4 installation directions, and that seems to work, since I can use phpinfo() and get all the information on a test php page. Then I...
13
3860
by: hornedw | last post by:
I have been working on a ecommerce website for myself. What I needed some assistance on was when i was trying to display the categories/subcategories for the different products. I decided to use the modified preorder tree transversal algorithm. What I wanted was on the first page is to display the catogories as follows Books (35)...
10
2195
by: Trammel | last post by:
Hi, Im just about to start developing a new website for personal / friend use that may be accessed by other people all over the web. I was sitting thinking through designs for the pages, etc when I came across a thought.... ....why show the visitor loads of junk just because Im using A-href type links? Is there a way to create a...
7
5801
by: Bill H | last post by:
When I do website design I have my screen (on a PC) set for 1600 x 1200 or greater resolution so that I can have as many windows open as I need and not have to flip between them. The issue I have is the the IE7 window is never a consistant size because I resize it as I am using it. I would like to be able to open up a blank IE 7 window and...
8
1559
by: renfri | last post by:
I am learning Frontpage 2002 by teching myself. My employment had a very old website. I have created a new website to replace the old one. I published it. I am having a problem with the home page. When I check the files that are loaded it shows one index.htm file which is the new home page. When you go to the website it brings up the old...
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2107
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.