Mixed pure and non-pure

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

Mixed pure and non-pure

Postby eydelber@codeplex » July 30th, 2006, 4:43 am

Hi, I have a PHP asp.net web application, and I would like to use a charts package from within the app (http://www.maani.us/charts). My code behind page is a pure PHP.NET object Page, but the charts package is a normal PHP include.

If, I include "charts.php" it gives the error that includes are not supported by pure code. I read the Phalanger Language Extensions document and it says:

"In the pure mode, the application comprises of a set of source files free of global code and inclusions. All
declarations stated in any source file are visible from any other source file."

So, my charts.php file is within the web project, however if I call InsertChart in my code behind page, I get the error:

"Call to undefined function: 'InsertChart'"

I do not completely understand the statement "comprises of a set of source files free of global code and inclusions." How is this set created... I assumed it was just the files in the web directory.

Does this mean I need to independently compile the charts package with non-pure and then reference that assembly from the web project?

Thanks!
Kevin
eydelber@codeplex
 
Posts: 5
Joined: January 7th, 2012, 8:57 pm

RE: Mixed pure and non-pure

Postby eydelber@codeplex » July 30th, 2006, 4:47 am

Here is an update. I compiled the charts.php file with phpc and placed the DLL into my Bin directory of the web project. Now, when I try to call InsertChart I receive the following error:

Phalanger - the PHP Language Compiler - version 2.0
for Microsoft (R) .NET Framework version 2.0
Configuration error:
Library assembly 'file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/phpplayweb/7a45f444/d739562d/assembly/dl3/45e01a90/f05c727e_8ab3c601/charts.DLL' could not be loaded.
Object reference not set to an instance of an object.
eydelber@codeplex
 
Posts: 5
Joined: January 7th, 2012, 8:57 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 13 guests

cron

User Control Panel

Login

Who is online

In total there are 13 users online :: 0 registered, 0 hidden and 13 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 13 guests