[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 read it in with addFile... The HTTP POST I'm
looking at will need to add "files" both from disk and variables.

Ideas are welcome..


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



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.  Thanks for the
memories.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

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



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 reference is, not saying that the function is used
that way.
My apologies.

no worries


So help me God, if you two don't stop fighting, I'm going to turn
this car around


(;-P)



Getting in some practice for new little one?  :)

Happy New Year to all, and to all a safe night!

--
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] 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, not saying that the function is used
>> that way.
>> My apologies.
>
> no worries

So help me God, if you two don't stop fighting, I'm going to turn
this car around


(;-P)

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

-- 
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 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" />
src="himages/switch-button-default.gif" title="Alternate Theme" 
id="style2" value="alternate" />




Any thoughts?




I understand that you have it all working with FF, but just a one question...

You have your grey button associated with your "Default Theme" button
and you have your default button associated with your "Alternate Theme" button

Is this 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] 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/unsub.php



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 is this being submitted?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.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] 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 ( http://git.or.cz/ ) too.
>
> But here's my situation..  I deal with dozens of clients.  I usually make a
> backup copy of their site (at least the files, not usually the DB) so I
> have the latest copy of the site to make changes to.  Usually I'm the only
> one working on the site, but sometimes other people may make changes too.
> Not so often than we're conflicting with our changes, or if this is a known
> issue, we make sure to coordinate.
>
> What I'd ideally like to do is be able to use a CVS type system to keep
> incremental backups of the code.  So instead of checking code out of CVS,
> changing it, then checking it back in... I'd like to just do a mass checkin
> of the whole site and have changes recorded and the ability to look at
> previous versions with DIFF and all that.  And of course the ability to
> 'check out' a previous set of files by date or revision maybe.
>
>
> I assume you can do this with one of the major version control systems, but
> mostly what I see with how to use these systems involves checking code out
> then checking it back in.  That's not really what I want to do.
>
> 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"
> responses.  I don't have anything against Linux or Mac, they're great
> systems.  But I have my reasons for running Windows.
>
> Also, I realize this is semi-OT for a PHP list, but asking on a CVS list or
> a
> SVN list might not give me the more comprehensive/broad experience base I'm
> looking for.  I'd like a semi-unbiased response. :)


im not sure how well git works on windows atm, but if youre interested in a
dcvs that works on windows, ive heard good things about mercurial; its
written in python.

http://www.selenic.com/mercurial/wiki/

-nathan


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
> > > function specifies $return_var is passed by reference in the formal
> > > parameter.  when you include the & along w/ an actual parameter
> > (during
> > > function invocation) thats referred to as
> > call-time-pass-by-reference in
> > > php, and its typically frowned upon.  in fact, i think its being
> > removed
> > > from a future version of php.
> > >
> > > -nathan
> > >
> > >
> > You don't call system using the ampersand.  The reference is
> > declared in
> > the function definition.  There's no reason for this to be frowned
> > upon.
> >
> >
> > well i dont think they deprecated it for shits-&-giggles.
> >
> > http://us.php.net/manual/en/language.references.pass.php
> >
> > its disabled by default in php.ini; wonder why.. ;)
> >
> >
> >   What you are referring to is the old PHP4 style of explicit
> > pass-by-reference in function usage which is frowned upon.
> >
> >
> > no im referring to call-time-pass by reference, which works just as
> > well in php5; as long as you enable it in php.ini (or one of the other
> > various ways).
> >
> > and also, for clarification, marking parameters as pass-by-reference
> > works during method definition in php4 as well, of course.
> >
> > -nathan
> >
> 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, not saying that the function is used
> that way.
> My apologies.
>

no worries

