[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 until I
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 the
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
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
Ronald Wiplinger wrote:
I thought I did it correct to define in the header:
meta http-equiv=Content-Type content=text/html;
charset=utf-8
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
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
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:
?php
$UNIX_TIME = mktime(0,0,0,5,31,2008);
echo Time Made for 31-05-2008: $UNIX_TIME\n;
echo Expected Time
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
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:
?php
$UNIX_TIME = mktime(0,0,0,5,31,2008);
echo Time Made for
Consider the following test code:
?php
$myArray = array();
for( $i = 0; $i = 1; $i++ )
{
$date = microtime( TRUE );
$key = rand( $date, $date * rand( 1, 5000 ));
$myArray[$key] = $key;
}
echo '$myArray items created: ' . count( $myArray ) . 'brbr';
$startTime =
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,
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.saundersdate
The current date is: 06/11/2007
D:\Documents and Settings\neil.saunderstime
The
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:
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 the
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 tried
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 PROTECTED]/share
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 this is good for my
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 timezone
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?
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 was surprised.
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
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
I'm a mess in regular expressions and I make this code:
$link = ereg_replace('ntilde;','n',$link);
$link = ereg_replace('aacute;','a',$link);
$link = ereg_replace('eacute;','e',$link);
$link = ereg_replace('iacute;','i',$link);
$link = ereg_replace('oacute;','o',$link);
$link =
On 11/5/07, Jon Westcot [EMAIL PROTECTED] wrote:
Hi all:
As requested, here's the code:
?php
if(isset($_POST['process'])){
$old_session_gc_maxlifetime = ;
$old_max_execution_time = ;
$old_max_input_time = ;
$old_session_gc_maxlifetime =
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.
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
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
if youre running linux, you might also want to consider disown.
-nathan
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 php script name
Wolf
Jim Lucas [EMAIL PROTECTED] wrote:
oops, didn't mean to reply off list. SORRY LIST!
here is what I said.
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
Maybe this helps
?php
$line = preg_replace_callback(
'/(aacute;|eacute;|iacute;|oacute;|uacute;|ntilde;)/',
create_function(
// single quotes are essential here,
// or alternative escape all $ as \$
'$matches',
$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 = EXAMPLE
you could do it without any function
?php
$line = Hola que tal con aacute; con acento y entilde;e \n;
echo preg_replace('/([aeioun])(acute|tilde);/i','\1',$line);
?
On Nov 6, 2007 2:44 PM, Ezequiel Gutesman [EMAIL PROTECTED]
wrote:
Maybe this helps
?php
$line = preg_replace_callback(
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
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
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 (Bot Hello!) while listening for
events and reacting
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 missed
True, but you'll have to change the rexex not to match, 'nacute;' or
'atilde; for example (unless you want it)
Thiago Ferreira wrote:
you could do it without any function
?php
$line = Hola que tal con aacute; con acento y entilde;e \n;
echo
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.
look for
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
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
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
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 boot, so still looking
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
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
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 directives
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]
mailto:[EMAIL PROTECTED] wrote:
I couldn't find an /etc/rd.d or
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 a
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
I'm
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 first
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
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.
Alberto García Gómez wrote:
I'm a mess in regular expressions and I make this code:
$link = ereg_replace('ntilde;','n',$link);
$link = ereg_replace('aacute;','a',$link);
$link = ereg_replace('eacute;','e',$link);
$link = ereg_replace('iacute;','i',$link);
$link =
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:
On
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
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-8107
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
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
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 lot
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 memory
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
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('ntilde;','n',$link);
$link = ereg_replace('aacute;','a',$link);
$link = ereg_replace('eacute;','e',$link);
$link = ereg_replace('iacute;','i',$link);
$link =
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'
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('ntilde;','n',$link);
$link = ereg_replace('aacute;','a',$link);
$link =
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 worked fine
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('ntilde;','n',$link);
$link = ereg_replace('aacute;','a',$link);
$link =
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
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
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 processing.
[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 data in
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('ntilde;','n',$link);
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
72 matches
Mail list logo