PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTTP » HTTP_Session2 » Bug #7279

Error in example file

Details

Submitted2006-04-03 09:48 UTC
Froma dot mucci at cingusoft dot com
Assignedtill
StatusClosed
PackageHTTP_Session2
PHP Version5.1.0
OSLinux Debina
Roadmaps(Not assigned)

Comments

[2006-04-03 09:48 UTC] a dot mucci at cingusoft dot com

Description:
------------
hi, the error is very simple.
in the example you have istanciate the HTTP_Session::....
and you call the Pear file Session
This is not correct because the classe is Session2
bye :-)

Test script:
---------------
require_once ("PEAR.php");
require_once ("HTTP/Session.php");

ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);

HTTP_Session::useCookies(true);
HTTP_Session::start('SessionID', uniqid('MyID'));

Expected result:
----------------
Fatal error: Class 'HTTP_Session' not found in C:\xampp\htdocs\dbkart\HTTP_Session2_Example.php on line 48

Actual result:
--------------
require_once ("PEAR.php");
require_once ("HTTP/Session2.php");

ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
//PEAR::setErrorHandling(PEAR_ERROR_DIE);

//HTTP_Session::setContainer('DB', array('dsn' => 'mysql://root@localhost/database', 'table' => 'sessiondata'));
HTTP_Session2::useCookies(true);
HTTP_Session2::start('SessionID', uniqid('MyID'));