Re: [PHP] Include directive..



Dele wrote:
Hi,

Thanks for the reply. What I did was to edit the includes path in my php.ini
file to specify the location to my script folders.

I did that but now am experiencing another problem. Don't know if you are
into the Zend Framework. :) But any help on tis post will be appreciated
thanks

Nope, I know nothing about ZF. Sorry.


http://www.nabble.com/ZF-live-settings-td20911516.html

Regards

Dele

(C) 071 673 4130 (E) dele@xxxxxxxxxxxxxxxxxxxx (S) dee454

"Start by doing what's necessary; then do what's possible; and suddenly you
are doing the impossible. "- St. Francis of Assisi.

Disclaimer: This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the system
manager. This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited.

-----Original Message-----
From: Jim Lucas [mailto:lists@xxxxxxxxx]
Sent: Tuesday, December 09, 2008 8:19 PM
To: dele454
Cc: php-general@xxxxxxxxxxxxx
Subject: Re: [PHP] Include directive..

dele454 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]

But i do have the <?php tag closed in my Bootstrap file. I dont know why
it
is saying otherwise.

Please help is needed.

Thanks

-----
dee

Taking in what everybody else has already pointed out, I would like to add
that their is a php configuration option that will do something along the
line of what you are trying to do.

It is called the 'auto_prepend_file' option.

You could do something like this in your httpd.conf file instead of what you
are trying to do.

<VirtualHost IP:PORT>

... All Your normal stuff ...

php_value auto_prepend_file '/path/to/file.php'

</VirtualHost>

The above code will include your php file as a standard php include every
time someone visits the given VirtualHost block.

Hope this helps.



--
Jim Lucas

"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare
.



Relevant Pages

  • Re: Banner Rotator
    ... "If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), you can specify the file to be included using a URL (via HTTP or other supported wrapper..." ...
    (comp.lang.php)
  • Help with php5 install under windows
    ... This includes moving php from the ... Enable the PHP scripting language engine under Apache. ... or per-virtualhost web server configuration file. ... The PHP directives register_globals, ...
    (php.general)
  • ADODB PHP Extension Help
    ... I want to take advantage of the ease of porting that the ADODB PHP extensions will afford as I begin conversion of my old, ... I am using mysqli as my database connection. ... # configuration directives that give the server its instructions. ... dynamically loaded extension, ...
    (comp.lang.php)
  • Re: TCPIP PROFILE
    ... Perhaps the configuration you are struggling to describe involves a TELNET or ... server node which can translate names to IP addresses and IP addresses to ... If you want to benefit from the possibility to specify a name rather than an IP ... The NSPORTADDR, RESOLVERTIMEOUT, ...
    (bit.listserv.ibm-main)
  • Re: You must specify the PHP executable used for the debug session
    ... ini file to be copied ... Sorry, PHP Debugging configuration failed. ...
    (comp.lang.php)