Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help: php.ini and the session.auto_start !!!!!!!!!!!


aida

Recommended Posts

Hi Everybody,

I have installed oscommerce on my website, but it shows a warning at the top of the catalog/index.php that says, the session.auto_start is enabled in the php.ini file of the webserver. So none of the links in the page work. and a Fatal Error occures when I point to them:

 

Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition navigationhistory of the object you are trying to operate on was loaded _before_ the session was started in /home/mydomain/public_html/catalog/includes/application_top.php on line 309

------------

My Webserver owner says that he can not, disable the session.auto_start as long as some of his customers, need that to be enabled,

could anyone Help me?

Thanks.

Link to comment
Share on other sites

  • 3 months later...
Hi Everybody,

I have installed oscommerce on my website, but it shows a warning at the top of the catalog/index.php that says, the session.auto_start is enabled in the php.ini file of the webserver. So none of the links in the page work. and a Fatal Error occures when I point to them:

 

Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition navigationhistory of the object you are trying to operate on was loaded _before_ the session was started in /home/mydomain/public_html/catalog/includes/application_top.php on line 309

------------

My Webserver owner says that he can not, disable the session.auto_start as long as some of his customers, need that to be enabled,

could anyone Help me?

Thanks.

This is what I have in my php.ini file for session and have had no problems with sessions, just be sure you have a c:\tmp\sessions subdirectory on your server

 

[Session]
session.save_handler      = files  ; handler used to store/retrieve data
session.save_path         = c:\tmp\sessions   ; argument passed to save_handler
                                  ; in the case of files, this is the
                                  ; path where data files are stored
session.use_cookies       = 1      ; whether to use cookies
session.name              = PHPSESSID  
                                  ; name of the session
                                  ; is used as cookie name
session.auto_start        = 0      ; initialize session on request startup
session.cookie_lifetime   = 0      ; lifetime in seconds of cookie
                                  ; or if 0, until browser is restarted
session.cookie_path       = /      ; the path the cookie is valid for
session.cookie_domain     =        ; the domain the cookie is valid for
session.serialize_handler = php    ; handler used to serialize data
                                  ; php is the standard serializer of PHP
session.gc_probability    = 1      ; percentual probability that the 
                                  ; 'garbage collection' process is started
                                  ; on every session initialization
session.gc_maxlifetime    = 432000  ; after this number of seconds, stored
                                  ; data will be seen as 'garbage' and
                                  ; cleaned up by the gc process
session.referer_check     =        ; check HTTP Referer to invalidate 
                                  ; externally stored URLs containing ids
session.entropy_length    = 0      ; how many bytes to read from the file
session.entropy_file      =        ; specified here to create the session id
; session.entropy_length    = 16
; session.entropy_file      = /dev/urandom
session.cache_limiter     = nocache; set to {nocache,private,public} to
                                  ; determine HTTP caching aspects
session.cache_expire      = 180    ; document expires after n minutes
session.use_trans_sid     = 1      ; use transient sid support if enabled
                                  ; by compiling with --enable-trans-sid

url_rewriter.tags         = "a=href,area=href,frame=src,input=src,form=fakeentry"

Best Regards

Link to comment
Share on other sites

  • 3 weeks later...
Hi Everybody,

I have installed oscommerce on my website, but it shows a warning at the top of the catalog/index.php that says, the session.auto_start is enabled in the php.ini file of the webserver. So none of the links in the page work. and a Fatal Error occures when I point to them:

 

Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition navigationhistory of the object you are trying to operate on was loaded _before_ the session was started in /home/mydomain/public_html/catalog/includes/application_top.php on line 309

------------

My Webserver owner says that he can not, disable the session.auto_start as long as some of his customers, need that to be enabled,

could anyone Help me?

Thanks.

This is what I have in my php.ini file for session and have had no problems with sessions, just be sure you have a c:\tmp\sessions subdirectory on your server

 

[Session]
...
session.auto_start ? ? ? ?= 0 ? ? ?; initialize session on request startup
...

Maybe you didn't see where Aida said session.auto_start could NOT be disabled. This doesn't help at all as your php.ini has autostart disabled.

 

Back to the drawing board.

Link to comment
Share on other sites

How about trying adding this to catalog/includes/application_top.php at the top of the file.

ini_set("session.auto_start", 0);

HTH

Tom

that doesn't work because as soon as the next page starts to process PHP uses the ini file setting and hoses the sessions.

 

But I found a workaround. I did some testing and found that php.exe will use a ini file in the current directory if one exist whereas the isapi filter does not. It always uses the ini from the %system% directory. well all of the sites on the server are running isapi. so I put a php ini in the same directory with php.exe and I run that one site in cgi mode.

 

There is talk of being able to specify the ini file with the -c switch but I wasn't able to get that to work.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...