Exception; strange phpc behavior

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

Exception; strange phpc behavior

Postby ooptimum@codeplex » April 8th, 2007, 10:55 pm

I am trying to use Dolphin (www.boonex.com product) with Phalanger 2.0 Beta3. I managed to install Dolphin, but then whenever I open its index.php,
I receive "Object reference not set to an instance of an object" exception on one of included files (full details are below).

I looked at "Temporary ASP.NET Files" for all assemblies related to this project and found that the assembly for this particular include file is missing there.
I tried to clear the project's folder there and then restart IIS, but this didn't help me.

Then I tried to compile the project with the command-line compiler:
phpc /target:web /debug+ /verbose+ /out:bin /config:web.config
Upon fixing four trivial "PHP1003: Cannot break/continue 1 level(s)" errors I got this:

Phalanger - the PHP Language Compiler - version 2.0for Microsoft (R) .NET Framework version 2.0Arguments:/target:web/debug+/verbose+/out:bin/config:web.config D:\WWW\Dolphin\web.configLoaded libraries:mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Base Library (PhpNetClassLibrary)XmlDom (PhpNetXmlDom)calendar (php_calendar.mng)image (php_image.mng)ftp (php_ftp.mng)zlib (php_zlib.mng)MySql (PhpNetMySql)gd (php_gd2.mng) Performing compilation ......Build complete -- 0 errors, 7 warnings.
Upon this I got empty bin folder. Why on Earth it's empty? It's FAT32 drive a I have full administrative rights on this computer. What to do next?

Exception details:

Server Error in '/' Application.-------------------------------------------------------------------------------- Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.  Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error:   Line 23: require_once( 'header.inc.php' );Line 24: require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );Line 25: require_once( BX_DIRECTORY_PATH_INC . 'images.inc.php' ); <-- exception is hereLine 26: require_once( BX_DIRECTORY_PATH_INC . 'params.inc.php' );Line 27:   Source File: D:\WWW\Dolphin\inc\profiles.inc.php    Line: 25  Stack Trace:   [NullReferenceException: Object reference not set to an instance of an object.]   PHP.Core.AST.DirectVarUse.EmitLoad(CodeGenerator codeGenerator) +112   PHP.Core.AST.DirectVarUse.EmitNodeRead(CodeGenerator codeGenerator) +144   PHP.Core.AST.DirectVarUse.Emit(CodeGenerator codeGenerator) +51   PHP.Core.ChainBuilder.EmitGetItem(Expression array, Expression index, GetItemKinds kind) +25   PHP.Core.AST.ItemUse.EmitNodeRead(CodeGenerator codeGenerator, GetItemKinds itemGetterKind) +64   PHP.Core.AST.ItemUse.Emit(CodeGenerator codeGenerator) +132   PHP.Core.ChainBuilder.EmitGetItem(Expression array, Expression index, GetItemKinds kind) +25   PHP.Core.AST.ItemUse.EmitNodeRead(CodeGenerator codeGenerator, GetItemKinds itemGetterKind) +695   PHP.Core.AST.ItemUse.Emit(CodeGenerator codeGenerator) +132   PHP.Core.AST.BinaryEx.EmitComparison(CodeGenerator codeGenerator, Boolean equality) +87   PHP.Core.AST.BinaryEx.Emit(CodeGenerator codeGenerator) +1404   PHP.Core.CodeGenerator.EmitConversion(Expression expression, PhpTypeCode dst) +335   PHP.Core.AST.BinaryEx.EmitBinaryBooleanOperation(CodeGenerator codeGenerator, Boolean isAnd) +75   PHP.Core.AST.BinaryEx.Emit(CodeGenerator codeGenerator) +985   PHP.Core.CodeGenerator.EmitConversion(Expression expression, PhpTypeCode dst) +335   PHP.Core.AST.BinaryEx.EmitBinaryBooleanOperation(CodeGenerator codeGenerator, Boolean isAnd) +233   PHP.Core.AST.BinaryEx.Emit(CodeGenerator codeGenerator) +966   PHP.Core.CodeGenerator.EmitConversion(Expression expression, PhpTypeCode dst) +335   PHP.Core.AST.IfStmt.Emit(CodeGenerator codeGenerator) +313   PHP.Core.CodeGenerator.EmitArgfullOverloadBody(PhpRoutine routine, List`1 body, Position entirePosition) +112   PHP.Core.AST.FunctionDecl.Emit(CodeGenerator codeGenerator) +237   PHP.Core.AST.GlobalCode.Emit(CodeGenerator codeGenerator) +769   PHP.Core.Reflection.SourceUnit.Emit(CodeGenerator codeGen) +140   PHP.Core.Reflection.InclusionGraphBuilder.EmitAllUnits(CodeGenerator codeGenerator) +367   PHP.Core.Emit.ScriptAssemblyBuilder.CompileScripts(IEnumerable`1 sourceFiles, CompilationContext context) +299   PHP.Core.WebServerCompilerManager.CompileScript(String ns, PhpSourceFile sourceFile, RequestContext requestContext) +369   PHP.Core.WebServerCompilerManager.GetCompiledScript(PhpSourceFile sourceFile, RequestContext requestContext) +138   PHP.Core.ScriptContext.LoadDynamicScriptType(PhpSourceFile sourceFile) +59   PHP.Core.ScriptContext.DynamicInclude(String includedFilePath, String includerFileRelPath, Dictionary`2 variables, DObject self, DTypeDesc includer, InclusionTypes inclusionType) +380   <Script>.<Main>(ScriptContext <context>, Dictionary`2 <locals>, DObject , DTypeDesc , Boolean ) in D:\WWW\Dolphin\inc\profiles.inc.php:25 [TargetInvocationException: Exception has been thrown by the target of an invocation.]   System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0   System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +358   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29   PHP.Core.PhpFunctionUtils.Invoke(MethodInfo method, Object target, Object[] args) +128   PHP.Core.PhpScript.InvokeMainHelper(Type script, ScriptContext context, Dictionary`2 variables, DObject self, DTypeDesc includer, Boolean isMain) +145   PHP.Core.ScriptContext.DynamicInclude(String includedFilePath, String includerFileRelPath, Dictionary`2 variables, DObject self, DTypeDesc includer, InclusionTypes inclusionType) +476   <Script>.<Main>(ScriptContext <context>, Dictionary`2 <locals>, DObject , DTypeDesc , Boolean ) in D:\WWW\Dolphin\index.php:45 [TargetInvocationException: Exception has been thrown by the target of an invocation.]   System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0   System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +358   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29   PHP.Core.PhpFunctionUtils.Invoke(MethodInfo method, Object target, Object[] args) +128   PHP.Core.PhpScript.InvokeMainHelper(Type script, ScriptContext context, Dictionary`2 variables, DObject self, DTypeDesc includer, Boolean isMain) +145   PHP.Core.ScriptContext.<IncludeScript>b__0(Object scriptType) +51   PHP.Core.ScriptContext.GuardedCall(Action routine, Object data, Boolean allowUserExceptions) +273 [PhpNetInternalException: Guarded call]   PHP.Core.ScriptContext.GuardedCall(Action routine, Object data, Boolean allowUserExceptions) +419   PHP.Core.ScriptContext.IncludeScript(String relativeSourcePath, Type type) +343   PHP.Core.RequestContext.IncludeScript(String relativeSourcePath, Type type) +22   PHP.Core.RequestHandler.ProcessRequest(HttpContext context) +280   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64    --------------------------------------------------------------------------------Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
ooptimum@codeplex
 
