[PHP] Sending files via POST

2008-12-31 Thread Anders Norrbring
I'm a bit stuck.. I'm using the PEAR http_Request to send files and data as HTTP POST, which is working fine if I in fact have the files on disk on the server. Just using the method addFile.. But what if the file data is only in a variable? It feels like overkill to first save to disk, and then re

Re: [PHP] system() Question

2008-12-31 Thread Daniel Brown
On Thu, Jan 1, 2009 at 01:57, Jim Lucas wrote: > > Getting in some practice for new little one? :) Damn kids ;-P > Happy New Year to all, and to all a safe night! To you as well, Mr. Lucas! And now that I am done with work (for the most part), this is my official adieu to 2008. T

Re: [PHP] system() Question

2008-12-31 Thread Jim Lucas
Daniel Brown wrote: On Wed, Dec 31, 2008 at 21:29, Nathan Nobbe wrote: On Wed, Dec 31, 2008 at 7:03 PM, Micah Gersten wrote: I think I was confused here about your response. After re-reading a few times, I see that you were enhancing Dan's response by explaining what call-time pass by refere

Re: [PHP] system() Question

2008-12-31 Thread Daniel Brown
On Wed, Dec 31, 2008 at 21:29, Nathan Nobbe wrote: > On Wed, Dec 31, 2008 at 7:03 PM, Micah Gersten wrote: >> >> I think I was confused here about your response. After re-reading a few >> times, I see that you were enhancing Dan's response by explaining what >> call-time pass by reference is, no

Re: [PHP] IE Problem Detecting Post Variables

2008-12-31 Thread Jim Lucas
L. Herbert wrote: I agree with your supposition. The problem is that the variable is passed in one instance with FF and not with IE. Thus my quandary. Here's the form html: Flip It! src="images/switch-button-grey.gif" title="Default Theme" id="style1" value="default" /

Re: [PHP] IE Problem Detecting Post Variables

2008-12-31 Thread Lupus Michaelis
L. Herbert a écrit : Each input is a "submit" button. MSIE pushes input_name.x and input_name.y to the server, when the input is an image. -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

Re: [PHP] IE Problem Detecting Post Variables

2008-12-31 Thread L. Herbert
Each input is a "submit" button. On Dec 31, 2008, at 8:57 PM, Micah Gersten wrote: L. Herbert wrote: The problem is that the variable is passed in one instance with FF and not with IE. Thus my quandary. Here's the form html: Flip It! Any thoughts? How

Re: [PHP] Question about version control.. sorta..

2008-12-31 Thread Nathan Nobbe
On Wed, Dec 31, 2008 at 9:40 AM, TG wrote: > Ok.. so I know about CVS and SVN and unfortunately haven't had as much > experience with them as I'd like. I've used them, but always in a really > basic sense and always on systems that have already been set up. A friend > recently mentioned GIT ( h

Re: [PHP] system() Question

2008-12-31 Thread Nathan Nobbe
On Wed, Dec 31, 2008 at 7:03 PM, Micah Gersten wrote: > Nathan Nobbe wrote: > > > > > > On Sun, Dec 28, 2008 at 8:40 PM, Micah Gersten > > wrote: > > > > Nathan Nobbe wrote: > > > good point dan, and just to add further clarification, thats b/c > the > > > f

Re: [PHP] Question about version control.. sorta..

2008-12-31 Thread Micah Gersten
Richard Heyes wrote: >> The other issue is that I run Windows. So if there's something nice and >> WinGUI, that'd be nice. Please no "you should be running linux" >> > > You should be running linux. Muhaha. > > >> responses. I don't have anything against Linux or Mac, they're great >> s

Re: [PHP] system() Question

2008-12-31 Thread Micah Gersten
Nathan Nobbe wrote: > > > On Sun, Dec 28, 2008 at 8:40 PM, Micah Gersten > wrote: > > Nathan Nobbe wrote: > > good point dan, and just to add further clarification, thats b/c the > > function specifies $return_var is passed by reference in the formal > > p

Re: [PHP] IE Problem Detecting Post Variables

2008-12-31 Thread Micah Gersten
L. Herbert wrote: > The problem is that the variable is passed in one instance with FF and > not with IE. Thus my quandary. > > Here's the form html: > > > > Flip It! > src="images/switch-button-grey.gif" title="Default Theme" id="style1" > value="default" /> > src

Re: [PHP] IE Problem Detecting Post Variables

