SPF with APC enabled cause WAMP to crash

95 views
Skip to first unread message

pisi

unread,
Jan 25, 2013, 1:21:25 PM1/25/13
to simple-php...@googlegroups.com
Hello,

I've created a simple "hello world" php file using this Simple PHP Framework with DBsession enable.
After running the script 4 or 5 time, WAMP crushs. I restarted the WAMP, run the script a few time, and WAMP crush again....

I tried to debug for a few hours and found out that because of APC.

I disable APC and everything work fine.

I've google around. It seems many Framework having problem with APC. They suggest to set some options to solve the problem like this

=========
apc.include_once_override = 0
apc.canonicalize = 0
apc.stat = 0
===========
But, it doesn't work :(


Is there anyone using this SPFramework (enable DBsession) with ACP enable?


Thanks

pisi

unread,
Jan 26, 2013, 1:57:55 AM1/26/13
to simple-php...@googlegroups.com
Hello,

I did some more debug:

Testing on Window 7 - WAMP 2.0 - enable APC

"test.php"
<?php
require './includes/master.inc.php';
echo "Hello World!";
?>

"class.config.php" --> update Database information and ENABLE useDBSession

"master.inc.php" --> nothing change


"class.dbsession.php"

    class DBSession
    {
        public static function register()
        {
            ini_set('session.save_handler', 'user');
            session_set_save_handler(array('DBSession', 'open'), array('DBSession', 'close'), array('DBSession', 'read'), array('DBSession', 'write'), array('DBSession', 'destroy'), array('DBSession', 'gc'));
        }
        public static function open(){
            return true;
        }
        public static function close(){
            return true;
        }
        public static function read($id){
            return '';
        }
        public static function write($id, $data){
            return true;
        }

        public static function destroy($id){
            return true;
        }

        public static function gc($max){
            return true;
        }
   }

===========================================

With the above configuration, running "test.php" a few time cause WAMP to crush.

When I comment the bellow lines, the script run fine.
//ini_set('session.save_handler', 'user');
//session_set_save_handler(array('DBSession', 'open'), array('DBSession', 'close'), array('DBSession', 'read'), array('DBSession', 'write'), array('DBSession', 'destroy'), array('DBSession', 'gc'));


Does "session_set_save_handler(....)" conflict with APC?

That doesn't make sense :( or maybe did I miss something?

Could anyone confirm if this also happen on other OS or other HTTP server?


Thanks

Tyler Hall

unread,
Jan 26, 2013, 2:08:48 AM1/26/13
to simple-php...@googlegroups.com
I've never encountered a crash with DBSession on any LAMP stack.

Tyler
--
You received this message because you are subscribed to the Google Groups "Simple PHP Framework" group.
To post to this group, send email to simple-php...@googlegroups.com.
To unsubscribe from this group, send email to simple-php-frame...@googlegroups.com.
Visit this group at http://groups.google.com/group/simple-php-framework?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages