On Tue, Dec 9, 2008 at 12:47 AM, dele454 <dele@xxxxxxxxxxxxxxxxxxxx> wrote: > > Hi, > > I am modifying the apache config file on my domain to include the path to > the Zend Framework on a specified location outside the public folder. > > So in my http.conf file i simply include the path to where the includes > file > is to customise the virtual host: > > [CODE] > > # To customize this VirtualHost use an include file at the following > location > Include > "/usr/local/apache/conf/userdata/std/2/domains/mydomain.co.za/me.conf" > [/CODE] > > And then me.conf looks like this: > [CODE] > Include "/home/domain/apps" > Include "/home/domain/apps/models" > Include "/home/domain/apps/lib" > [/CODE] > > But then i get this error: > > [CODE] > Failed to generate a syntactically correct Apache configuration. > Bad configuration file located at > /usr/local/apache/conf/httpd.conf.1228614930 > Error: > Configuration problem detected on line 277 of file > /usr/local/apache/conf/httpd.conf.1228614930: : Syntax error on line > 1 of /usr/local/apache/conf/userdata/std/2/domain/mydomain.co.za/me.conf: > Syntax error on line 1 of /home/domain/apps/Bootstrap.php: > /home/maineven/apps/Bootstrap.php:1: <?php> was not closed.[/CODE] > You get this error because you are trying to include a php file in the apache configuration. Apache config files have tags, such as <Directory> and <?php looks like it's opening an Apache directive but not closing it with <?php> ... </?php> If you want to include php scripts in your php file, you should do that there, e.g. in incfiles.php: <?php require_once('file1.php'); require_once('file2.php'); ... Or if you want to include a whole directory, read it with readdir (would have to look up the function name etc) and iterate over it. If you have classes you can also use the feature that i really like, called class autoloading ( http://nz2.php.net/autoload ).