LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2001, 06:47 PM   #1
Graanco
Member
 
Registered: May 2001
Location: US somewhere
Distribution: Mandrake Redhat Debian Usually the last versions
Posts: 45

Rep: Reputation: 15
Include mod for Apache


Now it has been two days still with not a clue!!! I have basic Mandrake 8.0 and the include i.e. <!--#include file="/some/file"-->
Doesn't seem to work in the web pages any thoughts or idea is greatly apreciated... I also ensured that the Options Includes statement was there too...

Benj
 
Old 09-12-2001, 06:48 PM   #2
sykkn
Member
 
Registered: Apr 2001
Location: Texas
Distribution: Mandrake 8.0, RedHat 7.1
Posts: 48

Rep: Reputation: 15
What is the file extension of your index/web page. To use SSI (Server Side Include) as you have attempted above, you have to name your file with a .shtml or .shtm file extension.

your normal:

index.html
index.htm

should be:

index.shml
index.shtm
 
Old 09-13-2001, 03:06 PM   #3
Graanco
Member
 
Registered: May 2001
Location: US somewhere
Distribution: Mandrake Redhat Debian Usually the last versions
Posts: 45

Original Poster
Rep: Reputation: 15
Understanding correctly

Okay.. the extention of the file that has the include statement in it. Is php, if it need to be shtml then can I still run php??? Or if the include file needs to be shtml then all I need to do is change the extention of the include file to shtml???

Thanks
 
Old 09-13-2001, 05:45 PM   #4
sykkn
Member
 
Registered: Apr 2001
Location: Texas
Distribution: Mandrake 8.0, RedHat 7.1
Posts: 48

Rep: Reputation: 15
I ran into a problem like this myself. My index page had been .shtml since I put up my website. Then when I learned PHP I started wanting to add scripts into the above mentioned page. The only way I found that they can work together peacefully is to include the script via SSI.

If you want to include a poll script in your index page you can just write the script in PHP and save the file as somefile.php. You can then include the file like this:

<!--#include file="somefile.php"-->

I have had trouble including a PHP script that is not in the same directory as the .shtml page you want to include it in.

This is what I have gotten from my personal experiences and I hope this has been helpful.
 
Old 09-13-2001, 05:46 PM   #5
sykkn
Member
 
Registered: Apr 2001
Location: Texas
Distribution: Mandrake 8.0, RedHat 7.1
Posts: 48

Rep: Reputation: 15
Oh, and just to make sure I was clear. You cannot put php code into a .shml file, or it will just print to the screen like regular text. You have to use the SSI.
 
Old 09-14-2001, 12:03 AM   #6
Graanco
Member
 
Registered: May 2001
Location: US somewhere
Distribution: Mandrake Redhat Debian Usually the last versions
Posts: 45

Original Poster
Rep: Reputation: 15
Question Correct to Say????

So if my index page is .shtml extention then I can use the include file command (Great!!) and if I want to add php functionality to it the I need to include them like wise <!--#Include file="Some/File.php"--> or can I add this line "Addhandler server-parsed .php" to the httpd.conf so it support Includes???? And lastly if I want to use a directory to support includes do I need to do a <Directory /some/directory> Options +Includes </ Directory> to the httpd.conf (mandrake: commonhttpd.conf) file.

Thanks
 
Old 09-14-2001, 01:06 AM   #7
Graanco
Member
 
Registered: May 2001
Location: US somewhere
Distribution: Mandrake Redhat Debian Usually the last versions
Posts: 45

Original Poster
Rep: Reputation: 15
Add line to httpd.conf

Ok,
I tried the addhandler server-parsed .php and now it askt o down load my home page silly... Oh well back to shtml I guess. I hope it will work...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache mod or httpd problem peterb Linux - Networking 8 06-06-2005 08:09 AM
Apache + Mod SSL abhijeetudas Linux - Software 0 01-05-2005 03:34 PM
Apache Mod proxy doesn't work with all images slackwarefan Linux - Software 0 07-22-2004 05:15 AM
Apache + Mod SSL driving me bonkers hjunk86 Linux - Software 1 01-09-2004 10:46 AM
apache mod rewrite Robert0380 Linux - Software 5 07-31-2003 05:42 PM


All times are GMT -5. The time now is 03:10 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration