Re: [PHP] Persistent connections and transactions

2001-01-25 Thread Martin A. Marques

El Jue 25 Ene 2001 10:21, Frank Joerdens escribió:
> On the PostgreSQL lists there has been some discussion recently as to
> the mechanism behind, benefits and drawbacks, of persistent connections.
> In particular a scenario similar to the following was brought up:
>
> Browser A connects to Apache child N, and calls a web page that calls a
> script which issues SQL commands that involve opening and committing a
> transaction:
>
> - begin work;
> - do some selects, inserts, deletes, updates . . .
>
> Now, the question is: Is it conceivable that in the meantime, whilst
> Browser A is waiting for the output from the script, that Browser B
> talks to same Apache child, uses the same persistent connection, and
> messes up the transaction that Browser A initiated in some unpredictable
> way?

No, and thats why in the postgres list we talked about persistent connections 
not having much benefits. That is because the connection is persistent to the 
httpd child that called it and not to all.

> - do more selects, inserts, deletes, updates . . .
> - commit work;

Any way, for the SQL statements you wrote here, Browser B cound never (and 
this is because postgres won't let it) mess with the transaccion browser A is 
doing.

> My guess would be that the Apache child wouldn't allow Browser B to talk
> to it whilst Browser A is waiting for output from the script and that
> that means that everything is fine and hunky-dory . . . I'm not sure
> though, and there is nagging trace of murkiness.

Now be carefull. http connection open and close, they do not stay open, so if 
you try to execute different SQL statments with different httpd connections, 
your gonna have trouble (the sql server won't let you, because there is 
another transaction been executed).

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Persistent connections and transactions

2001-01-25 Thread Martin A. Marques

El Jue 25 Ene 2001 14:34, Frank Joerdens escribió:
> On Thu, Jan 25, 2001 at 11:18:49AM -0300, Martin A. Marques wrote:
> [ . . . ]
>
> > No, and thats why in the postgres list we talked about persistent
> > connections not having much benefits. That is because the connection is
> > persistent to the httpd child that called it and not to all.
>
> Well, yes, but as long as the child lives, it'll be connected which
> means that every subsequent request to this child involving a database
> connection won't have to suffer the connection startup cost. If you have
> a rather inexpensive query, and a lot of web apps use simple,
> straightforward selects that are very inexpensive, then the connection
> startup overhead contributes more to the performance hit than the actual
> query.

Of course. But the persistent connection are not working as the manuals say 
they should work.

> [ . . . ]
>
> > Now be carefull. http connection open and close, they do not stay open,
> > so if you try to execute different SQL statments with different httpd
> > connections, your gonna have trouble (the sql server won't let you,
> > because there is another transaction been executed).
>
> Hmm. Say the Apache child is idle (under which cirumstances exactly does
> it consider itself 'idle'?), receives a request for a page which
> executes a query (because it contains php code that does). This takes a
> while. In the meantime, while the SQL server is chugging away running
> the query, will the Apache child not accept further http requests? How
> does the Apache child know that it is waiting for the query to complete?
> This is what I don't know about the mechanism.

That has nothing to do with apache. If the SQL statments are well 
implemented, the second query wouldn't see any of the changes that the first 
query executed until the work is commited, and it shouldn't be able to modify 
the rows with which the first query is updating or deleting.
But thats Postgres that doesn't let it, not the apache server, not php.

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas
-

-- 
PHP General 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] Persistent connections and transactions

2001-01-25 Thread Martin A. Marques

El Jue 25 Ene 2001 16:49, Frank Joerdens escribió:
> On Thu, Jan 25, 2001 at 04:04:24PM -0300, Martin A. Marques wrote:
> [ . . . ]
>
> > Of course. But the persistent connection are not working as the manuals
> > say they should work.
>
> It appears this riddle has been solved: From a post by Adam Lang on
> pgsql-php on Dec 8:
>
> 
>   Well, there's a problem with PHP's [mis]documentation. First of all,
> it counts open DB connections not on per-webserver, but on
> per-process/thread basis.
>   The default PHP config file has the limits of persistent and
> non-persistent connections set to -1 (no limit)... Setting it to
> some (supposedly) reasonable value (like, 50) accomplishes nothing: you
> should multiply 50 by the number of webserver processes/threads. There
> can be lots of them... :[
>   And then there comes PHP's "logic": if I can just open the new
> connection, why bother reusing the old one? And thus Postgres backends
> start multiplying like rabbits, eventually reaching the limit... :[
>   You should set a reasonable limit on number of open persistent
> connections (like 1, maybe 2 or 3), only then PHP will actually reuse
> them. My webserver now works with such setup and there are no more
> problems with pg_pconnect().
> 

Yes, I got this mail from Adam, but I think it was on the IMP mailing list or 
the Postgres-devel mailing list. Well, that doesn't matter to much. ;-)
Any way, it speaks very bad about the logic that PHP has of what is a 
persistent connection (I think I had the same problem with informix).

> > That has nothing to do with apache. If the SQL statments are well
> > implemented, the second query wouldn't see any of the changes that the
> > first query executed until the work is commited, and it shouldn't be able
> > to modify the rows with which the first query is updating or deleting.
> > But thats Postgres that doesn't let it, not the apache server, not php.
>
> You are assuming that the Postgres backend has accurate information
> about the client's identity. The "client" for the backend is the Apache
> child, not the browser. The Postgres backend doesn't know anything about
> web browsers. So if Apache/PHP allows a 2nd browser to connect to a
> particular Apache process while it's waiting for a query to complete
> that would generate information to be sent back to the first browser,
> then you're in trouble. But I think it would be pretty silly for
> Apache/PHP to allow that.

OK, lets see if we can understand what each other is saying (maybe I'm not 
getting your point here).
Lets say browser A connects to the apache server, to a page using php code. 
Lets say the code is OK (no bugs). Apache opens a persistent connection to 
the database and starts executing the queries. Now the connection between the 
apache server and the web browser doesn't close until the queries are all 
finished and the output is send back to the browser.
Now, how about if browser B connects to the apache server just in the middle 
of the execution of the queries that browser A asked for?
Well, the connection between Browser A and the web server is still opened, so 
another httpd child process answers the request. If a persistent connection 
is needed (as Adam said) this child will open a new one, because the other 
one is still in use.
So now you have two web connections with two backend connections.

My question would be, and seeing Adams thoughts, wouldn't it be the best 
optimization configuration of php.ini to have only one persistent conection? 
Wouldn't there be one per-child? Any way, you can't have two connections to 
the same httpd child.

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] PostgreSQL + PHP + SQL warning messages

2001-01-25 Thread Martin A. Marques

El Jue 25 Ene 2001 16:36, Evelio Martinez escribió:
> Hi!
>
> Is there any way to get the equivalent sqlca.sqlcode value of informix
> in PostgreSQL from php ?
>
> I would like to use the sqlcode to print the messages in Spanish.

The problem is that informix puts in an array (sort of) all the info about 
the last query. What sort of information would you like? Last insert? You 
have an pg_getlastoid() function.
Hope it helps.

Saludos...:-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Session problems

2001-02-21 Thread Martin A. Marques

Mensaje citado por: Jack Davis <[EMAIL PROTECTED]>:

> We have designed a web based email program that we have
> recently found a problem with...If you open up two email
> accounts in two different browser windows, the first window
> opened takes on the session that the second window is in.
> It appears that you can open up as many sessions as you
> like, but all open windows take on the session properties
> of the most recently opened session...This happens in Windows 
> and Linux with either IE or Netscape...Has anyone else
> had this problem and if so how can I work around it...

That is because you're usuing cookies, and the cookie is part of the bowsers
information. Opening another netscape session isn't really a new netscape, but a
new browser using the same session. And, by default, the cookie will die when
the browser is close.

Saludos... :-)



System Administration: It's a dirty job,
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Sessions and naming a file with SID

2001-02-22 Thread Martin A. Marques

Mensaje citado por: Brandon Orther <[EMAIL PROTECTED]>:

> Hello,
> 
> Is there a way to start a session and then save a temp file with the
> name of
> the Session ID?

I thought that was what it did. :-)
Read the session manual, the papers published in phpbuilder and check the
session options in php.ini.

Saludos... :-)



System Administration: It's a dirty job,
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] phpPgAdmin ?

2001-02-22 Thread Martin A. Marques

Mensaje citado por: Oguz Demirkapi <[EMAIL PROTECTED]>:

> 
> Hi,
> 
> We have a PostgreSQL and Php 4.02 preinstalled Cobalt RaQ4r server and
> I
> want to manage PostgreSQL via pgPgAdmin. But when I try to login I got
> error such as :
> 
> 
> Fatal error: Call to undefined function: pg_connect() in
> /home/sites/home/web/manage/phpPgAdmin/lib.inc.php on line 130
> 

Do you have PHP compiled to work with Postgres? Because thats what the error
message says. It says that pg_connect is not defined, which means you don't have
a postgres php.
recompile!

Saludos... :-)




System Administration: It's a dirty job,
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Problemas con conexion Oracle

2001-02-23 Thread Martin A. Marques

Speak in english, even if some of us can understand you.

Mensaje citado por: Alex sepúlveda <[EMAIL PROTECTED]>:

> Estimados:
>   He instalado PHP en un servidor Windows NT/2000 y cuando en el primer
> archivo php creo una conexion a Oracle, se cae
> en la función OCILogon() dando el siguiente error:
> 
> Fatal error: Call to undefined function: ocilogon() in
> D:\voicenetchile\ROOT-PHP\prueba.php on line 43

Your PHP isn't compiled to support oracle. Compile it, because the binary for
windows that's in the php site is compiled to work with MySQL, not oracle.

>   La verdad es que no he podido solucionarlo, y desearía mucho que por
> favor
> me dieran una solución si la tuvieran,
> estaré muy agradecido.

Pensaste en cambiar de sistema operativo? Linux tal vez?

Saludos... :-) 



System Administration: It's a dirty job,
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Parsing a string

2001-02-23 Thread Martin A. Marques

Mensaje citado por: Todd Cary <[EMAIL PROTECTED]>:

> I have a comma delimited string that I need to parse into an array.  Is
> there a PHP function that will do that ?

Did you check the string functions? explode for example?

Saludos... ;-)


System Administration: It's a dirty job,
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] PostgreSQL vs InterBase

2001-02-27 Thread Martin A. Marques

Mensaje citado por: Ron Wills <[EMAIL PROTECTED]>:

> I know this isn't one of the databases that you;re inquiring about, but
> we've been using MySQL (www.mysql.com) and it has been working
> beautifully.
> We have an email server with a MySQL db that's about 4 Gigs now a it's
> still running strong. MySQL is free and might be worth looking into :-)

He was talking about reliability. I think MySQL can't give you much on that. A
database server that has transactions only a few months ago, and doesn't have
data integrety checks isn't very reliable in my point of view.

> Arnold Gamboa wrote:
> 
> > I hve heard a great deal about InterBase.  Please comment on which is
> > better:
> >
> > 1.  Speed
> > 2.  Data Reliability
> > 3.  Compatibility with PHP
> >
> > Thanks for your comments.
> >
> > --
> > PHP General 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]
> 
> --
> 209 Media 
> Ron Wills <[EMAIL PROTECTED]>
> Programmer
> 
> 



System Administration: It's a dirty job,
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] I can't do a connection to POSTGRES from PHP4 as NSAPI

2001-03-16 Thread Martin A. Marques

El Vie 16 Mar 2001 19:53, Norberto Rojas escribió:
> Hi,
>
> I built the latest PHP4to use it as NSAPI with postgress connection:
>
>./configure --with-nsapi=/usr/netscape/server4/
> --with-pgsql=/var/lib/pgsql --enable-libgcc --enable-track-vars
>make
>   make install
>   "stop web server" & "restart"
>
> ,but when I try to pg_connect to postgres, I get the following:
>
> PHP Fatal Error: call to undefined function
>
> : pg_connect line 8

Norberto, check the compilation (make command), because you are simple not 
compiling PHP with postgres support. Check the configure, to see if it really 
finds the postgres distro, or if it checks it, doesn't find it, and says "I 
won't give support for postgres".

> I dont understand why this is happening.
> What can I do? I searched for this error and could not find any help.
>
> Thanks in advance

-- 
System Administration: It's a dirty job, 
but someone told me I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Exit Function

2001-01-31 Thread Martin A. Marques

El Mié 31 Ene 2001 19:34, Karl J. Stubsjoen escribió:
> What is the way to exit a function?  For example:
>
> function FooBar() {
>
> if ($foo = $bar)
> Exit_this_Function;
>
> ## otherwise execute the rest of this function
> }

return is what you want.

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Tab character

2001-02-01 Thread Martin A. Marques

El Jue 01 Feb 2001 12:17, Karl J. Stubsjoen escribió:
> Is this a tab character \t

yes (depending)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Tab character

2001-02-02 Thread Martin A. Marques

El Jue 01 Feb 2001 13:49, Alexander Skwar escribió:
> So sprach Martin A. Marques am Thu, Feb 01, 2001 at 12:20:54PM -0300:
> > yes (depending)
>
> On what?

It depends on the charset you use.

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] getting STDIO

2001-02-02 Thread Martin A. Marques

I want to use PHP to build a script that would run from the comand line. Now 
me problem is how do I make PHP interpretate a chunk of text that is piped to 
it?
Lets say my script is named script1.php and I do:

$ less file1 | script1.php

just like if I send variables with info with a put in the apache module 
version.
How do I get that output?

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] PHP & mySQL on Sun Solaris OS

2001-02-06 Thread Martin A. Marques

El Mar 06 Feb 2001 09:37, Thomas Edison Jr. escribió:
> Does PHP work on Sun Solaris? if so..where can i get
> the version that needs to be downloaded & installed on
> solaris machine and the documentation to install it
> there?

Download the source and compile them. We work with PHP on Solaris 7 (apache), 
using Informix, Postgres and Mysql as databases, all compiled from sources.

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] PHP & mySQL on Sun Solaris OS

2001-02-06 Thread Martin A. Marques

El Mar 06 Feb 2001 10:06, Thomas Edison Jr. escribió:
> Thanks for the info... we'll download the source ..
> but how do we install on the Solaris machine? is there
> any doc available for that? it comes with the source
> file?

Do you have gcc (or another compiler) installed?
The sources comes with lots of docs, I can recall, but you should have a 
README and an INSTALL.

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] PHP/Majordomo web interface

2001-02-06 Thread Martin A. Marques

El Mar 06 Feb 2001 16:38, Jaguwar escribió:
> I'm wondering if such a thing already exists as a "package".  I'd like to
> be able not only to manage a mailing list, but also to view message
> archives, have users subscribe and so on.  A bit like eGroups.

I have been looking for something that those this the past few weeks, and 
found non.
So at this moment I started a proyect with the local LUG, which will store 
mails from any mailling list into a database and have a search engine.
Pretty cool, no? :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] PHP/Majordomo web interface

2001-02-06 Thread Martin A. Marques

El Mar 06 Feb 2001 18:39, Jaguwar escribió:
> Oh bother!  What you are doing sounds like it's on the way to what I'm
> looking for, at the very least!  I guess it will take me longer than I'd
> thought, though.  On the other hand, it'll be one heck of a learning
> ground!

Well, when I sent the mail to the mailling list we have here in our LUG, I 
got a responce from Roberto Alsina (KDE developer) that said he was working 
on something like that, with C++ and it was 80% compete.
So lets see what comes out of all this.

> Gracìas, Martin!

De nada. ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] base dir

2001-02-07 Thread Martin A. Marques

El Mié 07 Feb 2001 19:20, Brandon Orther escribió:
> Hello,
>
> I am sure this is a dumb/easy question but I can't seem to find it looking
> at the php manual... can someone tell me the function that gets the path of
> where the script is?

Check the variable $HTTP_SERVER_VARS["SCRIPT_FILENAME"] and use basename 
function to get the path.

Saludos... :-)


-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Compiling php??

2001-02-08 Thread Martin A. Marques

El Jue 08 Feb 2001 00:48, GAYTAN BAHAMONDEZ DANIEL EDUARDO escribió:
> Hi there,
>   Is there a way to compile php files so that no one can read them
> but php will undestand them?? something like .exe in win

I think zend will (or is) do that.

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] base dir

2001-02-08 Thread Martin A. Marques

El Jue 08 Feb 2001 01:44, Steve Werby escribió:
> "Brandon Orther" <[EMAIL PROTECTED]> wrote:
> > I am sure this is a dumb/easy question but I can't seem to find it
> > looking at the php manual... can someone tell me the function that gets
> > the path
>
> of
>
> > where the script is?
>
> Create a webpage containing the following:
>
> 
>
> It will show you the way and give you a lot more info. to save you from
> asking a lot of questions in the future.  


With you on this! ;-)

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] How to make PHP work in all sub-directories?

2001-02-08 Thread Martin A. Marques

El Jue 08 Feb 2001 05:34, SED escribió:
> Hi,
>
> I´m hosting a PHP-doc in sub-directorie (http://myserver/subdirectory/) on
> my IIS server Win2000 but it doesn't run, though it runs in the root
> (http://myserver/).
>
> Is there something in the PHP.ini to config (and how) or is it something
> else?

NO! php.ini has no information regarding where you can execute it. You have 
to read the documentation of IIS (or switch to apache ;-) ).

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] copy PEAR

2001-02-09 Thread Martin A. Marques

El Vie 09 Feb 2001 10:37, Conover, Ryan escribió:
> I was wondering if PEAR is built into the Win distribuition of php
> 4.0.4pl1. Or can I download it somewhere, and where?

PEAR is just a bunch of very good php code which you can include in your 
code. It comes with the source.

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] mysql not reporting errors

2001-02-09 Thread Martin A. Marques

El Vie 09 Feb 2001 11:38, Christian Dechery escribió:
> WHy PHP is not showing SQL syntax (or any) errors?
>
> I'm using Win98Me with Apache 1.3.12 and PHP 4.x.
>
> it works... if I run a correct query it runs normally, but if I go like:
>
> $query="selct nonexistingfield from nonexistingtable with all crazy
> syntax"; mysql_query($query);
>
> it doesn't tell me there's an error... in fact it doesn't show anything...
> why is that?

Check the apache error log.

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] HTTP Authentication not getting unset

2001-02-14 Thread Martin A. Marques

El Mié 14 Feb 2001 12:37, Toby Miller escribió:
> Hey all,

Hi,
This is far to long, so I'll strip a part of it.

> Now if I try to read the $PHP_AUTH_USER or $PHP_AUTH_PW variables anyplace
> on the site they don't exist, until I go back to one of the protected
> pages. Then they miraculously re-appear and are readily available once
> again without requiring the user to log back in.

Yes, thats because the browser saves those variables (very bad idea, but what 
can I say... I didn't write the code of netscape or IE).
At this moment I just finished coding a session login, logout hack. So I will 
suggest you to read about sessions, read some articles in phpbuilder, 
phpwizard and the documentation.

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] HTTP Authentication not getting unset

2001-02-14 Thread Martin A. Marques

El Mié 14 Feb 2001 13:44, Chris Lee escribió:
> Ive found the same thing and currently do not have a workaround, it seems
> that browsers cache this. one method Ive thought of and never tested is to
> set a session variable, cross reference that SessionID, PHP_AUTH_PW,
> PHP_AUTH_USER are all valid, if not then your not loged in correctly. to
> log out just unset SessionID. any future pages will not load. even if the
> PW/USER are valid the Session wouldnt.

Don't unset the session ID, just destroy the session with session_destroy().

> If the browser has cookies disabled, you have compiled php with
> --trans-sid, and the user uses the back button the user would still be able
> to view cached pages. you might want to put some fancy no-cache headers in
> there somewhere and hope the browser supports them.

This feature is pretty cool. If it can't but a cookie in the browser, it 
expands the URL with the SID, which is all you need, because the variables 
you register are on the server side (file, database).

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] PHP 4 sessions and PHPLIB

2001-02-14 Thread Martin A. Marques

Hi,
I've been using horde, IMP for a while with PHP4 pretty well, no problem at 
all (uses PHPLIB for session and database storage).
But now I need to built some code and I'm using PHP4's native session 
functions. The problem was that when coding I got an error related with 
PHPLIB's session object. So, I took the prepend file out of the autoprepend 
line in php.ini, and my code started working.
The problem is that IMP needs the prepended file, so what can I do?

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] HTTP Authentication not getting unset

2001-02-14 Thread Martin A. Marques

El Mié 14 Feb 2001 13:04, Toby Miller escribió:
> Sorry, I meant common header, not footer.
>
> Inside my common "header" on my site ..
> (which also includes the same "header") ...

Don't worry, I understood it. ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Compiling PHP for Apache.

2001-02-15 Thread Martin A. Marques

El Jue 15 Feb 2001 11:47, escribiste:
> Hi!
>
> Right now, I'm trying to figure out which step in order is
> appropriate.  I'm going to put it down now, if I got it wrong then help me
> out with the correct order.  Whether it is from scratch or from existing
> softwares.
>
>
> 1) OpenSSL
> 2) libmcrypt  (Add-on to PHP)
> 3) PHP 4.0
> 4) mod_ssl
> 5) apache

OS is an importante issue. More info please.

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Session Questions...

2001-02-15 Thread Martin A. Marques

El Jue 15 Feb 2001 12:32, escribiste:
> I was reading through the documentation on sessions at
> http://www.php.net/manual/en/html/ref.session.html
>
> I have a few questions..
>
> 1) How do I explicitly close a session, so that any subsequent attempts to
> use pages would require a new session started? Will session_destroy() do
> this?

Yes.

> 2) I don't want to rely on cookies being set for the client's browser. 
> What are the security ramifications for passing the SID through the URL?

As secure as your server is.
But if you compiled php --with-trans-id, then you will have no problems at 
all.

> Most important to me is to understand the overall concept.  Can I start and
> stop sessions whever I want? Can I start and use one session, then destroy
> it, then start a whole new session on the client?

Yes, but remember that the data es stored on the server side, not the client 
side.

> I'm just starting to hate the looks of all these encoded urls being thrown
> around as i'm developing the site.  It is getting more and more complex,
> and some of the stuff i'm passing in the urls is ugly, and some of it is
> not good to be showing.

Try hidding variables in inputs (if you use forms) or store the values in a 
session.

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] unstable execution of mysql_db_query($db, $myQuery)

2001-02-15 Thread Martin A. Marques

El Jue 15 Feb 2001 13:32, escribiste:
> I am using MySQL 3.22.32 and PHP 4.01PL2, but it seems that
> mysql_db_query($db, $myQuery) is not quite stable, actually, in my code, it
> is like
>
> mysql_db_query($db, $myQuery) or die "Something wrong during query");
>
> 1 out of 15 (the same query), it will "die".

Looks like you have a problem with the MySQL configuration.

> Does anyone have any suggestion?

Change to PostgreSQL maybe?

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] case sensitivity checking?

2001-02-15 Thread Martin A. Marques

El Jue 15 Feb 2001 16:41, James, Yz escribió:
>
> Oh, another thing.  Anyone know of any tools like PHP MyAdmin for
> PostGresSQL ?

phpPgAdmin?

http://www.greatbridge.org/project/phppgadmin/projdisplay.php

Saludos... ;-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] php site, parse error

2001-02-15 Thread Martin A. Marques

El Jue 15 Feb 2001 17:41, escribiste:
> Looks like the PHP site is down, parse error on site.inc... just an FYI :)

Ohhh, I'd love to get me hands on some of the code these great guys do. :-)

Saludos... :-)

-- 
System Administration: It's a dirty job, 
but someone told I had to do it.
-
Martín Marqués  email:  [EMAIL PROTECTED]
Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-

-- 
PHP General 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] Help!! IP functions!!!

2001-02-19 Thread Martin A. Marques

Mensaje citado por: Bruno Freire <[EMAIL PROTECTED]>:

> Hi!! 
> 
> My name is Bruno, From Brazil!!!
> 
> I need to know how can i discovery the ip address when somebody access
> my
> home page
> 
> What function can I use

Bruno, check the phpinfo() function, which will give you lots of information
about variables that are passed from the browser to the server.

I think that HTTP_SERVER_VARS["REMOTE_ADDR"] is what you're looking for.

Saludos... :-)

Martín Marqués

-- 
PHP General 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] Libraries

2001-02-19 Thread Martin A. Marques

Mensaje citado por: Kath <[EMAIL PROTECTED]>:

> Why do a lot of people use libraries like PHPLib?
> 
> I find it a lot better to write my own basic functions.
> 
> Is it just the attitude "Someone else coded it already, why should I?"

Like some said to me "Don't re-invent the wheel"

Saludos... :-)


-- 
PHP General 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] sessions and data missing browser message

2001-02-19 Thread Martin A. Marques

Mensaje citado por: Evelio Martinez <[EMAIL PROTECTED]>:

> 
> Hi!
> 
> is there any relation between use of sessions (php 4.0.4) and  the
> following browser message ?
> 
> Data Missing
> 
> This document resulted from a POST operation and has expired from the
> cache. If you wish you can repost the form
> data to recreate the document by pressing the reload button.

Whta does the error file say (error_log in apache)?

> I am having this message since I include session handling in the code.

Change the expire time?

> Is there any way to avoid this?

Martin Marques

-- 
PHP General 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] function with 2 arguments

2001-02-19 Thread Martin A. Marques

Hi, I'm about to make a function with two arguments, and I want the second one
to be optional. Can I just write the function and use it with one or two
arguments without problems (I check if the second argument was passed inside the
function).
Is this OK?

Saludos... :-)

Martin Marques

-- 
PHP General 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]