-nathan


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
>> systems.  But I have my reasons for running Windows.
>> 
>
> There's definitely a Gui for CVS. TurtleCVS IIRC. Presumably there's
> one for SVN.
>
>   
TortoiseCVS and TortoiseSVN on Windows

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



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



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
> > parameter.  when you include the & along w/ an actual parameter
> (during
> > function invocation) thats referred to as
> call-time-pass-by-reference in
> > php, and its typically frowned upon.  in fact, i think its being
> removed
> > from a future version of php.
> >
> > -nathan
> >
> >
> You don't call system using the ampersand.  The reference is
> declared in
> the function definition.  There's no reason for this to be frowned
> upon.
>
>
> well i dont think they deprecated it for shits-&-giggles.
>
> http://us.php.net/manual/en/language.references.pass.php
>
> its disabled by default in php.ini; wonder why.. ;)
>  
>
>   What you are referring to is the old PHP4 style of explicit
> pass-by-reference in function usage which is frowned upon.
>
>
> no im referring to call-time-pass by reference, which works just as
> well in php5; as long as you enable it in php.ini (or one of the other
> various ways).
>
> and also, for clarification, marking parameters as pass-by-reference
> works during method definition in php4 as well, of course.
>
> -nathan
>
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, not saying that the function is used
that way.
My apologies.

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



-- 
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 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="himages/switch-button-default.gif" title="Alternate Theme"
> id="style2" value="alternate" />
> 
> 
>
> Any thoughts?
>
How is this being submitted?

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


-- 
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 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, at 11:27 AM, c...@l-i-e.com wrote:



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 about it.




"If the quarterback throws the ball nowhere near the receiver, don't  
blame the receiver."


--
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] 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!
		
		




The action attribute is left blank so the form posts to the current  
page.  The theme switcher script is at the top of each page and  
intercepts the posted variables.


Any thoughts?


On Dec 31, 2008, at 11:02 AM, Phpster wrote:


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 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 the script:


if(isset($_REQUEST['style'])) {

  $style = $_REQUEST['style'];
}

Thanks in advance for your assistance.

--
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



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, which use any software distributed with this license, make 
their source code freely available to end users. If this is either not 
the case or no longer the case, then I will be glad to use GnuPG.




Bastien

Sent from my iPod

On Dec 30, 2008, at 10:50 PM, Edward Diener  wrote:


My client application needs to send data to a PHP page in encrypted form
and have the PHP code able to decrypt it. Likewise the PHP code needs to
return data to my application encrypted and my client application needs
to be able to decrypt it.

My application is written in C++ and naturally the PHP page is written
in PHP.

I do understand that public key-private key cryptography is the way to
go. So far my Internet search has turrned up GnuPG as a means of doing
public key-private key cryptography for PHP with libraries for C++ also.
However the client application is a commercial application and unless I
misunderstand the GNU General Public License the software of the
application which uses GnuPG must allow its source to be freely
available in order to use the library. This is of course something which
I am completely unwilling to do for the commercial application.

Is there any other public key-private key cryptography solution on the
PHP side which also has a C++ library which I can use for the client
application, which does not adhere to the GNU General Public License ?
This does not have to be a free product.

--
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] 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 I drag the CC address up to the To field and delete the  
poster's address. Seems like the best I can do, but it creates this  
problem people have reported. Do I just totally suck, or is there a  
more reasonable explanation?


--
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
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);




--
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 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
>  /var/www/html/original.pdf /var/www/new.jpg";
> system($command_line, $return_var);

Try using exec() so you get the whole return message, might be
something useful in there.

exec($command_line, $return_output, $return_code);

-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
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
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 OK,  
no problem), but it only works converting JPG and GIF images. As soon  
as I try to convert a PDF image, it fails:


$command_line = "/usr/local/imagemagick/bin/convert  /var/www/html/ 
original.pdf /var/www/new.jpg";

system($command_line, $return_var);
?>

