I wonder if someone could help me out here, please: I haven't been able to get SSI to work at all on my Apache 2 server. The server is running on Windows 2000 Pro.
Here are the pertinent lines from the configuration file:
I want to be able to use SSI with my php pages also (possibly every hyper-text document type), so I added the bold line to the end of the configuration file, after the lines for the PHP module:
# Load PHP4 as a module
LoadModule php4_module "c:\Server Files\php\sapi\php4apache2.dll"
AddType application/x-httpd-php .php AddOutputFilter INCLUDES .php
On the contrary, I can use SSI to import a widely used custom PHP function into several pages from a single easily changeable source. SSI can be a lot more convenient, also.
You assume correctly, Krom, and I believe I've followed all of their directions.
The log (nothing):
[Fri Jun 04 14:04:31 2004] [notice] Parent: Created child process 912
[Fri Jun 04 14:04:31 2004] [notice] Child 912: Child process is running
[Fri Jun 04 14:04:31 2004] [notice] Child 912: Acquired the start mutex.
[Fri Jun 04 14:04:32 2004] [notice] Child 912: Starting 250 worker threads.
Yeah there is no sense in running every page through mod_include just to have it go through the PHP parser. Use either require() or include(), depending on whether you need the page to exist or not.
And in any event wouldn't you need to use "AddType application/x-httpd-php .shtml" instead of "AddType text/html .shtml" anyway?
I stand corrected. Now that you mention it, I guess I've seen those functions (require(), and include()) before, it just never clicked. Those seem every bit as convenient (and probably better for performance).
fliptw wrote:AddType text/html .shtml .php
AddOutputFilter INCLUDES .shtml .php
DCrazy wrote:Yeah there is no sense in running every page through mod_include just to have it go through the PHP parser. Use either require() or include(), depending on whether you need the page to exist or not.
Right
DCrazy wrote:And in any event wouldn't you need to use "AddType application/x-httpd-php .shtml" instead of "AddType text/html .shtml" anyway?
I intend to use PHP instead of SSI, now, but I'm going to have to give that a try anyway, just out of curiosity.
Not unless I'd want .shtml files to go through the PHP processor, DCrazy.
I guess I'd still like to get SSI working: even though I'll be using PHP in it's place, I would still like to have the functionality available. Also, if it's going to be disabled, I want it to be disabled because I disabled it, not because I couldn't get it working.
Well, I just had an experience that makes me wonder if maybe SSI just plain isn't meant to work with PHP. I'm working on a website (not hosted by me) that is running on Windows 2003. The service supports both ASP and PHP, but when I converted an ASP page over to PHP just now, the SSI directive contained in it quit working.