gnope php gtk gui gnope.org  

sqlite?

 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
Plochi



Joined: 25 Jan 2006
Posts: 4
Location: Paderborn

PostPosted: Mon Jan 30, 2006 10:31 pm    Post subject: sqlite? Reply with quote

I have installed the Gnope programm and know my test application cannot find the sqlite class. Has anyone an idea how i can get this running?
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Mon Jan 30, 2006 11:09 pm    Post subject: Re: sqlite? Reply with quote

Plochi wrote:
my test application cannot find the sqlite class.

That is because Gnope does not install any extensions. But it is easy to add them after installation:
- Either you download the full php archive (php 5.1.1) with all extensions and put them into the ext/ directory
- Or goto http://pecl4win.php.net/index.php and find the appropriate dll for your php version (php 5.1.1)
Back to top
Plochi



Joined: 25 Jan 2006
Posts: 4
Location: Paderborn

PostPosted: Tue Jan 31, 2006 9:22 am    Post subject: Reply with quote

I have done it the first way. But it doesn't work. What changes do i have to make in the php.ini file? If I only delete the ";" before "extension=php_sqlite.dll, the php.exe crash because of "cannot find php_pdo.dll"
Back to top
Osiris



Joined: 17 Dec 2005
Posts: 65

PostPosted: Tue Jan 31, 2006 10:06 am    Post subject: Reply with quote

sqlite in PHP 5.1.x needs the pdo-extension, so you have to uncomment the
extension=php_pdo.dll.

And btw. php has given an error-message to you, which can't be better, to find the error Wink
Back to top
Plochi



Joined: 25 Jan 2006
Posts: 4
Location: Paderborn

PostPosted: Tue Jan 31, 2006 10:51 pm    Post subject: Reply with quote

Unfortunatly it's not so easy. I have uncommented the line with pdo but the php.exe still crashes. I no idea why?
If somebody has time to help me, i have uploaded my hole GTK2 as Zip file Folder to my webspace. you can find it here: http://plochi.cybton.com/PHPGtk2.zip
Back to top
neters



Joined: 04 Jan 2006
Posts: 5

PostPosted: Wed Feb 01, 2006 1:34 pm    Post subject: Reply with quote

Plochi wrote:
Unfortunatly it's not so easy. I have uncommented the line with pdo but the php.exe still crashes. I no idea why?

Initially, I had a little trouble getting sqlite working on my windows box. I ended up downloading the php 5.1.2 source tree and copying the pdo_sqlite.dll and the php_pdo.dll to my PHP-Gtk2 extension directory. Then I made sure my php.ini file had these 2 lines (in this order):
Code:
extension=php_pdo.dll
extension=php_sqlite.dll

I think my original problem was due to conflicting dll versions so be sure you are using the same release of these 2 dll's.

Niles
Back to top
Plochi



Joined: 25 Jan 2006
Posts: 4
Location: Paderborn

PostPosted: Wed Feb 01, 2006 6:30 pm    Post subject: Reply with quote

Thanks! I've got it.
It was just the order of the extensions.
After puttin php_pdo before the the sqlite extension , it runs.
Back to top
beidlerj



Joined: 10 Feb 2006
Posts: 55
Location: Oregon, USA

PostPosted: Thu Feb 23, 2006 2:34 am    Post subject: Reply with quote

I am trying to enable MSSQL support for my application, and I can't get it to go. I downloaded the PHP5 ZIP and copied the PHP_mssql.dll file into C:\PHP-Gtk2\ext. I still get an error message about not being able to load the module, though. As far as I know the module doesn't rely on anything else... I don't get any messages about that, anyhow. When I try to run my program, I get:

PHP Startup: Unable to load dynamic library './ext/php_mssql.dll' - The specified module could not be found.

It's in there, though! What gives?
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Thu Feb 23, 2006 9:02 am    Post subject: Reply with quote

beidlerj wrote:
PHP Startup: Unable to load dynamic library './ext/php_mssql.dll' - The specified module could not be found.?


Some short search would you have brought the answer:
http://www.sitepoint.com/forums/showthread.php?s=4acd0245c71ef4ab9d8a15861fcaaf2a&p=2379042#post2379042
Back to top
Mikey



Joined: 02 May 2006
Posts: 10

PostPosted: Tue May 02, 2006 9:43 pm    Post subject: Reply with quote

Has there been discussion of frequently used extensions, and which should be enabled by default in a Gnope installation?

I'm working on a distributable app that would make use of SQLite. Telling users to go edit their .ini file to enable the extension is a little silly, and SQLite seems to be the best option for PHP-GTK2 apps that need data storage beyond a simple flat file or XML.

Is there a way to load the extension upon app initialization and override the ini? Forgive me, I'm a little new.
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Wed May 03, 2006 6:41 am    Post subject: Reply with quote

Mikey wrote:
Has there been discussion of frequently used extensions, and which should be enabled by default in a Gnope installation?

Not yet. There was a short one that brought the result that there are too many different devs that need different extensions, so shipping none fits best.
However, I have decided that

  • sqlite (+pdo version)
  • mysql (+pdo version)
  • gettext

will be in the next version.
Sqlite, because you can have local databases without needing a db server, mysql because it's the most often used db driver, and gettext to translate the applications easily.

There may be voices that want to have postgres or other db drivers, but I won't include them. Full stop.

I also thought about having modules in the gnope channel, so that one can just use the pear installer to install + activate them. The only problem is that's it's nearly too much work, and that there is currently no real solution on how to enable/disable the extensions in php. I'll ask [url=http://greg.chiaraquartet.net/]Greg[url].
Back to top
Osiris



Joined: 17 Dec 2005
Posts: 65

PostPosted: Wed May 03, 2006 9:55 am    Post subject: Reply with quote

Can Pear::Config be used to rewrite the php-gtk2 php.ini file, by adding some new extension=... lines to activate new extensions?

So the AppRunner may check extensions at start and add them to php.ini, quits with a message "new extensions installed. Please restart..." or the Pear Package Installer can be extended to do this on package installation.
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Wed May 03, 2006 9:57 am    Post subject: Reply with quote

Osiris,

The extension check is the task of the PEAR installer. I mailed Greg, and he told me that PEAR 1.5.0 will support extension enabling/disabling/installing in general. That way, it will be easy to distribute the extensions on the Gnope channel and make a package just depend on it.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.