$return_var = 1. I don't have ghostscript, but I figured I don't need  
it since the PDF->JPG conversions works on the command line. Any  
suggestions?


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



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 know this is possibly not possible since this has to be done from
> either the Zend Engine or PHP itself, but if i could see a complete
> output of all the code within my project that is used for a certain
> execution.
> 
> Example:
> I call index.php?page=10
> 
> index.php includes functions.php and classes.php
> classes.php include page_classes.php if there is a $_GET["page"]
> variable set and product_classes.php if there is a $_GET["product"]
> variable set
> 
> What i would like to see is the linear output of what code is included
> (so the data of functions.php, classes.php, then page_classes.php, and
> then index.php (not product_classes.php since its not included within
> this request)
> 
> This is most likely possible with some PHP code but I'm thinking of
> trying to make sense of an old project i didn't create quickly and if
> this is possible it would help a lot.
> 
Have you looked at PHPDebug? It offers something similar to what has
been offered by ASP, ColdFusion, and .Net in terms of debugging output,
and could help you?


Ash
www.ashleysheridan.co.uk


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



[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
either the Zend Engine or PHP itself, but if i could see a complete
output of all the code within my project that is used for a certain
execution.

Example:
I call index.php?page=10

index.php includes functions.php and classes.php
classes.php include page_classes.php if there is a $_GET["page"]
variable set and product_classes.php if there is a $_GET["product"]
variable set

What i would like to see is the linear output of what code is included
(so the data of functions.php, classes.php, then page_classes.php, and
then index.php (not product_classes.php since its not included within
this request)

This is most likely possible with some PHP code but I'm thinking of
trying to make sense of an old project i didn't create quickly and if
this is possible it would help a lot.

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



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 experiment w/
the xdebug settings in php.ini; if you cant get it cleared up that way, you
may just have to disable it to test this piece of code.

you might also look at which settings you can toggle via .htaccess.  what im
getting at is see if you can have an instance of the site w/ your settings
(possibly disable xdebug) and other instances for your colleagues where they
can enable it if they like.

Turns out, XDebug is kindly splatting out the exception even though it's
> being caught.
>
> Sorry for the noise. Now that I know what is happening, I'm feeling silly
> for asking.


i wouldnt worry about it; i dont think theres a spot in the xdebug docs
where they discuss how it can screw up some things you might want to leave
alone :D

-nathan


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.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 desirable to many folk in dev environment.



But my colleagues' habit of using Exceptions for non-exceptional events is 
pretty much going to drive me crazy, like it or not.



There's probably some setting for xdebug that I need to turn off to just ignore 
caught Exceptions.



Hopefully it will still blow up for un-caught Exceptions...



Sorry for the noise. Now that I know what is happening, I'm feeling silly for 
asking.



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



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 on line 274
>
> Hello?
>
> What is the point of all this try/catch stuff, eh?
>

you dont have to use it if you dont want, in fact you could strip it out of
that code segment if you wanted to.


> I don't think we've done anything particularly fancy/tricky with the class
> hierarchy.
>

nobody said you did, but that has no bearing on the fact that the Soap
extension throws exceptions.  as i said you dont have to catch them, but the
idea is they provide opportunities for your code to degrade gracefully in
the event of a problem occurring.

-nathan


[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 this try/catch stuff, eh?



I don't think we've done anything particularly fancy/tricky with the class 
hierarchy.



-- 
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 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";
}
?>


> "Per Jessen"  撰寫於郵件新聞: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..91.2001
>> //who can help me ? and tell me why ?
>
> It's a floating point rounding error.  If you don't need the accuracy,
> just round it to what you need.
>
>
> /Per Jessen, Zurich
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!


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 checking code out of CVS,
> changing it, then checking it back in... I'd like to just do a mass checkin
> of the whole site and have changes recorded and the ability to look at
> previous versions with DIFF and all that.  And of course the ability to
> 'check out' a previous set of files by date or revision maybe.

You can definitely do this with CVS and I assume SVN. I keep a
separate "abbreviated" change log which I compile manually from
checkin diffs. This changelog is what I publish. No one wants to know
about the whitespace changes I've done for example. Or maybe they do -
saddos

> I assume you can do this with one of the major version control systems, but
> mostly what I see with how to use these systems involves checking code out
> then checking it back in.  That's not really what I want to do.

I find it quite useful. It's an extra step but the advantages it
provides are more than worth it.

> 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
> systems.  But I have my reasons for running Windows.

There's definitely a Gui for CVS. TurtleCVS IIRC. Presumably there's
one for SVN.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 20th)

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



[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 situation..  I deal with dozens of clients.  I usually make a 
backup copy of their site (at least the files, not usually the DB) so I 
have the latest copy of the site to make changes to.  Usually I'm the only 
one working on the site, but sometimes other people may make changes too.  
Not so often than we're conflicting with our changes, or if this is a known 
issue, we make sure to coordinate.


What I'd ideally like to do is be able to use a CVS type system to keep 
incremental backups of the code.  So instead of checking code out of CVS, 
changing it, then checking it back in... I'd like to just do a mass checkin 
of the whole site and have changes recorded and the ability to look at 
previous versions with DIFF and all that.  And of course the ability to 
'check out' a previous set of files by date or revision maybe.



I assume you can do this with one of the major version control systems, but 
mostly what I see with how to use these systems involves checking code out 
then checking it back in.  That's not really what I want to do.


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" 
responses.  I don't have anything against Linux or Mac, they're great 
systems.  But I have my reasons for running Windows.


Also, I realize this is semi-OT for a PHP list, but asking on a CVS list or a 
SVN list might not give me the more comprehensive/broad experience base I'm 
looking for.  I'd like a semi-unbiased response. :)


Thanks in advance!

-TG


Hi TG,

I use svn (on windows and linux); and very happy with it :)

Not sure if you already have an SVN server or not, if you don't best to 
get one installed on server somewhere I'd reckon.


To use with windows you can get something like Tortoise SVN which 
integrates right in to the windows shell; updateing, commiting etc is as 
simple as a right click on a synchronised folder.

http://tortoisesvn.tigris.org/

Personally though; I use eclipse as my IDE (on windows + linux), and let 
eclipse handle all my svn needs by way of Subversive SVN (kit and 
connectors from polarion); works a charm and keeps everything in the ide 
+ caters for all the norms like importing, rolling back, diff etc etc - 
couldn't recommend it enough.


Regards

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



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 more performance.
> > 
> > That's easily said, but a MUD means all the users have to share a
> > significant portion of your data model.
> 
> That's fine - there are many well-known schemes for distributing and
> updating such data. 
> 
> > Though I suspect the bandwidth issue would be the main bottleneck most
> > of the time...
> > I don't want to get into this in much detail, mainly because I've
> > spent all of 5 minutes seriously thinking about it, and may just need
> > more bake-time...
> > But it's not ALWAYS that easy to architect something to be
> > "shared-nothing" even with PHP.
> 
> It's not easy in any language, but if your key concern is the
> performance of PHP (as a language), hardware is what you need.  You can
> design your software to run on a single box with lots of CPU cores, or
> you can go for a distributed (and more easily scalable) approach.  If
> you don't need/want straight scalability, go for the 32 cores all
> ticking at 3GHz.  Once that is saturated, buy another one. 

If you go multi core then you need to go with a threaded approach...
which makes the development a bit complex for newbies to MUD
development. I don't think I'd go distributed since people whine about
lag that takes a 1/4 second... distributed would inherently require more
time while messages are passed to and fro.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



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 easily said, but a MUD means all the users have to share a significant 
> portion of your data model.
> 
> Though I suspect the bandwidth issue would be the main bottleneck most of the 
> time...

Nah, you can run a MUD on most home internet connections these days. It
really takes up very little bandwidth. I think our web-based builder
eats more bandwidth than the mud itself.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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



[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..  I deal with dozens of clients.  I usually make a 
backup copy of their site (at least the files, not usually the DB) so I 
have the latest copy of the site to make changes to.  Usually I'm the only 
one working on the site, but sometimes other people may make changes too.  
Not so often than we're conflicting with our changes, or if this is a known 
issue, we make sure to coordinate.

What I'd ideally like to do is be able to use a CVS type system to keep 
incremental backups of the code.  So instead of checking code out of CVS, 
changing it, then checking it back in... I'd like to just do a mass checkin 
of the whole site and have changes recorded and the ability to look at 
previous versions with DIFF and all that.  And of course the ability to 
'check out' a previous set of files by date or revision maybe.


I assume you can do this with one of the major version control systems, but 
mostly what I see with how to use these systems involves checking code out 
then checking it back in.  That's not really what I want to do.

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" 
responses.  I don't have anything against Linux or Mac, they're great 
systems.  But I have my reasons for running Windows.

Also, I realize this is semi-OT for a PHP list, but asking on a CVS list or a 
SVN list might not give me the more comprehensive/broad experience base I'm 
looking for.  I'd like a semi-unbiased response. :)

Thanks in advance!

-TG

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



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 users have to share a
> significant portion of your data model.

That's fine - there are many well-known schemes for distributing and
updating such data. 

> Though I suspect the bandwidth issue would be the main bottleneck most
> of the time...
> I don't want to get into this in much detail, mainly because I've
> spent all of 5 minutes seriously thinking about it, and may just need
> more bake-time...
> But it's not ALWAYS that easy to architect something to be
> "shared-nothing" even with PHP.

It's not easy in any language, but if your key concern is the
performance of PHP (as a language), hardware is what you need.  You can
design your software to run on a single box with lots of CPU cores, or
you can go for a distributed (and more easily scalable) approach.  If
you don't need/want straight scalability, go for the 32 cores all
ticking at 3GHz.  Once that is saturated, buy another one. 


/Per Jessen, Zürich


--
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 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 about it.



"If the quarterback throws the ball nowhere near the receiver, don't blame the 
receiver."

-- 
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 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:
>
>   
>> > $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 you don't need the accuracy,
> just round it to what you need.
>
>
> /Per Jessen, Zurich
>
>
>
>   

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



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 significant 
portion of your data model.



Though I suspect the bandwidth issue would be the main bottleneck most of the 
time...



I don't want to get into this in much detail, mainly because I've spent all of 
5 minutes seriously thinking about it, and may just need more bake-time...



But it's not ALWAYS that easy to architect something to be "shared-nothing" 
even with PHP.



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



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 alternative...



-- 
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 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..91.2001
> //who can help me ? and tell me why ?

It's a floating point rounding error.  If you don't need the accuracy,
just round it to what you need.


/Per Jessen, Zurich



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



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 nether of us understand what the other is saying.
>
> I was using it in a humorous manner, at least that was my intent.
>

It was a quote from The Princess Bride, also in humorous manner.

> Cheers and Happy New Year.
>

A safe New Year!

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


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 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 the script:


if(isset($_REQUEST['style'])) {

   $style = $_REQUEST['style'];
}

Thanks in advance for your assistance.

--
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] =.='' 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 you don't need the accuracy,
just round it to what you need.


/Per Jessen, Zürich


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



[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 addition of a salt
it would be largely pointless since you need both pieces (?) of
information (password plus salt) to generate the hash.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 20th)

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



[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 the script:


if(isset($_REQUEST['style'])) {

$style = $_REQUEST['style'];
}

Thanks in advance for your assistance.

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



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 client application needs to send data to a PHP page in encrypted  
form
and have the PHP code able to decrypt it. Likewise the PHP code  
needs to
return data to my application encrypted and my client application  
needs

to be able to decrypt it.

My application is written in C++ and naturally the PHP page is written
in PHP.

I do understand that public key-private key cryptography is the way to
go. So far my Internet search has turrned up GnuPG as a means of doing
public key-private key cryptography for PHP with libraries for C++  
also.
However the client application is a commercial application and  
unless I

misunderstand the GNU General Public License the software of the
application which uses GnuPG must allow its source to be freely
available in order to use the library. This is of course something  
which

I am completely unwilling to do for the commercial application.

Is there any other public key-private key cryptography solution on the
PHP side which also has a C++ library which I can use for the client
application, which does not adhere to the GNU General Public License ?
This does not have to be a free product.

--
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] 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 programatically
generate a random string on first run of the application and store it in a
background db or in your config file, so that you could be more certain that
the salt value from implementation to implementation was different.

M is for Murray


On Thu, Jan 1, 2009 at 12:12 AM, Jason Pruim  wrote:

>
> 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 salted hash may well be enough. For example,
> you could use this:
>
>  $hash = md5($password . 'salt -
> bhuyfuyftyfctujvikhgvbhjiftye5645rt68ty97tgifyvcu6yt7d');
> ?>
>
>
> 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?
>
> Unless... When they log in, you store a MD5 hash of the salt in a separate
> field in the database, and store it on in a cookie so it can be compared.
>
> Or am I just missing something obvious like usual? :)
>
>
> --
> Jason Pruim
> japr...@raoset.com
> 616.399.2355
>
>
>
>


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 salted hash may well be enough. For example,
you could use this:





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?


Unless... When they log in, you store a MD5 hash of the salt in a  
separate field in the database, and store it on in a cookie so it can  
be compared.


Or am I just missing something obvious like usual? :)


--
Jason Pruim
japr...@raoset.com
616.399.2355





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
a moment to wish each and every one of you a safe and wonderful new
year.  May 2009 be ten times healthier, happier, and more prosperous
to you and yours than the three best years of your life so far, and
may each year beyond that be better even than the one before.

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 or sound I've ever heard in my entire life was as beautiful
as those few seconds.  My heart literally feels so full that it could
burst at any moment.

To all of you, thank you for being a part of the PHP project, and
many of you professional and personal parts of my life.  Of all of the
communities I've been involved in the last sixteen years or so, this
has always been my favorite.  And it's because of you folks.

From the bottom of my (bursting!) heart, thank you, and I look
forward to working alongside all of you in 2009.

All the best


Congratulations! It's amazing how much it changes your life... And  
how quickly...


I created MP3's of both my kids heart beats so I can play them  
anytime I want... And since I have to work out of the house it's nice  
to be able to remember give me a big reason to hurry up and get done  
coding so I can go see and hold my kids :) The youngest one started  
sitting up yesterday... Next step is crawling!




