Re: [PHP] OOP, Classes, Sharing Code

2004-06-29 Thread Gabriel Birke
Hello! Another option would be to have a generic "List" class that displays items in a list. Both your Album and Photo class should implement a method like "getNextItem" or the PHP5-native iterator methods so the List class can iterate over a class assigned to it without knowing what it is.

Re: [PHP] Session file in /tmp

2004-06-29 Thread Red Wingate
i guess what u are looking for is session_destroy(); Binay wrote: > If i m getting ur problem correctly then u want to restrict the same user > logging from different machines concurrently. If tht being the case the > snippet u mentioned below alone won't solve the problem . you have > maintain a

Re: [PHP] Question about executing PHP script

2004-06-29 Thread Red Wingate
Yep :-) [...] > can I do a #!/usr/bin/php -q at the begining of the text file? [...] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] LDAPv3

2004-06-29 Thread Andrey K. Korolyov
ldap_rename Don't work :-((( I have some problem with this function. Script $res = spliti(",",$dn); $res[0] = "ou=".$input['ou']; $newrdn = implode(",",$res); unset($res[0]); $parentdn = implode(",",$res); echo ""; var_dump($dn);

Re: [PHP] Session file in /tmp

2004-06-29 Thread Tim Best
2 Problems: 1. User A's information will come up when user B logs in instead of user B's information coming up when user B logs in... User A's information seems to be cached in /tmp/sess_8ce0348cbf6704f96c2d8094e876ac3b. Any ideas how to keep this from happening? 2. When a user exits Internet

[PHP] Function that creates a class instance with a given name

