Re: [PHP] gzuncompress() Not Working.

2007-11-06 Thread heavyccasey
The documentation for zlib says that it expects an Adler-32 checksum at the end of the file. PHP follows this [largely outdated] standard. Python, on the other hand, doesn't, and uses a different checksum, CRC-32. That's why it won't decompress. But I've written my own function and it's working

Re: [PHP] Regular Expressions

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 20:15 -0800, Jim Lucas wrote: > Robert Cummings wrote: > > On Tue, 2007-11-06 at 23:24 -0300, Martin Alterisio wrote: > >> 2007/11/6, Alberto García Gómez <[EMAIL PROTECTED]>: > >>> I'm a mess in regular expressions and I make this code: > >>> > >>> $link = ereg_replace('ñ','n

Re: [PHP] gzuncompress() Not Working.

2007-11-06 Thread Per Jessen
[EMAIL PROTECTED] wrote: > Alright, I think I know the problem. > > PHP's gzuncompress uses the Adler-32 checksum at the end of the zlib, > while Python uses CRC32. > > Why must you follow the standards, PHP!? > > Does anyone know of any workaround? Are you saying that you've got compressed da

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Per Jessen
Robert Cummings wrote: > On Tue, 2007-11-06 at 19:33 +0100, Per Jessen wrote: >> Jason Pruim wrote: >> >> > Actually, what you are looking for is an eggdrop bot which is >> > written in TCL. PHP in my humble opinion was not designed to handle >> > something like that as it requires realtime proce

Re: [PHP] gzuncompress() Not Working.

2007-11-06 Thread heavyccasey
Alright, I think I know the problem. PHP's gzuncompress uses the Adler-32 checksum at the end of the zlib, while Python uses CRC32. Why must you follow the standards, PHP!? Does anyone know of any workaround? On Nov 6, 2007 7:03 AM, <[EMAIL PROTECTED]> wrote: > I left that empty. The decompres

Re: [PHP] More info on timeout problem, with code

2007-11-06 Thread Jon Westcot
Hi Chris: > What indexes are on this table? On the import table, there is only one index. And I probably don't even need an index on it since it will be processed sequentially into other tables after it's been imported. > When you do an insert, each one has to update the index > as well as

Re: [PHP] Regular Expressions

2007-11-06 Thread Jim Lucas
Robert Cummings wrote: On Tue, 2007-11-06 at 23:24 -0300, Martin Alterisio wrote: 2007/11/6, Alberto García Gómez <[EMAIL PROTECTED]>: I'm a mess in regular expressions and I make this code: $link = ereg_replace('ñ','n',$link); $link = ereg_replace('á','a',$link); $link = ereg_replace('é','e',

Re: [PHP] php.ini include_path and symlinks

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 18:35 -0800, Ravi Menon wrote: > Hi, > > We run php 5.2.0 + apache 2.2. with apc turned on ( apc.stat also on > ). Earlier we did not use the php.ini include_path setting. We relied > on some symlinks for our common code > so that require_once works correctly. > > This worke

Re: [PHP] Regular Expressions

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 23:24 -0300, Martin Alterisio wrote: > 2007/11/6, Alberto García Gómez <[EMAIL PROTECTED]>: > > > > I'm a mess in regular expressions and I make this code: > > > > $link = ereg_replace('ñ','n',$link); > > $link = ereg_replace('á','a',$link); > > $link = ereg_replace('é','e',$l

[PHP] php.ini include_path and symlinks

2007-11-06 Thread Ravi Menon
Hi, We run php 5.2.0 + apache 2.2. with apc turned on ( apc.stat also on ). Earlier we did not use the php.ini include_path setting. We relied on some symlinks for our common code so that require_once works correctly. This worked fine and during code releases we flipped the main 'release' symlink

Re: [PHP] Regular Expressions

2007-11-06 Thread Martin Alterisio
2007/11/6, Alberto García Gómez <[EMAIL PROTECTED]>: > > I'm a mess in regular expressions and I make this code: > > $link = ereg_replace('ñ','n',$link); > $link = ereg_replace('á','a',$link); > $link = ereg_replace('é','e',$link); > $link = ereg_replace('í','i',$link); > $link = ereg_replace('ó','

Re: [PHP] More info on timeout problem, with code

