I am a reseller on cPanel with Apache and PHP 5.5, and my server owner has just installed the latest PHPMailer on the shared folder, so it can be accessed from:
require "PHPMailerAutoload.php";
but, all of my current sites have PHPmailer in my class folder, with an extended class to customise the mailer details to each site.
So, my PHP class has:
require_once "class.phpmailer.php";
class ChoiceMailerSMTP extends PHPMailer {
/**
* Mailer
*
**/
My issue is that since my server guy has put on the shared folder, the new PHPMailer, that now all of my require calls are searching the Shared folder BEFORE searching the local folder, and therefore loading the wrong phpmailer.class.php.
This is really frustrating, although in this instance it's (only) a hassle - if he puts other files in the shared folder for himself or for others, how am I meant to ensure that my PHP includes and requires run the local rather than shared files?
Is there a line in php.ini I can use? Or perhaps a cPanel setting? require "./file" doesn't work.
EDIT:
I've been doing some research on my system and found that set include path is already set to:
include_path = ".:/usr/lib/php:/usr/local/lib/php"
So any help why the local directory is only searched after the include path directories?