php-general Digest 24 Oct 2006 19:35:53 -0000 Issue 4419

2006-10-24 Thread php-general-digest-help
php-general Digest 24 Oct 2006 19:35:53 - Issue 4419 Topics (messages 243556 through 243587): Is there a function can decrypt md5 ?? 243556 by: Brad Chow 243557 by: Chris 243583 by: tg-php.gryffyndevelopment.com 243584 by: zerof 243585 by: Satyam

Re: [PHP] One-page password-protected file

2006-10-24 Thread Dotan Cohen
On 24/10/06, Richard Lynch [EMAIL PROTECTED] wrote: Can't you just use $_SESSION ? Or is that also out? Once the user is authenticated, $_SESSION['username'] = $username; and you're done. No passing passwords, hashed or not, back and forth. Somebody can still hijack the session, but you

[PHP] Is there a function can decrypt md5 ??

2006-10-24 Thread Brad Chow
Dear all: Is there a function can decrypt md5 ?? I don't have any bad ideas. I just want to know whether md5 can be decrypted or not. Thank you! -- Brad

Re: [PHP] Is there a function can decrypt md5 ??

2006-10-24 Thread Chris
Brad Chow wrote: Dear all: Is there a function can decrypt md5 ?? I don't have any bad ideas. I just want to know whether md5 can be decrypted or not. It can't be decrypted (you can't get the original value back) but it can have collisions in which two items will have the same md5 sum.

Re: [PHP] connectivity weirdness

2006-10-24 Thread Ivo F.A.C. Fokkema
On Mon, 23 Oct 2006 16:52:54 -0500, Richard Lynch wrote: On Fri, October 20, 2006 11:40 am, Richard Lynch wrote: Changing the gateway to the one that NATs fixed things. Good you got things fixed! PS On another fun job this weekend... NOTE TO SELF: Always check to make sure nobody kicked

Re: [PHP] mysqldump problem from PHP

2006-10-24 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-23 16:34:16 +0100: It appears that it could be because the user that runs the scripts is not allowed to. When I run them on the commandline, I run them as the root user. that's very simple to check (man su) yes I know of CRONtabs but wont this still

Re: [PHP] FTP - folders

2006-10-24 Thread Roman Neuhauser
Don't top-post. # [EMAIL PROTECTED] / 2006-10-23 20:35:16 -0500: On 10/23/06, tedd [EMAIL PROTECTED] wrote: At 8:42 PM +0100 10/23/06, Stut wrote: Rob Kritzer wrote: Is it possible to FTP a folder and all it's content? I can do a file at a time, but not a folder. Also there is times when

Re: [PHP] mysqldump problem from PHP

2006-10-24 Thread Chris
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-10-23 16:34:16 +0100: It appears that it could be because the user that runs the scripts is not allowed to. When I run them on the commandline, I run them as the root user. that's very simple to check (man su) yes I know of CRONtabs but

Re: [PHP] ENV vars

2006-10-24 Thread Jochem Maas
jekillen wrote: Hello again; I'm wondering if it is possible to create an $_ENV var with a php script running under a web server. I'm not sure where to look in the manual or other documentations for this. Isn't there a set_env() function or something like it? (would apply to php 4 0r 5x)

Re: [PHP] Class privacy and variable identifiers

2006-10-24 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-23 15:07:29 -0500: i) Does the language provide a way to generate a private or local class that is accessible only within another function or a parent class. no Does PHP 5 supply a good way to generate a little utility class without polluting the public

Re: [PHP] mysqldump problem from PHP

2006-10-24 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-24 17:58:45 +1000: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-10-23 16:34:16 +0100: It looks to me as if you are trying to use web scripting (PHP) to do the sysadmin on your server, for which other methods are more suitable. Those would be? What

[PHP] I'm newbie in PHP

2006-10-24 Thread Hassan Arteaga Rodriguez
Hi all: Sorry if this question become a very simple but i'm getting errors when i try to connect to MySQL Server. I setup the PHP correctly..As example I run ?php phpinfo(); ? from one web site I have been created. Then testing MySQL server with this simple code ?php $link =

Re: [PHP] I'm newbie in PHP

2006-10-24 Thread Dave Goodchild
Doesn't look like you have mysql support compiled with PHP. -- http://www.web-buddha.co.uk

RE: [PHP] I'm newbie in PHP

2006-10-24 Thread Edward Kay
I expect this is because you haven't installed the MySQL extension. Look at the output from phpinfo() - there should be a section called MySQL. If it's not there, you haven't got the MySQL extension installed. Edward -Original Message- From: Hassan Arteaga Rodriguez [mailto:[EMAIL

Re: [PHP] I'm newbie in PHP

2006-10-24 Thread Andrei
If you don't have mysql support built in your PHP compilation, check your php.ini file (you see its location in phpinfo()), go to ;Windows Extensions part and check the line extension=php_crack.dll to be uncommented. Andy Hassan Arteaga Rodriguez wrote: Hi all: Sorry if

Re: [PHP] I'm newbie in PHP

2006-10-24 Thread Paul Scott
On Tue, 2006-10-24 at 14:15 +0300, Andrei wrote: extension=php_crack.dll to be uncommented. What does the CrackLib have to do with MySQL??? Surely you meant the php_mysql.dll extension? Oh, and if you are on a real operating system, you will enable the extension with a .so extension, not a

[PHP] PHP Zip Question

2006-10-24 Thread Matt Street
Dear all, I am trying to create a zipping mechanism that allows the user to select a number of files from a list; these files are then zipped and downloaded to the user's machine. I presently have: $zip = new ZipArchive(); $filename = $zipfinalpath.tutor/zipfiles/.$tutorzipfile;

Re: [PHP] FTP - folders

2006-10-24 Thread tedd
At 8:35 PM -0500 10/23/06, Rob Kritzer wrote: Yes Tedd, This is what I am having trouble with, I can see where you can upload each file, but all I really need it to do is take the contents of a folder and upload everything it finds in the directory. Rob Rob: I understand what you're trying

Re: [PHP] handling multipart form-data

2006-10-24 Thread Anton Statutov
Richard Lynch wrote: I think you want that HTTP_RAW_POST_DATA setting thingie that's in the manual... I tried HTTP_RAW_POST_DATA with same result as php://input did. When form enctype is url-form-encoded they both works fine, but when enctype is multipart/form-data they both are empty. I need

Re: [PHP] PHP Search and Privacy...

2006-10-24 Thread Russell Jones
You're right - i dont know if there is even a standards body that would cover something like this. I am assuming, along with that answer, that none of the popular php site search tools have implemented it yet. Ill see if i can throw something into one of the more common scripts... Russ On

Re: [PHP] Creating thumbnails using Image Functions, then saving to folders

2006-10-24 Thread tedd
Chris asked: Is there a way to use a php FTP function to FTP the file out of the buffer to a directory on the server, or some other way to write a file to a folder without making that folder 0777? What about changing the folder's permission to 0777 during the operation and then changing

Re: [PHP] I'm newbie in PHP

2006-10-24 Thread Andrei
Ah sorry, I ment php_mysql.dll, forgot to change the name in copypaste (as mine is builtin). The guy which wrote said: [QUOTE] i got this error *Fatal error*: Call to undefined function mysql_connect() in * D:\WEB\aplicaciones\TestPHP\testmysql.php* on line *2* [/QUOTE]

[PHP] Job postings?

2006-10-24 Thread Steve Lane
Greetings all: This is a general etiquette question. I have a job posting for a junior PHP programmer. Are there any of the PHP mailing lists to which it would be appropriate to post that? If not, can anyone recommend a good place to post, especially a place that might be read by many people

Re: [PHP] Job postings?

2006-10-24 Thread Chris Boget
This is a general etiquette question. I have a job posting for a junior PHP programmer. Are there any of the PHP mailing lists to which it would be appropriate to post that? If not, can anyone recommend a good place to post, especially a place that might be read by many people with specifically

RE: [PHP] Job postings?

2006-10-24 Thread Edward Kay
This is a general etiquette question. I have a job posting for a junior PHP programmer. Are there any of the PHP mailing lists to which it would be appropriate to post that? If not, can anyone recommend a good place to post, especially a place that might be read by many people with

Re: [PHP] Job postings?

2006-10-24 Thread Jochem Maas
Steve Lane wrote: Greetings all: This is a general etiquette question. this is the [php]general mailing list. some say etiquette here is generally lacking :-) I have a job posting for a junior PHP programmer. Are there any of the PHP mailing lists to which it would be appropriate to post

Re: [PHP] Job postings?

2006-10-24 Thread Steve Lane
Thanks Jochem. If I can't find a junior PHP dev, it sounds as though I'll at least be able to improve my beer technique :-) -- SGL On 10/24/06 10:02 AM, Jochem Maas [EMAIL PROTECTED] wrote: Steve Lane wrote: Greetings all: This is a general etiquette question. this is the [php]general

Re: [PHP] Job postings?

2006-10-24 Thread David Giragosian
I've seen PHP/programming job postings on Craig's List. I was kind of shocked by it, but nonetheless... David

Re: [PHP] Job postings?

2006-10-24 Thread Jochem Maas
Steve Lane wrote: Thanks Jochem. If I can't find a junior PHP dev, it sounds as though I'll at least be able to improve my beer technique :-) lol. we can also do 'drink-away-your-sorrows' in OO and procedural styles. -- SGL On 10/24/06 10:02 AM, Jochem Maas [EMAIL PROTECTED] wrote:

Re: [PHP] Is there a function can decrypt md5 ??

2006-10-24 Thread tg-php
There is no practical way to 'decrypt' an MD5 hash. It is meant to be a one-way encoding of data to produce a (mostly) unique ID. It does a lot better job than some of it's predecessors like CRC32, in producing a unique ID, but apparently it still has a very slim possibility of generating the

[PHP] Re: Is there a function can decrypt md5 ??

2006-10-24 Thread zerof
Brad Chow escreveu: Dear all: Is there a function can decrypt md5 ?? I don't have any bad ideas. I just want to know whether md5 can be decrypted or not. -- Brad -- The md5 hash is not a codification, but, yes, a validation key. In this way, it cannot be decoded! It only can be

