Problem with instance of class

Discussion about the open-source Phalanger [?] project.

Problem with instance of class

Postby shpontes » March 15th, 2014, 1:31 am

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
You do not have the required permissions to view the files attached to this post.
shpontes
 
Posts: 2
Joined: March 15th, 2014, 12:39 am

Re: Problem with instance of class

Postby Jakub Misek » March 17th, 2014, 3:50 pm

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,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Problem with instance of class

Postby shpontes » March 20th, 2014, 12:17 am

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
shpontes
 
Posts: 2
Joined: March 15th, 2014, 12:39 am

Re: Problem with instance of class

Postby Jakub Misek » March 21st, 2014, 3:15 pm

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.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Problem with instance of class

Postby Jakub Misek » October 18th, 2014, 10:43 am

It is in File | New | Project

Please let us know if it works,
Thanks
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 2 guests

cron

User Control Panel

Login

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 124 on September 25th, 2020, 6:57 am

Users browsing this forum: No registered users and 2 guests