Re: [PHP] Graph type

2008-08-08 Thread Jim Lucas

tedd wrote:

At 7:45 PM +0100 8/8/08, Richard Heyes wrote:

Hi,

Well, whatever it is, I made one. Just a picture at the moment because
I have no website... :-(

http://picasaweb.google.com/richard.heyes

--
Richard Heyes
http://www.phpguru.org


Seriously, it looks just like a horizontal bar chart showing two 
distributions.


If you want to see the most suburb graphs ever, try viewing this:

http://weirdboi.multiply.com/video/item/7/The_3rd_world_myth

This presentation is the best I've ever seen and if we could put all 
data into similar presentations, we would all have a better 
understanding of everything.


Cheers,

tedd




So, Richard, when will your version of this be coming out???  :)

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



[PHP] Re: Using Ajax to populate a drop-down list

2008-08-08 Thread Manuel Lemos

Hello,

on 08/08/2008 12:58 AM Don said the following:

Hi,

I have a form with two lists. One is populated with many options while the 
second is populated with only a single item.  When the first drop-down list 
is changed, I call a PHP script sing AJAX to populate the second list.  I 
also need to perform another task when the second list is changed but it 
seems not to work.


I think this is because even though my AJAX script populates the second 
drop-down list using pure PHP code, the second drop-down isn't aware of it. 
I've tries adding JavaScript code in the AJAX route to add options to the 
list but it's not working.


Does anyone have an example of how to do this?


This is being asked overe and over again. No problem.

You may want to try this forms class. It comes with a plug-in that does 
exactly that. It can load options in a linked select input depending on 
the value of the first input. The options can be loaded statically from 
arrays or dynamically from the server using AJAX. There are variants of 
the plug-in to load options from many different types of databases.


http://www.phpclasses.org/formsgeneration

Here is a live example:

http://www.meta-language.net/forms-examples.html?example=test_linked_select

Here you can watch a tutorial video about this plug-in:

http://www.phpclasses.org/browse/video/1/package/1/section/plugin-linked-select.html

--

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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



RE: [PHP] Re: PUT vs. POST (was: php File upload)

2008-08-08 Thread Boyd, Todd M.
> -Original Message-
> From: mike [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 08, 2008 4:36 PM
> To: Per Jessen
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Re: PUT vs. POST (was: php File upload)
> 
> On 8/8/08, Per Jessen <[EMAIL PROTECTED]> wrote:
> 
> > I am not for or against either, I'm just looking for the right
> argument
> > for PUT support as it seems to be lacking (and I've never found
> myself
> > in a situation where PUT was the solution).
> 
> I need to accept files of various sizes - up to 2GB, maybe even more
> (if it can be supported) - videos, code samples, zips, pdfs, anything.
> 
> They're coming from various geographies - so slow unreliable
> connections must be factored in.
> 
> HTTP upload even with -large- files on a fast connection can be
> spotty, due to how many systems are in place between client -> server.
> There is no resume either with straight browser upload...

My buddy is/was hosting a free licensed-music service that needed "segmented" 
uploads. I wrote a Java applet that communicates with a "receiver" PHP page to 
upload the file in segments rather than all at once. I got it to successfully 
upload an MP3, but a few bytes were missing from the destination file. I'll try 
to go digging through the "receiver" code and see if I can't find something to 
post that may give you guys a push in (hopefully) the right direction.

I had to use Java for the simple fact that PHP by itself cannot access the 
local file system in a way that allows for the partial loading of files. If 
I/we get the source to work, 2GB, 4GB, the contents of the library of 
congress... all will be feasible.

More news at 11,


Todd Boyd
Web Programmer




Re: [PHP] Re: PUT vs. POST (was: php File upload)

2008-08-08 Thread mike
On 8/8/08, Per Jessen <[EMAIL PROTECTED]> wrote:

> I am not for or against either, I'm just looking for the right argument
> for PUT support as it seems to be lacking (and I've never found myself
> in a situation where PUT was the solution).

I need to accept files of various sizes - up to 2GB, maybe even more
(if it can be supported) - videos, code samples, zips, pdfs, anything.

They're coming from various geographies - so slow unreliable
connections must be factored in.

HTTP upload even with -large- files on a fast connection can be
spotty, due to how many systems are in place between client -> server.
There is no resume either with straight browser upload...

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



Re: [PHP] php File upload

2008-08-08 Thread Tom
> PUT is raw (AFAIK)

That sounds good. Have you any link to a basicly methode description? This 
is a really new methode for me but sounds better than http upload btw. 
resume function is not bad.




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



Re: [PHP] how to curl

2008-08-08 Thread Nathan Nobbe
On 8/8/08, mukesh yadav <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I want to send some text to the serverA For a varification and gettign
> some data from the server from the serverB.
> is it possible to achieve this using cURL If yes then can any one please
> tell me how do i achieve this?
> I tried to learn cURL function but I'm not able to understand any thing can
> nay one explain me how to use this funtion.



remember, serverB should be speaking http.  were you unable to understand
its usage looking at the manual,

http://us3.php.net/manual/en/function.curl-init.php

?

-nathan


[PHP] Inconsistent behavior. PHP5 FreeBSD server Vs PHP5 Windows Server.

2008-08-08 Thread merv

Hi,

I have a strange problem with PHP5 on FreeBSD.

When run on a FreeBSD server the decrypt function of a xTea encryption 
library does not work correctly. While the same PHP code runs without 
problem on a Windows Server. Has anybody experienced similar problems? I 
am at a dead end any help would be much appreciated.


Windows output:
xTea

A secret message. Meet at 21:00 by the old bridge to talk about the new 
plan.


hK/xEOKqgx+Tfb7tCndxFH/3HTck+cy3+y1uMa/DUWNgg7I91/QeG2BceCmtaDYmFjPRAczqCHCc 


LHMWiGE0ZQV+QC+f3xcJWvtGxLIdDHY=

A secret message. Meet at 21:00 by the old bridge to talk about the new 
plan.



FreeBSD output:
xTea

A secret message. Meet at 21:00 by the old bridge to talk about the new 
plan.


hK/xEOKqgx+Tfb7tCndxFH/3HTck+cy3+y1uMa/DUWNgg7I91/QeG2BceCmtaDYmFjPRAczqCHCc 


LHMWiGE0ZQV+QC+f3xcJWvtGxLIdDHY=

’³ûøfsƒ‰cfˆ®[Ë[…*x¶ØÚ5L´¥$¨lÔî�ÊB%Tª”ô�Ö�GµXõqÕ-åÉH>(€¯;H8¯€àØÃ


Note encryption works fine it is possible to encrypt the message on 
FreeBSD and decrypt the message on Windows. The message also decrypts 
correctly using a Javascript implementation of xTea. The only part that 
fails is decrypt under FreeBSD. Is this expected and common?


PHP source:

$input = "A secret message. Meet at 21:00 by the old bridge to talk 
about the new plan.";


//Encrypt
$ct_data = base64_encode(cryptN($input, $key, TRUE, 32));
//Decrypt
$pt_data = cryptN(base64_decode($ct_data), $key, FALSE, 32);

?>


xTea






xTEA.php:

http://www.simonshepherd.supanet.com/tea.htm

crypt en- and decrypts a string (1st arg) using a key (2nd arg) of
length 16 with 16 iterations (a 4th argument may be given to use
another number of iterations (8 is superficial, 16 is often adequate,
32 is hard)). Arg 3 is true for encryption, false for decryption. Key
is taken to contain byte characters (0x01-0xFF); subject sstring may
contain wider characters but only each lower byte is used.

\*/

function cryptN($str,$key,$encrypt,$itr)
{
$res="";

while (strlen($str)>8)
{
// $res .= crypt8(substr($str,0,8),$key,$encrypt,$itr);
$res .= JScrypt8(substr($str,0,8),$key,$encrypt,$itr);
$str = substr($str,8);
}

if (strlen($str)>0)
{
while (strlen($str)<8)
{
$str .= ' ';
}
// $res .= crypt8($str,$key,$encrypt,$itr);
$res .= JScrypt8($str,$key,$encrypt,$itr);
}

return rtrim($res,' ');
}

//Four-byte truncate
function fbt($x)
{
$x = $x&0x0;
return $x<0?0x01+$x:$x;
}

function JScrypt8($oct,$key,$encrypt,$itr)
{
$y=0;
$z=0;
$k=array(); $k[0]=$k[1]=$k[2]=$k[3]=0;
$d=0x9E3779B9;
$sum=$encrypt?0:($d*$itr);
$res="";

for ($i=0; $i<8; )
{
$y=fbt(($y<<8)+(ord($oct{$i})&0xFF));
$k[$i&3]=fbt(($k[$i&3]<<8)+ord($key{$i}));
$k[$i&3]=fbt(($k[$i&3]<<8)+ord($key{$i+8}));
$i++;
$z=fbt(($z<<8)+(ord($oct{$i})&0xFF));
$k[$i&3]=fbt(($k[$i&3]<<8)+ord($key{$i}));
$k[$i&3]=fbt(($k[$i&3]<<8)+ord($key{$i+8}));
$i++;
}
if ($encrypt)
{
while ($itr-->0)
{
$y = fbt(($y+fbt(($z*16)^floor($z/32))+fbt($z^$sum)+$k[$sum&3]));
$sum=$sum+$d;
$z = fbt(($z+fbt(($y*16)^floor($y/32))+fbt($y^$sum)+$k[($sum>>11)&3]));
}
}
else
{
while ($itr-->0)
{
$z = fbt($z-fbt(fbt(($y*16)^floor($y/32))+fbt($y^$sum)+$k[($sum>>11)&3]));
$sum=$sum-$d;
$y = fbt($y-fbt(fbt(($z*16)^floor($z/32))+fbt($z^$sum)+$k[$sum&3]));
}
}
for ($i=4; $i-->0; )
{
$res .= chr(fbt(($y&0xFF00)>>24));
$y = $y<<8;
$res .= chr(fbt(($z&0xFF00)>>24));
$z=$z<<8;
}
return $res;
}

function crypt8($oct,$key,$encrypt,$itr)
{
$y=0;
$z=0;
$k=array(); $k[0]=$k[1]=$k[2]=$k[3]=0;
$d=0x9E3779B9;
$sum=$encrypt?0:($d*$itr)&0x0;
$res="";

for ($i=0; $i<8; )
{
$y=($y<<8)+(ord($oct{$i})&0xFF);
$k[$i&3]=($k[$i&3]<<8)+ord($key{$i});
$k[$i&3]=($k[$i&3]<<8)+ord($key{$i+8});
$i++;
$z=($z<<8)+(ord($oct{$i})&0xFF);
$k[$i&3]=($k[$i&3]<<8)+ord($key{$i});
$k[$i&3]=($k[$i&3]<<8)+ord($key{$i+8});
$i++;
}
if ($encrypt)
{
while ($itr-->0)
{
$y = ($y+(($z<<4)^($z>>5))+($z^$sum)+$k[$sum&3])&0x0;
$sum=$sum+$d;
$z = ($z+(($y<<4)^($y>>5))+($y^$sum)+$k[($sum>>11)&3])&0x0;
}
}
else
{
while ($itr-->0)
{
$z = 
($z+0x01-$y<<4)^($y>>5))+($y^$sum)+$k[($sum>>11)&3])&0x0))&0x0; 


$sum=($sum+0x01-$d)&0x0;
$y = 
($y+0x01-$z<<4)^($z>>5))+($z^$sum)+$k[$sum&3])&0x0))&0x0; 


}
}
for ($i=4; $i-->0; )
{
$res .= chr(($y&0xFF00)>>24);
$y = $y<<8;
$res .= chr(($z&0xFF00)>>24);
$z=$z<<8;
}
return $res;
}