2007-11-06 Thread Chris
Jon Westcot wrote: Hi David, et al.: Thanks for the comment. I removed the trailing semi-colon in the two areas where it was being sent to mysql_query() and tried the code again. I'm still getting the same basic problem -- it silently aborts somewhere around 22,000 to 26,000 records being p

[PHP] Sessionvariable

2007-11-06 Thread Ronald Wiplinger
I use at the first page a session variable to set a flag. After a few pages, or if somebody wait too long, the pages have another flag. I noticed that there are often more than one session file exist. How can I avoid that? How can I make sure that for one user is only one session file? bye Ron

Re: [PHP] Regular Expressions

2007-11-06 Thread Jim Lucas
Alberto García Gómez wrote: I'm a mess in regular expressions and I make this code: $link = ereg_replace('ñ','n',$link); $link = ereg_replace('á','a',$link); $link = ereg_replace('é','e',$link); $link = ereg_replace('í','i',$link); $link = ereg_replace('ó','o',$link); $link = ereg_replace('ú'

Re: [PHP] Can not run PHP pages in Apache

2007-11-06 Thread Daniel Brown
On 11/6/07, SFWahoo <[EMAIL PROTECTED]> wrote: > > Thanks. And this did work. Or at least I am able to access php pages. > Given your comment about 1.3 vs. 2.2, I upgraded to 2.2. And I now have a > different issue. When accessing a PHP page the Apache HTTP Server process > crashes or I get a m

Re: [PHP] Can not run PHP pages in Apache

2007-11-06 Thread SFWahoo
Thanks. And this did work. Or at least I am able to access php pages. Given your comment about 1.3 vs. 2.2, I upgraded to 2.2. And I now have a different issue. When accessing a PHP page the Apache HTTP Server process crashes or I get a memory error. Any ideas? Daniel Brown-5 wrote: > > O

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5) *SOLVED*

2007-11-06 Thread Rahul S. Johari
On 11/6/07 4:07 PM, "Daniel Brown" <[EMAIL PROTECTED]> wrote: > We are the geniuses that are the core PHP community. Hear us roar! :D You know the funniest thing? As my discussion progressed, and the contributions back & forth, the problem became evidently little to do with PHP and a whole

Re: [PHP] More info on timeout problem, with code

2007-11-06 Thread Daniel Brown
Jon, I can provide you with access to a Linux web box to test your code and database stuff if you'd like. No charge or anything, it's just that I strongly believe the problems are caused by the limits you face with your current web host. If you want to give it a shot, let me know and I'l

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5) *SOLVED*

2007-11-06 Thread Daniel Brown
On 11/6/07, Rahul S. Johari <[EMAIL PROTECTED]> wrote: > I guess I can officially consider this case closed with all problems solved! > > Thanks All! We are the geniuses that are the core PHP community. Hear us roar! -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 20:23 +0100, Luca Paolella wrote: > > This can be done quite easily using shared memory and/or a database to > > share data between the scripts. > Really? could you give me a little briefing about this method? I'll give an example using the DB as the sharing mechanism. So you

RE: [PHP] More info on timeout problem, with code

2007-11-06 Thread Instruct ICC
> Thanks for the comment. I removed the trailing semi-colon in the two > areas where it was being sent to mysql_query() and tried the code again. > I'm still getting the same basic problem -- it silently aborts somewhere > around 22,000 to 26,000 records being processed out of just under 30,000. >

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Luca Paolella
This can be done quite easily using shared memory and/or a database to share data between the scripts. Really? could you give me a little briefing about this method? Actually, what you are looking for is an eggdrop bot which is written in TCL. PHP in my humble opinion was not designed to handl

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5) *SOLVED*