--
Jason Pruim
japr...@raoset.com
616.399.2355





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 was using it in a humorous manner, at least that was my intent.

Cheers and Happy New Year.

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] 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 costly hash functions is unnecessary.

Heysem 


-Original Message-
From: richard.he...@gmail.com [mailto:richard.he...@gmail.com] On Behalf Of 
Richard Heyes
Sent: Wednesday, December 31, 2008 12:37 PM
To: Phpster
Cc: Murray; php-general@lists.php.net
Subject: Re: [PHP] Is MD5 still considered safe for storing application user 
passwords?

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 this:



-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 20th)

-- 
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] 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 somewhere between next year and the year
after, let's see how things go. :)

(if you're not religious, you can stop reading here)

This year I found about the great love of Jesus and how good He's been
to me. Thanks to His love, everything's been so good I can't even
express myself.

If you still haven't, try fiding about Him. You'll not regret it. :)


Best wishes to everyone,

Thiago Henrique Pojda
http://nerdnaweb.blogspot DOT com



On Wed, Dec 31, 2008 at 10:32 AM, Dotan Cohen  wrote:
> 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! You will enjoy this!
>
> --
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
>
> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
> ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
> А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
> а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
> ä-ö-ü-ß-Ä-Ö-Ü
>


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! You will enjoy this!

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


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 or sound I've ever heard in my entire life was as beautiful
> as those few seconds.  My heart literally feels so full that it could
> burst at any moment.
>
Congrats, Dan! I'm right there with you!  My wife is 7 months preggo right
now!  Wait until you get to feel the kicks every day and see little hands
poking out from her belly. Totally awesome!

