php-general Digest 27 Nov 2006 07:21:01 -0000 Issue 4482

2006-11-26 Thread php-general-digest-help
php-general Digest 27 Nov 2006 07:21:01 - Issue 4482 Topics (messages 245155 through 245168): Re: Self generating variables/arrays 245155 by: jekillen 245166 by: Richard Lynch Re: Negative memory_get_usage() Values 245156 by: Chris 245159 by: Chris

[PHP] PHP sendmail proxy (using xinetd)

2006-11-26 Thread Kelly Jones
I'm trying to write a sendmail proxy in PHP: people would connect to my proxy running on port 25 (via xinetd), and the proxy would connect to sendmail (tweaked to run on port 26). Currently, the proxy is 100% transparent, but I plan to tweak it to intercept sendmail's replies and substitute its

Re: [PHP] Self generating variables/arrays

2006-11-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-25 22:19:05 -0800: Hello; I am writing some code that will format results of a search for display. I need to split an array into several different arrays but I won't know before hand how many, so, I am looking for a way to dynamically generate arrays for this

Re: [PHP] Self generating variables/arrays

2006-11-26 Thread Stut
jekillen wrote: I am writing some code that will format results of a search for display. I need to split an array into several different arrays but I won't know before hand how many, so, I am looking for a way to dynamically generate arrays for this purpose. My present direction is to use the

Re: [PHP] To install a small program from a web browser

2006-11-26 Thread tedd
At 11:24 AM -0800 11/25/06, Navid wrote: Thanks guys. I found out (or he actually revealed to me) what he wants his members to download without their knowledge. I refused to work on his project. I knew it sounded fishy. Navid: Way to go -- not everything is worth the money. Besides, I'm

[PHP] Negative memory_get_usage() Values

2006-11-26 Thread Chris
Hey gang, I'm getting a negative return value from memory_get_usage() using the following script. My I've got --enable-memory-limit enabled and my memory_limit is set to 100MB (which should more than enough memory). I suspect that there is a bug in utf8_encode() but I'd like others to

RE: [PHP] GD, and GD JPEG

2006-11-26 Thread Peter Lauri
I don't know what environment you are on, because I have been absent from this list a long while. If you are on a Linux distribution you might be able to do this via the command line: yum install php-gd.i386 service httpd restart That might install GD and then restart the web server. /Peter

Re: [PHP] Negative memory_get_usage() Values

2006-11-26 Thread Richard Lynch
What version of PHP and what OS? I *think* that there is some jiggery-pokery going on in memory_get_usage() in PHP 5 and managed memory where it would make perfect sense to get negative numbers occasionally... You may also want to log the memory_get_usage inside the loop, and then graph the

Re: [PHP] Self generating variables/arrays

2006-11-26 Thread Richard Lynch
On Sun, November 26, 2006 12:19 am, jekillen wrote: I am writing some code that will format results of a search for display. I need to split an array into several different arrays but I won't know before hand how many, so, I am looking for a way to dynamically generate arrays for this

Re: [PHP] Negative memory_get_usage() Values

2006-11-26 Thread Chris
Whoops, I'm using PHP 5.2.0 on Mac OS X 10.4.8. I'll do as you suggest (and learn more about PHP memory usage) to try to see what's going on. Chris [EMAIL PROTECTED] On Nov 26, 2006, at 12:34 PM, Richard Lynch wrote: What version of PHP and what OS? I *think* that there is some

Re: [PHP] Self generating variables/arrays

2006-11-26 Thread jekillen
On Nov 26, 2006, at 5:11 AM, Stut wrote: jekillen wrote: I am writing some code that will format results of a search for display. I need to split an array into several different arrays but I won't know before hand how many, so, I am looking for a way to dynamically generate arrays for

Re: [PHP] Negative memory_get_usage() Values

2006-11-26 Thread Chris
Okay, I modified the script as follows to allow for collecting data and graphed it. The graph is at http://dented-planet.net/graph.png (sorry, I'm not versed in created perfect charts). ?php $x = ''; for ($i = 1; $i = 2; $i++) { $x = utf8_encode('this is a test'); if ($i %

[PHP] ?=$var? on OS X

2006-11-26 Thread Brian Dunning
I've got a new OS X box and for some reason ?=$var? doesn't work like it does on all my other OS X boxes - anyone know a quick reason why not? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ?=$var? on OS X