2008-12-31 Thread L. Herbert
I agree with your supposition. The problem is that the variable is passed in one instance with FF and not with IE. Thus my quandary. Here's the form html: Flip It! title="Default Theme" id="style1" value="default" /> Any thoughts? On Dec 31, 2008,

Re: [PHP] IE Problem Detecting Post Variables

2008-12-31 Thread L. Herbert
Bastien, Thanks for your response. The curious thing is that the value is passed when using FF, but not passed when using IE. Here is the relevant form html: Flip It!

Re: [PHP] Encryption/decryption of PHP data

2008-12-31 Thread Edward Diener
Phpster wrote: In reading the license I believe it refers to the gnupg itself, not the application it may be embedded in. You are completely free to use gnupg as you choose including modifying it to meet your needs. I always thought the GNU public license demanded that any non-free modules, w

[PHP] Anyone else have trouble with Apple Mail threading this list?

2008-12-31 Thread Brian Dunning
I use Apple Mail, and subscribe to many lists but PHP-General is the only one I have this problem with. People tell me that my replies are not properly threaded to the original post. When I hit Reply or Reply All in Mail, it wants to reply directly to the poster, and only CC's the list. So

Re: [PHP] IM Convert PDF->JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
OMG. I had not set the permissions properly on the destination directory. It works now. Sorry for wasting the list's time, and thanks to Chris for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IM Convert PDF->JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
Interesting. When I try this, $return_output gives an empty array, and $return_code gives 1. On Dec 31, 2008, at 3:38 PM, chris smith wrote: Try using exec() so you get the whole return message, might be something useful in there. exec($command_line, $return_output, $return_code); -- PH

Re: [PHP] IM Convert PDF->JPG works in command line, not in PHP

2008-12-31 Thread chris smith
> But from PHP, it only works beautifully if I specify complete pathnames for > convert /usr/local/imagemagick/ is not in apache's $PATH, so you need to specify the full location. > As soon as I try to convert a PDF > image, it fails: > > $command_line = "/usr/local/imagemagick/bin/convert > /v

Re: [PHP] IM Convert PDF->JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
My typo skipping the '/html/' in the pathname, the paths are correct in my actual code. On Dec 31, 2008, at 3:24 PM, Brian Dunning wrote: /var/www/html/original.pdf /var/www/html/new.jpg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] IM Convert PDF->JPG works in command line, not in PHP

2008-12-31 Thread Brian Dunning
Here's a weird thing. I have a new Redhat machine, with PHP 5.2.6 and IM 6.4.8. The following works beautifully on the command line: convert original.pdf new.jpg But from PHP, it only works beautifully if I specify complete pathnames for convert, the original file, and the new file (that's O

Re: [PHP] Quick question regarding debugging and PHP structure.

2008-12-31 Thread Ashley Sheridan
On Wed, 2008-12-31 at 20:41 +, Ólafur Waage wrote: > Short: Is it possible to see the PHP code that is going to be > processed in whole? > > Long: I love to see things visually, and while programming i create > all kinds of debugging variables i keep on the side for each > page/request. > I kn

[PHP] Quick question regarding debugging and PHP structure.

2008-12-31 Thread Ólafur Waage
Short: Is it possible to see the PHP code that is going to be processed in whole? Long: I love to see things visually, and while programming i create all kinds of debugging variables i keep on the side for each page/request. I know this is possibly not possible since this has to be done from eithe

Re: [PHP] When is an Exception not an Exception?

2008-12-31 Thread Nathan Nobbe
On Wed, Dec 31, 2008 at 1:12 PM, wrote: > > I'm afraid I wasn't clear enough. > > I thought the "catch" block was not actually 'catching' anything, since I'm > seeing an error message with the line of code that is causing the Fault. oic. yeah xdebug will do things like that, you may want to ex

Re: [PHP] When is an Exception not an Exception?

2008-12-31 Thread phphelp -- kbk
On Dec 31, 2008, at 2:12 PM, c...@l-i-e.com wrote: Sorry for the noise. Now that I know what is happening, I'm feeling silly for asking. For me, hitting the the "Send" button often suddenly opens my eyes. Too bad there is no "un-Send" button. Ken -- PHP General Mailing List (http://www.

Re: [PHP] When is an Exception not an Exception?

2008-12-31 Thread ceo
I'm afraid I wasn't clear enough. I thought the "catch" block was not actually 'catching' anything, since I'm seeing an error message with the line of code that is causing the Fault. Turns out, XDebug is kindly splatting out the exception even though it's being caught. Which I'm sure it