My New Years Resolution is going to be getting a raise!

Well, I hope you all have a great New Years!

I promise to not ask anymore PHP questions until next year! :)

Dan


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 correctly, I don't
need you to quote it.

> Yes ssh and fixed IP is properly a must for you guys who having php
> programming as a hobby, but I only want a webside up and running.

Just the opposite: the static IP is for the visitors, not for the developer.

> The only other thing I would like would be a 100Gbyte remote backup.  Here I
> only got 10Gbyte.
> The price of getting these this is rather high compared to my 2$ a month,
> another detail is, that I payed 5 years in advance to get this price, so
> that would all be lost. In total I payed 100$ for 5 years including
> webhosting and  the domain name registration onbe year ago.
> Now I finally get some value for the money.

I wouldn't exactly call that value, but it is your decision. You seem
to know what you are doing, so I won't lecture you!

> Today the price for the same has doubled.
> I do not mind spending another 100$ if you can do better, but I will not
> spend 5 or 10$ a month for this.
>
> As php programming is not a hobby I properly will be away from this list for
> a long time, have fun everyone, before you know you have become too old for
> that.
>
> My retirement will also restore the average age of this list back to normal.
>
> Best regards
>
> Granpa
> Peter
>
> nb I can not show you my web, as login is restricted to familie only, but I
> guess you all know how coppermine look.
> but you are welcome to look at my work homepage www.protelevision.com where
> I am a HW engineer.
>

