[PHP] PHP V4.3.10 / Apache2 Handler Question...

2005-01-01 Thread Robin Getz
I am trying to turn on apache_child_terminate with PHP V4.3.10 / Apache 2.0.52
When I do a phpinfo(); it returns a:
apache2handler with only three Directives:
- engine
- last_modified
- xbithack
When I look at others with apache 1.3, it lists, child_terminate, which I 
need to be able to set.

Does this function only work with Apache 1.3?
Thanks
-Robin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] handling large files w/readfile

2005-01-01 Thread Sebastian
yea. all the files aren't 100MB though.. some are 2mb (even less) while some
files are over 300MB as well.
so, does this need to be adjusted depending on the filesize?

thanks.

- Original Message - 
From: Rory Browne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Sebastian [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Friday, December 31, 2004 10:24 PM
Subject: Re: [PHP] handling large files w/readfile


 I'd go with Richards Basic idea, but if you're outputting a 100Mb file
 I'd use a hell of a lot bigger chunks than 4K. With the syscall and
 loop overhead, i'd go with at least half a megabyte, or more likely
 2Mb depending on your amount of memory.

 To do this you'd change Richards

 echo fread($fp, 4096); //4K chunks

 to

 echo fread($fp, 2048000); // ~2Mb chunks (actually 2000KB but couldn't
 be bothered counting, and 2Mb is an arbitory figure anyway)

 Just make sure you don't have output buffering on.


 On Fri, 31 Dec 2004 15:17:51 -0800 (PST), Richard Lynch [EMAIL PROTECTED]
wrote:
  Sebastian wrote:
   i'm working on a app which output files with readfile() and some
headers..
   i read a comment in the manual that says if your outputting a file php
   will
   use the same amount of memory as the size of the file. so, if the file
is
   100MB php will use 100MB of memory.. is this true?
  
   if it is, how can i work around this?
 
  I don't know if it's STILL true (or ever was) that readfile() would suck
  the whole file into RAM before spitting it out...  Seems real unlikely,
  but...
 
  At any rate, you can simply do:
 
  $file = 'whatever.mb';
  $fp = @fopen($file, 'r') or trigger_error(Could not read $file,
  E_USER_ERROR);
  while (!feof($fp)){
echo fread($fp, 4096); //4K chunks
  }
 
  http://php.net/fopen http://php.net/fread http://php.net/feof
 
  --
  Like Music?
  http://l-i-e.com/artists.htm
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [ANN] Kwartz-php 0.3.0 - a template system for PHP, Ruby, and Java

2005-01-01 Thread Makoto Kuwata
Hi all, A HAPPY NEW YEAR!

I'm pleased to announce the release of Kwartz-php 0.3.0.
  http://www.kuwata-lab.com/kwartz-php

Kwartz-php is a template system which is available with multi
programming language (PHP, Ruby and Java).
And it is the first template system that realized the concept of
'Separation of Presentation Logic and Presentaion data' (SoPL/PD).

It is available to separate the presentation layer from the
main program with any template system. In addition, Kwartz-php
enables you to separate the presentation logics (iteration and
conditional branching) from the presentation data (HTML file).


Features:
  * Separates presentation logic from presentation data.
  * Runs very fast
  * Supports multiple programing languages (PHP/Ruby/Java)
  * Doesn't break HTML design at all
  * Handles any text file
  * Supports Auto-Sanitizing and Partial-Sanitizing


Example:

  * Presentation Data (example.html)
  - There is no iteration nor conditional branching
in the presentation data file.

table
  tr id=mark:values
td@{$var}@/td
  /tr
/table

  
  * Presentation Logic (example.plogic)
  - There is no HTML tags in the presentation logic file.

## Re-define an element
element values {  ## element
  foreach ($list as $var) {
@stag;## start tag
@cont;## content
@etag;## end tag
  }
}


  * Compile
  - Generate an output script from presentation data
and presentation logic.

$ kwartz-php   -p example.plogic example.html  example.php

$ kwartz-php -l eruby  -p example.plogic example.html  example.rhtml

$ kwartz-php -l jstl11 -p example.plogic example.html  example.jsp


  * Output Script
