Issue Using PDO with SQLite

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

Issue Using PDO with SQLite

Postby MX26 » June 4th, 2014, 11:37 pm

Hi there,

I am having an issue creating an SQLite database using PDO. In my PHP/Phalanger class - I have the line:
$db = new PDO('sqlite:AQA.sqlite3');

Compiling the class in Pure Mode produces no issues. However, when I attempt to call the function containing the previously mentioned statement, VS2013 throws an error that reads "Driver not found".

I have the PhpNetPDOSQLite .dll referenced in my VS project.

Thanks in advance,
Geoff
MX26
 
Posts: 18
Joined: May 14th, 2014, 4:49 pm

Re: Issue Using PDO with SQLite

Postby Jakub Misek » June 6th, 2014, 12:44 pm

hi Geoff,

Try to add reference to the driver into your web.config file.

Code: Select all
<phpNet><classLibrary>
  <add assembly="PhpNetPDO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" />
  <add assembly="PhpNetPDOSQLite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2771987119c16a03" />
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: Issue Using PDO with SQLite

Postby MX26 » June 6th, 2014, 3:16 pm

Jakub,

Thanks for your response.

This is a Win Forms project. Adding the reference should have added the assembly reference to my config file, right?

Thanks,
Geoff
MX26
 
Posts: 18
Joined: May 14th, 2014, 4:49 pm

Re: Issue Using PDO with SQLite

Postby MX26 » June 6th, 2014, 11:11 pm

Further updates on this issue:

I'm messed around with making a local app.config file with the code you supplied. Additionally, I threw together an app.config file modeled after a sample one that I found online. Still no luck initializing the PDO class.

I get two different errors depending on how I structure the function arguments:
1) "Driver not found"
2) "PDO aliasing"

Thanks,
Geoff
MX26
 
Posts: 18
Joined: May 14th, 2014, 4:49 pm

Re: Issue Using PDO with SQLite

Postby Jakub Misek » June 8th, 2014, 12:39 pm

Hi Geoff,

Please attach your sample project. I'll take a look and probably fix extensions loading in Phalanger.

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

Re: Issue Using PDO with SQLite

Postby MX26 » June 8th, 2014, 10:34 pm

Jakub,

I am developing this program as a portion of a client's project so I am not at liberty to send you the full program. Can you walk me through the fix? I am happy to pay a fee if you feel that the fix will take some time. I plan on purchasing a full Phalanger license as soon as my trial license runs out.

Thanks,
Geoff
MX26
 
Posts: 18
Joined: May 14th, 2014, 4:49 pm

Re: Issue Using PDO with SQLite

Postby Jakub Misek » June 9th, 2014, 3:28 am

Hi Geoff,

We can prepare just a sample project to show the configuration.

Please note Phalanger is an opensource project with the community support at here and https://github.com/DEVSENSE/Phalanger

Phalanger Tools are tools for Phalanger, paid support does not cover Phalanger opensource project.

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

Re: Issue Using PDO with SQLite

Postby MX26 » June 9th, 2014, 11:02 am

Jakub,

Great - I would really appreciate that. Again, if you feel that this will take some time I would be happy to pay a fee.

Thanks again,
Geoff
MX26
 
Posts: 18
Joined: May 14th, 2014, 4:49 pm

Re: Issue Using PDO with SQLite

Postby MX26 » June 12th, 2014, 1:44 pm

Bump.

Any progress here?
MX26
 
Posts: 18
Joined: May 14th, 2014, 4:49 pm

Re: Issue Using PDO with SQLite

Postby MX26 » June 14th, 2014, 8:23 pm

Problem is resolved!

Fix was implemented by adding your suggested assembly references in machine.config file of .NET 4.

I'd like to note that I ran the Phalanger Tools installer several times. Both times Phalanger Tools install failed to update the machine.config file.

I have seen in several places that the installer should update machine.config automatically. Is this a bug with the new installer or simply not a feature that is supported?

Thanks,
Geoff
MX26
 
Posts: 18
Joined: May 14th, 2014, 4:49 pm

Next

Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 20 guests

cron

User Control Panel

Login

Who is online

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