I cannot see that website as I have flash disabled. When your company
puts up an HTML site I would be glad to look over it. Thanks.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


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 bit lazy when it comes to write perfect english in
>>> mails. I believe we can do better with our time.
>>> In this particulary case the result was below acceptable levels.
>>>
>>
>> English is not my native language either, by the way.
>>
>>> No I would not laugh if you where writing in Bokmal or Nynorsk.
>>> Because I would not know the first think about spelling in the Norwedian
>>> languages. I am Danish, we speak and write in Danish.
>>>
>>
>> I apologize! I know little of Scandinavian culture (the letters in
>> your last name were a hint to Scandinavian) and your email address
>> just looked Norwegian to me.
>>
>>> Yes it is a linux server, and I know the basic linux commands, but I do
>>> not
>>> know if and how I can get SSH access to my web host.
>>
>> If you can't, then switch hosts. SSH access is a necessity.
>>
>>> It may not be supported or be too basic to be include in the help search
>>> at
>>> surftown, I simply do not know.
>>> My web do not have a fixed IP, so I guess it may not
>>>
>>
>> No fixed IP for your web host?!? Change!
>>
>>> It seems like surftown is an okay host, compared to my less than 2$ a
>>> month,
>>> but their help is a major candidate for winning the price of the most
>>> useless help ever.
>>>
>>> A google search found a blog where the guy say they do not support ssh on
>>> pivate hosting, so I guess not.
>>>
>>> /Peter
>>>
>>
>> --
>> Dotan Cohen
>>
>
> Hi again
>
> Sorry for cutting your name card short Dotan, but I get tired reading the
> entire alfabet every time.
>
> Yes ssh and fixed IP is properly a must for you guys who having php
> programming as a hobby, but I only want a webside up and running.
> The only other thing I would like would be a 100Gbyte remote backup.  Here I
> only got 10Gbyte.
> The price of getting these this is rather high compared to my 2$ a month,
> another detail is, that I payed 5 years in advance to get this price, so
> that would all be lost. In total I payed 100$ for 5 years including
> webhosting and  the domain name registration onbe year ago.
> Now I finally get some value for the money.
> Today the price for the same has doubled.
> I do not mind spending another 100$ if you can do better, but I will not
> spend 5 or 10$ a month for this.
>
> As php programming is not a hobby I properly will be away from this list for
> a long time, have fun everyone, before you know you have become too old for
> that.
>
> My retirement will also restore the average age of this list back to normal.
>
> Best regards
>
> Granpa
> Peter
>
> nb I can not show you my web, as login is restricted to familie only, but I
> guess you all know how coppermine look.
> but you are welcome to look at my work homepage www.protelevision.com where
> I am a HW engineer.
>
>
>
>
>
>
>
>
>
>
>
> --
> 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] 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't think
> any song or sound I've ever heard in my entire life was as beautiful
> as those few seconds.  My heart literally feels so full that it could
> burst at any moment.
[/snip]

