VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: ruudjonk on January 11, 2012, 22:45:02 PM

Title: Fatal error: session_start() on vmpsplugin.php on line 949
Post by: ruudjonk on January 11, 2012, 22:45:02 PM
Hello All,

I hope someone can help me with this one as i can't find a solution to this one. I'm working on a new payment plugin but after updating the order status etc and we use:

$this->emptyCart($return_context);

as seen in the paypal plugin I get a fatal error:

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: user (path: /tmp) in /home/xxxxxxxx/public_html/joomla17/administrator/components/com_virtuemart/plugins/vmpsplugin.php on line 949

The $return_context contains the session ID used in the plugin in the function plgVmConfirmedOrder();

I don't know if this is caused by Virtuemart or by Joomla as the problem with the plugin is solved when setting the session handler in the joomla configuration to "none" in stead of "database".

Does anyone know how to solve this one?

Thanks
Title: Re: Fatal error: session_start() on vmpsplugin.php on line 949
Post by: ruudjonk on January 12, 2012, 21:34:37 PM
Hello all,

I just fixed this one with a temporarily patch so I hope someone could tell me why this one is going wrong with Virtuemart 2 on Joomla 1.7:

The temp fix is:

Add the following line:
ini_set('session.save_handler', 'files');

to vmpsplugin.php on line 947;


Anyone knows why this goes wrong?


Thanks
Title: Re: Fatal error: session_start() on vmpsplugin.php on line 949
Post by: GJC Web Design on November 15, 2014, 23:35:36 PM
Perhaps it will help some one else.

Also had this problem.. setting the joomla session handler to 'none' did cure it

I assume it defaults to "file" then?

An upgrade to php 5.4 also allowed the handler to go back to "database" - info very sparse on what is better/worse etc..

Was previously 5.2.7 (with patches the host said??? )

So a server issue - not CMS
Title: Re: Fatal error: session_start() on vmpsplugin.php on line 949
Post by: alatak on November 18, 2014, 14:36:39 PM
Hello

Quote$this->emptyCart($return_context);
when are you using it ?
if it is in the trigger plgVmOnPaymentResponseReceived, then you should do
$this->emptyCart();

because in that case the session has already started