Posts: 3
Joined: January 7th, 2012, 8:52 pm

RE: Exception; strange phpc behavior

Postby ooptimum@codeplex » April 9th, 2007, 9:28 am

I am quite sure the problem is with Phalanger in some way. When I switch to regular PHP 5.2.0 on this development IIS, Dolphin works like a charm.

Unfortunately, not all inclusions are static, so static InclusionMappings didn't work for me either.

Also I found that some php files have multiple assemblies in the Temporary ASP.NET Files (just upon I cleared it out and restarted IIS).
For example:
inc_header.inc.php~0#35863539#08c948bc36a11726.dll
inc_header.inc.php~0#a9e057e1#08c948bba878e0e6.dll
I don't have any idea whether it's okay or not though.

Could someone of the development team members just confirm you're aware of the problem, so that I know that I am not talking to myself?
I will appreciate it much. Thank you.

Igor.
ooptimum@codeplex
 
Posts: 3
Joined: January 7th, 2012, 8:52 pm

RE: Exception; strange phpc behavior

Postby Daniel Balas » April 11th, 2007, 4:00 pm

We are trying to solve this problem. I ask for your patience :). I'm sorry I didn't reply earlier.
Daniel Balas
 
Posts: 25
Joined: January 7th, 2012, 8:37 pm

RE: Exception; strange phpc behavior

Postby tomasp » April 18th, 2007, 1:09 am

Hi,
thanks for reporting the issue. There was an issue when function had parameter with same name as auto-global variable (like $_FILES).
Latest source code includes the fix, so you can either build Phalanger from source or wait one or two days for new release, where it will be fixed!

Thanks,
Tomas
tomasp
 
Posts: 46
Joined: January 7th, 2012, 8:37 pm

RE: Exception; strange phpc behavior

Postby tomasp » April 19th, 2007, 12:31 am

Here it is: 2.0 4th Beta

Thanks,
Tomas
tomasp
 
Posts: 46
Joined: January 7th, 2012, 8:37 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 17 guests

User Control Panel

Login

Who is online

In total there are 17 users online :: 0 registered, 0 hidden and 17 guests (based on users active over the past 5 minutes)
Most users ever online was 511 on April 27th, 2024, 10:11 pm

Users browsing this forum: No registered users and 17 guests