Congrats to you and your wife! My daughter just started college but I
remember the day I first heard her heart beat...and it is all worth the
ride!

[snip = Stuart] Anyone got an interesting resolution beyond the usual
drinking/smoking/eating less? I intend to spend less non-work hours
sat in front of a computer and blog/twitter more. Those two are
probably mutually exclusive but I'm giving it a shot ;-)
[/snip]

I reach a significant age milestone in February which may be the cause
for way too much introspection! Anyhow I do have something out of the
ordinary; I plan to spend more time playing disc golf (Frisbee golf for
those not in the know)...well, not just playing...competing! Playing
more tournaments. Seriously studying the game and its techniques.
Disciplined practice.

Happy New Year to all!

Jay

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



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 time.
In this particulary case the result was below acceptable levels.



English is not my native language either, by the way.


No I would not laugh if you where writing in Bokmal or Nynorsk.
Because I would not know the first think about spelling in the Norwedian
languages. I am Danish, we speak and write in Danish.



I apologize! I know little of Scandinavian culture (the letters in
your last name were a hint to Scandinavian) and your email address
just looked Norwegian to me.

Yes it is a linux server, and I know the basic linux commands, but I do 
not

know if and how I can get SSH access to my web host.


If you can't, then switch hosts. SSH access is a necessity.