2006-11-26 Thread Chris
Brian Dunning wrote: I've got a new OS X box and for some reason ?=$var? doesn't work like it does on all my other OS X boxes - anyone know a quick reason why not? Check your php.ini for short_open_tags. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List

Re: [PHP] Negative memory_get_usage() Values

2006-11-26 Thread Chris
Chris wrote: Whoops, I'm using PHP 5.2.0 on Mac OS X 10.4.8. Memory usage in php5.2.0 has been changed: http://www.php.net/UPDATE_5_2.txt Under Improved memory manager and increased default memory limit Not sure why you'd be getting negative values but I'm guessing it's related to those

Re: [PHP] ?=$var? on OS X

2006-11-26 Thread Dotan Cohen
On 27/11/06, Brian Dunning [EMAIL PROTECTED] wrote: I've got a new OS X box and for some reason ?=$var? doesn't work like it does on all my other OS X boxes - anyone know a quick reason why not? Exactly for that reason I don't recommend that you use it. Just use ?php print $var; ? as it's

Re: [PHP] ?=$var? on OS X

2006-11-26 Thread Chris
Dotan Cohen wrote: On 27/11/06, Brian Dunning [EMAIL PROTECTED] wrote: I've got a new OS X box and for some reason ?=$var? doesn't work like it does on all my other OS X boxes - anyone know a quick reason why not? Exactly for that reason I don't recommend that you use it. Just use ?php print

Re: [PHP] ?=$var? on OS X

2006-11-26 Thread Dotan Cohen
On 27/11/06, Chris [EMAIL PROTECTED] wrote: Dotan Cohen wrote: On 27/11/06, Brian Dunning [EMAIL PROTECTED] wrote: I've got a new OS X box and for some reason ?=$var? doesn't work like it does on all my other OS X boxes - anyone know a quick reason why not? Exactly for that reason I don't

Re: [PHP] ?=$var? on OS X

2006-11-26 Thread Chris
Dotan Cohen wrote: On 27/11/06, Chris [EMAIL PROTECTED] wrote: Dotan Cohen wrote: On 27/11/06, Brian Dunning [EMAIL PROTECTED] wrote: I've got a new OS X box and for some reason ?=$var? doesn't work like it does on all my other OS X boxes - anyone know a quick reason why not? Exactly for

Re: [PHP] ?=$var? on OS X

2006-11-26 Thread Dotan Cohen
On 27/11/06, Chris [EMAIL PROTECTED] wrote: Dotan Cohen wrote: On 27/11/06, Chris [EMAIL PROTECTED] wrote: Dotan Cohen wrote: On 27/11/06, Brian Dunning [EMAIL PROTECTED] wrote: I've got a new OS X box and for some reason ?=$var? doesn't work like it does on all my other OS X boxes -

Re: [PHP] Negative memory_get_usage() Values

2006-11-26 Thread Richard Lynch
On Sun, November 26, 2006 3:27 pm, Chris wrote: Okay, I modified the script as follows to allow for collecting data and graphed it. The graph is at http://dented-planet.net/graph.png (sorry, I'm not versed in created perfect charts). That's pretty weird... I mean, something is not right with

Re: [PHP] Self generating variables/arrays

2006-11-26 Thread Richard Lynch
On Sun, November 26, 2006 3:45 pm, jekillen wrote: 1. one large array exploded around \n 2. then a loop looks for 'brbr\n' items and records the index number of these items as well of keeping a count: ($c) 3. Since $c is a variable it can represent a different number each

[PHP] RE: RE: PHP and XML

2006-11-26 Thread onewaylife
hello all I have created a simple xml file address.php i.e ?php $xmlstr = XML ?xml version=1.0 ? !DOCTYPE AddressBook[ !ELEMENT AddressBook (person)+ !ELEMENT person (group,name,organization, address,email) !ELEMENT

Re: [PHP] backing up a database

2006-11-26 Thread David Robley
Sumeet wrote: Brad Fuller wrote: $command = mysqldump -u $dbuser -p$dbpass $dbname | gzip $backupFile; system($command); what if system() has been disabled on the server? SELECT INTO OUTFILE 'file_name' export_options seems a useful alternative. Cheers -- David Robley

Re: [PHP] RE: RE: PHP and XML

2006-11-26 Thread Børge Holen
so I see... just follow the guidelines on php.net on what NOT to do after a ?php. On Monday 27 November 2006 06:22, onewaylife wrote: hello all I have created a simple xml file address.php i.e ?php $xmlstr = XML ?xml version=1.0 ? !DOCTYPE AddressBook[