Re: [PHP] Re: Is there a function can decrypt md5 ??

2006-10-24 Thread Satyam
- Original Message - From: zerof [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, October 24, 2006 6:00 PM Subject: [PHP] Re: Is there a function can decrypt md5 ?? Brad Chow escreveu: Dear all: Is there a function can decrypt md5 ?? I don't have any bad ideas. I just

Re: [PHP] Re: Is there a function can decrypt md5 ??

2006-10-24 Thread zerof
Satyam escreveu: An analogy of why it cannot be decodified is thinking of the MD5 as the remainder of a division. Even if you know the divisor and the remainder, there are many numbers that could have produced that result. The remainder or modulo operation loses information thus the original

Re: [PHP] Job postings?

2006-10-24 Thread John Nichel
Steve Lane wrote: Greetings all: This is a general etiquette question. I have a job posting for a junior PHP programmer. Are there any of the PHP mailing lists to which it would be appropriate to post that? If not, can anyone recommend a good place to post, especially a place that might be

[PHP] Problems with mail function

2006-10-24 Thread Ricardo Ríos
Hi wizards, I 'm trying to use mail function in PHP, but this function don't send the email , I have a server with postfix. Does somebody know how to send an email with php and postfix. Thanks in advance.

Re: [PHP] Problems with mail function

2006-10-24 Thread John Nichel
Ricardo Ríos wrote: Hi wizards, I 'm trying to use mail function in PHP, but this function don't send the email , I have a server with postfix. Does somebody know how to send an email with php and postfix. Thanks in advance. Does your install of postfix have a sendmail wrapper? Is it in the

[PHP] foreach on a 3d array

2006-10-24 Thread Dotan Cohen
I have an array that lloks like this: $languages = array( af = array(Afrikaans, Afrikaans, South Africa), sq = array(Albanian, Shqipe, Albania)); Now, if the user's $_HTTP_ACCEPT_LANGUAGE contains, for example, af, I want to print the third value of the subarray for that value.

Re: [PHP] foreach on a 3d array

2006-10-24 Thread Chris Boget
$languages = array( af = array(Afrikaans, Afrikaans, South Africa), sq = array(Albanian, Shqipe, Albania)); foreach ($languages as $language){ if ( strstr( $_HTTP_ACCEPT_LANGUAGE, $language) ) { printcenterYou are from .$language[2].!/center; } } What you want is

Re: [PHP] Problems with mail function

2006-10-24 Thread Jochem Maas
John Nichel wrote: Ricardo Ríos wrote: Hi wizards, I 'm trying to use mail function in PHP, but this function don't send the email , I have a server with postfix. Does somebody know how to send an email with php and postfix. Thanks in advance. Does your install of postfix have a sendmail

Re: [PHP] foreach on a 3d array

2006-10-24 Thread Dotan Cohen
On 24/10/06, Chris Boget [EMAIL PROTECTED] wrote: $languages = array( af = array(Afrikaans, Afrikaans, South Africa), sq = array(Albanian, Shqipe, Albania)); foreach ($languages as $language){ if ( strstr( $_HTTP_ACCEPT_LANGUAGE, $language) ) { printcenterYou

Re: [PHP] foreach on a 3d array

2006-10-24 Thread M.Sokolewicz
Dotan Cohen wrote: On 24/10/06, Chris Boget [EMAIL PROTECTED] wrote: $languages = array( af = array(Afrikaans, Afrikaans, South Africa), sq = array(Albanian, Shqipe, Albania)); foreach ($languages as $language){ if ( strstr( $_HTTP_ACCEPT_LANGUAGE, $language) ) {

Re: [PHP] Problems with mail function

2006-10-24 Thread Chris
Ricardo Ríos wrote: Hi wizards, I 'm trying to use mail function in PHP, but this function don't send the email , I have a server with postfix. Does somebody know how to send an email with php and postfix. Thanks in advance. Create a phpinfo page and make sure the 'sendmail_path' is set. If

[PHP] strtotime

2006-10-24 Thread Ron Piggott (PHP)
I have used the strtotime command to calculate a week ago (among other things) with syntax like this: $one_week_ago = strtotime(-7 days); $one_week_ago = date('Y-m-d', $one_week_ago); How would you use this command to figure out the last day of the month in two months from now --- Today is

Re: [PHP] strtotime

2006-10-24 Thread Chris
Ron Piggott (PHP) wrote: I have used the strtotime command to calculate a week ago (among other things) with syntax like this: $one_week_ago = strtotime(-7 days); $one_week_ago = date('Y-m-d', $one_week_ago); How would you use this command to figure out the last day of the month in two months

Re: [PHP] strtotime

2006-10-24 Thread Brad Chow
Dear Ron: I have a solution as follows: $date=(2006-10-26); $date=strtotime($date); $date=date('Y-m-1',$date); $now=strtotime(+3 month, strtotime($date)); $lastday=strtotime(-1 day, $now); echo date('Y-m-d',$lastday); //2006-12-31 It's a very easy way to do you want. I use strtotime to convert