FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19891&edit=1

ID: 19891
Updated by: ashtekarmukesh@gmail.com
Reported By: ashtekarmukesh@gmail.com
-Summary: problem
+Summary: undefined function init()
Status: Open
Type: Bug
Package: Text_CAPTCHA
Operating System: window 7
Package Version: 0.4.6
PHP Version: 5.3.9
Roadmap Versions:
New Comment:

-Summary: problem
+Summary: undefined function init()



Previous Comments:
------------------------------------------------------------------------

[2013-04-09 14:23:17] mak

Description:
------------
Having Error Undefined method init() ....

Test script:
---------------
require_once 'Text/CAPTCHA.php';

$imageOptions = array(
'font_size' => 24,
'font_path' => './',
'font_file' => 'ARLRDBD.TTF',
'text_color' => '#DDFF99',
'lines_color' => '#CCEEDD',
'background_color' => '#555555'
);

$options = array(
'width' => 200,
'height' => 80,
'output' => 'png',
'imageOptions' => $imageOptions
);

$c = Text_CAPTCHA::factory('Image');

$retval = $c->init($options);

var_dump($retval);
die;
if (PEAR::isError($retval)) {
printf('Error initializing CAPTCHA: %s!',
$retval->getMessage());
exit;
}

Expected result:
----------------
Must call init function correctly ..
$c initialize perfect with :
object(PEAR_Error)[1]
public 'error_message_prefix' => string '' (length=0)
public 'mode' => int 1
public 'level' => int 1024
public 'code' => int 100
public 'message' => string 'Could not load driver class file Image'
(length=38)
public 'userinfo' => null
public 'backtrace' =>
array
0 =>
array
'file' => string 'C:\wamp\bin\php\php5.3.9\pear\PEAR.php'
(length=38)
'line' => int 533
'function' => string 'PEAR_Error' (length=10)
'class' => string 'PEAR_Error' (length=10)
'type' => string '->' (length=2)
'args' =>
array
...
1 =>
array
'file' => string
'C:\wamp\bin\php\php5.3.9\pear\Text\CAPTCHA.php' (length=46)
'line' => int 168
'function' => string 'raiseError' (length=10)
'class' => string 'PEAR' (length=4)
'type' => string '::' (length=2)
'args' =>
array
...
2 =>
array
'file' => string 'C:\wamp\www\mak\test\captcha\index.php'
(length=38)
'line' => int 20
'function' => string 'factory' (length=7)
'class' => string 'Text_CAPTCHA' (length=12)
'type' => string '::' (length=2)
'args' =>
array
...
public 'callback' => null

Actual result:
--------------
Giving Fatal Error ... Indefined function init() ...

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 9, '13 at 12:46p
activeApr 9, '13 at 12:46p
posts1
users1
websitepear.php.net

1 user in discussion

Ashtekarmukesh: 1 post

People

Translate

site design / logo © 2022 Grokbase