Page 1 of 1

Problem with instance of class

PostPosted: March 15th, 2014, 1:31 am
by shpontes
Hi, I am a new user phalanger.
I have a problem with my php class.

I create a php web project and php class library. I compiled my project library and I try to call into my php web project, but an error occurs (class not found). I don't know what happens.

Attached I am sending my project.
If you can help me I thank.

Regards,

Sheila

Re: Problem with instance of class

PostPosted: March 17th, 2014, 3:50 pm
by Jakub Misek
Hi,

first, try to move
Code: Select all
<add assembly="libaeonline, Version=1.0.0.0" />
into <classLibrary> section. Also you dont have to <add> libaeonline twice.

Second, PHP Web Project is PHP thing - it has nothing to do with Phalanger. So you've created classic PHP web which ignores web.config, runs on php.exe and does not compile.

To create Phalanger Web Site, go to File | New WebSite | Phalanger.

I'm sorry for all the confusion, we are now in the process of updating Phalanger Tools and documentation so it might be easier to start with.

Thanks,

Re: Problem with instance of class

PostPosted: March 20th, 2014, 12:17 am
by shpontes
Hi Jakub,

thanks for your help.
Now I understand, I create a simple php project and this project don't understand file dll.
I move this code <add assembly="libaeonline, Version=1.0.0.0" /> into my web.config but the error continues.

I try to create a Phalanger Web Site, but I don't find phalanger em new website.
My visual studio is 2012, the iis is express 8 and my windows is 8.
When I go to file / new / web site I find installed the templates visual basic and visual c#, no phalanger ou php.
When I go to file / new / project I find installed php and phalanger, in php I see php web project and phalanger I see class library, console application, windows forms, extension, php console application and php windows application.
No web project like c# ou visual basic.

When I find this templates for install? or I need to configure anything?

My project is written in php and I want to protect my code compiling some dll in visual studio and using in a php project.

regards,

Sheila

Re: Problem with instance of class

PostPosted: March 21st, 2014, 3:15 pm
by Jakub Misek
I guess there is no template currently. With Visual Studio, you can open an existing ASP.NET Web Site (File | Open | Web Site) or create new one. And manually add configuration to web.config to process .php files by Phalanger.
Code: Select all
<system.webServer>
    <handlers>
      <add name="Phalanger" path="*.php" verb="*" type="PHP.Core.RequestHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
    </handlers>
  </system.webServer>


This is the fastest way for development. Once it will work, you can precompile whole directory by following command
Code: Select all
phpc.exe /target:web /root:. /recurse:. /debug-


This command will create bin/WebPages.dll file containing all .php files within the directory, so physical files are not needed, Note for file operations like fopen etc, you still have to keep files physically in the folder.

Re: Problem with instance of class

PostPosted: October 18th, 2014, 10:43 am
by Jakub Misek
It is in File | New | Project

Please let us know if it works,
Thanks