Re: [PHP] When is an Exception not an Exception?

2008-12-31 Thread Nathan Nobbe
On Wed, Dec 31, 2008 at 12:41 PM, wrote: > > We have code like this: > > try > { > $details = $this->__client->getData($email); //Line 274 > } > catch (SoapFault $sf) > { > //do stuff > } > catch (Exception $e) > { > //do more general stuff > } > > SoapFault: No data found in C:\classes\Client

[PHP] When is an Exception not an Exception?

2008-12-31 Thread ceo
We have code like this: try { $details = $this->__client->getData($email); //Line 274 } catch (SoapFault $sf) { //do stuff } catch (Exception $e) { //do more general stuff } SoapFault: No data found in C:\classes\Client.php on line 274 Hello? What is the point of all t

Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread Daniel Brown
On Wed, Dec 31, 2008 at 11:15, LKSunny wrote: > i need accuracy, how to ? No you don't. Not the level of accuracy Per was mentioning. His suggestion to round() is what you need. Just adjust the [optional] second parameter to the number of decimal places you wish to round: \n"; } ?> > "P

Re: [PHP] Question about version control.. sorta..

2008-12-31 Thread Richard Heyes
> What I'd ideally like to do is be able to use a CVS type system to keep > incremental backups of the code. Space is so cheap these days I don't think is particularly useful to do incremental backups unless you have a hell of a lot of data. I simply do full backups daily. Now... > So instead of

[PHP] Re: Question about version control.. sorta..

2008-12-31 Thread Nathan Rixham
TG wrote: Ok.. so I know about CVS and SVN and unfortunately haven't had as much experience with them as I'd like. I've used them, but always in a really basic sense and always on systems that have already been set up. A friend recently mentioned GIT ( http://git.or.cz/ ) too. But here's my

Re: [PHP] PHP telnet server

2008-12-31 Thread Robert Cummings
On Wed, 2008-12-31 at 17:35 +0100, Per Jessen wrote: > c...@l-i-e.com wrote: > > > > >>> I often thought PHP would be a nice language for a MUD, if one could > >>> get the performance out of it... > >> > >> Design your code such that you can just throw more hardware at it > >> whenever you need m

Re: [PHP] PHP telnet server

2008-12-31 Thread Robert Cummings
On Wed, 2008-12-31 at 16:19 +, c...@l-i-e.com wrote: > >> I often thought PHP would be a nice language for a MUD, if one could > >> get the performance out of it... > > > > Design your code such that you can just throw more hardware at it > > whenever you need more performance. > > That's eas

[PHP] Question about version control.. sorta..

2008-12-31 Thread TG
Ok.. so I know about CVS and SVN and unfortunately haven't had as much experience with them as I'd like. I've used them, but always in a really basic sense and always on systems that have already been set up. A friend recently mentioned GIT ( http://git.or.cz/ ) too. But here's my situation..

Re: [PHP] PHP telnet server

2008-12-31 Thread Per Jessen
c...@l-i-e.com wrote: > >>> I often thought PHP would be a nice language for a MUD, if one could >>> get the performance out of it... >> >> Design your code such that you can just throw more hardware at it >> whenever you need more performance. > > That's easily said, but a MUD means all the use

Re: [PHP] IE Problem Detecting Post Variables

2008-12-31 Thread ceo
Whatever is SENDING the request data is broken, almost for sure. PHP doesn't *do* much to the HTTP Request data except urldecode it for you. There's not much that can go wrong there. If your theme switcher, presumably in JS, isn't sending the data properly, there's not much PHP can do ab

Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread ceo
If it's money, store everything in pennies INTEGER, and format as dollars on output. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread Micah Gersten
http://us3.php.net/manual/en/function.number-format.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com LKSunny wrote: > i need accuracy, how to ? > > Thank You. > > "Per Jessen" > ¼¶¼g©ó¶l¥ó·s»D:gjg4fk$58...@saturn.local.net... > LKSunny wrote: > > >> >

Re: [PHP] PHP telnet server

2008-12-31 Thread ceo
>> I often thought PHP would be a nice language for a MUD, if one could >> get the performance out of it... > > Design your code such that you can just throw more hardware at it > whenever you need more performance. That's easily said, but a MUD means all the users have to share a signific

Re: [PHP] Encryption/decryption of PHP data

2008-12-31 Thread ceo
As I understand it: You can LINK your commercial binary with GPL binaries, and keep closed source. You cannot co-mingle the two C source codes together and keep it closed. I am fairly certain you can find commercial C++ offerings to generate PGP key pairs, instead of using the GnuPG OSS

Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread LKSunny
i need accuracy, how to ? Thank You. "Per Jessen" ¼¶¼g©ó¶l¥ó·s»D:gjg4fk$58...@saturn.local.net... LKSunny wrote: > $credithold = 100; > for($i=1;$i<=1000;$i++){ > $credithold -= 0.1; > echo "$credithold"; > } > //i don't know why, when run this code, on 91.3 after expect is 91.2, > however

Re: [PHP] Re: Webhotel structure

2008-12-31 Thread Dotan Cohen
2008/12/31 tedd : > At 9:47 AM +0200 12/31/08, Dotan Cohen wrote: >> >> 2008/12/31 tedd : >>> >>> Everythink about getin' a job? >>> >> >> There's that word again! You keep using that word. I do not think that >> it means what you think it means. >> >> -- >> Dotan Cohen > > Dotan: > > And perhaps

Re: [PHP] Is MD5 still considered safe for storing application user passwords?

2008-12-31 Thread ceo
For a bank? No, MD5 would not be acceptable. For you gramma's blog? Sure, MD5 for passwords is fine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IE Problem Detecting Post Variables

2008-12-31 Thread Phpster
Try checking to see if the value was passed with var_dump($_REQUEST) Also try (!empty($_REQUEST['style'])) Bastien Sent from my iPod On Dec 31, 2008, at 10:24 AM, "L. Herbert" wrote: Hello all, Anyone have insight to share on the following issue: I have a simple theme switcher script

Re: [PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread Per Jessen
LKSunny wrote: > $credithold = 100; > for($i=1;$i<=1000;$i++){ > $credithold -= 0.1; > echo "$credithold"; > } > //i don't know why, when run this code, on 91.3  after expect is 91.2, > however..91.2001 > //who can help me ? and tell me why ? It's a floating point rounding error. If

[PHP] =.='' what wrong ? just simple code, however error.

2008-12-31 Thread LKSunny
"; } //i don't know why, when run this code, on 91.3 after expect is 91.2, however..91.2001 //who can help me ? and tell me why ? //Thank You. ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is MD5 still considered safe for storing application user passwords?

2008-12-31 Thread Richard Heyes
Hi, > Correst me if I'm wrong... but assuming that your salt string is hard coded > into the program, with a MD5 a password + salt is no more secure then a > simple password? Well if you store the hash by itself, if an attacker gets hold of your hashes they could be brute forced. However with the

[PHP] IE Problem Detecting Post Variables

2008-12-31 Thread L. Herbert
Hello all, Anyone have insight to share on the following issue: I have a simple theme switcher script that functions as expected in FF, Safari, etc. but does not work in IE 6 or 7. It appears that the posted form variables are not detected in IE. I am using the following check within th

Re: [PHP] Encryption/decryption of PHP data

2008-12-31 Thread Phpster
In reading the license I believe it refers to the gnupg itself, not the application it may be embedded in. You are completely free to use gnupg as you choose including modifying it to meet your needs. Bastien Sent from my iPod On Dec 30, 2008, at 10:50 PM, Edward Diener wrote: My clien

Re: [PHP] Is MD5 still considered safe for storing application user passwords?

2008-12-31 Thread Murray
Well, the idea would be to allow the person downloading and implementing the application to choose their own salt value. That way, in theory, each implementation of the application will be salting the hash algorithm with a different value. I guess, if you really wanted to get tricky, you could pro

Re: [PHP] Is MD5 still considered safe for storing application user passwords?

2008-12-31 Thread Jason Pruim
On Dec 31, 2008, at 5:36 AM, Richard Heyes wrote: Hi, ... You should also take into account how crucial your data is. If it's nuclear launch codes I would say that you can't get enough security. Howver if it's an admin system for Bobs local grocery store, then as "Phpster" suggested, a salt

Re: [PHP] Since I speak with some of you more than people I see in person....

2008-12-31 Thread Jason Pruim
On Dec 30, 2008, at 4:32 PM, Daniel Brown wrote: To hell with being on-topic, since this list is generally never on-topic for an entire thread anyway. This has been a roller-coaster year for some of us --- certainly myself included --- but the year has come to a close. I want to take

Re: [PHP] Re: Webhotel structure

2008-12-31 Thread tedd
At 9:47 AM +0200 12/31/08, Dotan Cohen wrote: 2008/12/31 tedd : Everythink about getin' a job? There's that word again! You keep using that word. I do not think that it means what you think it means. -- Dotan Cohen Dotan: And perhaps nether of us understand what the other is saying. I w

RE: [PHP] Is MD5 still considered safe for storing application user passwords?

2008-12-31 Thread Heysem Kaya
Hi, That's true. It provides a message digest of 128 bits. It's strong collision resistance is 2^64. So finding a collision is hard even though it is proved less secure than SHA-384 and SHA-512. A rule of thumb in technology is utilizing what is needed. If MD5 is sufficient, utilizing more c

Re: [PHP] Since I speak with some of you more than people I see in person....

2008-12-31 Thread Thiago H. Pojda
[top-posting] Congratulations guys, take good care of those new little persons! This has been a great year, probably the best year for me. Learnt a lot with you here and I hope I helped giving something back to the community. Keep up the good work, it's been great! I wish I'll get married som

Re: [PHP] Since I speak with some of you more than people I see in person....

2008-12-31 Thread Dotan Cohen
2008/12/30 Bastien Koert : > Congrats on the new critter to be...they are a lot of fun after the first > year of eating sleeping and pooping ;-) > Sleeping? Why don't mine do that? I am of the opinion that the first year they are little more than a crying digestive system :) To the OP: congrats!

Re: [PHP] Since I speak with some of you more than people I see in person....

2008-12-31 Thread Dan Shirah
> >And as a side note (some of you already know): for my wife and I > closing out the year, we heard the heartbeat of our first child for > the first time today in the ultrasound. Nothing else will ever again > matter as much to me as what I am about to embark upon. I don't think > any song o

Re: [PHP] Re: Webhotel structure

2008-12-31 Thread Dotan Cohen
2008/12/31 Peter Sorensen : > Hi again > > Sorry for cutting your name card short Dotan, but I get tired reading the > entire alfabet every time. > I put that there to catch badly-encoded messages so that I can improve http://gibberish.co.il So long as your mail client displays the alephbet correc

Re: [PHP] Re: Webhotel structure

2008-12-31 Thread paragasu
uh.. nice flash website grandpa =) On 12/31/08, Peter Sorensen wrote: > > > ""Dotan Cohen"" wrote in message > news:880dece00812301337m1cca395cxcb1ef500d8c10...@mail.gmail.com... >> 2008/12/30 Nordstjernealle 10 : >>> Hi Dotan >>> >>> I am glad I can at least be funny. >>> I must admit I am a bi

RE: [PHP] Since I speak with some of you more than people I see in person....

2008-12-31 Thread Jay Blanchard
[snip = Daniel Brown] >And as a side note (some of you already know): for my wife and I > closing out the year, we heard the heartbeat of our first child for > the first time today in the ultrasound. Nothing else will ever again > matter as much to me as what I am about to embark upon. I don'

Re: [PHP] Re: Webhotel structure

2008-12-31 Thread Peter Sorensen
""Dotan Cohen"" wrote in message news:880dece00812301337m1cca395cxcb1ef500d8c10...@mail.gmail.com... 2008/12/30 Nordstjernealle 10 : Hi Dotan I am glad I can at least be funny. I must admit I am a bit lazy when it comes to write perfect english in mails. I believe we can do better with our

Re: [PHP] Is MD5 still considered safe for storing application user passwords?

2008-12-31 Thread Richard Heyes
Hi, > ... You should also take into account how crucial your data is. If it's nuclear launch codes I would say that you can't get enough security. Howver if it's an admin system for Bobs local grocery store, then as "Phpster" suggested, a salted hash may well be enough. For example, you could use

Re: [PHP] PHP telnet server

2008-12-31 Thread Per Jessen
c...@l-i-e.com wrote: > > I often thought PHP would be a nice language for a MUD, if one could > get the performance out of it... Design your code such that you can just throw more hardware at it whenever you need more performance. /Per Jessen, Zürich -- PHP General Mailing List (http://www.

Re: [PHP] PHP telnet server

2008-12-31 Thread Micah Gersten
Luke Slater wrote: > Hi everyone, > > I'm trying to rewrite an old MUD in PHP; the reasons for this are that > the original is written in C and most files in the codebase run over > 2000 lines with at least 20 of them, which makes it very hard to > change anything. > > Plus, the web interface is al