?>


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



[PHP] Re: PUT vs. POST (was: php File upload)

2008-08-08 Thread Per Jessen
mike wrote:

> On 8/8/08, Per Jessen <[EMAIL PROTECTED]> wrote:
> 
>> Same as POST then :-)  (except for the resume bit).
>>
>> I still don't see much of a difference.  It doesn't matter much to
>> me,
>> I'd just like to understand what the real difference is.  Maybe I
>> need to go and read RFC2616.
> 
> I'm all for using existing POST but it seems like a lot of
> configuration needs to occur, 

Well, that's not really true unless your requirements for upload go
beyond what is considered the norm/default.  Large files for instance
are not considered the norm, so yes, some additional configuration is
necessary.

> and PHP is expecting a single stream of data. If the stream is broken,
> how do you resume it? If you accepted the data raw you could dump the
> stream to a file until it ends, and then fseek($fp, $offset) when you
> get a resume request... 

Yes, but that does seem to be the only point about PUT vs. POST.

> PUT seems to be expected to be straight old "file $x goes here" ... I
> actually am not allowing the file to be put on the filesystem directly
> but fed to a PHP script.
> 
> I am totally down for POST since POST is supported by browsers, flash,
> everything, and PUT has some limitations (java applets aplenty, flash
> can do it i think but you have to do actual raw socket communication
> and I haven't found an applet for that yet)

I am not for or against either, I'm just looking for the right argument
for PUT support as it seems to be lacking (and I've never found myself
in a situation where PUT was the solution).


/Per Jessen, Zürich


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



Re: [PHP] php File upload

2008-08-08 Thread mike
On 8/8/08, Per Jessen <[EMAIL PROTECTED]> wrote:

> Same as POST then :-)  (except for the resume bit).
>
> I still don't see much of a difference.  It doesn't matter much to me,
> I'd just like to understand what the real difference is.  Maybe I need
> to go and read RFC2616.

I'm all for using existing POST but it seems like a lot of
configuration needs to occur, and PHP is expecting a single stream of
data. If the stream is broken, how do you resume it? If you accepted
the data raw you could dump the stream to a file until it ends, and
then fseek($fp, $offset) when you get a resume request...

PUT seems to be expected to be straight old "file $x goes here" ... I
actually am not allowing the file to be put on the filesystem directly
but fed to a PHP script.

