VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: aagios on December 09, 2014, 00:17:30 AM

Title: Undefined variable: basePath in ../components/com_virtuemart.php on line 92
Post by: aagios on December 09, 2014, 00:17:30 AM
Here is my error.log

[08-Dec-2014 11:07:24 Europe/London] PHP Notice:  Undefined variable: basePath in ../public_html/components/com_virtuemart/virtuemart.php on line 92
[08-Dec-2014 11:07:26 Europe/London] PHP Notice:  Undefined variable: basePath in ../public_html/components/com_virtuemart/virtuemart.php on line 92


and from the virtuemart.php line 89 to 109 code:

/* Create the controller name */
$_class = 'VirtuemartController'.ucfirst($_controller);

if (file_exists($basePath.DS.'controllers'.DS.$_controller.'.php')) {
   if (!class_exists($_class)) {
      require ($basePath.DS.'controllers'.DS.$_controller.'.php');
   }
}
else {
   // try plugins
   JPluginHelper::importPlugin('vmextended');
   JPluginHelper::importPlugin('vmshipment');
   JPluginHelper::importPlugin('vmpayment');
   $dispatcher = JDispatcher::getInstance();
   $dispatcher->trigger($trigger, array($_controller));
}

if (class_exists($_class)) {
    $controller = new $_class();



Any ideas?

Thank you for your help.

(VM 2.6.12.2 - Joomla 2.5.27)
Title: Re: Undefined variable: basePath in ../components/com_virtuemart.php on line 92
Post by: jenkinhill on December 09, 2014, 11:42:25 AM
PHP notices & warnings are generally ignored by most users as they have no effect on function. http://forum.virtuemart.net/index.php?topic=102555.0

Efforts are being made in the VM3 series to get rid of all PHP notices, but that will be an ongoing problem as PHP versions on servers are updated.
Title: Re: Undefined variable: basePath in ../components/com_virtuemart.php on line 92
Post by: aagios on December 09, 2014, 13:29:08 PM
Thanks for the reply.

I know this but I'm looking to find a solution because the file "error.log" it loads and grows up daily...

Thanks again.
Title: Re: Undefined variable: basePath in ../components/com_virtuemart.php on line 92
Post by: jenkinhill on December 09, 2014, 13:39:48 PM
You can turn off the logging in php.ini - or on the server place a php.ini file in the Joomla root with just the following:

log_errors = off