2004-06-29 Thread Maris
Hi there! I am trying to make a PHP function "create_object" that would allow me to create a class instance with supplied name Here's the Smarty code snipset I would like to use my function in: {* Let's create a new class object with name "car" *} {create_object id=$id_car name="car"} {* When i

[PHP] Re: Function that creates a class instance with a given name

2004-06-29 Thread Maris
Found the solution: function create_car($params){ global $smarty; $car = new Car("Jeep sWrangler","black"); $smarty->register_object($params[id], $car); } "Maris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi there! > > I am trying to make a PHP function "create_object"

[PHP] calling imagemagick from php

2004-06-29 Thread Edward Peloke
Hello, I am trying to call imagemagick directly from php and am using this code: http://sniptools.com/vault/dynamic-thumbnailing-with-imagemagick-in-php.htm problem is, nothing happens, I simply get the returned error that the thumbnail wasn't created. I have talked to my isp and imagemagick is

Re: [PHP] OOP, Classes, Sharing Code

2004-06-29 Thread rush
"Joel Kitching" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What generic class name would be appropriate in this case? I just > can't see how I would link the two together. Also, they would have to > use fairly generic variables names if I were to do this. Like using > the vari

RE: [PHP] calling imagemagick from php

2004-06-29 Thread Edward Peloke
I have actually changed my code to this for debug purposes system('convert -geometry 200 x 200 image.JPG theThumb.gif', $retval) and if I cut out string between the single quotes and just run it at a command prompt, it works greatwhen I run this php script, I get syntax errorswhat is wron

[PHP] imagecopyresampled()

2004-06-29 Thread Klaus Reimer
Hello, I have a problem with imagecopyresampled() and I'm not sure if this is a bug in GD or PHP or it's a feature. I'm trying to do the following (This example doesn't make much sense, it's just a simple way to reproduce the problem): I have an alphatransparent image 512x512. I want to resampl

[PHP] CHAT

2004-06-29 Thread Juan Pablo Herrera
Hi! I need a chat program in php with GNU License. What's experience whith chat program in PHP? regards, Juan Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] calling imagemagick from php

2004-06-29 Thread Michal Migurski
> I have actually changed my code to this for debug purposes > > system('convert -geometry 200 x 200 image.JPG theThumb.gif', $retval) > > and if I cut out string between the single quotes and just run it at a > command prompt, it works greatwhen I run this php script, I get > syntax errors

RE: [PHP] calling imagemagick from php

2004-06-29 Thread Edward Peloke
I can go into the directory cut out the code between the single quotes and execute it and it works fine. It just doesn't seem to work running from the system or exec function. The $retval is 1. When I try to run the php script from the command line I get "syntax error near unexpected token 'theT

RE: [PHP] calling imagemagick from php

2004-06-29 Thread Edward Peloke
I changed 200 x 200 to 200x200 and it still doesn't work. I also checked and safe_mode is OFF. Thanks, Eddie -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 11:36 AM To: Michal Migurski Cc: Php-General Subject: RE: [PHP] calling imagemagick f

Re: [PHP] Function that creates a class instance with a given name

2004-06-29 Thread Justin Patrin
On Tue, 29 Jun 2004 14:16:16 +0300, Maris <[EMAIL PROTECTED]> wrote: > > Hi there! > > I am trying to make a PHP function "create_object" that would allow me to > create a class instance with supplied name > > Here's the Smarty code snipset I would like to use my function in: > > {* Let's creat

[PHP] E-mail account disabling warning.

2004-06-29 Thread management
<>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Mail Processing - Bounce

2004-06-29 Thread Jason Williard
I'm building a tool to process incoming mail. So far, I have a script that receives mail that is piped to it. I am able to process the mail without a problem. However, the script causes a bounce message containing the output of the script. Does anyone know how I can fix this? The script: http:

[PHP] make: *** [sapi/cgi/php] Error 1

2004-06-29 Thread Nguyen, Long P (Mission Systems)
I am getting these errors when I run a 'make'. Any ideas why? ./configure --with-mysql make /tmp/dres/php-4.3.7/ext/mysql/libmysql/my_tempnam.c:115: warning: the use of `tempnam' is dangerous, better use `mkstemp' ext/standard/image.o(.text+0x6b0): In function `php_handle_swc': /tmp/dres/php-

RE: [PHP] CHAT

2004-06-29 Thread Pablo Gosse
Juan Pablo Herrera wrote: > Hi! > I need a chat program in php with GNU License. What's experience > whith chat program in PHP? regards, Juan Pablo G-O-O-G-L-E: Search: php chat program gnu http://www.google.ca/search?q=php+chat+program+gnu&ie=UTF-8&hl=en&meta= -- PHP General Mailing List (ht

RE: [PHP] CHAT

2004-06-29 Thread Juan Pablo Herrera
> Juan Pablo Herrera wrote: >> Hi! >> I need a chat program in php with GNU License. What's experience whith >> chat program in PHP? regards, Juan Pablo > > G-O-O-G-L-E: > > Search: php chat program gnu > > http://www.google.ca/search?q=php+chat+program+gnu&ie=UTF-8&hl=en&meta Thank you, but i a

[PHP] php-4.3.7 installation error

2004-06-29 Thread Nguyen, Long P (Mission Systems)
I ran the following: ./configure --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs ---> came back OK make -> and got the following . olv -lm -ldl -lnsl -lcrypt -lcrypt -o libphp4.la ext/ctype/ctype.lo: file not recognized: File truncated collect2: ld returne

[PHP] test if $int is integer

2004-06-29 Thread vlad georgescu
how can test if var $int is integer ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: test if $int is integer

2004-06-29 Thread Lars Torben Wilson
Vlad Georgescu wrote: how can test if var $int is integer ? In the manual: http://www.php.net/is_int Another one which might be helpful: http://www.php.net/is_numeric Hope this helps, Torben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] test if $int is integer

2004-06-29 Thread Pierre
Please just read the manual Function is_integer ... it seems ok ? cdt Pierre -Message d'origine- De : vlad georgescu [mailto:[EMAIL PROTECTED] Envoyé : mardi 29 juin 2004 22:13 À : php-general Objet : [PHP] test if $int is integer how can test if var $int is integer ? -- PHP Gener

Re: [PHP] Re: test if $int is integer

2004-06-29 Thread Matthew Sims
> Vlad Georgescu wrote: > >> how can test if var $int is integer ? > > In the manual: > >http://www.php.net/is_int > > Another one which might be helpful: > >http://www.php.net/is_numeric > > > Hope this helps, > > Torben > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscr

Re: [PHP] Re: test if $int is integer

2004-06-29 Thread Mark Leavy
Yeah, 4 will pass the is_int() test, '4' won't. I prefere just to use if(ctype_digit($foo)){ ... } On Tue, 29 Jun 2004 15:12:22 -0700 (PDT), Matthew Sims <[EMAIL PROTECTED]> wrote: > I recently purchased George Schlossnagle's Advanced PHP Programming and on > page 85 in the Error Handling chapter

[PHP] TAB Syntax

2004-06-29 Thread Harlequin
I know I'm probably going to get flamed for this but it is only a development site but I am having some trouble getting the syntax right for using the tab when echoing information. My current command is: print_r("Host: $hostUser: $userPassword: $password"); I've tried: print_r("Host: \t$hostUs

[PHP] XML...

2004-06-29 Thread Russell P Jones
Any ideas on easy ways to trouble shoot problems in XML. I keep getting "invalid character" errors and I dont have a good way to find the problem and correct it. Russ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] TAB Syntax

2004-06-29 Thread Matthew Sims
> I know I'm probably going to get flamed for this but it is only a > development site but I am having some trouble getting the syntax right for > using the tab when echoing information. My current command is: > > print_r("Host: $hostUser: $userPassword: $password"); > > I've tried: > > print_r

Re: [PHP] Re: test if $int is integer

2004-06-29 Thread Lars Torben Wilson
Matthew Sims wrote: I recently purchased George Schlossnagle's Advanced PHP Programming and on page 85 in the Error Handling chapter, he made a reference about the is_int function. In the above function example he had: if (!preg_match('/^\d+$/',$n) || $n < 0) { In which he mentions: It might be

Re: [PHP] XML...

2004-06-29 Thread Justin Patrin
I've gotten that before and it was international (Extended ASCII) characters which made this happen. I ended up doing a utf8_encode on the data before I entered it into the XML, then a utf8_decode after I processed the XML. If you're reading someone else's file, I don't know what to say... On Tue

[PHP] Re: TAB Syntax

2004-06-29 Thread Lars Torben Wilson
Harlequin wrote: I know I'm probably going to get flamed for this but it is only a development site but I am having some trouble getting the syntax right for using the tab when echoing information. My current command is: print_r("Host: $hostUser: $userPassword: $password"); I've tried: print_r("H

[PHP] GD Support without Recompiling?

2004-06-29 Thread gohaku
Hello everyone, Much to my surprise for Windows XP, to get GD Support, All I had to do was copy some files, edit a configuration file and restart the Web Server. I would like to know if this is possible on Mac OS X. I have seen instructions for recompiling but never as simple as for Windows. Do

[PHP] Is there a name for this kind of DOS attack?

2004-06-29 Thread Richard Davey
Hi all, I've just finished dealing with, and protecting against, an attack on a server that did the following: It found the "weakest" point on the site - i.e. the one with the most database connections / heaviest processor load required to generate that page - and then set about requesting this p

[PHP] Help with array / list looping syntax

2004-06-29 Thread Robb Kerr
I need some help with a looping syntax. In english, "a" is used before words that begin with consonants - "an" is used before words that start with vowels. I'm trying to create a loop that checks this state and inserts the correct word in the echo line. Below is the sloppy version of what I'm t

Re: [PHP] calling imagemagick from php

2004-06-29 Thread Randy C Boland
I seem to remember having similar problems with ImageMagick. Have you checked the permissions on the directory this PHP file is running in? You'll probably need to give group write permissions, and make sure the directory is in the same group that PHP is running under so that it has permission to

Re: [PHP] Help with array / list looping syntax

2004-06-29 Thread Justin Patrin
On Tue, 29 Jun 2004 19:27:04 -0500, Robb Kerr <[EMAIL PROTECTED]> wrote: > > I need some help with a looping syntax. In english, "a" is used before > words that begin with consonants - "an" is used before words that start > with vowels. I'm trying to create a loop that checks this state and insert

[PHP] Trouble with calling an external program in PHP

2004-06-29 Thread Indrek Siitan
Hi, I'm writing a small image stock application that stores EPS files (that's what the client is using for their work). Since GD doesn't support EPS, the only alternative I've found to create thumbnails is to use the 'convert' utility from ImageMagick. When testing it on the command line and fro

[PHP] Protecting database passwords

2004-06-29 Thread Bob Hockney
Hi there, I wrote a php script that accesses a database, and I am wondering about securing the password to the database. I could prompt the user for the password every session, but I don't necessarily want the user to have the password. Unless I'm missing something, any on-disk place I store

Re: [PHP] Help with array / list looping syntax

2004-06-29 Thread Philip Olson
> > I need some help with a looping syntax. In english, "a" is used before > > words that begin with consonants - "an" is used before words that start > > with vowels. I'm trying to create a loop that checks this state and inserts > > the correct word in the echo line. Below is the sloppy version o

RE: [PHP] disguise as static content

2004-06-29 Thread David Bevan
Hi Florin, Another trick if you will, to fool search engines would be to use mod_rewrite, provided you are using apache. Check out the documentation on the apache site: http://httpd.apache.org/docs-2.1/mod/mod_rewrite.html Hope this helps. Regards, David -Original Message- From:

[PHP] Web live radio

2004-06-29 Thread ascll
Greetings, Does anyone know how to develop a "web live radio" using php, which could use any one of my PCs as the 'radio station' to broadcast whatever voices/music? For example: http://www.rthk.org.hk/live1.asx http://www.rthk.org.hk/live1.ram Thanks. -- PHP General Mailing List (http://www.p

[PHP] best place to get extension dev help?

2004-06-29 Thread Chris Griffin
Is this the best/right place to ask extnesion development questions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Is there a name for this kind of DOS attack?

2004-06-29 Thread Vail, Warren
Not sure, but it sounds to me like a denial-of-service attack. Warren Vail -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 29, 2004 5:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Is there a name for this kind of DOS attack? Hi all, I've just finish

Re[2]: [PHP] Is there a name for this kind of DOS attack?

2004-06-29 Thread Richard Davey
Hello Warren, Wednesday, June 30, 2004, 2:26:51 AM, you wrote: VW> Not sure, but it sounds to me like a denial-of-service attack. Sorry, I wasn't too clear I guess - it is definitely a DoS attack, I just wondered if it had a specific name (ala Fraggle, SYN, et all). Best regards, Richard Davey

Re: Re[2]: [PHP] Is there a name for this kind of DOS attack?

2004-06-29 Thread Matthew Sims
> Hello Warren, > > Wednesday, June 30, 2004, 2:26:51 AM, you wrote: > > VW> Not sure, but it sounds to me like a denial-of-service attack. > > Sorry, I wasn't too clear I guess - it is definitely a DoS attack, I > just wondered if it had a specific name (ala Fraggle, SYN, et all). > > Best regards

Re[4]: [PHP] Is there a name for this kind of DOS attack?

2004-06-29 Thread Richard Davey
Hello Matthew, Wednesday, June 30, 2004, 2:44:26 AM, you wrote: MS> This should help. MS> http://www.unixcities.com/dos-attack/index1.html Strangely enough I was looking at that page not an hour ago, but it doesn't list what I described I'm afraid. It talks about it (re: Amazon, Yahoo, etc) but

Re: [PHP] best place to get extension dev help?

2004-06-29 Thread Curt Zirzow
* Thus wrote Chris Griffin: > Is this the best/right place to ask extnesion development questions? here would be a better place: http://pecl.php.net/support.php Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our mode

Re: [PHP] Help with array / list looping syntax

2004-06-29 Thread Paul Bissex
> > > I need some help with a looping syntax. In english, "a" is used before > > > words that begin with consonants - "an" is used before words that start > > > with vowels. I'm trying to create a loop that checks this state and inserts > > > the correct word in the echo line. Below is the sloppy v

Re: [PHP] Help with array / list looping syntax

2004-06-29 Thread Robb Kerr
On Wed, 30 Jun 2004 00:58:32 + (GMT), Philip Olson wrote: >>> I need some help with a looping syntax. In english, "a" is used before >>> words that begin with consonants - "an" is used before words that start >>> with vowels. I'm trying to create a loop that checks this state and inserts >>> t

[PHP] Best external app from php

2004-06-29 Thread C.F. Scheidecker Antunes
Hello all, I need to have a web application to call an external app that needs to execute on the background. (It is an *NIX server) The app that is being called will do a lenghty work but will be called by a php script through the web server. An user will log in, request a computation, the scrip

Re: [PHP] best place to get extension dev help?

2004-06-29 Thread Chris Griffin
Thanks! There is acutally a tutorial on just the question I was goning to ask. :-) In <[EMAIL PROTECTED]> Curt Zirzow wrote: > * Thus wrote Chris Griffin: >> Is this the best/right place to ask extnesion development questions? > > here would be a better place: > > http://pecl.php.net/support.

