RogerInHawaii Posted June 12, 2007 Share Posted June 12, 2007 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 prpoblems 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? ??? Quote Link to comment https://forums.phpfreaks.com/topic/55198-doesnt-like-indexphp-for-main-page/ Share on other sites More sharing options...
Caesar Posted June 12, 2007 Share Posted June 12, 2007 First of all....did you configure Apache to look for index.php as one of the default home pages to look for? Quote Link to comment https://forums.phpfreaks.com/topic/55198-doesnt-like-indexphp-for-main-page/#findComment-272884 Share on other sites More sharing options...
RogerInHawaii Posted June 12, 2007 Author Share Posted June 12, 2007 RE: configure Apache to look for index.php as one of the default home pages That does not sound familiar. I just installed and set up Apache last week and I don't recall anything like a specification for "default home pages". Of course, at the time I was installing I hadn't encountered this problem so default home pages would not have been on my mind. I am VERY new to all of this. If you can tell me how I might now specify to Apache what the default home pages should be, I'd be very grateful. - Roger Quote Link to comment https://forums.phpfreaks.com/topic/55198-doesnt-like-indexphp-for-main-page/#findComment-272913 Share on other sites More sharing options...
vbnullchar Posted June 12, 2007 Share Posted June 12, 2007 what webserver are you using? For Apache 1.3 open you apache.conf # # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # <IfModule mod_dir.c> DirectoryIndex index.html index.htm index.shtml default.htm default.html index.php </IfModule> Quote Link to comment https://forums.phpfreaks.com/topic/55198-doesnt-like-indexphp-for-main-page/#findComment-272932 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.