Connection problem

Discussion about the managed MySql extension [?] for Phalanger.

Connection problem

Postby draxtor@codeplex » December 24th, 2008, 11:38 am

Hi,
I installed Phalanger 2 march 2008 edition and then I downloaded MySql Managed Extension for Phalanger (4th Beta).
I copied the extension and run cmd file and all files were writen to GAC.
Then I tried simple test:

mysql_connect("127.0.0.1","root","vt381")ordie ("Could not connect");
print ("Connected successfully");
mysql_close ();

I tried with localhost too. I was amazed that there is no single example of mysql connection with phalanger so I assumed it works same as in good old PHP.
I put this code in my web.config 
<phpNet>
<!--
Reference to the extension assembly-->
<
classLibrary>
<
addassembly="PhpNetMySql, Version=2.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03"section="mysql"/>
</
classLibrary> </phpNet>
I finished up with:
Value cannot be null.
Parameter name: descriptor
 


Source Error:

Line 5:  $a=1;Line 6:  echo ++$a;Line 7: mysql_connect("127.0.0.1", "root", "vt381") or die ("Could not connect");Line 8:  print ("Connected successfully");Line 9:  mysql_close ();

Source File: C:\.net\web\phpSite\default.php    Line:7

Stack Trace:

[ArgumentNullException: Value cannot be null.Parameter name: descriptor]   PHP.Core.LocalConfiguration.GetLibraryConfig(PhpLibraryDescriptor descriptor) +70   PHP.Library.Data.MySqlConfiguration.get_Local() +34   PHP.Library.Data.MySql.Connect(String server, String user, String password, Boolean newLink, ConnectFlags flags, Boolean persistent) +67   PHP.Library.Data.MySql.Connect(String server, String user, String password) +38   <Script>.<Main>(ScriptContext <context>, Dictionary`2 <locals>, DObject , DTypeDesc , Boolean ) in C:\.net\web\phpSite\default.php:7[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) +71   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +261   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) +166   PHP.Core.PhpScript.InvokeMainHelper(Type script, ScriptContext context, Dictionary`2 variables, DObject self, DTypeDesc includer, Boolean isMain) +140   PHP.Core.ScriptContext.<IncludeScript>b__0(Object scriptType) +51   PHP.Core.ScriptContext.GuardedCall(Action routine, Object data, Boolean allowUserExceptions) +225[PhpNetInternalException: Guarded call]   PHP.Core.ScriptContext.GuardedCall(Action routine, Object data, Boolean allowUserExceptions) +372   PHP.Core.ScriptContext.IncludeScript(String relativeSourcePath, Type type) +197   PHP.Core.RequestContext.IncludeScript(String relativeSourcePath, Type type) +24   PHP.Core.RequestHandler.ProcessRequest(HttpContext context) +231   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

I found somewhere in this forum to put :

I found somewhere in this forum to put :

<paths>
<
setname="DynamicWrappers"value=".." />
<
setname="Libraries"value=".." />
<
setname="ExtManager"value=".." />
<
setname="ExtWrappers"value=".." />
<
setname="ExtTypeDefs"value=".." />
<
setname="ExtNatives"value=".." /> </paths>

to my phpNet section, so I put it. But the error remain the same.
Is there any working example how can I make MySql Connection? I see that AdoDb is recommended but AdoDb is using same mysql functions. I know I can use .net Objects but I wonder is it possible to use mysql functions? 
draxtor@codeplex
 
Posts: 6
Joined: January 7th, 2012, 8:52 pm

RE: Connection problem

Postby supershowwei@codeplex » September 30th, 2009, 4:15 am

Anyone know it...???

supershowwei@codeplex
 
Posts: 2
Joined: January 7th, 2012, 8:59 pm

RE: Connection problem

Postby supershowwei@codeplex » September 30th, 2009, 12:47 pm

I find the solution.

Phalanger must be 2.0 4th Beta.

supershowwei@codeplex
 
Posts: 2
Joined: January 7th, 2012, 8:59 pm

RE: Connection problem

Postby Jakub Misek » December 14th, 2010, 11:54 pm

Hi,

we didn't notice, sorry. The extension is fixed and updated now to work with the latest Phalanger 2.0.

Best Regards,
Jakub 

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: Connection problem

Postby Endrio143 » December 17th, 2014, 5:35 am

I have "patched" the Extension and created a version that works with current Phalanger, now I am on the search for a way to release: Submitting a patch is unfeasable, as part of the "patch" was to rip out the ancient version of Mysql connector/.NET and replace it with a newer version.
Unlock the key of your success by MB7-701 brain dumps and testking.By using our latest testking.co.uk - 1Y0-A26 brain dumps
Endrio143
 
Posts: 1
Joined: December 17th, 2014, 5:27 am


Return to MySql Extension project

Who is online

Users browsing this forum: No registered users and 1 guest

cron

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (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 1 guest