I wrote two messages about the subject to forum.caucho.com but my messages 
haven't been published.  
I try here. Please, forgive me if the subject is out of interest.

I found that Quercus 4.0.5 doesn't implement 'array_walk' rightly when the 
function call contains the second and the third parameters.
Here a simple test case:

$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => 

function test_alter(&$item1, $key, $prefix)
    $item1 = "$prefix:$item1";

function test_print($item2, $key)
    echo "$key => $item2<br />\n";

echo "Before ...:<br />\n";
array_walk($fruits, 'test_print');

array_walk($fruits, 'test_alter', 'fruit');
echo "\n<br>... and after:<br />\n";

array_walk($fruits, 'test_print');

The output should be:
Before ...:
d => lemon
a => orange
b => banana
c => apple

... and after:
d => fruit:lemon
a => fruit:orange
b => fruit:banana
c => fruit:apple

The actual output is:Before ...:
=> lemon
=> orange
=> banana
=> apple
/usr/local/resin/webapps/aw1.php:17: Warning: required argument missing 
[array_walk] /usr/local/resin/webapps/aw1.php:17: Warning: required argument 
missing [array_walk] /usr/local/resin/webapps/aw1.php:17: Warning: required 
argument missing [array_walk] /usr/local/resin/webapps/aw1.php:17: Warning: 
required argument missing [array_walk] 
... and after:
=> :lemon
=> :orange
=> :banana
=> :apple

If array_walk contains two parameters, the second one is ignored silently.
If array_walk contains three parameters, a warning is raised.

I filled a Quercus bug: http://bugs.caucho.com/view.php?id=3961

Any ideas about possible workarounds?


To separate arguments of a query string, any character specified by 
"arg_separator.input" configuration option should be valid.
I think that Quercus ignores "arg_separator.input" value and uses only '&' to 
calculate $_GET values.
I tried to set "arg_separator.input" both in web.xml <php-ini> and by ini_set() 

A simple test-case:
ini_set("arg_separator.input", ";");
echo "arg_separator.input value: ". ini_get('arg_separator.input') . "<br>";

echo "Get parameters: ";


and call it from the browser in a way similar to this:
http://localhost/php/args.php?1=first&2=second;3=third [^]

The output should be:
arg_separator.input value: ;
Get parameters: Array ( [1] => first [2] => second [3] => third ) 

The actual output is:
arg_separator.input value: ;
Get parameters: Array ( [1] => first [2] => second;3=third )

We are using Resin-Pro for 10 years and we would like to switch off the apache 
front-end used only for two PHP applications...
The two applications cannot be modified for security reasons.

Thanks in advance for any hints/suggestions.


resin-interest mailing list

Reply via email to