Page 1 of 1
PEAR Unknown class passed as parameter
Posted: Sun Oct 08, 2006 2:47 am
by bijeshmg
Hi,
I am new to PEAR. i am getting an error when i try to run my application in php5
In /var/www/vhost/
www.xtimesheet.co.uk/PEAR/HTML/QuickForm/select.php, line: 449
Unknown class passed as parameter
Please help me to sort it out.
I am using php5 + MySQL 5
Posted: Sun Oct 08, 2006 2:54 am
by volka
Hi.
May we see some code?
Posted: Sun Oct 08, 2006 3:01 am
by bijeshmg
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Code: Select all
function load(&$options, $param1=null, $param2=null, $param3=null, $param4=null)
{
switch (true) {
case is_array($options):
return $this->loadArray($options, $param1);
break;
case (is_a($options, 'db_result')):
return $this->loadDbResult($options, $param1, $param2, $param3);
break;
case (is_string($options) && !empty($options) || is_subclass_of($options, "db_common")): // =>Line 449
return $this->loadQuery($options, $param1, $param2, $param3, $param4);
break;
}
}
In my server allow_call_time_pass_reference is off.
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Posted: Sun Oct 08, 2006 3:17 am
by bijeshmg
it is working fine in php4. but showing this error in php5
Any problem with php5 and quickform?
Posted: Sun Oct 08, 2006 3:42 am
by volka
bijeshmg wrote:it is working fine in php4. but showing this error in php5
Any problem with php5 and quickform?
There's
http://pear.php.net/package/HTML_QuickForm2[quote]PHP5 rewrite of HTML_QuickForm package[/quote]
But I guess the problem is somewhere else. Only guessing.
please try
Code: Select all
function myErrorHandler($errno, $errstr, $errfile, $errline) {
echo $errstr, "<br />\n";
foreach(debug_backtrace() as $s) {
if (isset($s['file'])) {
echo $s['file'], ':', $s['line'], "<br />\n";
}
}
}
set_error_handler('myErrorHandler');
$form = new HTML_QuickForm('personalinfo', 'post');
if ($refid && $do_action!='save') {
...
please post the output and and mark the lines of
your code mentioned in the output.
Posted: Sun Oct 08, 2006 5:06 am
by bijeshmg
Code here
Posted: Sun Oct 08, 2006 12:47 pm
by volka
do not pass '' for "no options" but
nullCode: Select all
$s = &$form->createElement('select','frm[selPostalState]','County', null,'class="formitem" onchange="OnKeyPress()"');
Posted: Mon Oct 09, 2006 12:07 am
by bijeshmg
Many Many Thanks... It is working...