Board index » kylix » Apache DSO with dbExpress - Does it even work?

Apache DSO with dbExpress - Does it even work?


2005-05-30 12:35:35 PM
kylix2
I am trying to implement a "significant" Apache DSO using Kylix3 and
dbExpress to access a Firebird database. I have maybe 10 years experience
with Delphi (since version 1.0) but only a few weeks with Linux / Apache /
Kylix.
Other than the trivial CGI dbExpress example found in
bdn.borland.com/article/images/28556/apache_development.pdf
I can't get dbExpress to work. It seems to me that a dbExpress component
(in either a CGI or DSO) must be executed within the context of one of the
WebModule's Action.OnAction events! This is not acceptable. I cannot even
call one of the WebModule's OnAction events from another unit without
getting an Access Violation.
At this moment I don't think that Kylix / dbExpress even works for Apache
CGI's or DSO's.
Any help would be appreciated. I will pay for consulting support.
Regards,
Phil Henningsen
 
 

Re:Apache DSO with dbExpress - Does it even work?

Hi Phil -
I used the dbExpress components with my Apache DSOs for about 3 years -
they were reasonably reliable, but I have found considerably better
success with the SciBit components. I have only used them against MySQL
and Oracle DBs though. I handle about 30K surfers a day with at least 2
DB hits per page request (get and put the surfer's state record) from a
cluster of machines. I do not use the onAction at all, prefering to use
the BeforeDispatch for everything (I chose to write my own handlers from
the ground up). Some pages are quite intricate and have many DB hits -
depends on what the surfer requests. You may see the system in action
here: www.beauxties.com/ ({*word*78} cancer awareness retail site)
I also came from Delphi 1 - 6E and switched to Kylix about 4 years ago -
it was a bit trying at times but completely worth it once I got past the
Linux learning curve. I am happy to correspond with you directly (off
thread) if you would like assistance.
Best,
-Ed Purkiss
Quote
I am trying to implement a "significant" Apache DSO using Kylix3 and
dbExpress to access a Firebird database. I have maybe 10 years experience
with Delphi (since version 1.0) but only a few weeks with Linux / Apache /
Kylix.

Other than the trivial CGI dbExpress example found in
bdn.borland.com/article/images/28556/apache_development.pdf
I can't get dbExpress to work. It seems to me that a dbExpress component
(in either a CGI or DSO) must be executed within the context of one of the
WebModule's Action.OnAction events! This is not acceptable. I cannot even
call one of the WebModule's OnAction events from another unit without
getting an Access Violation.

At this moment I don't think that Kylix / dbExpress even works for Apache
CGI's or DSO's.

Any help would be appreciated. I will pay for consulting support.

Regards,
Phil Henningsen


 

Re:Apache DSO with dbExpress - Does it even work?

I already use Kylix3 + Apache + Linux + dbExpress + Informix + Luxena
without problem.
"Phil Henningsen" < XXXX@XXXXX.COM >wrote in message
Quote
I am trying to implement a "significant" Apache DSO using Kylix3 and
dbExpress to access a Firebird database. I have maybe 10 years experience
with Delphi (since version 1.0) but only a few weeks with Linux / Apache /
Kylix.

Other than the trivial CGI dbExpress example found in
bdn.borland.com/article/images/28556/apache_development.pdf
I can't get dbExpress to work. It seems to me that a dbExpress component
(in either a CGI or DSO) must be executed within the context of one of the
WebModule's Action.OnAction events! This is not acceptable. I cannot
even call one of the WebModule's OnAction events from another unit without
getting an Access Violation.

At this moment I don't think that Kylix / dbExpress even works for Apache
CGI's or DSO's.

Any help would be appreciated. I will pay for consulting support.

Regards,
Phil Henningsen

 

{smallsort}

Re:Apache DSO with dbExpress - Does it even work?

Phil Henningsen wrote:
Quote
At this moment I don't think that Kylix / dbExpress even works for
Apache CGI's or DSO's.
I've used Kylix + DbExpress + WebBroker + Firebird for a project with
good success. Building an Apache 2 DSO.
Maybe if you were a bit more specific when it works and when it doesn't
I could help you further.
--
Leonel
 

Re:Apache DSO with dbExpress - Does it even work?

It works, but there are dependencies involved. i.e. I believe DBexpress
pulls in all the QT {*word*99}.
DBexpress is not the best choice for what you want to do. Don't use it!
I have used the standard Interbase components without problems and for
the last 2 years I have been using the IBobjects Kylix beta for my DSOs
and it works great.
The key with DSOs and database stuff is to use components that do not
require the visual QT CLX {*word*99}.
Run ldd against your dso to see what the dependencies are.
here is what mine looks like, notice no QT dependencies.
ldd libsecuretrans.so
linux-gate.so.1 =>(0xffffe000)
libpthread.so.0 =>/lib/libpthread.so.0 (0x4001e000)
libdl.so.2 =>/lib/libdl.so.2 (0x40070000)
libc.so.6 =>/lib/libc.so.6 (0x40074000)
/lib/ld-linux.so.2 (0x40000000)
Contact Jason Wharton or Helen Borie if you would like to try the
IBobjects Kylix Beta or just use the Interbase Express components, NOT
DBexpress.
Phil Henningsen wrote:
Quote
I am trying to implement a "significant" Apache DSO using Kylix3 and
dbExpress to access a Firebird database. I have maybe 10 years experience
with Delphi (since version 1.0) but only a few weeks with Linux / Apache /
Kylix.

Other than the trivial CGI dbExpress example found in
bdn.borland.com/article/images/28556/apache_development.pdf
I can't get dbExpress to work. It seems to me that a dbExpress component
(in either a CGI or DSO) must be executed within the context of one of the
WebModule's Action.OnAction events! This is not acceptable. I cannot even
call one of the WebModule's OnAction events from another unit without
getting an Access Violation.

At this moment I don't think that Kylix / dbExpress even works for Apache
CGI's or DSO's.

Any help would be appreciated. I will pay for consulting support.

Regards,
Phil Henningsen


 

Re:Apache DSO with dbExpress - Does it even work?

Oh, I forgot to add that Zeos also works great from DSOs.
Zeos works with Firebird,Interbase,Postgresql etc.
grab it from www.zeoslib.net and download the last alpha from Nov
2004 (it says it's alpha but it is just bug fixes on top of the last
stable version, so it's actually pretty solid).
Phil Henningsen wrote:
Quote
I am trying to implement a "significant" Apache DSO using Kylix3 and
dbExpress to access a Firebird database. I have maybe 10 years experience
with Delphi (since version 1.0) but only a few weeks with Linux / Apache /
Kylix.

Other than the trivial CGI dbExpress example found in
bdn.borland.com/article/images/28556/apache_development.pdf
I can't get dbExpress to work. It seems to me that a dbExpress component
(in either a CGI or DSO) must be executed within the context of one of the
WebModule's Action.OnAction events! This is not acceptable. I cannot even
call one of the WebModule's OnAction events from another unit without
getting an Access Violation.

At this moment I don't think that Kylix / dbExpress even works for Apache
CGI's or DSO's.

Any help would be appreciated. I will pay for consulting support.

Regards,
Phil Henningsen


 

Re:Apache DSO with dbExpress - Does it even work?

Quote
It works, but there are dependencies involved. i.e. I believe DBexpress
pulls in all the QT {*word*99}.
No, it does not.
Simon
 

Re:Apache DSO with dbExpress - Does it even work?

Simon,
I will have to check that out, last time I used DBexpress on Kylix I
could not just copy the DSO to the target server without haveing the
dependencies in place first(maybe its not QT, but from what I remember
there were some). That's why I moved to the Interbase Express
components, then to IBobjects.
The initial versions of Interbase Express also pulled in QT because of a
timer isssue.
Later,
Tony
Simon Kissel wrote:
Quote
>It works, but there are dependencies involved. i.e. I believe DBexpress
>pulls in all the QT {*word*99}.


No, it does not.

Simon
 

Re:Apache DSO with dbExpress - Does it even work?

I believe I had an issue a few times where I dropped a dbExpress
component on a DataModule/WebModule and the project errantly included
some of the QT headers - they are obviously unnecessary so eliminating
them from the uses list was all that was required, but it was a bit
baffling at first.
-EP
tony wrote:
Quote
Simon,
I will have to check that out, last time I used DBexpress on Kylix I
could not just copy the DSO to the target server without haveing the
dependencies in place first(maybe its not QT, but from what I remember
there were some). That's why I moved to the Interbase Express
components, then to IBobjects.

The initial versions of Interbase Express also pulled in QT because of a
timer isssue.

Later,

Tony

Simon Kissel wrote:

>>It works, but there are dependencies involved. i.e. I believe
>>DBexpress pulls in all the QT {*word*99}.
>
>
>
>No, it does not.
>
>Simon
 

Re:Apache DSO with dbExpress - Does it even work?

Quote
I will have to check that out, last time I used DBexpress on Kylix I
could not just copy the DSO to the target server without haveing the
dependencies in place first(maybe its not QT, but from what I remember
there were some). That's why I moved to the Interbase Express
components, then to IBobjects.
Dbexpress does not pull in QT. If your project was using QT, then it
probably had references to some visual db components.
There is not much to check out.
Open dbxpress.pas, see uses clause. Open db.pas, see uses clause.
Simon
 

Re:Apache DSO with dbExpress - Does it even work?

I am almost positive the version of Dbexpress that shipped with Kylix 1
had QT dependencies, Remember I said I had not used DBexpess in a long
time. So if it was resolved in Kylix3, that is great :-)
The best way it just to run ldd on the binary, just because it is not in
the main uses, does not mean it is not buried deeper down.
Later,
Tony
Quote
Simon Kissel wrote:

There is not much to check out.

Open dbxpress.pas, see uses clause. Open db.pas, see uses clause.

Simon
 

Re:Apache DSO with dbExpress - Does it even work?

tony caduto wrote:
Quote
The best way it just to run ldd on the binary
This will always show that libborqt.so is not used because the
sharedobject is not bound at load-time. It is loaded by a dlopen() call.
--
Regards,
Andreas Hausladen
(www.kylix-patch.de.vu - unofficial Kylix 3 patches)
(andy.jgknet.de/blog)
 

Re:Apache DSO with dbExpress - Does it even work?

I guess I should have been more clear on this,
When QT is used ldd will show X11 as a dependency, not QT itself.
Sorry.
Andreas Hausladen wrote:
Quote
tony caduto wrote:


>The best way it just to run ldd on the binary


This will always show that libborqt.so is not used because the
sharedobject is not bound at load-time. It is loaded by a dlopen() call.

--
Tony Caduto
AM Software Design
Home of PG Lightning Admin for Postgresql 8.x
www.amsoftwaredesign.com
 

Re:Apache DSO with dbExpress - Does it even work?

David,
Thanks for your response. I just read it. I also don't hang out here
much, except in times of panic. :-)
The app is up and running pretty well.
But still using dbExpress, with all the Connection, SQL stuff within
the main WebModule, where they definitely do NOT belong.
I hadn't heard of AstaIO before. I'll check them out.
Regards,
Phil
David Keith wrote:
Quote
Phil -
I've done this sort of thing with AstaIO and Oracle... works really
well. I would suggest based on my own (bad) experience with dbexpress
that you ***can the dbexpress effort and jump into AstaIO from AstaTech.
Then you can use FIB, IBO, IBX or any other commercial or free Firebird
component kit.