2007-11-06 Thread Rahul S. Johari
On 11/6/07 12:57 PM, "Nathan Nobbe" <[EMAIL PROTECTED]> wrote: > perhaps if you google around on something like mac os x /etc/fstab > something useful will turn up. im sure there is an alternative mechanism > to mount things at boot time on that system. > > -nathan For whatever reason, when I

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 19:33 +0100, Per Jessen wrote: > Jason Pruim wrote: > > > Actually, what you are looking for is an eggdrop bot which is written > > in TCL. PHP in my humble opinion was not designed to handle something > > like that as it requires realtime processing. Someone correct me if >

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Robert Cummings
On Tue, 2007-11-06 at 18:05 +0100, Luca Paolella wrote: > Hi, > > I'm very grateful for your help (thanks to everybody!), but maybe I > didn't explain myself correctly, I'm sorry. What I need is the bot to > log onto the server and, being logged as a user, to send some > periodic messages on

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-06 Thread Rahul S. Johari
On 11/6/07 12:57 PM, "Nathan Nobbe" <[EMAIL PROTECTED]> wrote: > On 11/6/07, Rahul S. Johari <[EMAIL PROTECTED]> wrote: >> >> On 11/6/07 12:03 PM, "Nathan Nobbe" <[EMAIL PROTECTED]> wrote: >> >>> On 11/6/07, Rahul S. Johari <[EMAIL PROTECTED] >>> > wrote: I

Re: [PHP] Disabling Functions And Clasess

2007-11-06 Thread Nathan Nobbe
On 11/6/07, Alberto García Gómez <[EMAIL PROTECTED]> wrote: > > Can I use -dissable_classes- and -dissable_functions- directives inside > Apache virtual host configuration using php_value directive. all you have to do is check the doc on php.ini directives. the answer in this case to both directi

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Per Jessen
Jason Pruim wrote: > Actually, what you are looking for is an eggdrop bot which is written > in TCL. PHP in my humble opinion was not designed to handle something > like that as it requires realtime processing. Someone correct me if > I'm wrong but that isn't what PHP was designed to do was it? I

Re: [PHP] Allowed path in VHosts

