2.0 4th Beta - Error: Class not found / Object reference not set to an instance of an object

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

2.0 4th Beta - Error: Class not found / Object reference not set to an instance of an object

Postby SteJ@codeplex » July 11th, 2007, 1:50 pm

Howdy,

I'm having trouble using .NET classes in my PHP code. After I encountered the error in my own code I tried the tutorials from the Wiki site and received the same errors. My system specs are:

Windows Server 2003
IIS version 6
ASP.NET 2.0.50727
Phalanger 2.0 4th Beta

Firstly, I tried the image resize tutorial from: http://php-compiler.net/doku.php?id=resize-image. This produced the following error message:

"Error: Class 'Bitmap' not found" on the line:

$bmp = Bitmap::FromFile($from);

I then tried the Download file tutorial from: http://php-compiler.net/doku.php?id=download-file-from-web. This produced the error:

Object reference not set to an instance of an object.

Line 8: {
Line 9: $client = new WebClient;
Line 10: $client->DownloadFile(new Uri($path), $name);
Line 11: }
Line 12:

I have tried the standard web.config from the Phalanger v2.0\WebRoot\Samples\SimpleScripts directory and even creating my own web.config file show below:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
<phpNet>
<compiler>
<set name="LanguageFeatures">
<add value="PhpClr" />
</set>
</compiler>
<classLibrary>
<add assembly="mscorlib" />
<add assembly="System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Drawing, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</classLibrary>
</phpNet>
</configuration>

Any ideas where the problem lies? I've been looking at this problem for a few hours now and have developed a mental block, so I imagine it's something stupid I may have done :)

Cheers!

Ste

SteJ@codeplex
 
Posts: 1
Joined: January 7th, 2012, 8:55 pm

Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 7 guests

cron

User Control Panel

Login

Who is online

In total there are 7 users online :: 0 registered, 0 hidden and 7 guests (based on users active over the past 5 minutes)
Most users ever online was 297 on March 29th, 2024, 7:06 am

Users browsing this forum: No registered users and 7 guests