Hello All,
I do not know much at all about PHP except for the include function.
I was in the process of putting a site together when my host SteadFast went from a PHP 4 w/apache (<-- I beleive Apache) server to a PHP 5 w/ Litespeed server.
I used to write my includes as
<?php include("http://mysite.com/header.html"); ?>
well after the upgrade these stopped working. I messed around with them based on the onscreen error messages I was getting and by solutions found via Google and finally came to realize that this worked...
<?php include ("/hsphere/local/home/myaccountname/mysite.com/header.html"); ?>
I also changed my .htaccess file which used to read only
AddHandler application/x-httpd-php htm html
on the old server to...
AddHandler php5-script htm html php
AddType text/html php
on the new server.
I have a few questions about this though.
Why did I even need to change it what about PHP 5 caused the old method not to work.
What do the lines in my .htaccess actually do ? I found that they were a solution but I have not read of anyone that explains why it works and what the lines are actually doing.
When I was looking for solutions I read that PHP 5 used relative paths for example...
<?php include ("header.html"); ?>
when I tried it I got the error message that led me to add the...
/hsphere/local/home/myaccountname/mysite.com/
which ended up working but no ones solution called for doing that WHY ?
How is it that other people that asked the question were told to start at thier personal sites root and I have to use the root all the way back to my host company ?
Is any of the changes I made a security risk or do they slow things down in any way ? Is there a way to get the same effect and be more efficient in speed security etc ?
What is the difference between Apache and Litespeed and is this playing any part in this ?