2007-11-06 Thread Per Jessen
Alberto García Gómez wrote: > Is there some directive that configure a vistual host to only see > inside a path eg.: /var/www/users/user1 > An apache virtual host will normally not look outside its DocumentRoot, but you can allow it do so. /Per Jessen, Zürich -- PHP General Mailing List (http

[PHP] Allowed path in VHosts

2007-11-06 Thread Alberto García Gómez
Is there some directive that configure a vistual host to only see inside a path eg.: /var/www/users/user1 Este correo ha sido enviado desde el Polit�cnico de Inform�tica "Carlos Marx" de Matanzas. "La gran batalla se librar� en el campo de las ideas" -- PHP General Mailing List (http://www.p

[PHP] Disabling Functions And Clasess

2007-11-06 Thread Alberto García Gómez
Can I use -dissable_classes- and -dissable_functions- directives inside Apache virtual host configuration using php_value directive. Este correo ha sido enviado desde el Politécnico de Informática "Carlos Marx" de Matanzas. "La gran batalla se librará en el campo de las ideas"

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Jason Pruim
Actually, what you are looking for is an eggdrop bot which is written in TCL. PHP in my humble opinion was not designed to handle something like that as it requires realtime processing. Someone correct me if I'm wrong but that isn't what PHP was designed to do was it? There are many eggdrop

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-06 Thread Nathan Nobbe
On 11/6/07, Rahul S. Johari <[EMAIL PROTECTED]> wrote: > > > On 11/6/07 12:03 PM, "Nathan Nobbe" <[EMAIL PROTECTED]> wrote: > > > On 11/6/07, Rahul S. Johari <[EMAIL PROTECTED]> wrote: > >> > >> I couldn't find an /etc/rd.d or rc3.d on my system at all. I've been > >> manually mounting after each b

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-06 Thread Rahul S. Johari
On 11/6/07 12:03 PM, "Nathan Nobbe" <[EMAIL PROTECTED]> wrote: > On 11/6/07, Rahul S. Johari <[EMAIL PROTECTED]> wrote: >> >> I couldn't find an /etc/rd.d or rc3.d on my system at all. I've been >> manually mounting after each boot, so still looking for an automated >> mounting solution. > > lo

Re: [PHP] Regular Expressions

2007-11-06 Thread Ezequiel Gutesman
True, but you'll have to change the rexex not to match, 'ń' or 'ã for example (unless you want it) Thiago Ferreira wrote: > you could do it without any function > > $line = "Hola que tal con á con acento y eñe \n"; > > echo preg_replace('/&([aeioun])(acute|tilde);/i','\1',$line); > > ?> > > O

Re: [PHP] Can not run PHP pages in Apache

2007-11-06 Thread Daniel Brown
On 11/6/07, SFWahoo <[EMAIL PROTECTED]> wrote: > I have installed Apache 1.3 and PHP 5.2.4. I am now trying to install Zen > Cart. When accessing the Zen Cart setup, the PHP files are not read. I > simply get a directory listing of files instead of execution of the > index.php. Seems I have miss

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Luca Paolella
Hi, I'm very grateful for your help (thanks to everybody!), but maybe I didn't explain myself correctly, I'm sorry. What I need is the bot to log onto the server and, being logged as a user, to send some periodic messages on a channel ( Hello!) while listening for events and reacting cons

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-06 Thread Nathan Nobbe
On 11/6/07, Rahul S. Johari <[EMAIL PROTECTED]> wrote: > > I couldn't find an /etc/rd.d or rc3.d on my system at all. I've been > manually mounting after each boot, so still looking for an automated > mounting solution. look for /etc/fstab -nathan

[PHP] Can not run PHP pages in Apache

2007-11-06 Thread SFWahoo
First time poster, so please bear with me... I have installed Apache 1.3 and PHP 5.2.4. I am now trying to install Zen Cart. When accessing the Zen Cart setup, the PHP files are not read. I simply get a directory listing of files instead of execution of the index.php. Seems I have missed somet

Re: [PHP] Regular Expressions

2007-11-06 Thread Thiago Ferreira
you could do it without any function On Nov 6, 2007 2:44 PM, Ezequiel Gutesman <[EMAIL PROTECTED]> wrote: > Maybe this helps > > > > $line = preg_replace_callback( >'/(á|é|í|ó|ú|ñ)/', >create_function( >// single quotes are essential here, >// or alterna

[PHP] A workaround for type hinting native types (and a little of self-advertising)

2007-11-06 Thread Martin Alterisio
$me->apologizeFor($this->isSelfAdvertising()); if ($you->lookingFor($php->workaround(TYPE_HINT_FOR_NATIVE_TYPES)) { check('http://www.phpclasses.org/browse/package/4195.html'); } $package = new Package('http://www.phpclasses.org/browse/package/4195.html' ); $package->usageExample = <

Re: [PHP] crop an image

2007-11-06 Thread Edward Vermillion
On Nov 6, 2007, at 10:20 AM, Chris Bruce wrote: Does anyone have some insight here? I am trying to crop an image. The crop seems to almost work, but I get black bars on the image. Has anyone had any experience with cropping images using the GD library? Thanks. Chris On Nov 2, 2007, at

Re: [PHP] Regular Expressions

2007-11-06 Thread Ezequiel Gutesman
Maybe this helps if you want to use this functionality several times: hope this helps. Note that these are pcre (Perl Compatible RegEx). Alberto García Gómez wrote: > I'm a mess in regular expressions and I make this code: > > $link = ereg_replace('ñ','n',$link); > $link = ereg_replace('

Re: [PHP] crop an image

2007-11-06 Thread Chris Bruce
Does anyone have some insight here? I am trying to crop an image. The crop seems to almost work, but I get black bars on the image. Has anyone had any experience with cropping images using the GD library? Thanks. Chris On Nov 2, 2007, at 5:41 PM, Chris Bruce wrote: What was the solution he

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Nathan Nobbe
if youre running linux, you might also want to consider disown. -nathan

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Wolf
You could CRON the script, write a simple bash script that polls the server and if the php script is not running, restarts it. * * * * * * /path/to/php Wolf Jim Lucas <[EMAIL PROTECTED]> wrote: > oops, didn't mean to reply off list. SORRY LIST! > > here is what I said. > > This metho

Re: [PHP] More info on timeout problem, with code

2007-11-06 Thread Jon Westcot
Hi David, et al.: Thanks for the comment. I removed the trailing semi-colon in the two areas where it was being sent to mysql_query() and tried the code again. I'm still getting the same basic problem -- it silently aborts somewhere around 22,000 to 26,000 records being processed out of just

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Jim Lucas
oops, didn't mean to reply off list. SORRY LIST! here is what I said. This method will work until you log out, when you log out all your background processes are killed. If it were to be a CLI and you wanted it to run constantly and you manually wanted to control it, I would use "screen". S

[PHP] Regular Expressions

2007-11-06 Thread Alberto García Gómez
I'm a mess in regular expressions and I make this code: $link = ereg_replace('ñ','n',$link); $link = ereg_replace('á','a',$link); $link = ereg_replace('é','e',$link); $link = ereg_replace('í','i',$link); $link = ereg_replace('ó','o',$link); $link = ereg_replace('ú','u',$link); I ask if is

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Per Jessen
Jim Lucas wrote: > This method will work until you log out, when you log out all your > background processes are killed. man nohup. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] php-pecl-session_mysql

2007-11-06 Thread Alberto García Gómez
I install php-pecl-session_mysql and I config my php.ini in this way session.save_handler = mysql but this error appear: Warning: session_start() [function.session-start]: Cannot find save handler mysql in /var/www/mysite/core/users.php on line 45 I just folow the instructions in the session_m

RE: [PHP] Benchmarking check to see if array key is set

2007-11-06 Thread Ford, Mike
On 06 November 2007 12:57, Christoph Boget wrote: > Consider the following test code: [...snip...] > Running that I found that > > if( isset( $myArray[$key] )) > > is faster than > > if( array key exists( $key, $myArray )) > > is faster than > > if( $myArray[$key] ) > > To be honest, I wa

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Jim Lucas
Per Jessen wrote: Luca Paolella wrote: I want the bot to run a process in background (a periodic message, for example) while listening for events (like a user joining a channel or using a certain command) and consequentially executing the corresponding functions, is it possible? and how? Writ

Re: [PHP] More info on timeout problem, with code

2007-11-06 Thread David Giragosian
On 11/5/07, Jon Westcot <[EMAIL PROTECTED]> wrote: > Hi all: > >As requested, here's the code: > > if(isset($_POST['process'])){ >$old_session_gc_maxlifetime = ""; >$old_max_execution_time = ""; >$old_max_input_time = ""; >$old_session_gc_maxlifetime = ini_set("session.gc_maxl

Re: [PHP] Memory Allocation Error

2007-11-06 Thread heavyccasey
Thank you! That works. On Nov 6, 2007 12:23 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > Hi! > > > > I have a script that reads a 120 MB remote file. This raises a Memory > > Allocation Error unless I use: > > ini_set('memory_limit', '130M'); > > > > I doubt th

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-06 Thread Rahul S. Johari
On 11/2/07 11:12 AM, "Daniel Brown" <[EMAIL PROTECTED]> wrote: > > Rahul, > > I believe all of the modern MacOS variants still use the > *nix-style (due to being based on BSD) rc.d startups, right? If so: > > sudo echo "sudo -u www mount_smbfs -f 0777 -d 0777 > //usr:[EMAIL PROTECT

Re: [PHP] gzuncompress() Not Working.

2007-11-06 Thread heavyccasey
I left that empty. The decompressed string is about 224 KB, so it shouldn't throw an error. Thanks for the reply! On Nov 6, 2007 12:25 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > Casey wrote: > > > When I try gzuncompress() on the same data (I checked), it returns a > > "Data error". I also trie

Re: [PHP] stftime differences on Windows/Linux platforms

2007-11-06 Thread Robin Vickery
On 06/11/2007, Neil Saunders <[EMAIL PROTECTED]> wrote: > Hi Robin, > > Thanks for your reply. The times are exactly synchronized. I'm looking > at the date section in the output of phpinfo(), and get the following: > > Development > Default timezoneEurope/London > > Production: > Default t

Re: [PHP] Performance of PHP

2007-11-06 Thread Per Jessen
Merlin wrote: > Hi there, > > I am doing some image cropping of about 40.000 files with php. If you're worried about performance, maybe why not use mogrify from ImageMagick? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

[PHP] Re: stftime differences on Windows/Linux platforms

2007-11-06 Thread Colin Guthrie
Neil Saunders wrote: > Hi Robin, > > Thanks for your reply. The times are exactly synchronized. I'm looking > at the date section in the output of phpinfo(), and get the following: > > Development: > Default timezone Europe/London > Production: > Default timezone UTC Could this be th

Re: [PHP] stftime differences on Windows/Linux platforms

2007-11-06 Thread Neil Saunders
Hi Robin, Thanks for your reply. The times are exactly synchronized. I'm looking at the date section in the output of phpinfo(), and get the following: Development: D:\Documents and Settings\neil.saunders>date The current date is: 06/11/2007 D:\Documents and Settings\neil.saunders>time The curre

[PHP] Re: Performance of PHP

2007-11-06 Thread Colin Guthrie
Merlin wrote: > Hi there, > > I am doing some image cropping of about 40.000 files with php. > To do this I wrote a PHP file that does what I want and I did disable > the timeout so I can call it via webbrowser and fire the script. > > There are two down sides I see: > 1. One image takes about 0.

[PHP] Benchmarking check to see if array key is set

2007-11-06 Thread Christoph Boget
Consider the following test code: '; $startTime = microtime( TRUE ); $foundCount = 0; for( $i = 0; $i <= 1; $i++ ) { $date = microtime( TRUE ); $key = rand( $date, $date * rand( 1, 5000 )); if( array key exists( $key, $myArray )) { $foundCount++; } } $e

Re: [PHP] Performance of PHP

2007-11-06 Thread Sudheer Satyanarayana
Merlin wrote: Hi there, I am doing some image cropping of about 40.000 files with php. To do this I wrote a PHP file that does what I want and I did disable the timeout so I can call it via webbrowser and fire the script. There are two down sides I see: 1. One image takes about 0.25 s, so the w

Re: [PHP] stftime differences on Windows/Linux platforms

2007-11-06 Thread Robin Vickery
On 06/11/2007, Neil Saunders <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm experiencing some differences in in the return values of strftime > on Windows & Linux platforms on PHP 5.2.1. I've knocked up a test case > to demonstrate the bug: > > > $UNIX_TIME = mktime(0,0,0,5,31,2008); > echo "Time Ma

[PHP] stftime differences on Windows/Linux platforms

2007-11-06 Thread Neil Saunders
Hi All, I'm experiencing some differences in in the return values of strftime on Windows & Linux platforms on PHP 5.2.1. I've knocked up a test case to demonstrate the bug: OUTPUT DEVELOPMENT: C:\>php -e c:\test.php Time Made for 31-05-2008: 1212188400 Expected Time for 31-05-

[PHP] Performance of PHP

2007-11-06 Thread Merlin
Hi there, I am doing some image cropping of about 40.000 files with php. To do this I wrote a PHP file that does what I want and I did disable the timeout so I can call it via webbrowser and fire the script. There are two down sides I see: 1. One image takes about 0.25 s, so the whole process wo

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Per Jessen
Luca Paolella wrote: > I want the bot to run a process in background (a periodic message, > for example) while listening for events (like a user joining a > channel or using a certain command) and consequentially executing the > corresponding functions, is it possible? and how? Write a PHP CLI sc

Re: [PHP] php 4.4.7 configure and sablotron version issue

2007-11-06 Thread Per Jessen
Edward Vermillion wrote: > I don't know enough about the configure test to say there's a bug > there, Yes, it's a bug - "1.0.3" will never turn into a floating point number that is > 0.96. > but then I couldn't figure out how to get it to work either. > Tried setting the SAB_VERSION define in

Re: [PHP] Chinese input character count

2007-11-06 Thread Per Jessen
Ronald Wiplinger wrote: > I thought I did it correct to define in the header: > > to display chinese characters correct. It works. > > However, if you type in a form directly, than each character will be > translated to UTF-8 with a sequence of #; > I could then count the numbers of # an

Re: [PHP] gzuncompress() Not Working.

2007-11-06 Thread Per Jessen
Casey wrote: > When I try gzuncompress() on the same data (I checked), it returns a > "Data error". I also tried gzinflate() and many user-created gzdecode > () functions, with no luck. Did you specify a correct length for gzuncompress() ? >From the manpage: The function will return an error if

Re: [PHP] Memory Allocation Error

2007-11-06 Thread Per Jessen
[EMAIL PROTECTED] wrote: > Hi! > > I have a script that reads a 120 MB remote file. This raises a Memory > Allocation Error unless I use: > ini_set('memory_limit', '130M'); > > I doubt this is good for my server... I tried both fopen and > file_get_contents. This used to work fine in PHP 4