Internal functions not returning Output Parameters.
3 posts
• Page 1 of 1
Internal functions not returning Output Parameters.
STATUS: Closed (See comments).
The following problem only occurs when the code is executed from a MSA DLL.
When the code is executed from a PHP file included from the MSA, the problem doesn't occur.
When executing:
$pipes isn't returning anything (count($pipes) returns 0 and is_array($pipes) is false).
When adding debug info in Open()...
...the "pipes" array shows to have elements.
The same code was working in Phalanger 2.1.
Note that if you change the code for:
...$pipes is still empty.
I'm testing on:
Phalanger 3 - SVN 2012-02-15
Mono 2.10.8 and 2.10.9.
The following problem only occurs when the code is executed from a MSA DLL.
When the code is executed from a PHP file included from the MSA, the problem doesn't occur.
When executing:
- Code: Select all
proc_open($cmd, $descriptor, $pipes);
$pipes isn't returning anything (count($pipes) returns 0 and is_array($pipes) is false).
When adding debug info in Open()...
- Code: Select all
[ImplementsFunction("proc_open")]
public static PhpResource Open(string command, PhpArray descriptorSpec, out PhpArray pipes)
{
// return Open(command, descriptorSpec, out pipes, null, null, null);
PhpResource tmp = Open(command, descriptorSpec, out pipes, null, null, null);
Console.WriteLine("command: " + command);
Console.WriteLine("pipes count: " + pipes.Count);
return tmp;
}
...the "pipes" array shows to have elements.
The same code was working in Phalanger 2.1.
Note that if you change the code for:
- Code: Select all
public static PhpResource Open(string command, PhpArray descriptorSpec, out PhpArray pipes)
{
pipes = new PhpArray();
pipes.Add(new PhpString("ok"));
return null;
...$pipes is still empty.
I'm testing on:
Phalanger 3 - SVN 2012-02-15
Mono 2.10.8 and 2.10.9.
Last edited by kripper on February 19th, 2012, 10:29 am, edited 1 time in total.
- kripper
- Posts: 44
- Joined: February 19th, 2012, 1:02 am
Re: Internal functions not returning Output Parameters.
Problem solved!
phpc was generating the MSA scripts using machine.conf referencing old 2.1.0.0 assemblies.
IMO, Phalanger should do some compatibility checkings to save debuging hours.
phpc was generating the MSA scripts using machine.conf referencing old 2.1.0.0 assemblies.
IMO, Phalanger should do some compatibility checkings to save debuging hours.
- kripper
- Posts: 44
- Joined: February 19th, 2012, 1:02 am
Re: Internal functions not returning Output Parameters.
Ah, good you solved it so quick
Phalanger just references anything you give him. There might be cases somebody would like to reference older version of itself etc. In C# you can do the same, and mostly it causes the same issues.
Phalanger just references anything you give him. There might be cases somebody would like to reference older version of itself etc. In C# you can do the same, and mostly it causes the same issues.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 8 guests