Skip to main content

I'm a dick- apache conf php includes and pear


Sometimes I forget things, sometimes I not thinking straight.  After wasting hours with a php include problem and a problem with pear, I discovered the following.

  1. When you use an an apache php_value include_path (eg: as an apache declaration for a virtual host - I'm talking about an apache conf file here, not a php file), it actually does what it's supposed to do and "overrides" the include path.  I thought it appended the include path.  So you do need to also add a dot . for the current directory and also the normal paths, plus what ever else you want.  I'm not sure if you can code it dynamically in apache conf (like you would in a php file).
  2.  I forgot that with pear, you also need to include the pear file, like Mail.php etc...  (normally done with a require_once).  It doesn't all happen with the Mail::factory(...) declaration and so on.  
doh! and doh!

Comments

Popular posts from this blog

Javascript Form Validation

It's real simple. All you need to do is call a javascript function in a html  " onsubmit " in the form tag as a javascript return, like this       <form method="post" action="dosomething.php" onsubmit="return validateForm();"> If the code completes ok, the form is then sent to the page listed in "action" http://www.w3schools.com/js/js_form_validation.asp If the function specified in the onsubmit returns false, then the form is not sent to the page mentioned in action.