Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Hosting Requirements /

What you need to consider when choosing a hosting provider and plan.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

[Warning] Wrong parameter count for session_set_cookie_params()


Reply


1501 Views

Avatar
Tesla

Community Member, 9 Posts

20 May 2011 at 4:02pm

Hi All,

I've installed Silverstripe on a server my client chose and I'm getting this error. I'm assuming it's a server configuration issue, but I don't know where to go from here. When I comment out the Director::set_environment_type('dev'); line on my config file I can enter the site and the admin however, there are certain pagetypes that I can create but when I click on 'save and publish' nothing happens. There are no Javascript errors and the Publishing message just stays there.

One thing I noticed was that the page types I can't save are the ones that have an ImageDataObjectManager. I don't know if all of these issues are related, but I really need to get this sorted ASAP.

The client insisted on using a local hosting service, but I could not find one that was running php 5.2 so the one they chose has 5.1.6. I know the requirements call for 5.2, but it is just not available. I hope this is not the issue.

Thanks to anyone that can help.

[Warning] Wrong parameter count for session_set_cookie_params()
GET /

Line 438 in ....../sapphire/core/Session.php

Source

429       self::load_config();
430       $path = self::get_cookie_path();
431       $domain = self::get_cookie_domain();
432       $secure = self::get_cookie_secure();
433
434       if(!session_id() && !headers_sent()) {
435          if($domain) {
436             session_set_cookie_params(self::$timeout, $path, $domain, $secure /* secure */, true /* httponly */);
437          } else {
438             session_set_cookie_params(self::$timeout, $path, null, $secure /* secure */, true /* httponly */);
439          }
440
441          // @ is to supress win32 warnings/notices when session wasn't cleaned up properly
442          // There's nothing we can do about this, because it's an operating system function!
443          if($sid) session_id($sid);
444          @session_start();
Trace

session_set_cookie_params(0,/,,,1)
Line 438 of Session.php
Session::start()
Line 68 of main.php