(PHP)

table
?php foreach ($list as $var) { ?
  tr
td?php echo $var; ?/td
  /tr
?php } ?
/table


(eRuby)

table
% for var in list do %
  tr
td%= var %/td
  /tr
% end %
/table


(JSTL)

%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
table
c:forEach var=var items=${list}
  tr
tdc:out value=${var} escapeXml=false//td
  /tr
/c:forEach
/table


The above examples shows:
 * Presentation data (= HTML file) doesn't contain any logics.
 * Presentation logic file doesn't contain any data.
 * These are separated from the main program.
 
The command-line option '-e' escapes the HTML special chars
with 'htmlspecialchars()' in PHP, 'CGI::escapeHTML()' in eRuby,
and 'c:out/' tag without 'escapeXml=false' in JSTL.


Web Page:
  http://www.kuwata-lab.com/kwartz-php

Download:
  https://www.kuwata-lab.com/kwartz-php/download.html

Users Guide:
  http://www.kuwata-lab.com/kwartz-php/users-guide.en.html

Reference Manual:
  http://www.kuwata-lab.com/kwartz-php/reference.en.html

Changes from 0.2.0:
  * [enhance] support new functions (list_length(), str_toupper(), etc)
  * [enhance] support JSTL 1.1
  * [change]  indent format of output script is changed
  * [bugfix]  some bugs are fixed
  see http://www.kuwata-lab.com/kwartz-php/ChangeLog.html for details.


I hope you'd like it.

--
regards,
kwatch

# [off topic]
# I have submitted Kwartz-php to the Zend PHP5 contest, but ignored.
# I have also submitted the Code/App Gallery, but ignored again. Sol...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP :: SSH2 ??

