RES: [PHP] Installing PHP

2011-09-21 Thread Mateus Almeida
Thanks for the help, people. Problem solved.


-Mensagem original-
De: Alejandro Michelin Salomon (Hotmail) [mailto:amichel...@hotmail.com] 
Enviada em: quarta-feira, 21 de setembro de 2011 00:07
Para: 'Mateus Almeida'
Cc: php-general@lists.php.net
Assunto: RES: [PHP] Installing PHP

Mateus:

Para configurar o php no apache :
1) Adicionar estas linhas no httpd.conf

Troca D:\PHP\ pelos dados da tua instalação.
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir D:\PHP\ 
LoadModule php5_module D:\PHP\php5apache2_2.dll

AddHandler application/x-httpd-php .php
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

2 ) Trocar o directory index do apache
IfModule dir_module
DirectoryIndex index.html index.php adicionar index.php como um arquivo
padrão para ele procurar
/IfModule

Inglish:

Mateus:
To configure php on apache:
1) Add this lines in httpd.conf

Change this D:\PHP\ to yours instalation data.
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir D:\PHP\ 
LoadModule php5_module D:\PHP\php5apache2_2.dll

AddHandler application/x-httpd-php .php
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

2 ) Change the directory index on apache
IfModule dir_module
DirectoryIndex index.html index.php == add index.php to be a default
file to search
/IfModule

Alejandro M.S.
PAO/RS
Brasil

-Mensagem original-
De: Mateus Almeida [mailto:supor...@avanutri.com.br] 
Enviada em: segunda-feira, 19 de setembro de 2011 18:32
Para: php-general@lists.php.net
Assunto: [PHP] Installing PHP

Hello, I'm newbie and I'm trying to install PHP with Apache, but it doesn't
work. 

Every time I try to run a test I receive the message Not Found The
requested URL /php/php-cgi.exe/test.php was not found on this server. OR
(when I try to change some options) Forbidden You don't have permission to
access /php/php-cgi.exe/test.php on this server.

I've tried to copy the recommended configurations from some sites, but it
haven't worked. 

The machine runs Windows XP, I'm using an administrator account, no firewall
is blocking me, PHP and Apache are the most recent versions.

Thanks in advance.




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



[PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Dotan Cohen
I have an application in which the password is stored in the database
as md5(md5('passWord').'userSpecificSalt'). I'm checking the password
entered with:
$password=md5(  md5('$_POST['password']').'userSpecificSalt'  );
$query=SELECT id FROM table WHERE password='{$password}';

Now I'm a bit queasy about not using mysql_real_escape_string() on
that $password variable! Please reassure me or tell me the folly of my
ways. Thanks!

-- 
Dotan Cohen

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

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



Re: [PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Daniel Brown
On Wed, Sep 21, 2011 at 13:53, Dotan Cohen dotanco...@gmail.com wrote:
 I have an application in which the password is stored in the database
 as md5(md5('passWord').'userSpecificSalt'). I'm checking the password
 entered with:
 $password=md5(  md5('$_POST['password']').'userSpecificSalt'  );
 $query=SELECT id FROM table WHERE password='{$password}';

 Now I'm a bit queasy about not using mysql_real_escape_string() on
 that $password variable! Please reassure me or tell me the folly of my
 ways. Thanks!

It never hurts to be overly cautious, but as MD5 hashes are
strictly alphanumeric (using hex characters), you won't have an issue
with injection with the code above.  That is, of course, unless your
version of PHP is rebuilt without MD5 hash support, or some other
oddity that is on the outside edge of possibility.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

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



Re: [PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Igor Escobar
If you're converting the input data in a md5 hash has no reason to scape it.



Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar http://www.twitter.com/igorescobar





On Wed, Sep 21, 2011 at 2:53 PM, Dotan Cohen dotanco...@gmail.com wrote:

 I have an application in which the password is stored in the database
 as md5(md5('passWord').'userSpecificSalt'). I'm checking the password
 entered with:
 $password=md5(  md5('$_POST['password']').'userSpecificSalt'  );
 $query=SELECT id FROM table WHERE password='{$password}';

 Now I'm a bit queasy about not using mysql_real_escape_string() on
 that $password variable! Please reassure me or tell me the folly of my
 ways. Thanks!

 --
 Dotan Cohen

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

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




Re: [PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Dotan Cohen
On Wed, Sep 21, 2011 at 21:03, Daniel Brown danbr...@php.net wrote:
    It never hurts to be overly cautious, but as MD5 hashes are
 strictly alphanumeric (using hex characters), you won't have an issue
 with injection with the code above.  That is, of course, unless your
 version of PHP is rebuilt without MD5 hash support, or some other
 oddity that is on the outside edge of possibility.


The rebuild without md5 is an interesting point. That sounds exactly
like the type of it-will-never-happen-until-it-happens-to-me problems!
Thanks for the heads up.


-- 
Dotan Cohen

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

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



Re: [PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Dotan Cohen
Thanks Igor. I will sleep peacefully this night!


-- 
Dotan Cohen

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

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



Re: [PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Daniel Brown
On Wed, Sep 21, 2011 at 15:32, Dotan Cohen dotanco...@gmail.com wrote:

 The rebuild without md5 is an interesting point. That sounds exactly
 like the type of it-will-never-happen-until-it-happens-to-me problems!
 Thanks for the heads up.

I should've specified, though, that then you would simply have the
fatal error message (call to undefined function) pass through, not the
unhashed original text.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

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



Re: [PHP] Escaping MySQL passwords necessary when md5 is used?

2011-09-21 Thread Dotan Cohen
On Wed, Sep 21, 2011 at 22:36, Daniel Brown danbr...@php.net wrote:
    I should've specified, though, that then you would simply have the
 fatal error message (call to undefined function) pass through, not the
 unhashed original text.


Yes, that is obvious.


-- 
Dotan Cohen

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

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