Weird problem
13 posts
• Page 1 of 2 • 1, 2
Weird problem
I am trying to get Drupal 7 to run on Phalanger. I had to manually solve some minor issues, but now I am stuck with this error:
An exception of type 'System.TypeLoadException' occurred in PhpNetCore.dll but was not handled in user code
Additional information: Method 'ExecuteStatement' in type '<includes/database/database.inc>.DatabaseStatementBase' from assembly 'includes_database_database.inc~0#35863539#08d19aba8ab8d4b8, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Where:
class DatabaseStatementBase extends PDOStatement implements DatabaseStatementInterface
PDOStatement has an abstract member ExecuteStatement that must be implemented, so I just wrote an empty method for that, but it still complains after recompiling.
Am I missing something?
An exception of type 'System.TypeLoadException' occurred in PhpNetCore.dll but was not handled in user code
Additional information: Method 'ExecuteStatement' in type '<includes/database/database.inc>.DatabaseStatementBase' from assembly 'includes_database_database.inc~0#35863539#08d19aba8ab8d4b8, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Where:
class DatabaseStatementBase extends PDOStatement implements DatabaseStatementInterface
PDOStatement has an abstract member ExecuteStatement that must be implemented, so I just wrote an empty method for that, but it still complains after recompiling.
Am I missing something?
- davidbcn
- Posts: 87
- Joined: September 10th, 2014, 3:07 am
Re: Weird problem
Hi,
PDOStatement cannot be extended currently. This will be fixed and available within the next release. You can watch changes at https://github.com/DEVSENSE/Phalanger.
Thanks,
PDOStatement cannot be extended currently. This will be fixed and available within the next release. You can watch changes at https://github.com/DEVSENSE/Phalanger.
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Weird problem
The issue has been filed at https://github.com/DEVSENSE/Phalanger/issues/40
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Weird problem
I just hope this gets fixed soon, I just bought the Phalanger license to see If I could get Drupal up and running!
- davidbcn
- Posts: 87
- Joined: September 10th, 2014, 3:07 am
Re: Weird problem
Please note, Phalanger is opensource, it is free. Yes, I hope this will be fixed and released in a few days.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Weird problem
You are technically correct, Phalanger Tools is only supposed to be the visual studio integration.
I don't want to be rude, but I feel that devsense, being both behind Phalanger and the Phalanger Visual Studio integration should be giving some support to their customers as a whole. (And I thank you very much for saying you will be looking into this!).
Let me explain...
I buy a $50,000 car, but the car fails to start. So I go back to the agency to ask for help, and they tell me that they have open-sourced the car's design, and that they were only selling me the bare assembled "iron", that the design is "free" so they do not have any responsibility for it. Although this might be true, they actually delivered both the manufactured car with the design implicit in it. Now, if the standard for the car market was $1,000 per car, but I cashed out for the $50,000 car, I would be very unhappy and probably will not recommend or be a returning customer.
Now let's compare this to Phalanager. The PHP development tools available in the market are free (or extremely cheap - that's the $1,000 car), so that is the standard people are used to when talking about PHP. Devsense sells a product called Phalanger Tools - the $50,000 car - that, on it's home page (http://www.devsense.com/products/phalanger-tools) describes a full set of features and benefits that actually belong to the open-sourced Phalanger technology. When you purchase Phalanger Tools, it comes bundled with phalanger itself, just as when you buy the car it comes with the design implicit in it.
This just leaves me scraching my head. Imagine Microsoft open-sourced Visual Studio "Core" and told you it was only selling you de UI. Now you got some issues and ask for support, and they tell you that the UI is working, it's the core that has issues and because it's free it is not their concern. But wait, the UI they are selling is no use without the core, actually, they sell and distribute both as a single bundle.
Don't take me wrong, I am a deep believer in Open Source and actually appreciate a lot the work you guys are doing with Phalanger. If you ever get to a mature point where the most spread open source CMS's are able to run on Phalanger, you will be taking these CMS's to a very serious enterprise level.
Keep on with the good work!
I don't want to be rude, but I feel that devsense, being both behind Phalanger and the Phalanger Visual Studio integration should be giving some support to their customers as a whole. (And I thank you very much for saying you will be looking into this!).
Let me explain...
I buy a $50,000 car, but the car fails to start. So I go back to the agency to ask for help, and they tell me that they have open-sourced the car's design, and that they were only selling me the bare assembled "iron", that the design is "free" so they do not have any responsibility for it. Although this might be true, they actually delivered both the manufactured car with the design implicit in it. Now, if the standard for the car market was $1,000 per car, but I cashed out for the $50,000 car, I would be very unhappy and probably will not recommend or be a returning customer.
Now let's compare this to Phalanager. The PHP development tools available in the market are free (or extremely cheap - that's the $1,000 car), so that is the standard people are used to when talking about PHP. Devsense sells a product called Phalanger Tools - the $50,000 car - that, on it's home page (http://www.devsense.com/products/phalanger-tools) describes a full set of features and benefits that actually belong to the open-sourced Phalanger technology. When you purchase Phalanger Tools, it comes bundled with phalanger itself, just as when you buy the car it comes with the design implicit in it.
This just leaves me scraching my head. Imagine Microsoft open-sourced Visual Studio "Core" and told you it was only selling you de UI. Now you got some issues and ask for support, and they tell you that the UI is working, it's the core that has issues and because it's free it is not their concern. But wait, the UI they are selling is no use without the core, actually, they sell and distribute both as a single bundle.
Don't take me wrong, I am a deep believer in Open Source and actually appreciate a lot the work you guys are doing with Phalanger. If you ever get to a mature point where the most spread open source CMS's are able to run on Phalanger, you will be taking these CMS's to a very serious enterprise level.
Keep on with the good work!
- davidbcn
- Posts: 87
- Joined: September 10th, 2014, 3:07 am
Re: Weird problem
I agree and I'm glad you like the project.
Phalanger is compiler of PHP code into .NET and its primary purpose is an easy migration from PHP to .NET and the interoperability; It can be used to migrate an existing PHP project to .NET (with little modifications to the code). It brings PHP code to a whole different platform, so you can't avoid some modifications to the PHP code, and we'll gladly help with them. I wouldn't advertise it as a simple replacement of php-cgi.exe and all of its libraries being developed for decades.
Please let us know any bug or missing feature, here or at github, we are happy for any feedback.
PDOStatement was fixed so it is extensible now; the fix will be available within the next release, and already available at github.
Phalanger is compiler of PHP code into .NET and its primary purpose is an easy migration from PHP to .NET and the interoperability; It can be used to migrate an existing PHP project to .NET (with little modifications to the code). It brings PHP code to a whole different platform, so you can't avoid some modifications to the PHP code, and we'll gladly help with them. I wouldn't advertise it as a simple replacement of php-cgi.exe and all of its libraries being developed for decades.
Please let us know any bug or missing feature, here or at github, we are happy for any feedback.
PDOStatement was fixed so it is extensible now; the fix will be available within the next release, and already available at github.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Weird problem
Thank you very much, I was able to recompile the extension from the repository and got a little bit further.
I found that the sql server PDO Driver is missing all the PDO constant definitions such as PDO::SQLSRV_ATTR_DIRECT_QUERY or PDO::SQLSRV_ENCODING_BINARY, but I could work over it.
Now I am stuck with this:
Additional information: Derived method '<Override>' in type '<includes\database\sqlsrv\database.inc?0>.DatabaseConnection_sqlsrv' from assembly 'TransientAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' cannot reduce access.
where
class DatabaseConnection_sqlsrv extends DatabaseConnection
and
abstract class DatabaseConnection extends PDO
I am just trying to rush on seeing how far I can get with Drupal + Phalanger, so I replaced all protected and private accesors for public in DatabaseConnection and DatabaseConnection_sqlsrv but it did not work.
Any clue?
Thank you!
I found that the sql server PDO Driver is missing all the PDO constant definitions such as PDO::SQLSRV_ATTR_DIRECT_QUERY or PDO::SQLSRV_ENCODING_BINARY, but I could work over it.
Now I am stuck with this:
Additional information: Derived method '<Override>' in type '<includes\database\sqlsrv\database.inc?0>.DatabaseConnection_sqlsrv' from assembly 'TransientAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' cannot reduce access.
where
class DatabaseConnection_sqlsrv extends DatabaseConnection
and
abstract class DatabaseConnection extends PDO
I am just trying to rush on seeing how far I can get with Drupal + Phalanger, so I replaced all protected and private accesors for public in DatabaseConnection and DatabaseConnection_sqlsrv but it did not work.
Any clue?
Thank you!
- davidbcn
- Posts: 87
- Joined: September 10th, 2014, 3:07 am
Re: Weird problem
I have more details on the problem.
class DatabaseConnection_sqlsrv has this constructor:
public function __construct(array $connection_options = array())
totally commenting out that constructor makes the trick.
The class inheritance is as follows:
DatabaseConnection_sqlsrv : DatabaseConnection : PDO
where DatabaseConnection has the constructor:
public function __construct($dsn, $username, $password, $driver_options = array())
I guess the problem has to do with the fact the the new constructor for the last class in the inheritance hierarchy is defining completely different parameters.
class DatabaseConnection_sqlsrv has this constructor:
public function __construct(array $connection_options = array())
totally commenting out that constructor makes the trick.
The class inheritance is as follows:
DatabaseConnection_sqlsrv : DatabaseConnection : PDO
where DatabaseConnection has the constructor:
public function __construct($dsn, $username, $password, $driver_options = array())
I guess the problem has to do with the fact the the new constructor for the last class in the inheritance hierarchy is defining completely different parameters.
- davidbcn
- Posts: 87
- Joined: September 10th, 2014, 3:07 am
Re: Weird problem
Hi,
I've tried to compile following piece of code with success
Do you have such single test case that we can debug and fix?
Thanks,
I've tried to compile following piece of code with success
- Code: Select all
abstract class DatabaseConnection extends PDO {
public function __construct($dsn, $username, $password, $driver_options = array())
{
}
}
class DatabaseConnection_sqlsrv extends DatabaseConnection {
public function __construct(array $connection_options = array())
{
}
}
Do you have such single test case that we can debug and fix?
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
13 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 11 guests