|
-
Apr 28th, 2006, 02:33 AM
#1
Thread Starter
Addicted Member
PHP 4.4 problem
Well i am back with another problem 
And looking forward visualAd,pengate,john
I am trying to parse XML by using xml library of Keith Devens available at
http://keithdevens.com/software/phpxml
and code at
http://keithdevens.com/software/phpxml/xml.php
I am getting error at line 62
PHP Code:
$this->parser = &xml_parser_create();
error is
Code:
Notice: Only variables should be assigned by reference
and at line 73
PHP Code:
return xml_parse(&$this->parser, &$data, true) ? $this->document : NULL;
error is
Code:
Notice: Only variable references should be returned by reference
after searching about the errors i have found its due to webhost has upgraded to PHP 4.4 .
from http://forum.mamboserver.com/showthread.php?t=58302
and http://mail.wikipedia.org/pipermail/...st/031137.html
and http://fudforum.org/forum/index.php?t=msg&goto=26311
From Keith Devens
PHP 4 deprecated a feature called call-time pass-by-reference. Unfortunately, the developers of PHP deprecated the feature without making appropriate alternatives available, so the net result is that, under PHP 4, some things are literally impossible to do without using call-time pass-by-reference even though it's deprecated. Even parts of the PHP manual use the deprecated feature since it's impossible not to. This library requires that call-time pass-by-reference be enabled.
so i have also tried to use htaccess
Code:
php_flag allow_call_time_pass_reference 1
from http://www.verysimple.com/support/viewtopic.php?p=415&
But it returnded me Internet Server Error 500.
I have also tried to remove "&" sign but it didn't solve the problem.
So could you help me with this problem ?
What is its solution?
Thank You.
Last edited by slice; Apr 28th, 2006 at 02:37 AM.
-
Apr 28th, 2006, 08:07 PM
#2
Stuck in the 80s
Re: PHP 4.4 problem
You can also try putting this above the code in question:
PHP Code:
ini_set('allow_call_time_pass_reference', 1);
This will only set it for that script until it's done executing.
-
Apr 29th, 2006, 12:11 AM
#3
Thread Starter
Addicted Member
Re: PHP 4.4 problem
 Originally Posted by The Hobo
You can also try putting this above the code in question:
PHP Code:
ini_set('allow_call_time_pass_reference', 1);
This will only set it for that script until it's done executing.
Same errors
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|