Re: [PHP] php-cli and daemon

2006-05-15 Thread Richard Lynch
On Sat, May 13, 2006 5:40 pm, Michelle Konzack wrote:
> I run a webserver which is a frontend for a huge PostgreSQL database.
> Now I like to code some stand-alone Apps, which can connect to a
> daemon uploading files and geting infos from the database
>
> (NO, the have no right to connect directly to the database)
>
> Questions for now:
>
> 1)  How to code a daemon?

http://php.net/sockets

> 2)  How to use ssl-certs for the connection?
> The $USER must use an USB-Key with its one cert.

Ya got me there...

You may want to look into http://gtk.php.net for coding the GUI part
of the stand-alone client application.  And that MIGHT have some
built-in SSL stuff to make this crystal-clear and dead easy...

I'm a bit confused between the deamon, the uploading files, and the
read-only access to the database, personally...

That said, the PostgreSQL documentation probably has pretty clear
description of how to do an SSL connection if it can be done, and
workarounds if it can't:
http://postgresql.org/

You might also consider tunneling all the data, uploads and PostgreSQL
through SSH as a sort of Poor Man's VPN deal...

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php-cli and daemon

2006-05-15 Thread chris smith

On 5/14/06, Michelle Konzack <[EMAIL PROTECTED]> wrote:

Hello,

I run a webserver which is a frontend for a huge PostgreSQL database.
Now I like to code some stand-alone Apps, which can connect to a
daemon uploading files and geting infos from the database

(NO, the have no right to connect directly to the database)

Questions for now:

1)  How to code a daemon?


This would be a good place to start.

http://www.php.net/pcntl

Depending on your app you might need to look at shared memory, but the
main area to check out would be the process functions.

http://www.php.net/manual/en/ref.sem.php


2)  How to use ssl-certs for the connection?
The $USER must use an USB-Key with its one cert.


There are ssl functions you can use:

http://www.php.net/manual/en/ref.openssl.php

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php-cli and daemon

2006-05-15 Thread Michelle Konzack
Hello,

I run a webserver which is a frontend for a huge PostgreSQL database.
Now I like to code some stand-alone Apps, which can connect to a
daemon uploading files and geting infos from the database

(NO, the have no right to connect directly to the database)

Questions for now:

1)  How to code a daemon?

2)  How to use ssl-certs for the connection?
The $USER must use an USB-Key with its one cert.

Greetings
Michelle Konzack


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
# Debian GNU/Linux Consultant #
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/6/6192519367100 Strasbourg/France   IRC #Debian (irc.icq.com)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php