Page 1 of 1

Convert to Phalanger Tools - Problem

PostPosted: September 5th, 2014, 10:01 pm
by SystemAdmin_Bill
Well I had good results with PHP Tools in VS 2013. A bit new to PHP, but the tools made it pretty easy.
Thought the Phalanger tools sounded like a better idea, compiled code etc. So a bit pricey but I sprung the $249 for it.
Now I can't make anything work!
I'm sure its something I don't understand. I take a default Phalanger Tools web's index.php and try to add something to it besides the "Hello World". Code that worked in PHP Tools won't work.

Specifically start the following in a Debug session:
<?php
session_start():
$missing = 'Missing MAC'; // used for missing mac or ap_mac
echo "Hello World!";
?>

1. session_start(); ==> "Call to undefined function" shows on web page. Why? This worked fine in PHP Tools?
2. Put a breakpoint at echo... ==> breaks ok, but I cannot see or watch the value of $missing.

I haven't even tried to put in the rest of the old code that worked.

Re: Convert to Phalanger Tools - Problem

PostPosted: September 5th, 2014, 11:43 pm
by bgraves
I am using IIS Express for the project testing

Re: Convert to Phalanger Tools - Problem

PostPosted: September 8th, 2014, 3:38 pm
by Jakub Misek
Hello,

I'm glad you are trying Phalanger. Phalanger is an opensource project compiling PHP to .NET, hence it requires little bit background and configuration.

All the builtin functions are defined in assembly called PhpNetClassLibrary.dll; you have to add a reference to this assembly in order to use basic functions and classes. (anyway this dll should be referenced by default, but I guess there might be a bug in the latest version so the DLL is not found :/)

Please let me know if you have referenced the dll and how it works for you.

thanks,

Re: Convert to Phalanger Tools - Problem

PostPosted: September 8th, 2014, 7:08 pm
by SystemAdmin_Bill
No there is no reference to PhpNetClassLibrary.dll in a newly created project. What is worse? I cannot find PhpNetClassLibrary.dll on my system. It does not show in the Add Reference dialog. I also do not see it under \Windows\Assembly.

Where should it be?

Thanks

Re: Convert to Phalanger Tools - Problem

PostPosted: September 8th, 2014, 10:37 pm
by SystemAdmin_Bill
Well I finally found it in:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\PhpNetClassLibrary\v4.0_4.0.0.0__4af37afe3cde05fb

I see other folders under ...\GAC_MSIL\ with PHPxxxx names. How many of those need to be referenced? I did a repair install and still had to do the manual referencing!!!
--------
What about the debugging question - if I break, I still cannot see the contents of $missing (see earlier code post). Adding an echo $missing does producer the expected results. Do I have to debug everything in PHPTools instead???

Re: Convert to Phalanger Tools - Problem

PostPosted: September 9th, 2014, 2:15 pm
by Jakub Misek
Hello, this seams like a bug in latest version. Today we are planning to release an update, I'll let you know as soon it will be available.

The DLL is referenced by default (only not working).

Other PhpNet* dlls correspond to specific PHP extensions. There will be UI for that in a future version.

Thanks,

Re: Convert to Phalanger Tools - Problem

PostPosted: September 9th, 2014, 6:49 pm
by Jakub Misek
Noting there is newer version fixing referencing assemblies
http://www.devsense.com/products/phalan ... ad/preview

I'd like to note, "Phalanger Tools" product is IDE for Phalanger. The Phalanger itself is opensource project enabling compilation of PHP-like code into .NET assemblies (more at viewforum.php?f=3 or https://github.com/DEVSENSE/Phalanger)

Thank you,