Getting Wordpress running on Phalanger on AppHarbor

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

Getting Wordpress running on Phalanger on AppHarbor

Postby mgleason@codeplex » October 12th, 2011, 5:56 pm

Hi, we're trying to get Wordpress running on Phalanger on AppHarbor.  Currently, I'm getting the following error:

     Could not load file or assembly 'php4ts.dll' or one of its dependencies. The specified module could not be found. - the full errror message is below...

The following files are in the Bin directory (I added the msvcrXXXX.dll files due to thispost which suggests that the error might be due to a missing VC++ 2010 SP runtime).

  • msvcr100.dll
  • msvcr100d.dll
  • msvcr100_clr0400.dll
  • msvcrt.dll
  • MySql.Data.dll
  • php4ts.dll
  • php5ts.dll
  • PhpNetClassLibrary.dll
  • PhpNetCore.dll
  • PhpNetCore.IL.dll
  • PhpNetMySql.dll
  • PhpNetXmlDom.dll
  • php_image.mng.dll
  • php_mbstring.mng.dll
  • php_xml.mng.dll
  • php_zlib.mng.dll
  • WebPages.dll 

 Here's the full error:

Could not load file or assembly 'php4ts.DLL' or one of its dependencies. The specified module could not be found.

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.IO.FileNotFoundException: Could not load file or assembly 'php4ts.DLL' or one of its dependencies. The specified module could not be found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[FileNotFoundException: Could not load file or assembly 'php4ts.DLL' or one of its dependencies. The specified module could not be found.]   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0   System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144   System.Reflection.Assembly.Load(String assemblyString) +28   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46[ConfigurationErrorsException: Could not load file or assembly 'php4ts.DLL' or one of its dependencies. The specified module could not be found.]   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +618   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94   System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677[HttpException (0x80004005): Could not load file or assembly 'php4ts.DLL' or one of its dependencies. The specified module could not be found.]   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9079228   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
mgleason@codeplex
 
Posts: 4
Joined: January 7th, 2012, 8:37 pm

RE: Getting Wordpress running on Phalanger on AppHarbor

Postby mgleason@codeplex » October 14th, 2011, 1:28 am

Thanks Jakub, I've checked with AppHarbor and we do have "Enable 32-Bit Applications" set on the application pool.

What else could it be?

mgleason@codeplex
 
Posts: 4
Joined: January 7th, 2012, 8:37 pm

RE: Getting Wordpress running on Phalanger on AppHarbor

Postby Jakub Misek » October 14th, 2011, 9:14 am

Hi,

php4ts.dll is 32bit-only DLL. You have to "Enable 32-Bit Applications" according to thispost. It is because of following DLLs

  • php_image.dll
  • php_mbstring.dll
  • php_xml.dll
  • php_zlib.dll

which are 32bit only.

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: Getting Wordpress running on Phalanger on AppHarbor

Postby Jakub Misek » October 14th, 2011, 9:14 am

The other thing required by php4ts.dll is Visual C++ 2010 SP1 Redistributable to be installed on the target machine (http://wiki.php-compiler.net/Manual_installation#Prerequisites). It is common runtime component required by all the applications developed in Visual Studio 2010.
Jakub Misek
Donate
phpcompiler

Regards,
Jakub Misek
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: Getting Wordpress running on Phalanger on AppHarbor

Postby mgleason@codeplex » October 17th, 2011, 4:53 am

One challenge we have is the Visual C++ 2010 SP1 Redistributable is NOT installed on the target machine.  We're hoping to work-around this by including the DLL's from the C++ Redistributable in the BIN directory that we deploy on the target - which is exactly what we've done.  But then we get an error which says "Could not load file or assembly 'mfcm100.dll' or one of its dependencies..." If we remove 'mfcm100.dll' from the directory, we the same error shown above 'Could not load file or assembly 'php4ts.dll...'.

 

mgleason@codeplex
 
Posts: 4
Joined: January 7th, 2012, 8:37 pm

RE: Getting Wordpress running on Phalanger on AppHarbor

Postby Jakub Misek » October 17th, 2011, 7:56 pm

I can only give you a hint - download tool called "dependency walker", and open php4ts.dll ... you will see all its dependencies, that should be loadable from the applications context. Try to ensure these files and msvcrt.dll are in /bin folder (or installed on system) and all their dependencies too. "dependency walker" will tell you if any DLL is not loadable.
Please share with us your results :-)
Jakub Misek
Donate
phpcompiler

Regards,
Jakub Misek
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: Getting Wordpress running on Phalanger on AppHarbor

Postby mgleason@codeplex » October 26th, 2011, 6:50 pm

This seems to be impossible.  I can't see what's missing since I don't have direct access to the system at AppHarbor.  I've copied all of the DLL's from the C++ redist into the /bin folder, plus many others, but always get the same result.

Is it possible to get a 64-bit version of Phalanger?

mgleason@codeplex
 
Posts: 4
Joined: January 7th, 2012, 8:37 pm

RE: Getting Wordpress running on Phalanger on AppHarbor

Postby Jakub Misek » October 28th, 2011, 12:25 am

If it is impossible to "hack" installation of Visual C++ 2010 SP1,
I would recommend to contact DEVSENSE support (info at devsense.com) to obtain managed extensions, so you don't need php4ts.dll and VC++ and you can run 64-bit.

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: Getting Wordpress running on Phalanger on AppHarbor

Postby dereklakin » January 12th, 2012, 5:51 pm

Did you manage to get it working in the end? If so, which version of Phalanger are you using?

I'm trying to do the same thing (unsuccessfully so far) and had to go back to version 2.0 because AppHarbor seem to only provide .NET Framework 2.0 :(
dereklakin
 
Posts: 20
Joined: January 12th, 2012, 5:27 pm

Re: Getting Wordpress running on Phalanger on AppHarbor

Postby Jakub Misek » January 12th, 2012, 6:04 pm

2.0 is little outdated. We are using Phalanger 3.0 and latest WordPress runs ok. Still, VC++ 2010 x86 redistributable must be installed ...
The installation package of VC++ redist contains few DLLs, and I'm not sure if it is sufficient just to place them into Bin.

"php4ts.dll" depends on "msvcr100.dll" and "msvcp100.dll" from the package. You can use e.g. WinRar to open the package (http://www.microsoft.com/download/en/de ... px?id=5555), then extract file vc_red.cab ... and required files from the cab copy into you /Bin folder.

I can test this "hack" later, or let us know! 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

Next

Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 19 guests

cron

User Control Panel

Login

Who is online

In total there are 19 users online :: 0 registered, 0 hidden and 19 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 19 guests