2005-01-01 Thread Pari Purna Chand Nannapaneni
Can anybody give me a small example on using 
ssh2 functions ( http://pecl.php.net/package/ssh2 ).

I want to execute a command on the remote machine and 
want to get the ouput into a phpvariable.

Here is my php code ... 
?php
$connection = ssh2_connect('127.0.0.1', 22);
ssh2_auth_password($connection, 'root', 'myrootpassword');
$stream = ssh2_exec($connection, 'uptime');
echo $stream;
?

I'm getting some Resource id #5 as output.
What does this mean. How to get the actual output of my remote command.

I'm using PHP-4.3.10

best regards,
/Chandu

Re: [PHP] handling large files w/readfile

2005-01-01 Thread Curt Zirzow
* Thus wrote Richard Lynch:
 Sebastian wrote:
  i'm working on a app which output files with readfile() and some headers..
  i read a comment in the manual that says if your outputting a file php
  will
  use the same amount of memory as the size of the file. so, if the file is
  100MB php will use 100MB of memory.. is this true?
 
  if it is, how can i work around this?
 
 I don't know if it's STILL true (or ever was) that readfile() would suck
 the whole file into RAM before spitting it out...  Seems real unlikely,
 but...

Never was and still isn't.

using either readfile or fpassthru is the best route.


Curt
-- 
Quoth the Raven, Nevermore.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php vs java....

2005-01-01 Thread Lewis LaCook
...just looking for opinions: will PHP eclipse (IS PHP
eclipsing) Java? 

bliss
lewis lacook

=


***

Lewis LaCook --Poet-Programmer|||http://www.lewislacook.com/||| 

Web Programmer|||http://www.corporatepa.com/||| 

XanaxPop:Mobile Poem Blog- http://www.lewislacook.com/xanaxpop/ 

Collective Writing Projects-- The Wiki-- http://www.lewislacook.com/wiki/ 
Appendix M -http://www.lewislacook.com/AppendixM/







__ 
Do you Yahoo!? 
Send holiday email and support a worthy cause. Do good. 
http://celebrity.mail.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP :: SSH2 ??

2005-01-01 Thread M. Sokolewicz
Pari Purna Chand Nannapaneni wrote:
Can anybody give me a small example on using 
ssh2 functions ( http://pecl.php.net/package/ssh2 ).

I want to execute a command on the remote machine and 
want to get the ouput into a phpvariable.

Here is my php code ... 
?php
$connection = ssh2_connect('127.0.0.1', 22);
ssh2_auth_password($connection, 'root', 'myrootpassword');
$stream = ssh2_exec($connection, 'uptime');
echo $stream;
?

I'm getting some Resource id #5 as output.
What does this mean. How to get the actual output of my remote command.
I'm using PHP-4.3.10
best regards,
/Chandu
that is because it returns a stream (as is explained in the manual 
(CVS). However, the docs haven't been updated online yet, so that's why 
you can't find em...). To read from the stream, I *guess* you could use 
any normal stream-reading function. eg. fread() or fget().

trying to echo  a resource, will yield just that... 'Resource Id #n'.
$connection = ssh2_connect('127.0.0.1', 22);
ssh2_auth_password($connection, 'root', 'myrootpassword');
$stream = ssh2_exec($connection, 'uptime');
while(!feof($stream)) {
   $var .= fread($stream, 1024);
}
then you should have all in the $var.
hope that helps,
- Tul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] handling large files w/readfile

2005-01-01 Thread Robin Getz
Curt Zirzow wrote:
* Thus wrote Richard Lynch:
 Sebastian wrote:
  i'm working on a app which output files with readfile() and some 
headers..
  i read a comment in the manual that says if your outputting a file
  php will use the same amount of memory as the size of the file. so,
  if the file is 100MB php will use 100MB of memory.. is this true?

 I don't know if it's STILL true (or ever was) that readfile() would
 suck the whole file into RAM before spitting it out...  Seems real
 unlikely, but...

Never was and still isn't.
using either readfile or fpassthru is the best route.
All I know that I am hosting a GForge site, and if I leave the download.php 
code as is, I will send up with apache processes that are 200+Meg. (the 
size of my download files).
http://gforge.org/plugins/scmcvs/cvsweb.php/gforge/www/frs/download.php?rev=1.6;content-type=text%2Fplain;cvsroot=cvsroot%2Fgforge

(which uses readfile)
I have tried fpassthru - same thing.
I have even tried:
$fp = fopen($sys_upload_dir.$group_name.'/'.$filename,'rb');
while (!feof($fp)) {
   $buff = fread($fp, 4096);
   print $buff;
}
fclose ($fp);
and I get the same thing. The only thing that seems to work is:
Header(Location: .$html_pointer_to_fp);
which lets apache do the downloading.
I would do a apache_child_terminate, but the function does not seem to be 
available to me (see my previous question about this).

Any thoughts, or suggestions, I am open to try.
My next experiment is:

var $buff;
while (!feof($fp)) {
   $buff = fread($fp, 4096);
   print $buff;
}
unset($buff);
fclose ($fp);

Hopefully that will make sure that the var $buff is only created once, and 
that the memory is cleared after the function is done.

-Robin 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8

2005-01-01 Thread GH
It would be nice if phpMyAdmin would kindly note that on their website... 

Also, when I run a phpInfo()... it says i have the 3.23.49  could this
be a contributing factor?

On Sat, 1 Jan 2005 15:55:27 +0700, Willy Sudiarto Raharjo
[EMAIL PROTECTED] wrote:
  Has anyone had any problems installing phpMyAdmin with the above
  configuration? I get an error about the mySql client and
  authentication methods? MySQL Error: 1251 : Client does not support
  authentication protocol requested by server
 
 MySQL 4.1.x is using a different authentication protocols so it may break
 phpmyadmin functionality. Use 4.0.x if you want to use phpmyadmin clearly or
 maybe you should wait for the next release
 
 --
 Willy Sudiarto Raharjo
 Registered Linux User : 336579
 Public-key : http://www.informatix.or.id/willy/public-key.txt
 Blog : http://willysr.blogspot.com
 OOo Documentation Project (ID) : http://project.informatix.or.id
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8

2005-01-01 Thread Greg Donald
On Sat, 1 Jan 2005 14:15:27 -0500, GH [EMAIL PROTECTED] wrote:
 It would be nice if phpMyAdmin would kindly note that on their website...

http://www.phpmyadmin.net/documentation/

snip
Note: phpMyAdmin's MySQL 4.1 support is experimental! 
/snip


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php vs java....

2005-01-01 Thread Greg Donald
On Sat, 1 Jan 2005 10:07:20 -0800 (PST), Lewis LaCook [EMAIL PROTECTED] wrote:
 ...just looking for opinions: will PHP eclipse (IS PHP
 eclipsing) Java?

I'd like to see threads added to PHP.  Java has them, and Perl does as
well.  And I'm sure there are others that I don't know about.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8

2005-01-01 Thread GH
does anyone know of a simular tool that will work/has 4.1 support?

thanks


On Sat, 1 Jan 2005 14:33:05 -0600, Greg Donald [EMAIL PROTECTED] wrote:
 On Sat, 1 Jan 2005 14:15:27 -0500, GH [EMAIL PROTECTED] wrote:
  It would be nice if phpMyAdmin would kindly note that on their website...
 
 http://www.phpmyadmin.net/documentation/
 
 snip
 Note: phpMyAdmin's MySQL 4.1 support is experimental!
 /snip
 
 --
 Greg Donald
 Zend Certified Engineer
 http://gdconsultants.com/
 http://destiney.com/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8

2005-01-01 Thread Donny Simonton
The problem is not with phpmyadmin, the problem is with php.  If you install
4.3 of php it will not work with mysql 4.1.8 or any version mysql 4.1 or
5.0.  It will only work if you turn on the short passwords option in 4.1.
I've not tried it on 5.0 lately.  You can get it installed but it takes a
little work.  This is not a phpmyadmin bug it's all, it's not really a php,
and it's not a mysql bug.  I reported it to both phpmyadmin and php.net over
a year ago.

Think this is a problem, wait until you get a $40k 64 bit machine and try to
install php on it via source because you want to use php 4.3 and mysql 4.1
and you find out you can't install anything because 64 bit installs stuff in
different places than php is expecting it.  And the php devel team has no
plans on fix it.  So you have to hack the config script to get it to work.

Donny

 -Original Message-
 From: GH [mailto:[EMAIL PROTECTED]
 Sent: Saturday, January 01, 2005 1:15 PM
 To: Willy Sudiarto Raharjo; php-general; mysql@lists.mysql.com
 Subject: Re: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8
 
 It would be nice if phpMyAdmin would kindly note that on their website...
 
 Also, when I run a phpInfo()... it says i have the 3.23.49  could this
 be a contributing factor?
 
 On Sat, 1 Jan 2005 15:55:27 +0700, Willy Sudiarto Raharjo
 [EMAIL PROTECTED] wrote:
   Has anyone had any problems installing phpMyAdmin with the above
   configuration? I get an error about the mySql client and
   authentication methods? MySQL Error: 1251 : Client does not support
   authentication protocol requested by server
 
  MySQL 4.1.x is using a different authentication protocols so it may
 break
  phpmyadmin functionality. Use 4.0.x if you want to use phpmyadmin
 clearly or
  maybe you should wait for the next release
 
  --
  Willy Sudiarto Raharjo
  Registered Linux User : 336579
  Public-key : http://www.informatix.or.id/willy/public-key.txt
  Blog : http://willysr.blogspot.com
  OOo Documentation Project (ID) : http://project.informatix.or.id
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8

2005-01-01 Thread M. Sokolewicz
Donny Simonton wrote:
The problem is not with phpmyadmin, the problem is with php.  If you install
4.3 of php it will not work with mysql 4.1.8 or any version mysql 4.1 or
5.0.  It will only work if you turn on the short passwords option in 4.1.
I've not tried it on 5.0 lately.  You can get it installed but it takes a
little work.  This is not a phpmyadmin bug it's all, it's not really a php,
and it's not a mysql bug.  I reported it to both phpmyadmin and php.net over
a year ago.
If you use the mysqli extension with it, it works *fine*. But you need 
PHP 5 for that...

Think this is a problem, wait until you get a $40k 64 bit machine and try to
install php on it via source because you want to use php 4.3 and mysql 4.1
and you find out you can't install anything because 64 bit installs stuff in
different places than php is expecting it.  And the php devel team has no
plans on fix it.  So you have to hack the config script to get it to work.
that has already been fixed a couple of weeks ago...
Donny

-Original Message-
From: GH [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 01, 2005 1:15 PM
To: Willy Sudiarto Raharjo; php-general; mysql@lists.mysql.com
Subject: Re: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8
It would be nice if phpMyAdmin would kindly note that on their website...
Also, when I run a phpInfo()... it says i have the 3.23.49  could this
be a contributing factor?
On Sat, 1 Jan 2005 15:55:27 +0700, Willy Sudiarto Raharjo
[EMAIL PROTECTED] wrote:
Has anyone had any problems installing phpMyAdmin with the above
configuration? I get an error about the mySql client and
authentication methods? MySQL Error: 1251 : Client does not support
authentication protocol requested by server
MySQL 4.1.x is using a different authentication protocols so it may
break
phpmyadmin functionality. Use 4.0.x if you want to use phpmyadmin
clearly or
maybe you should wait for the next release
--
Willy Sudiarto Raharjo
Registered Linux User : 336579
Public-key : http://www.informatix.or.id/willy/public-key.txt
Blog : http://willysr.blogspot.com
OOo Documentation Project (ID) : http://project.informatix.or.id

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8

2005-01-01 Thread Robert Cummings
On Sat, 2005-01-01 at 16:48, Donny Simonton wrote:

 Think this is a problem, wait until you get a $40k 64 bit machine and try to
 install php on it via source because you want to use php 4.3 and mysql 4.1
 and you find out you can't install anything because 64 bit installs stuff in
 different places than php is expecting it.  And the php devel team has no
 plans on fix it.  So you have to hack the config script to get it to work.

Try paying someone on the PHP dev team $40k to fix it. You might find it
fixed the same day. You are, after all, using free and open source
software, the onus is on you to make things work the way you want when
it deviates from the default.

It's funny when someone complains about free software when they have
$40k hardware. Makes me want to cry... NOT!

As a side comment... did you happen to kick back a patch to the PHP team
for the changes you made to the config script?

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8

2005-01-01 Thread Donny Simonton
Yes, I did send in a patch just like the 3 or 4 other people who had the
same problem.  I'm not complaining about php, I was just commenting about
the person complaining that it was a problem with phpmyadmin.  I complained
about the problem over a year ago, when I first installed mysql 4.1.0, but
the problem was definitely not with phpmyadmin.  It was a combination of php
not working well with mysql 4.1.0.

Why would have pay somebody 40k a year, I can do it myself or anyone of my
other 20 programmers.  When php says it's not a bug, then obviously they
don't see it as being a problem.  Since all 32 bit servers will be phased
out by mid-May because of the opteron and the new intel procs, I'll just sit
back and watch the bug submissions come in next year as everybody gets their
new hardware in.  I won't complain, I know how to fix it.

Donny

 -Original Message-
 From: Robert Cummings [mailto:[EMAIL PROTECTED]
 Sent: Saturday, January 01, 2005 6:55 PM
 To: Donny Simonton
 Cc: 'GH'; 'Willy Sudiarto Raharjo'; 'php-general'; mysql@lists.mysql.com
 Subject: RE: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8
 
 On Sat, 2005-01-01 at 16:48, Donny Simonton wrote:
 
  Think this is a problem, wait until you get a $40k 64 bit machine and
 try to
  install php on it via source because you want to use php 4.3 and mysql
 4.1
  and you find out you can't install anything because 64 bit installs
 stuff in
  different places than php is expecting it.  And the php devel team has
 no
  plans on fix it.  So you have to hack the config script to get it to
 work.
 
 Try paying someone on the PHP dev team $40k to fix it. You might find it
 fixed the same day. You are, after all, using free and open source
 software, the onus is on you to make things work the way you want when
 it deviates from the default.
 
 It's funny when someone complains about free software when they have
 $40k hardware. Makes me want to cry... NOT!
 
 As a side comment... did you happen to kick back a patch to the PHP team
 for the changes you made to the config script?
 
 Cheers,
 Rob.
 --
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, properties, sessions, and caches. InterJinn |
 | also provides an extremely flexible architecture for   |
 | creating re-usable components quickly and easily.  |
 `'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8

2005-01-01 Thread John Nichel
Donny Simonton wrote:
Yes, I did send in a patch just like the 3 or 4 other people who had the
same problem.  I'm not complaining about php, I was just commenting about
the person complaining that it was a problem with phpmyadmin.  I complained
about the problem over a year ago, when I first installed mysql 4.1.0, but
the problem was definitely not with phpmyadmin.  It was a combination of php
not working well with mysql 4.1.0.
How is this a 'problem' with PHP?  It was MySQL who changed how 
passwords were handled by default.  However, it's not even a MySQL 
problem...it's not a problem at all.  MySQL added in backwards 
capabiilty for passwords.

Why would have pay somebody 40k a year, I can do it myself or anyone of my
other 20 programmers.  When php says it's not a bug, then obviously they
don't see it as being a problem.
It's not a problem.  There is a workaround for it.  It's that simple. 
Why should the PHP people rewrite the MySQL functions when a) the amount 
of people using php v4.x and MySQL = 4.1.x are small, and b) it will 
work if you take the time to read.

Since all 32 bit servers will be phased
out by mid-May because of the opteron and the new intel procs, I'll just sit
back and watch the bug submissions come in next year as everybody gets their
new hardware in.
All phased out by mid-May???  All where?  Maybe at Intercosmos (even 
though I doubt that), but 32 bit servers will still exist, more that 
likely as the majority, long after May.  Most companies are not going to 
shell out the duckies to 'upgrade' to 64-bit when a) alot of the 
software hasn't been battle tested, b) there are no big advantages to it 
 in the LAMP world, and c) there is no big outcry from the customer 
base to make the switch.

I won't complain, I know how to fix it.
And I'll refrain from getting personal.
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] handling large files w/readfile

2005-01-01 Thread Robin Getz
Robin Getz wrote:
My next experiment is:

$buff = 0;
while (!feof($fp)) {
   $buff = fread($fp, 4096);
   print $buff;
}
unset($buff);
fclose ($fp);

Nope that doesn't work either - came back, and saw apache processes that 
were +450Meg. Changed it back to apache redirection for now.

If anyone has __any__ suggestions, I am more than happy to try. I would 
like to get this figured out.

Thanks
-Robin 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] handling large files w/readfile

2005-01-01 Thread Rasmus Lerdorf
Robin Getz wrote:
Robin Getz wrote:
My next experiment is:

$buff = 0;
while (!feof($fp)) {
   $buff = fread($fp, 4096);
   print $buff;
}
unset($buff);
fclose ($fp);


Nope that doesn't work either - came back, and saw apache processes that 
were +450Meg. Changed it back to apache redirection for now.

If anyone has __any__ suggestions, I am more than happy to try. I would 
like to get this figured out.
Well, the above code does not use more than 4K of ram plus a bit of 
overhead.  So if something is causing your processes to grow to 450M you 
need to look elsewhere because this code is definitely not the cause.

-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] handling large files w/readfile

2005-01-01 Thread Sebastian
well, i really can't confirm what your seeing. but that is why i orginally
started this topic. i will do some tests..
are you setting headers before output? i just ran into another problem..
when downloading a .tar file it just returns an empty .tar file.. seems to
work fine with .exe, .zip, tar.gz, but not .tar

any ideas?
this is what im using:

header('Content-type: application/octet-stream');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-transfer-encoding: binary');
header('Content-Disposition: attachment; filename=' . $file['type'] . '');
header('Content-Length: ' . filesize($file['path'] . $file['type']));
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');

- Original Message - 
From: Robin Getz [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Saturday, January 01, 2005 9:38 PM
Subject: RE: [PHP] handling large files w/readfile


 Robin Getz wrote:
 My next experiment is:
 
 $buff = 0;
 while (!feof($fp)) {
 $buff = fread($fp, 4096);
 print $buff;
 }
 unset($buff);
 fclose ($fp);
 

 Nope that doesn't work either - came back, and saw apache processes that
 were +450Meg. Changed it back to apache redirection for now.

 If anyone has __any__ suggestions, I am more than happy to try. I would
 like to get this figured out.

 Thanks
 -Robin

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php