Many of the problems that I encountered while building DSO's were
actually Linux issues or Kylix deployment issues. On the Kylix CD if I
remember correctly there is a deployment document that tells you what to
deploy with your Kylix apps. Also you should check out Andreas
Hauslasen's (or something like that) patches and fixes for Kylix, and
CrossKylix which allows you to develop on Windoze and deploy on Linux.
If you are deploying a Kylix daemon do yourself a favor and set up a
basic logging mechanism and use it *EVERYWHERE*. Debugging DSO's,
Daemons etc. is definitely not for the faint of heart... you've really
got to want it.

However when you get to the end of the tunnel you can achieve some
great results. Just don't expect any help from Borland in getting there...

Sorry for the lateness of the reply.... don't hang out here much
anymore.

David Keith

Phil Henningsen wrote:

>I am trying to implement a "significant" Apache DSO using Kylix3 and
>dbExpress to access a Firebird database. I have maybe 10 years
>experience with Delphi (since version 1.0) but only a few weeks with
>Linux / Apache / Kylix.
>
>Other than the trivial CGI dbExpress example found in
>bdn.borland.com/article/images/28556/apache_development.pdf
>I can't get dbExpress to work. It seems to me that a dbExpress
>component (in either a CGI or DSO) must be executed within the context
>of one of the WebModule's Action.OnAction events! This is not
>acceptable. I cannot even call one of the WebModule's OnAction events
>from another unit without getting an Access Violation.
>
>At this moment I don't think that Kylix / dbExpress even works for
>Apache CGI's or DSO's.
>
>Any help would be appreciated. I will pay for consulting support.
>
>Regards,
>Phil Henningsen
>