Recent

Author Topic: Brook 1.0 - SQLdb Driver [RE-OPENED]  (Read 11571 times)

jamhitz

  • Jr. Member
  • **
  • Posts: 83
Re: Brook 1.0 - SQLdb Driver [RE-OPENED]
« Reply #15 on: February 07, 2013, 04:03:15 pm »
Thank you. I can see some progress. When I compile the program and run it off the terminal, my browser is able to get the JSON object fetched from the database (I tested the DB using Database Desktop).

However, I cannot run the app from my IDE, since it is attempting to bind to Port 80, and my Lazarus does not run as root. How do I change the port on which the app binds so that I can debug the code by stepping using a regular user account?

JamHitz

Silvio Clécio

  • Guest
Re: Brook 1.0 - SQLdb Driver [RE-OPENED]
« Reply #16 on: February 07, 2013, 05:52:49 pm »
Hm... without error in the embedded server, we will not need to debug with this technique. :)

Are you using apache? Port 80?

Execute the commands below:

Code: [Select]
# zypper install postgresql-devel
# zypper install sqlite3-devel

It will install client libs of your database servers.
« Last Edit: February 07, 2013, 07:00:12 pm by silvioprog »

jamhitz

  • Jr. Member
  • **
  • Posts: 83
Re: Brook 1.0 - SQLdb Driver [RE-OPENED]
« Reply #17 on: February 08, 2013, 10:34:56 am »
Apache is installed, the *-devel packages are installed; and of course when testing the project, Apache is off, and the Firewall is off. But, because I am running this as a regular user, I cannot access port 80 (ports < 1024) when running from the Lazarus IDE. However, if I run the compiled program as root, I can then access my application on port 80.

What I need to do is to change the port to something like 8080 so that I can be able to debug the program.

I know I can set re-routing in the iptables but I was hoping to not have to do this.

Thank you.

Silvio Clécio

  • Guest
Re: Brook 1.0 - SQLdb Driver [RE-OPENED]
« Reply #18 on: February 13, 2013, 04:02:37 pm »
Hello,

I think that I found your problem.

See this picture:

http://imagebin.org/246565

So, use BrookSettings.Configuration instead BrookSettings.Charset. :)

jamhitz

  • Jr. Member
  • **
  • Posts: 83
Re: Brook 1.0 - SQLdb Driver [RE-OPENED]
« Reply #19 on: February 15, 2013, 10:16:13 pm »
Hello Silvio

You are right. I think I trusted Code Assist a little too much to counter-check.  It works ok now. I'll finally get the tutorial going. Thank you.

Silvio Clécio

  • Guest
Re: Brook 1.0 - SQLdb Driver [RE-OPENED]
« Reply #20 on: February 18, 2013, 02:14:03 am »
Nice! :)

 

TinyPortal © 2005-2018