I am totally down for POST since POST is supported by browsers, flash,
everything, and PUT has some limitations (java applets aplenty, flash
can do it i think but you have to do actual raw socket communication
and I haven't found an applet for that yet)

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



[PHP] tidy

2008-08-08 Thread Selwyn Polit
How do I install php-tidy extension on a hosted linux?  I don't have 
access to yum or apt-get.  When I try pecl install tidy this fails


..
checking for TIDY support... yes, shared
configure: error: Cannot find libtidy
ERROR: `/var/tmp/pear/download/tidy-1.2/configure --with-tidy' failed

I am using php5 on westhost.
thanks

Selwyn


--
Selwyn Polit
Computer Consulting, programming, web sites
512-696-0410
www.AustinProgressiveCalendar.com


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



Re: [PHP] php File upload

2008-08-08 Thread Per Jessen
mike wrote:

> On 8/8/08, Andrew Ballard <[EMAIL PROTECTED]> wrote:
> 
>> I've not had to upload such large files over HTTP, so forgive my
>> ignorance, but on the request end isn't the only difference between
>> PUT and POST the verb used in the request (and the intent of the
>> operation)? What can you do with PUT that cannot also be handled the
>> same in POST? I don't see any implementations doing it, but from what
>> I can tell the spec allows you to use Content-Range in the request
>> headers that your client sends to PUT/POST the same way the server
>> sends them in the response headers when serving a GET request.
> 
> POST sends mime-encoded
> PUT is raw (AFAIK)

That's not necessarily a big difference between the two - mime-encoded
can also be plain 8-bit.

> Using PUT you can do pure file uploads, have smart clients that tell
> the server where to resume, it's not mime encoded (so not extra
> bytes), it can be processed as a web request via PHP, it can be done
> over SSL for security ...

Same as POST then :-)  (except for the resume bit).

I still don't see much of a difference.  It doesn't matter much to me,
I'd just like to understand what the real difference is.  Maybe I need
to go and read RFC2616.


/Per Jessen, Zürich


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



Re: [PHP] Graph type

2008-08-08 Thread tedd

At 7:45 PM +0100 8/8/08, Richard Heyes wrote:

Hi,

Well, whatever it is, I made one. Just a picture at the moment because
I have no website... :-(

http://picasaweb.google.com/richard.heyes

--
Richard Heyes
http://www.phpguru.org


Seriously, it looks just like a horizontal bar chart showing two distributions.

If you want to see the most suburb graphs ever, try viewing this:

http://weirdboi.multiply.com/video/item/7/The_3rd_world_myth

This presentation is the best I've ever seen and if we could put all 
data into similar presentations, we would all have a better 
understanding of everything.


Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Graph type

2008-08-08 Thread Richard Heyes
Hi,

Well, whatever it is, I made one. Just a picture at the moment because
I have no website... :-(

http://picasaweb.google.com/richard.heyes

-- 
Richard Heyes
http://www.phpguru.org

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



Re: [PHP] Graph type

2008-08-08 Thread Adam Richardson
When I first saw it, I thought of a stem and leaf graph:
http://cnx.org/content/m10157/latest/#table3
http://www.nervenet.org/papers_images/cb2.jpg

However, your stem remains constant (10), so I'm not really sure what you're
graphing.

Adam

On Fri, Aug 8, 2008 at 1:11 PM, tedd <[EMAIL PROTECTED]> wrote:

> At 3:59 PM +0100 8/8/08, Richard Heyes wrote:
>
>>  > Anyone know what this graph type is called?
>>
>> Well, whatever it is I made one. It'll be online as soon as my website is.
>>
>
>
> I would call it a bipolar bar chart.
>
> Cheers,
>
> tedd
> --
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
> --
>  PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] php File upload

2008-08-08 Thread mike
On 8/8/08, Andrew Ballard <[EMAIL PROTECTED]> wrote:

> I've not had to upload such large files over HTTP, so forgive my
> ignorance, but on the request end isn't the only difference between
> PUT and POST the verb used in the request (and the intent of the
> operation)? What can you do with PUT that cannot also be handled the
> same in POST? I don't see any implementations doing it, but from what
> I can tell the spec allows you to use Content-Range in the request
> headers that your client sends to PUT/POST the same way the server
> sends them in the response headers when serving a GET request.

POST sends mime-encoded
PUT is raw (AFAIK)

It's basically file exchange friendly. People usually say "HTTP isn't
for files, FTP is" but that's a whole other can of worms especially
when you're accepting uploads from -anyone- you have to implement a
wacky two-step process, ensure people know how to use FTP, blahblah.

Using PUT you can do pure file uploads, have smart clients that tell
the server where to resume, it's not mime encoded (so not extra
bytes), it can be processed as a web request via PHP, it can be done
over SSL for security ...

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



Re: [PHP] php File upload

2008-08-08 Thread Andrew Ballard
On Fri, Aug 8, 2008 at 1:08 PM, mike <[EMAIL PROTECTED]> wrote:
> On 8/8/08, Luke <[EMAIL PROTECTED]> wrote:
>> Is a 1.9 gb file upload even sustainable on even a fairly small scale web
>> application? Maybe you could implement FTP if you trust the people that want
>> to upload the file.
>
> This is why I am pushing for people to use PUT.
>
> Still over HTTP, uploaders can be coded to be 'smart' and resume,
> re-transmit on failure, etc.
>
> It does however require applet (java, flash, etc) or thick client
> support on the client, and a server that understands the DAV request.
> I have it working in nginx right now. Need to test large files and
> watch PHP's memory consumption, since I am spoonfeeding the file to
> PHP.
>

I've not had to upload such large files over HTTP, so forgive my
ignorance, but on the request end isn't the only difference between
PUT and POST the verb used in the request (and the intent of the
operation)? What can you do with PUT that cannot also be handled the
same in POST? I don't see any implementations doing it, but from what
I can tell the spec allows you to use Content-Range in the request
headers that your client sends to PUT/POST the same way the server
sends them in the response headers when serving a GET request.

Andrew

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



Re: [PHP] Kill Magic Quotes

2008-08-08 Thread mike
On 8/8/08, Stephen <[EMAIL PROTECTED]> wrote:

> I found this solution after a web search. I can't attribute the author, but
> would like to if I could.

I have something like that myself, but even on the URL they linked it
has a "php.net approved" snippet of code that works:

http://www.php.net/manual/en/security.magicquotes.disabling.php



but i'd say skip REQUEST. just unset($_REQUEST); don't get in the
habit of using it. blech.

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



Re: [PHP] Why PHP4?

2008-08-08 Thread Per Jessen
Robert Cummings wrote:

> 
> I'm calling shenanigans. It was a breeze to setup windows 3.11 WFWG in
> VMWare. There's a VM for almost every old system these days.

Very true, but not every one is a breeze.  I've been trying to get to
play "Master Of Magic" on DOS for quite some time.  On OS2 it _was_ a
breeze, but trying to get DOS622 to run (with sound, cdrom and minimal
memory usage) in Virtualbox is not a breeze. 


/Per Jessen, Zürich


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



Re: [PHP] Why PHP4?

2008-08-08 Thread Per Jessen
Luke wrote:

> A friend works in a place where they use pascal as a database
> interface!

Nothing wrong with that - Pascal is a decent language.  I know places
that still use APL2 - you need a special keyboard for that.  And you'll
probably have to go and look up what it is :-)

http://en.wikipedia.org/wiki/APL_%28programming_language%29#APL2


/Per Jessen, Zürich


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



Re: [PHP] Graph type

2008-08-08 Thread tedd

At 3:59 PM +0100 8/8/08, Richard Heyes wrote:

 > Anyone know what this graph type is called?

Well, whatever it is I made one. It'll be online as soon as my website is.



I would call it a bipolar bar chart.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] php File upload

2008-08-08 Thread mike
On 8/8/08, Luke <[EMAIL PROTECTED]> wrote:
> Is a 1.9 gb file upload even sustainable on even a fairly small scale web
> application? Maybe you could implement FTP if you trust the people that want
> to upload the file.

This is why I am pushing for people to use PUT.

Still over HTTP, uploaders can be coded to be 'smart' and resume,
re-transmit on failure, etc.

It does however require applet (java, flash, etc) or thick client
support on the client, and a server that understands the DAV request.
I have it working in nginx right now. Need to test large files and
watch PHP's memory consumption, since I am spoonfeeding the file to
PHP.

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



Re: [PHP] php File upload

2008-08-08 Thread Tom
Andrew write the answer:
-1149239296 Bytes is indiz for to big.


This time I had set the upload_file_size and post_max_size to 3000Mb
each, which probably didn't work.  When I tried the 1900Mb file again I
got this error:

[Fri Aug 08 16:57:28 2008] [error] [client 192.168.2.113] PHP Warning:
POST Content-Length of 1992294868 bytes exceeds the limit
of -1149239296 bytes in Unknown on line 0, referer


/Per Jessen, Zürich



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



Re: [PHP] php File upload

2008-08-08 Thread Per Jessen
Andrew Ballard wrote:

>> This time I had set the upload_file_size and post_max_size to 3000Mb
>> each, which probably didn't work.  When I tried the 1900Mb file again
>> I got this error:
>>
>> [Fri Aug 08 16:57:28 2008] [error] [client 192.168.2.113] PHP
>> [Warning:
>> POST Content-Length of 1992294868 bytes exceeds the limit
>> of -1149239296 bytes in Unknown on line 0, referer
>>
>>
>> /Per Jessen, Zürich
> 
> Just a guess 3000MB exceeds the value of a 4-byte integer when
> converted to bytes. -1149239296 is the signed equivalent of
> 3145728000, which is 3000 * 1024 * 1024. 

Ah, well spotted.  So the max request size is stored as a signed 32bit
number. 

> I'm guessing that since the upload size is greater than a (really
> large) negative number, PHP is throwing an error. That's probably
> where the 2GB figure comes from. 

That's certainly one place, but the 2Gb limitation is from HTTP or from
apache.  It's mentioned in the apache manual under "LimitRequestBody'.

"This directive specifies the number of bytes from 0 (meaning unlimited)
to 2147483647 (2GB) that are allowed in a request body."


/Per Jessen, Zürich


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



[PHP] More SOAP questions. Also, SOAP bug? Or just me? (long)

2008-08-08 Thread Christoph Boget
* I'm not sure if this is a bug (unlikely) or if it's just me (highly
likely).  Given the following WSDL,


http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
xmlns="http://schemas.xmlsoap.org/wsdl/"; name="TestTesting"
targetNamespace="urn:/test/testing">
  
http://www.w3.org/2001/XMLSchema";
xmlns="urn:/test/testing/soap/security/types"
elementFormDefault="qualified"
targetNamespace="urn:/test/testing/soap/security/types">
  

  


  

  

http://www.w3.org/2001/XMLSchema";
xmlns="urn:/test/testing/types" elementFormDefault="qualified"
targetNamespace="urn:/test/testing/types">
  
  

  




  

  

  

  

  

  
  

  
  

  
  

  
  

  
  
http://schemas.xmlsoap.org/soap/http"/>

  
  

  
  

  

  
  


  http://www.testserver.com"/>

  


I have the following code for calling the "ServerOperation" operation:

$oClient = new SoapClient( $sWSDL_URI,
array( 'trace' => TRUE,
 'exceptions'  => FALSE ));

$aParameters = array( 'authentication'  => array( 'username' => 'user',

'password' => 'pass' ),
  'stringvar1'  => 'here',
  'stringvar2'  => 'there',
  'data-array'  =>
'Bob' );

$oClient->ServerOperation( $aParameters );

But running that gives me a soap fault.  Apparently the "data-array"
node isn't populated in the SOAP message body.  I actually get a
different soap fault if I try to use classmap, but that is part of a
different question asked below.  So I then add in:

echo 'Types: ' . print_r( $oClient->__getTypes(), TRUE ) . '';

and it turns out that the "data-array" definition in the WSDL is
getting translated as the following structure:

[XX] => struct data-array {
  any;
}

Umm, huh?  What's going on there?  Why is the SoapClient the part of
the namespace included in the definition for the type in the WSDL
() and turning the "any" into an
attribute of the structure?  So in order to get the "data-array" node
in the SOAP message body, I have to change the parameters definition
to:

$aParameters = array( 'authentication'  => array( 'username' => 'user',

'password' => 'pass' ),
  'stringvar1'  => 'here',
  'stringvar2'  => 'there',
  'data-array'  => array( 'any' =>
'Bob' ));

That seems exceptionally silly to me.  Is this a bug in the
SoapClient's translation of the WSDL?  A problem with the WSDL?  Or a
problem with my (albeit simplistic) code and is something I can and
should get around using proper attributes?  If it's the latter, how
can I define attributes for the various nodes?

* Now, this question is sort of an extension of the issue above.  If
instead of passing in an array, I use the classmap option for the
SoapClient, I get a different soap fault but it's based on the same
problem.  If instead my code looks like this:

$oClient = new SoapClient( $sWSDL_URI,
array( 'trace'   => TRUE,
 'exceptions'  => FALSE,
 'classmap'=>
array( 'ServerOperation' => 'MyClass' )));

and populate public properties of an instance of MyClass with the
appropriate values, the fault message I get then is instead "Encoding:
object hasn't 'any' property".  By setting the "data-array" property
(using variable gymnastics because PHP doesn't like dashes in variable
names) as an array with an "any" key, just as I did above when using
the array, then the fault goes away.  However, it then gives me a
different fault but that is another question asked below.  So again,
is there something different I should be doing that can or does deal
with this?  Is it a bug?

* Finally, the last soap fault message I'm getting (alluded to above)
is one that is telling me that there was no POST data.  I see that the
SOAP envelope/body is populated with all the nodes and data the
operation is expecting but didn't ultimately get.  It seems to me that
when the SoapClient is making the remote function call, it is passing
the data as part of a GET.  Is it possible to tell the soap client
that it should use POST instead?  I don't see anything in the
documentation the deals and/or discusses this.

Any help and/or advice would be greatly appreciated!

thnx,
Christoph

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



Re: [PHP] Why PHP4?

2008-08-08 Thread Luke

A friend works in a place where they use pascal as a database interface!

Luke Slater
Lead Developer
NuVoo

On 8 Aug 2008, at 16:25, V S Rawat <[EMAIL PROTECTED]> wrote:


On 8/8/2008 3:59 AM India Time, _Micah Gersten_ wrote:

You can't steal it, but you can't do anything with it either, so  
what's

the point of having it?


They are getting it printed and processing the printed hard copy  
further. That's all.


They even have full fledged working programs (say, in good old  
foxpro) to keep track of a clients work progress, next action date,  
reminders, track of payment from the clients, to the agents who get  
the work done, so on.


I mean it is a complete working system as it was in 80s.

--
V


Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
V S Rawat wrote:

I was surprised to see some very busy and well to do Chartered
Accountants, Company Secretaries still using those 8086 pcs with
Wordstar and lotus that were there on mid 80s.

They say these are no more available so data in these pcs and these
formats are much more safer than that on a latest machine/ software.



--
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] php File upload

2008-08-08 Thread Andrew Ballard
On Fri, Aug 8, 2008 at 11:14 AM, Per Jessen <[EMAIL PROTECTED]> wrote:
> Per Jessen wrote:
>
>> Tom wrote:
>>
>>> Practical i  implement a robust filebase in my new gamer portal and
>>> go to max. at upload values. If the users make a big upload, it
>>> should be stable. I think, later (after release) i will enhance it
>>> with a ftp port. But not yet.
>>>
>>> Here you can see, what i have in filebase, but a 1.9 GB upload fails.
>>> I don't know if this is the overhead.
>>> http://www.guildmeets.de/index.php?onlydirid=78
>>
>> OK, I've also just tried uploading bigger files - 1280Mb,1536Mb,180MB
>> are fine, but 1900Mb fails.  I'll do that again with strace and see if
>> I can spot something obvious - I didn't see any errors etc.
>>
>
> This time I had set the upload_file_size and post_max_size to 3000Mb
> each, which probably didn't work.  When I tried the 1900Mb file again I
> got this error:
>
> [Fri Aug 08 16:57:28 2008] [error] [client 192.168.2.113] PHP Warning:
> POST Content-Length of 1992294868 bytes exceeds the limit
> of -1149239296 bytes in Unknown on line 0, referer
>
>
> /Per Jessen, Zürich

Just a guess 3000MB exceeds the value of a 4-byte integer when
converted to bytes. -1149239296 is the signed equivalent of
3145728000, which is 3000 * 1024 * 1024. I'm guessing that since the
upload size is greater than a (really large) negative number, PHP is
throwing an error. That's probably where the 2GB figure comes from.

Andrew


Re: [PHP] Why PHP4?

2008-08-08 Thread V S Rawat

On 8/8/2008 3:59 AM India Time, _Micah Gersten_ wrote:


You can't steal it, but you can't do anything with it either, so what's
the point of having it?


They are getting it printed and processing the printed hard copy 
further. That's all.


They even have full fledged working programs (say, in good old foxpro) 
to keep track of a clients work progress, next action date, reminders, 
track of payment from the clients, to the agents who get the work done, 
so on.


I mean it is a complete working system as it was in 80s.

--
V



Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



V S Rawat wrote:

I was surprised to see some very busy and well to do Chartered
Accountants, Company Secretaries still using those 8086 pcs with
Wordstar and lotus that were there on mid 80s.

They say these are no more available so data in these pcs and these
formats are much more safer than that on a latest machine/ software.



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



Re: [PHP] php File upload

2008-08-08 Thread Per Jessen
Per Jessen wrote:

> Tom wrote:
> 
>> Practical i  implement a robust filebase in my new gamer portal and
>> go to max. at upload values. If the users make a big upload, it
>> should be stable. I think, later (after release) i will enhance it
>> with a ftp port. But not yet.
>> 
>> Here you can see, what i have in filebase, but a 1.9 GB upload fails.
>> I don't know if this is the overhead.
>> http://www.guildmeets.de/index.php?onlydirid=78
> 
> OK, I've also just tried uploading bigger files - 1280Mb,1536Mb,180MB
> are fine, but 1900Mb fails.  I'll do that again with strace and see if
> I can spot something obvious - I didn't see any errors etc.
> 

This time I had set the upload_file_size and post_max_size to 3000Mb
each, which probably didn't work.  When I tried the 1900Mb file again I
got this error:

[Fri Aug 08 16:57:28 2008] [error] [client 192.168.2.113] PHP Warning: 
POST Content-Length of 1992294868 bytes exceeds the limit
of -1149239296 bytes in Unknown on line 0, referer


/Per Jessen, Zürich


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



Re: [PHP] Graph type

2008-08-08 Thread Richard Heyes
> Anyone know what this graph type is called?

Well, whatever it is I made one. It'll be online as soon as my website is.

-- 
Richard Heyes
http://www.phpguru.org

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



Re: [PHP] php File upload

2008-08-08 Thread Per Jessen
Tom wrote:

> Practical i  implement a robust filebase in my new gamer portal and go
> to max. at upload values. If the users make a big upload, it should be
> stable. I think, later (after release) i will enhance it with a ftp
> port. But not yet.
> 
> Here you can see, what i have in filebase, but a 1.9 GB upload fails.
> I don't know if this is the overhead.
> http://www.guildmeets.de/index.php?onlydirid=78

OK, I've also just tried uploading bigger files - 1280Mb,1536Mb,180MB
are fine, but 1900Mb fails.  I'll do that again with strace and see if
I can spot something obvious - I didn't see any errors etc. 


/Per Jessen, Zürich


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



Re: [PHP] php File upload

2008-08-08 Thread Jim Lucas

Per Jessen wrote:


How about if I upload a 1Gb file to a webserver on a machine that only
has 256Mb memory - would you say that's impossible?


/Per Jessen, Zürich




In my experience that would the correct.


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare


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



RE: [PHP] Graph type

2008-08-08 Thread Chrome


> -Original Message-
> From: tedd [mailto:[EMAIL PROTECTED]
> Sent: 08 August 2008 15:32
> To: php-general@lists.php.net
> Subject: Re: [PHP] Graph type
> 
> >Hi,
> >
> >Anyone know what this graph type is called?
> >
> >http://picasaweb.google.com/richard.heyes
> >
> 
> A European road sign?

Can't be.  The graph makes sense

Dan


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



Re: [PHP] Kill Magic Quotes

2008-08-08 Thread Stephen

Dave M G wrote:

PHP List,
I found this solution after a web search. I can't attribute the author, 
but would like to if I could.


I have a routine like this:

if (isset($_POST['choice'])) {
if (get_magic_quotes_gpc() ){
  stripslashes_arrays( $_POST );
}
$choice = $_POST['choice'];
}
else {
$choice = 'unknown';
}

and this is the function

# strips slashes to a multi dimensional array, by reference
function stripslashes_arrays(&$array) {
if ( is_array($array) ) {
  $keys = array_keys($array);
  foreach ( $keys as $key ) {
if ( is_array($array[$key]) ) {
  stripslashes_arrays($array[$key]);
}
else {
  $array[$key] = stripslashes($array[$key]);
}
  }
}
}



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



Re: [PHP] Re: Variable number of parameters

2008-08-08 Thread Philip Thompson

On Aug 7, 2008, at 12:37 PM, Shawn McKenzie wrote:


Philip Thompson wrote:

Oops! Meant to send this to the list
On Aug 7, 2008, at 9:31 AM, Philip Thompson wrote:

On Aug 6, 2008, at 4:25 PM, Shawn McKenzie wrote:


Philip Thompson wrote:
Is it possible to grab a variable number of parameters and send  
the appropriate amount to another function?

db->prepare("SELECT * FROM `table` WHERE (`id`=?)");
$this->db->bind('ii', $id1);
$this->db->prepare("SELECT * FROM `table` WHERE (`id`=? AND  
`other_id`=?)");

$this->db->bind('ii', $id1, $id2);
// DB class
function bind () {
$args = func_get_args();
$this->statement->bind_param($args[0], $args[1], ...);
}
?>
Ok, is it possible to send any number of variables to db->bind()  
in order to send those to statement->bind_param()?
Or, if someone else has a better db abstraction method, feel  
free to educate...

Thanks,
~Phil


I'm confused as your code looks like it's already doing what  
you're asking.  It's hard to tell without seeing what  
bind_param() looks like.  But just a thought to use arrays in one  
of two ways:


// 1.
$this->db->bind('ii', $id1, $id2);

function bind () {
   $args = func_get_args();
   $this->statement->bind_param($args);
   // then bind_param() can count the number of args and use them
}

//2.
$this->db->bind('ii', array($id1, $id2));

function bind ($var, $ids) {   // pass thru to bind_param()
   $this->statement->bind_param($var, $ids);
   // then bind_param() can use the $ids array
   // or count the ids and send individual args to bind_param()
}

As I said, it's kind of hard to tell without knowing exactly what  
you want to achieve.


One of the more elegant ways that I have seen is to pass required  
args and then an array of args that the receiving function can  
use, like:


$this->db->bind('ii', array('someoption'=>$id1, 'feature'=>$id2,  
'action'=>'doit'));


Need more info on the desired outcome.

-Shawn


The bind_param() function is a built-in PHP MySQLi function (http://php.net/mysqli_bind_param 
). I can't change how this accepts args (of course). Thanks for  
your thoughts anyway. =D


~Philip
"innerHTML is a string. The DOM is not a string, it's a hierarchal  
object structure. Shoving a string into an object is impure and  
similar to wrapping a spaghetti noodle around an orange and calling  
it lunch."

function bind () {
$args = func_get_args();
call_user_func_array(array(&$this->statement, 'bind_param'), $args);
}

Maybe?

-Shawn


I think that might be it!! I can't test it until later... but looks  
like it just may work! I'll update the list when I find out more  
info. ;)


Thanks, Shawn!

~Phil


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



Re: [PHP] Graph type

2008-08-08 Thread tedd

Hi,

Anyone know what this graph type is called?

http://picasaweb.google.com/richard.heyes



A European road sign?

Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] how to curl

2008-08-08 Thread mukesh yadav
Hi,
  I want to send some text to the serverA For a varification and gettign
some data from the server from the serverB.
is it possible to achieve this using cURL If yes then can any one please
tell me how do i achieve this?
I tried to learn cURL function but I'm not able to understand any thing can
nay one explain me how to use this funtion.

Thank you.


Re: [PHP] php File upload

2008-08-08 Thread Luke
Is a 1.9 gb file upload even sustainable on even a fairly small scale  
web application? Maybe you could implement FTP if you trust the people  
that want to upload the file.


Luke Slater
Lead Developer
NuVoo

On 9 Aug 2008, at 14:52, "Tom" <[EMAIL PROTECTED]> wrote:

Practical i  implement a robust filebase in my new gamer portal and  
go to
max. at upload values. If the users make a big upload, it should be  
stable.
I think, later (after release) i will enhance it with a ftp port.  
But not

yet.

Here you can see, what i have in filebase, but a 1.9 GB upload  
fails. I

don't know if this is the overhead.
http://www.guildmeets.de/index.php?onlydirid=78

(in Folder "Neue Game Demos")



"Per Jessen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
Tom wrote:


Hi Per,

Execution Time ist set to 72000, i learned to set it not to low for
tests
:-)
I learned also the last days many things about the php.ini. Many
changes affect later, its mostly for me a trial and error thing and
results in much phenomenon.

At moment its okay, i can upload 1.2 Gb, no problem. I test to upload
a 1.9 GB file (reading the max is 2GB a browser can handle), but this
failes. I don't know is this the overhead or what else.


Well, it seems to me that you've achieved what you need, right?  You
don't need one big upload, you need many smaller but concurrent
uploads, yeah?
I'll try a bigger file later today and see what happens.


/Per Jessen, Zürich



--
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] php File upload

2008-08-08 Thread Tom
Practical i  implement a robust filebase in my new gamer portal and go to 
max. at upload values. If the users make a big upload, it should be stable.
I think, later (after release) i will enhance it with a ftp port. But not 
yet.

Here you can see, what i have in filebase, but a 1.9 GB upload fails. I 
don't know if this is the overhead.
http://www.guildmeets.de/index.php?onlydirid=78

(in Folder "Neue Game Demos")



"Per Jessen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
Tom wrote:

> Hi Per,
>
> Execution Time ist set to 72000, i learned to set it not to low for
> tests
> :-)
> I learned also the last days many things about the php.ini. Many
> changes affect later, its mostly for me a trial and error thing and
> results in much phenomenon.
>
> At moment its okay, i can upload 1.2 Gb, no problem. I test to upload
> a 1.9 GB file (reading the max is 2GB a browser can handle), but this
> failes. I don't know is this the overhead or what else.

Well, it seems to me that you've achieved what you need, right?  You
don't need one big upload, you need many smaller but concurrent
uploads, yeah?
I'll try a bigger file later today and see what happens.


/Per Jessen, Zürich



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



[PHP] Task workflow management system

2008-08-08 Thread Manoj Singh
Hi all,
I am developing the system where i have to dynamically assigned the tasks to
the workers based on certain rules as well as also considering load
balance.

If you have solved this type of problem or any idea or documentation on how
to achieve this, then please help me.

Best Regards,
Manoj Kumar Singh


Re: [PHP] php File upload

2008-08-08 Thread Per Jessen
Tom wrote:

> Hi Per,
> 
> Execution Time ist set to 72000, i learned to set it not to low for
> tests
> :-)
> I learned also the last days many things about the php.ini. Many
> changes affect later, its mostly for me a trial and error thing and
> results in much phenomenon.
> 
> At moment its okay, i can upload 1.2 Gb, no problem. I test to upload
> a 1.9 GB file (reading the max is 2GB a browser can handle), but this
> failes. I don't know is this the overhead or what else.

Well, it seems to me that you've achieved what you need, right?  You
don't need one big upload, you need many smaller but concurrent
uploads, yeah?
I'll try a bigger file later today and see what happens.


/Per Jessen, Zürich


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



Re: [PHP] php File upload

2008-08-08 Thread Tom
Hi Per,

Execution Time ist set to 72000, i learned to set it not to low for tests 
:-)
I learned also the last days many things about the php.ini. Many changes 
affect later, its mostly for me a trial and error thing and results in much 
phenomenon.

At moment its okay, i can upload 1.2 Gb, no problem. I test to upload a 1.9 
GB file (reading the max is 2GB a browser can handle), but this failes. I 
don't know is this the overhead or what else.
Now i search the max value Browseres can handle for . Know you this value?



"Per Jessen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
Tom wrote:

> Hi Per,
>
> your result is on a suse 8.2 ?
> hmm, i don't know the reason why my suse 10.2 machines do that
> failure. My limits for for post_max_size and upload_max_size is both
> 1500M.
>
> Greets & thanx, Tom

Tom,

check your maximum PHP execution time.  I've just done some testing
where the upload was interrupted after 60seconds with this error:

PHP Fatal error:  Maximum execution time of 60 seconds exceeded in
Unknown on line 0, referer: http://tintin/uploadbig.php

I increased time to 240seconds, and had no problem uploading a 1Gb file.
This was on a openSUSE 10.3 system with only 256M RAM.


/Per Jessen, Zürich



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



Re: [PHP] php File upload

2008-08-08 Thread Per Jessen
Per Jessen wrote:

> Jim Lucas wrote:
> 
>> I have never seen a case where Apache has stored the file on the file
>> system. In my past experience it has always held the file in memory,
>> therefor limited to the max physical memory that was install, minus a
>> little for other things.
> 
> Well, I can easily show you such a case - I can upload a 1Gb file
> without apache memory usage changing one bit.  Even if Apache did
> upload into memory, why would that make the file limited to the max
> amount of physical memory??
> 
> How about if I upload a 1Gb file to a webserver on a machine that only
> has 256Mb memory - would you say that's impossible?

Just did that (1Gb file uploaded to machine with 256M RAM) - Apache
definitely does _not_ store the uploaded file in memory, I also straced
the upload, and it's 1) read from socket followed by 2) write to disk. 


/Per Jessen, Zürich


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



Re: [PHP] php File upload

2008-08-08 Thread Per Jessen
Tom wrote:

> Hi Per,
> 
> your result is on a suse 8.2 ?
> hmm, i don't know the reason why my suse 10.2 machines do that
> failure. My limits for for post_max_size and upload_max_size is both
> 1500M.
> 
> Greets & thanx, Tom

Tom, 

check your maximum PHP execution time.  I've just done some testing
where the upload was interrupted after 60seconds with this error:

PHP Fatal error:  Maximum execution time of 60 seconds exceeded in
Unknown on line 0, referer: http://tintin/uploadbig.php

I increased time to 240seconds, and had no problem uploading a 1Gb file. 
This was on a openSUSE 10.3 system with only 256M RAM. 


/Per Jessen, Zürich


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



Re: [PHP] Re: php File upload

2008-08-08 Thread Per Jessen
Tom wrote:

> "Per Jessen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]
> Tom wrote:
> 
>> Im very glad to fix this problem, but the next one is here: Other
>> machine (but 2 GB Ram), same suse version, same (working now) 
>> php.ini with limits to 5000M now and i can't upload a File greater
>> than 900MB. A file under 900MB i see the tmp file growing. A File
>> with +1 GB no temp file seeing at all and break after a view minutes.
>> It's horrible with no error codes and wasting pure of time :-(
>> 
>> The maximum size of an HTTP request is 2Gb.
>>
> 
> What is set this limit?
> 

I can't find it, but I'm pretty certain it's in RFC2616.


/Per Jessen, Zürich


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



Re: [PHP] Flampy : New Framework PHP5-MDA

2008-08-08 Thread Sebboon

Here you have a short video that describe the installer use and its results.

http://blog.webeo.fr/index.php?post/2008/08/08/Demo-Flampy-Installer-en-video
-- 
View this message in context: 
http://www.nabble.com/Flampy-%3A-New-Framework-PHP5-MDA-tp18887166p18891236.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



[PHP] Problem with SOAP and (maybe) VISTA?

2008-08-08 Thread Stefan Langwald
Hello folks,

I'd try the PHP docs example from
http://de.php.net/manual/de/function.soap-soapserver-handle.php

  "http://test-uri/";));
$server->addFunction("test");
$server->handle();
?>

If I open the test.php (with FF) on a linux server I get

−

−

SOAP-ENV:Server
Bad Request. Can't find HTTP_RAW_POST_DATA




If I open the test.php on a vista "server" I get nothing. A blank site. The
logs don't have any error messages for me.
error_reporting  = E_ALL

Could it be a bug of php or ?

Thanks
Stefan


Re: [PHP] Re: php File upload

2008-08-08 Thread Tom
What is set this limit?

"Per Jessen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
Tom wrote:

> Im very glad to fix this problem, but the next one is here: Other
> machine (but 2 GB Ram), same suse version, same (working now)  php.ini
> with limits to 5000M now and i can't upload a File greater than 900MB.
> A file under 900MB i see the tmp file growing. A File with +1 GB no
> temp file seeing at all and break after a view minutes. It's horrible
> with no error codes and wasting pure of time :-(

The maximum size of an HTTP request is 2Gb.


/Per Jessen, Zürich



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



Re: [PHP] Re: php File upload

2008-08-08 Thread Luke
You could always program in something (perhaps in Ajax) to monitor the  
progress of the file upload and check for errors periodically.


Luke Slater

On 8 Aug 2008, at 11:55, Peter Ford <[EMAIL PROTECTED]> wrote:


Per Jessen wrote:

Tom wrote:

Im very glad to fix this problem, but the next one is here: Other
machine (but 2 GB Ram), same suse version, same (working now)   
php.ini
with limits to 5000M now and i can't upload a File greater than  
900MB.

A file under 900MB i see the tmp file growing. A File with +1 GB no
temp file seeing at all and break after a view minutes. It's  
horrible

with no error codes and wasting pure of time :-(

The maximum size of an HTTP request is 2Gb. /Per Jessen, Zürich


Also bear in mind that the file is MIME encoded (so probably  
actually a base-64 stream or some such) and the actual size of the  
data sent in the request is therefore likely to be some fraction  
bigger than the file itself (like 33% bigger for base-64 encoding)



--
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

--
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] Re: php File upload

2008-08-08 Thread Peter Ford

Per Jessen wrote:

Tom wrote:


Im very glad to fix this problem, but the next one is here: Other
machine (but 2 GB Ram), same suse version, same (working now)  php.ini
with limits to 5000M now and i can't upload a File greater than 900MB.
A file under 900MB i see the tmp file growing. A File with +1 GB no
temp file seeing at all and break after a view minutes. It's horrible
with no error codes and wasting pure of time :-(


The maximum size of an HTTP request is 2Gb. 



/Per Jessen, Zürich



Also bear in mind that the file is MIME encoded (so probably actually a base-64 
stream or some such) and the actual size of the data sent in the request is 
therefore likely to be some fraction bigger than the file itself (like 33% 
bigger for base-64 encoding)



--
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



Re: [PHP] Re: php File upload

2008-08-08 Thread Per Jessen
Tom wrote:

> Im very glad to fix this problem, but the next one is here: Other
> machine (but 2 GB Ram), same suse version, same (working now)  php.ini
> with limits to 5000M now and i can't upload a File greater than 900MB.
> A file under 900MB i see the tmp file growing. A File with +1 GB no
> temp file seeing at all and break after a view minutes. It's horrible
> with no error codes and wasting pure of time :-(

The maximum size of an HTTP request is 2Gb. 


/Per Jessen, Zürich


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



[PHP] Graph type

2008-08-08 Thread Richard Heyes
Hi,

Anyone know what this graph type is called?

http://picasaweb.google.com/richard.heyes

Thanks, and I apologise for the slightly off-topic post. Probably best
to reply to me directly.

-- 
Richard Heyes
http://www.phpguru.org

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



[PHP] Re: php File upload

2008-08-08 Thread Tom
Problem solved (at one machine)!

I can upload  a ~ 2 GB File now on a machine with 1 GB Main Memory! No 
Problem, swap is used but no break now.
The answer is, i think, the dramatical overhead for http upload, simply my 
post_max_size and upload_max_size are to small. If i will upload 1 GB it 
must minimum 1.5 GB (better more) on this limit variables.
Im very glad to fix this problem, but the next one is here: Other machine 
(but 2 GB Ram), same suse version, same (working now)  php.ini with limits 
to 5000M now and i can't upload a File greater than 900MB.
A file under 900MB i see the tmp file growing. A File with +1 GB no temp 
file seeing at all and break after a view minutes. It's horrible with no 
error codes and wasting pure of time :-(
Now i begin at bottom on this machine.

Thanx for alle, who look for this problem.
Now we are the very only that can say that php 100% working file uploads if 
memory lower than the file size :-)




""Tom"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
> Hi,
>
> on a linux system (Suese 10.2) with 1 GB memory its not possible to upload 
> via http a  1 Gb File. Thats no limit problem  on my php config. i can 
> look the mem stats when uploading and the growing tmp file. If the temp 
> file has 900 MB, Main Memory free is 0 and the script aborts and php 
> deletes the tmp file.
>
> Why don't php use swap memory ?
>
> Greets Tom
> 



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



Re: [PHP] Using Ajax to populate a drop-down list

2008-08-08 Thread Kevin Waterson
This one time, at band camp, "Don" <[EMAIL PROTECTED]> wrote:

> Does anyone have an example of how to do this?


http://phpro.org/tutorials/Creating-Dropdowns-with-PHP-and-Xajax.html

enjoy,

Kevin

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



[PHP] Re: Version Control Software

2008-08-08 Thread Colin Guthrie

Boyd, Todd M. wrote:

Having never used a revision-control solution in the past, I installed
TortoiseSVN and the associated SVN Server (local-only) found on
www.tigris.org . I've gotta say... it's been a breeze to setup (I used
the SVN "1-Click Setup" installer), and I've already migrated several of
the projects I'm working on to the repository and tested extractions and
versioning. Pretty slick!



Indeed. Glad it's working for you! Don't forget to backup the repository 
regularly tho'!




I can't speak for GIT... but if it's mostly command line, with 130+
switches, I think I'll pass.


As I posted before, I would tend to prefer SVN for web project that 
include graphical churn. With git it keeps a full clone of the 
repository locally and thus if you've changed some large images a lot in 
your version history, that's a whole lot of data to keep on your local 
machine. With subversion it will store a little over double the data it 
needs to with a checkout. This is to allow offline diff'ing and 
reverting if you have a remote server.


Personally, for me at least, SVN is much simpler and the SVN Book over 
at red bean is well worth a couple of hours of reading. 
http://svnbook.red-bean.com/


Git is great and I do love it for distributed code projects with lots of 
authors. But the learning curve is very steep and I still don't consider 
myself competent, let alone and expert at git, whereas I know svn inside 
out!


Have fun.

Col




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



Re: [PHP] php File upload

2008-08-08 Thread Torsten Rosenberger

Am Freitag, den 08.08.2008, 09:00 +0100 schrieb Luke:
> Maybe there is some configuration in the server somewhere causing it  
> to incorrectly use the tmp?
normla config php.ini

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default
if not
; specified).
upload_tmp_dir = "/tmp"

; Maximum allowed size for uploaded files.
upload_max_filesize = 1500M




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



Re: [PHP] php File upload

2008-08-08 Thread Luke
Maybe there is some configuration in the server somewhere causing it  
to incorrectly use the tmp?


Luke Slater

On 8 Aug 2008, at 08:48, Torsten Rosenberger <[EMAIL PROTECTED]>  
wrote:



Hello

on a linux system (Suese 10.2) with 1 GB memory its not possible to  
upload
via http a  1 Gb File. Thats no limit problem  on my php config. i  
can look
the mem stats when uploading and the growing tmp file. If the temp  
file has
900 MB, Main Memory free is 0 and the script aborts and php deletes  
the tmp

file.

Why don't php use swap memory ?

no need for swap

my system OpenSuSE 10.3 512MB RAM

my uploaded file
-rw-r--r-- 1 wwwrun www 10  8. Aug 09:39 mytestfile.out

memory befor upload and during upload are nearly the same
and no swap
total   used   free sharedbuffers
cached
Mem:510488 504728   5760  0  60728
301476
-/+ buffers/cache: 142524 367964
Swap:  2104432  287562075676

a du shows that the tmp file is greater as the memory

du -h /tmp/phpMmAGdN
659M/tmp/phpMmAGdN
and grows
du -h /tmp/phpMmAGdN
663M/tmp/phpMmAGdN


So i think your script is wrong
maybe you trie to read the hole contend from the upload file in a
variable so you reach the memory

post your script ro see if its is correct.

BR/Torsten


--
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] php File upload

2008-08-08 Thread Torsten Rosenberger
Hello

> on a linux system (Suese 10.2) with 1 GB memory its not possible to upload 
> via http a  1 Gb File. Thats no limit problem  on my php config. i can look 
> the mem stats when uploading and the growing tmp file. If the temp file has 
> 900 MB, Main Memory free is 0 and the script aborts and php deletes the tmp 
> file.
> 
> Why don't php use swap memory ?
no need for swap

my system OpenSuSE 10.3 512MB RAM

my uploaded file
-rw-r--r-- 1 wwwrun www 10  8. Aug 09:39 mytestfile.out

memory befor upload and during upload are nearly the same
and no swap
 total   used   free sharedbuffers
cached
Mem:510488 504728   5760  0  60728
301476
-/+ buffers/cache: 142524 367964
Swap:  2104432  287562075676

a du shows that the tmp file is greater as the memory

du -h /tmp/phpMmAGdN
659M/tmp/phpMmAGdN
and grows
 du -h /tmp/phpMmAGdN
663M/tmp/phpMmAGdN


So i think your script is wrong
maybe you trie to read the hole contend from the upload file in a
variable so you reach the memory

post your script ro see if its is correct.

BR/Torsten


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



[PHP] Flampy : New Framework PHP5-MDA

2008-08-08 Thread Sebboon

Hello, 

I'm working on the MDA paradigm for PHP5.

The goal is very simple, generate the source code of your PHP application as
fast as possible like AndroMDA for java users.

Design your class diagram and your physical database diagram, and Flampy
will help you to generate your code...
Flampy provide a very simple ORM simpliste (WIP) and un web service engine
(For example for flex use).

Here you have a demo of the installer (en) :
http://installer.emukina.fr
(better viewed with firefox or opera)

The explanation page (fr):
http://blog.webeo.fr/index.php?pages/Flampy-Le-Guide

The MDA approach page (fr) :
http://blog.webeo.fr/index.php?post/2008/07/18/L-approche-MDA

To use the installer you need a .uml file, try with this one :
http://blog.webeo.fr/public/Flampy/Emukina.uml
Enjoy it ;)
-- 
View this message in context: 
http://www.nabble.com/Flampy-%3A-New-Framework-PHP5-MDA-tp18887166p18887166.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



Re: [PHP] php File upload

2008-08-08 Thread Per Jessen
Luke wrote:

> I think the sentiment is that you can't fit all of the file in the
> memory at once
> 

Which would be absolutely true, but irrelevant - the question is whether
that would prevent me from uploading it?  That is the problem Tom seems
to be having. 


/Per Jessen, Zürich


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



Re: [PHP] php File upload

2008-08-08 Thread Luke
I think the sentiment is that you can't fit all of the file in the  
memory at once


Luke Slater

On 8 Aug 2008, at 07:59, Per Jessen <[EMAIL PROTECTED]> wrote:


Jim Lucas wrote:


What Apache starts, it reads the PHP memory limits in to the running
Apache process.  When you try and upload a file, it is a straight  
HTTP
upload.  PHP plays no part in the actual upload, except for the  
upload

limits set in place by the php settings found in the php.ini or other
Apache config files.


Correct.


Now, Apache actually handles the Upload.  Once the file has been
received completely, Apache then passes the file and process running
to PHP.


Also correct.


I have never seen a case where Apache has stored the file on the file
system. In my past experience it has always held the file in memory,
therefor limited to the max physical memory that was install, minus a
little for other things.


Well, I can easily show you such a case - I can upload a 1Gb file
without apache memory usage changing one bit.  Even if Apache did
upload into memory, why would that make the file limited to the max
amount of physical memory??

How about if I upload a 1Gb file to a webserver on a machine that only
has 256Mb memory - would you say that's impossible?


/Per Jessen, Zürich


--
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] php File upload

2008-08-08 Thread Per Jessen
Jim Lucas wrote:

> What Apache starts, it reads the PHP memory limits in to the running
> Apache process.  When you try and upload a file, it is a straight HTTP
> upload.  PHP plays no part in the actual upload, except for the upload
> limits set in place by the php settings found in the php.ini or other
> Apache config files. 

Correct.

> Now, Apache actually handles the Upload.  Once the file has been
> received completely, Apache then passes the file and process running
> to PHP. 

Also correct.

> I have never seen a case where Apache has stored the file on the file
> system. In my past experience it has always held the file in memory,
> therefor limited to the max physical memory that was install, minus a
> little for other things.

Well, I can easily show you such a case - I can upload a 1Gb file
without apache memory usage changing one bit.  Even if Apache did
upload into memory, why would that make the file limited to the max
amount of physical memory?? 

How about if I upload a 1Gb file to a webserver on a machine that only
has 256Mb memory - would you say that's impossible?


/Per Jessen, Zürich


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