LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-30-2014, 04:34 PM   #1
passinthru
Member
 
Registered: Oct 2013
Location: Mid-Atlantic USA
Distribution: various debians and *buntus
Posts: 51

Rep: Reputation: Disabled
LAMP stack wierdness


Greetings. I have a problem I have never encountered with the LAMP stack. I have LAMP installed in Linuxmint 17 on my personal pc. The stack is configured correctly and serving html and php files on localhost (www/site1/, www/site2/, www/site3/, etc.) with the exception of one site (www/site4/). I developed the site using index.html (i.e. www/site4/index.html) and was having no problem until I decided to convert to index.php (using the contents of the index.html file broken down as includes in the index.php file). On reloading the site (www/site4/), apache2 serves the "download" option rather than the index.php. Strange thing is that the php module is loaded, serves the php test page, works on all of the other sites, permissions are correct, DirectoryIndex is present in both the apache2 config file and .htaccess, and works on localhost/www/site4 if the url is localhost/site4/index.php, but not unless index.php is specified. It's probably something simple and obvious, but I have checked and re-checked everything I know to check, and my searching has yielded nothing. I'll be grateful if someone could suggest or point me in the right direction of understanding and correcting the problem. Thanks.
 
Old 08-31-2014, 03:55 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
Quote:
I decided to convert to index.php (using the contents of the index.html file broken down as includes in the index.php file)
I cannot imagine how you did that. Can you give an example. Usually you can write HTML outside of areas limited by "<?php" and "?>"
 
Old 09-02-2014, 10:32 AM   #3
passinthru
Member
 
Registered: Oct 2013
Location: Mid-Atlantic USA
Distribution: various debians and *buntus
Posts: 51

Original Poster
Rep: Reputation: Disabled
Sorry to be so late in responding. For some reason I did not receive email notification of the reply.

Quote:
Originally Posted by j-ray View Post
I cannot imagine how you did that. Can you give an example. Usually you can write HTML outside of areas limited by "<?php" and "?>"
Code:
index.php:
<?php
?>
<?php include 'header.txt'; ?> (opening <html> to opening <body> tags)
<?php include 'content.txt;' ?>
<?php include 'menu.txt;' ?>
<?php include 'footer.txt;' ?> (closing </body> and </html> tags)
 
Old 09-02-2014, 12:23 PM   #4
passinthru
Member
 
Registered: Oct 2013
Location: Mid-Atlantic USA
Distribution: various debians and *buntus
Posts: 51

Original Poster
Rep: Reputation: Disabled
It's working properly. I changed nothing. No idea what happened.
 
  


Reply

Tags
lamp



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Migrate A LAMP Stack LXer Syndicated Linux News 0 10-11-2013 11:20 AM
[SOLVED] X-server on a LAMP stack Cyrolancer Linux - General 5 01-24-2012 03:54 PM
how to play videos on LAMP Stack? maradnus Linux - Server 2 12-15-2011 10:26 PM
LAMP stack for Windoze resetreset General 3 08-18-2010 09:46 AM
tuning my LAMP stack... sneakyimp Linux - Software 2 11-01-2006 03:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration