Re: [PHP-DB] Configure with Postgres/MySQL of different machine

2001-11-27 Thread Grant Johnson

The different machine has nothing to do with the config, and everything 
to do with the connect.  It is in the connect string that you specify 
which machine for PHP to connect to Postgres.

Joe Nelson wrote:

>I'm trying to configure php so that it will have support for both MySQL
>and Postgres.  Normally that would not be a problem, however, both MySQL
>and Postgres will be on a different machine.  How can I configure PHP to
>use the servers on the other machine?  Everything I've seen shows how to
>do it when it's all on one machine.
>
>This is what I ran:
>./configure \
>--enable-track-vars \
>--with-gd \
>--with-mysql \
>--with-pgsql \
>--with-apxs=/usr/sbin/apxs
>--with-config-file-path=/etc
>
>Any help or pointers would be appreciated.  Thanks.
>
>Joe
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Why use MySQL with PHP

2001-11-15 Thread Grant Johnson

I mostly agree, although I prefer PostgreSQL for the transactions, 
better row locking, and server side cursors.  It also does better with 
lotsa users (if the data isn't just used for the web, this is 
important).  I have used many languages for this stuff, and the one with 
the best balance of functionality, extensibility, and ease of use is PHP 
(I have used CF, ASP, Miva/HTMLScript, PERL, C, COBOL, Shell also)

BTW, COBOL on the web is weird.  ASP is the worst of them all.

Sheridan Saint-Michel wrote:

>I use PHP/MySQL for a few reasons.
>


>
>On the other hand, having to write in languages where you have strict types
>(You want to treat a variable as an int and then as a string?!?!?!?) and
>very structured design is just as distasteful to me.  PHP strikes a very
>good balance between the two even when working with MySQL (I won't paste any
>of the kludge needed to interface with CGI and DB in other languages... but
>if you have some free time look some of these programs up).
>
>Sheridan Saint-Michel
>Website Administrator
>FoxJet, an ITW Company
>www.foxjet.com
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] PHP/MySQL to M$ Access

2001-11-15 Thread Grant Johnson

Access has to be running on a Winders machine.  At least the drivers. 
 Another option might be to migrate the data, and use ODBC and linked 
tables to let Access still work temporarily, but really have the data 
already transitioned.

Otherwise it is a weird linked ODBC bouncing off a Windows machine on 
the way to the data.

Chris Andrew wrote:

>Hi,
>
>Until we completely migrate an application from M$ Access to PHP/MySQL, I
>need to figure out a way to temporarily query an Access DB from PHP/MySQL.
>
>I am aware of this article on PHP Builder:
>http://www.phpbuilder.com/columns/timuckun20001207.php3?page=1
>which discusses using ODBC Socket Servers, but the article assumes the M$
>Access db is on a winblows machine. In my case, the Access DB is on a Linux
>machine (served thru' Samba - isn't Linux great...  :-)
>
>Anyways - could someone offer me some advice - all I need is some some
>simple SELECT queries on the Access tables.
>
>Many Thanks,
>Chris
>
>
>Email: [EMAIL PROTECTED]
>Web: www.oxspring.com
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Re: file upload, again

2001-11-14 Thread Grant Johnson

Look in you apache.conf file and find out what user the web server runs 
as, then give that user the right to write to that directory, probably 
through a group used for nothing else is most secure.

Brian Mauter wrote:

>To get around this, I made a small shell script which runs as root.  The php
>page calls the script via the system call.  All the shell script does is
>move a specific file from tmp to a specific location.
>
>I'm probably asking for someone to exploit it, but I don't know exactly what
>they can do.
>
>-Brian
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] file upload, again

2001-11-13 Thread Grant Johnson

The web server user needs to have access to that directory.  On NT, 
there are 2 of these users.  On *nix, there is one.  Giving these users 
access to write to that directory is not a huge risk.

koelwebdesign wrote:

>hi there,
>I've searched the lists and forums for a couple of days now but nope...
>when I upload a file all is well, it get stored in the tmp directory, the
>filename and path get stored in the mysql database, however, it won't copy
>to the desired directory unless I give everyone write permissions to that
>directory. offcourse I don't like this.
>How do I tell php to use my username and password when copying the file from
>the tmp dir to the desired dir?
>Do I really have to make an ftp connection first? or is there a more simple
>way?
>How do you upload all those pictures to the webserver?
>
>thanks
>
>Leo Kuiper
>www.koelwebdesign.nl
>
>
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Close Postgresql Database Connection Problem !

2001-08-15 Thread Grant Johnson

Perrin wrote:
> ==> $connection  = pg_connect("$constr user='$USER' password='$PW'");
> 
> Actually It should be closed the connection after access finished, like that 
>pg_close();
> 
> ==> pg_close($connection);
> 
> But if the user force to close the web page that means have not close the 
>connection. I want to ask the connection will be closed by Apache Server automatic ? 
>or when user closed the web page the connection will be closed at the same time ? If 
>the connection have not been closed automatic. So the Apache Server will keep the 
>connect port forever ?
> Actually the connection port handle by Apache Server or PHP ?
> 
If you use pg_connect, it will close when the script is finished, like
when the page is to the browser.  If you use pg_pconnect, it will stay
open for other pages to use.  I am not sure how pg_close affects a
pg_pconnect.  As most of the overhead with postgres is in opening the
connection, I use pg_pconnect, and never close it.  This improves
performance, but if I want to shutdown, I have to shutdown apache before
I shut down postgres just in case there was some recent activity, and it
hasn't timed out yet.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] NON sql database

2001-08-04 Thread Grant Johnson

Eric Marenyi wrote:
> 
> I am trying to develop a dynamic website, but I dont have the capability to
> use SQL, or Access databases, can I use PHP to interface with a different
> type of database?, maybe a text delimited, or something, please help, thanks
> 
> --
> Eric Marenyi
> CEO Virtual British Airways
> http://www.virtualbritishairways.com
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

If you are on a Windows machine, you can connect to anything that will
work with ODBC.  If you are on a Unix or Linux machine, I have 3 or 4
good ones (1 REALLY like) that are full multi-user servers all for $0.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Postgres Library problems

2001-07-21 Thread Grant Johnson

Sorry I am not replying to the thread.  I deleted the message, not
thinking.

If you install PostgreSQL from source, and take the defaults, it puts
its files in /usr/local/pgsql/...   Each of theses subdirectories
matches one in /usr/local/...   What I do is create symlinks win
/usr/local so I don't have to add them to any paths, like:

cd /usr/local/lib
cp -rs ../pgsql/lib/* .

And so on for the other directories (bin, include, etc.)  It works great
that way.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]