[FX.php List] [OFF TOPIC] FXneocache...

Roger Price rp272 at cam.ac.uk
Fri May 18 02:11:43 MDT 2007


I have built a site using FX.php and to simplify maintenance made significant use of 'includes' for re-usable chunks of code. These have been saved with a 'php' extension only because my editor displays a formatted version of the code when I do so.

The pages work exactly as I expect!

I have recently tried to install 'FXneocache' after reading several postings in this list. I have not yet succeeded as I seem to have a permissions problem actually writing the cache files. I searched the Apache error_log and am working to resolve this issue (I will report on my success (or failure) as appropriate).

However I also noticed lots of undefined variable errors.

So this at last brings me to the point of this posting...

How does Apache/PHP evaluate includes of PHP code snippets?

An HTML page has an include 'get_menu_records.php' which incorporates an FX.php find followed by a 'for each' loop which identifies the current page and defines some variables. 

Further down the page another include: :'display_menu.php' does another 'for each' loop and tests each itteration against one of the variables defined in the previous include. This is the variable that seems to cause the error although when parsed as a complete page everything is OK and works!

Is the problem cause by my '.php' extension which forces an evaluation when it is included? I use '.html' for all the web pages which hides the fact that I'm using 'PHP.  However '.php' is defined in my root '.htaccess' to parse '.php' as well. Should I turn this off?
 

Roger

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20070518/d2bfecd2/attachment-0001.html


More information about the FX.php_List mailing list