[PHP] Saving variables in a session in a destructor

2004-06-29 Thread David Goodlad
Hi all Using PHP5, I am trying to save some properties of an object when it is destroyed in its destructor, __destruct(). However, I have found that the session variable is NOT stored unless I explicitly destroy the object using unset(). If I leave php to finish executing the script and automati

Re: [PHP] Saving variables in a session in a destructor

2004-06-29 Thread Curt Zirzow
* Thus wrote David Goodlad: > Unless I do an unset($sm); at the end of a script like this, the > $_SESSION array will never contain the state=>foobar key/value. > > Can anyone offer some insight into this? http://bugs.php.net/27555 Curt -- First, let me assure you that this is not one of thos

RE: [PHP] Help with array / list looping syntax

2004-06-29 Thread Michael Sims
Robb Kerr wrote: > I need some help with a looping syntax. In english, "a" is used before > words that begin with consonants - "an" is used before words that > start with vowels. You are probably already aware of this, but that isn't strictly correct. The rule for deciding between "a" and "an" is

RE: [PHP] Best external app from php

2004-06-29 Thread Michael Sims
C.F. Scheidecker Antunes wrote: > Hello all, > > I need to have a web application to call an external app that needs to > execute on the background. (It is an *NIX server) [...] > My question is this: > > Is it better to write the external app in PHP or Java? Assuming that you (or the developer(s)

Re: [PHP] Web live radio

2004-06-29 Thread raditha dissanayake
ascll wrote: Greetings, Does anyone know how to develop a "web live radio" using php, which could use any one of my PCs as the 'radio station' to broadcast whatever voices/music? PHP is probably not the sbest technology for streaming content. Take a look at shoutcast or icecast or some other pr