It may not be supported or be too basic to be include in the help search 
at

surftown, I simply do not know.
My web do not have a fixed IP, so I guess it may not



No fixed IP for your web host?!? Change!

It seems like surftown is an okay host, compared to my less than 2$ a 
month,

but their help is a major candidate for winning the price of the most
useless help ever.

A google search found a blog where the guy say they do not support ssh on
pivate hosting, so I guess not.

/Peter



--
Dotan Cohen



Hi again

Sorry for cutting your name card short Dotan, but I get tired reading the 
entire alfabet every time.


Yes ssh and fixed IP is properly a must for you guys who having php 
programming as a hobby, but I only want a webside up and running.
The only other thing I would like would be a 100Gbyte remote backup.  Here I 
only got 10Gbyte.
The price of getting these this is rather high compared to my 2$ a month, 
another detail is, that I payed 5 years in advance to get this price, so 
that would all be lost. In total I payed 100$ for 5 years including 
webhosting and  the domain name registration onbe year ago.

Now I finally get some value for the money.
Today the price for the same has doubled.
I do not mind spending another 100$ if you can do better, but I will not 
spend 5 or 10$ a month for this.


As php programming is not a hobby I properly will be away from this list for 
a long time, have fun everyone, before you know you have become too old for 
that.


My retirement will also restore the average age of this list back to normal.

Best regards

Granpa
Peter

nb I can not show you my web, as login is restricted to familie only, but I 
guess you all know how coppermine look.
but you are welcome to look at my work homepage www.protelevision.com where 
I am a HW engineer.












--
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,

> ...

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 this:



-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 20th)

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



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.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 also written in C, and needless to say
> that's just nasty!
>
> So I was looking at sockets in PHP, and thinking about the semantics
> of it all.
>
> I was looking at this article:
>
> http://devzone.zend.com/article/1086-Writing-Socket-Servers-in-PHP
>
> And thought 'wow this looks like it might be pretty easy actually!'
>
> But then I reached the first hurdle point:
>
> '
> /* Accept incoming requests and handle them as child processes */
> $client = socket_accept($sock);
> '
>
> Surely the point of a MUD is that the requests are shared?
>
> I also looked up telnet servers in PHP on google quite extensively,
> and there seems to be no real information out there? I would imagine
> that I'm looking for the wrong thing, however.
>
> In short I'm looking for the basic idea on how a MUD server would be
> implemented in PHP.
>
> Thanks in advance for anything,
>
> Luke Slater
>
How about AJAX and sessions instead of having TCP sockets?
http://xajaxproject.org/

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





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