English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

VirtueMart "PHP Notice: Use of undefined constant"
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: VirtueMart "PHP Notice: Use of undefined constant"
#7502
VirtueMart "PHP Notice: Use of undefined constant" 13 Years, 6 Months ago Karma: 0
Hello--
I'm getting an error in my error_log showing:

Code:

"PHP Notice: Use of undefined constant DS - assumed 'DS' in /var/www/vhosts/maindomain.com/httpdocs/administrator/components/com_virtuemart/virtuemart.cfg.php on line 19, referer: http://www.slavedomain.com/index.php?option=com_virtuemart&Itemid=*"


Here is the line 19 "virtuemart.cfg.php" this error is referring to:

Code:

if ( defined( 'MULTISITES_ID') && file_exists( dirname(__FILE__) .DS. 'virtuemart.' .MULTISITES_ID. '.cfg.php')) {


Not sure what is going on here. It looks like it can't seem to find the "virtuemart.cfg.php" for the slave domain?
fphorak
Junior Boarder
Posts: 24
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/06/28 17:19 By fphorak.
The administrator has disabled public write access.
 
#7509
Re: VirtueMart "PHP Notice: Use of undefined constant" 13 Years, 5 Months ago Karma: 54
Do you know in which context this "notice" message is generated.
I suppose it is generated from a script that is not called using the normal joomla entry point. For example from a payment notification script of similar.

If DS is not defined, you can add its joomla description that is present in the joomla "index.php".
I suggest to add something like

if ( !defined( 'DS')) define('DS', DIRECTORY_SEPARATOR);

OR
replace
DS by its PHP value DIRECTORY_SEPARATOR

I will modify the VM patch to use the second solution
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
Last Edit: 2011/06/29 11:39 By edwin2win.
The administrator has disabled public write access.
 
#7510
Re: VirtueMart "PHP Notice: Use of undefined constant" 13 Years, 5 Months ago Karma: 0
The notice is in the error_log from the web hosting server. Nothing from the Joomla system. The entry point seems to be any page I go to in the VirtueMart section of the website in the front end of the website.

I will try out your solution and see if that works.

Thanks.


Edit: It appears to have worked. I will keep an eye on my error_log and see if if comes back.

I did come across another PHP error in that same log. I appears it been doing this for a while so, it's not like it just showed up after this other issue.

Code:

PHP Fatal error: Call to a member function getNullDate() on a non-object in /var/www/vhosts/mastersite.com/httpdocs/components/com_multisitescontent/multisites.models/article.php on line 613


Here is Line 613 from page article.php:
Code:

$nullDate = $this->_db->getNullDate();


Let me know if is something on my server or the scripting.

Thanks again for your help.
fphorak
Junior Boarder
Posts: 24
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/06/29 15:36 By fphorak.Reason: spelling
The administrator has disabled public write access.
 
#7513
Re: VirtueMart "PHP Notice: Use of undefined constant" 13 Years, 5 Months ago Karma: 54
The fatal error mean that you are using the article sharing on a slave site that does not exists anymore or that has a DB connection error.

If you read the error message, it mentions that the "db" is not an object.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla