Re: [PHP] How to get oid after table insert? [postgresql]

2001-03-07 Thread Joe Conway
I am working on a site using PHP (obviously) and PostgreSQL. I am currently using the oid as a key on a table. I would like to return the user to the same record after INSERTing it, but I cannot figure out how to get the oid of the record after doing an INSERT. Ideally, I would like

Re: [PHP] key generation with mcrypt

2001-03-23 Thread Joe Conway
Does anyone know a good way to generate /good/ keys for algorithms used with mcrypt? I know openssl has key generation scripts, and it seems a little inane that mcrypt doesn't provide key generation functions. After all, encryption algorithms are not secure without sufficiently random and

Re: [PHP] Decryption

2002-01-13 Thread Joe Conway
John Cuthbert wrote: Is there a method for decrypting encrypted things by md5? No. MD5 is a one-way hash, *not* a form of encryption. A hash is specifically designed so that it is impractical to find the input string, given the output string. If you need to encrypt/decrypt, look at the

Re: [PHP] Re: pgSQL Functions with results set to php?

2002-07-14 Thread Joe Conway
Richard Lynch wrote: List, I'm creating a PHP/pgSQL web site...I need to execute queries with a cursor and get their result set into my PHP script. How can I make a pgSQL procedure with logic that also returns a result set? I've searched and searched but cannot find the answer. Does anyone

Re: [PHP] two way encryption

2002-07-14 Thread Joe Conway
Justin French wrote: I'm getting the following error using 4.1.1: Fatal error: Call to undefined function: mcrypt_create_iv() in /usr/local/apache/htdocs/tests/enc.php on line 3 Which is confusing, given that the manual says mcrypt_create_iv() is available in PHP 4. Looks like your ISP

Re: [PHP] two way encryption

2002-07-14 Thread Joe Conway
Justin French wrote: Well, that was on my local test server, which I didn't compile with mcrypt... so that solves that, but it appears my ISP didn't compile with it either... so there's very little point in getting my local server working with it. What alternatives do I have? I don't

Re: [PHP] defining vars within functions as global

2002-09-05 Thread Joe Conway
Justin French wrote: ? function foo() { $foo = aaa; $bar = bbb; } foo(); echo $foo; echo $bar; ? How to I specify that $foo and $bar (defined in the func) are to be set globally (ie, outside the function)? Why not use an include instead of a function? Joe

Re: [PHP] Use PHP to connect to Oracle 8i database

2001-08-27 Thread Joe Conway
I want to use php to connect to an Oracle 8i database. I have 2 questions: 1) does the webserver have to be installed on the database server? No -- you just have to configure your tnsnames.ora so that the web server can connect. Try sqlplus first. If you can connect with sqlplus, you

Re: [PHP] php/postgres display information...

2001-05-08 Thread Joe Conway
hey guys, alright, I am new to using php to interface with a database, right now I am trying to display just the primary keys for a table in my database, can someone point me in the right direction on how to use php to display this information? Create a function to supply the info -- see:

Re: [PHP] need some ideas here...

2001-05-14 Thread Joe Conway
My free-web-hosting (www.f2s.com) does not allow PHP to send emails... I've tried everything... the mail() function, my alternate function which calls popen(/usr/lib/sendmail -t) and even a script.cgi with '#!/usr/bin/php' and all that stuff... the mail simply won't go an mail() always

Re: [PHP] PHP based statistics/Graphs

2001-07-21 Thread Joe Conway
On Tue, Jul 17, 2001 at 10:48:24PM -0700, Rasmus Lerdorf wrote: I like Vagrant. See http://vagrant.sourceforge.net I prefer R :) http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html It is IMHO the best language for statistic. -Egon Do you know if anyone is working on a PHP extension for

Re: [PHP] PHP/Oracle mod

2001-02-12 Thread Joe Conway
I'm really struggling configuring the php mod with oracle 8i support on Solaris 8. ./configure --enable-track-vars --with-o8ci=/export/home/oracle --with-oracle --enable-sigchild --with-apxs The ORACLE_HOME is set to /export/home/oracle. I am getting an error: checking Oracle

Re: [PHP] help with classes

2001-02-12 Thread Joe Conway
Was just wondering how to do the following: ?php class Foo { var $bar = $foo; // causes parse error var $bar = "$foo"; // causes parse error var $bar = '$foo'; // works but $foo is not evaluated } ? So how does one correctly assign a variable to a variable inside a class withot doing

Re: [PHP] help with classes

2001-02-12 Thread Joe Conway
SC SC That's how you have to do it. SC SC SC class MyClass { SC var $bar; SC SC // This is the class's constructor SC sub MyClass () { SC $this-bar = $foo; SC } SC } I didn't think php had sub routines like perl? shouldn't that be: function MyClass(){ $this-bar = $foo; } I

Re: [PHP] Mathematical prob

2001-02-12 Thread Joe Conway
Okay, im a little stumped. I have been asked to use a formula which calculates Monthly Repayments on a mortgage loan. The formula I have been given is M = P * ( J / (1 - (1 + J) ** -N)) My problem is, the last part. It explains it in english as "then take that to the -N (minus N) power"

Re: [PHP] generate e.g. circles on the fly with coordinates for postioning

2001-02-24 Thread Joe Conway
Subject: [PHP] generate e.g. circles on the fly with coordinates for postioning Can php + what modules do this and has anybody succeeded to do something like the followingbefore? I want to generate simple images on the fly, e.g. a 50px circle on a transparent background of 200x200 px using

Re: [PHP] Apache user

2001-04-05 Thread Joe Conway
Can anyone tell me how to get the user apache is running as from php? If you're on Linux/Unix, try: echo `whoami`; Hope this helps, Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] Apache user

2001-04-05 Thread Joe Conway
y, April 05, 2001 11:32 AM Subject: RE: [PHP] Apache user Put the call to "whoami" in a call to exec() from inside a PHP script. ? echo exec("whoami"); ? Kirk -Original Message- From: Joe Conway [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 05, 2001 12

Re: [PHP] Recursive Childs

2001-04-22 Thread Joe Conway
Subject: [PHP] Recursive Childs snip like hotscripts.com too, so i thought if someone could tell me how to use get all the children : ID | NAME | PARENT 1X 0 2Y 1 3Z 2 4A 2 5F 1 6G 5 if i want to get all children of 1, i want to

Re: [PHP] Recursive Childs

2001-04-22 Thread Joe Conway
Subject: Re: [PHP] Recursive Childs thanks for that, could you just explain how it should start, should i just call the function, how does the level get determined ??? After the function ends, starting at * $conn = pg_connect("dbname=mydb user=postgres");

Re: [PHP] documentation on pg_escape_string()

2003-03-17 Thread Joe Conway
Dennis Gearon wrote: Anyone know where to find documentation on this? Who knows what it escapes? From PostgreSQL source (~/pgsql/src/interfaces/libpq/fe-exec.c): 8 /* --- * Escaping arbitrary strings to get valid

Re: [PHP] Padding with mcrypt_generic

2002-01-14 Thread Joe Conway (wwc)
Ben Sinclair wrote: I'm trying to use mcrypt_generic and it works fine except it pads the data with ^@'s when, according to the manual page, the length of the data is not n * blocksize. I've been trying to remove the padding from my decrypted data using something like $string =

Re: [PHP] Padding with mcrypt_generic

2002-01-15 Thread Joe Conway (wwc)
Ben Sinclair wrote: That would work for me, but I have to deal with many files that I have already encrypted and no longer know the correct sizes of. My search and replace for the padding characters doesn't work because the files sometimes contain those padding characters. -- Ben