md5:may insert plain strings, and mysql convert them
Please answer these Questions came from reading a PHP textbook(Stobart, cengage):
A]
I GET IN MY SCRIPT
Strict Standards: Declaration of square::resize() should be compatible with that of shape::resize() in C:\xampp\htdocs\Stobart2008\ch17\square.php on line 17
WELL WHY IF USE
error_reporting(E_ALL);
THIS MESSAGE IS REMOVED?
THIS is warning And MUST BYPASSED? How correctly, I can bypass warnings?
Code:
<?php
// File: example17-5.php
error_reporting(E_ALL);
function __autoload($class_name) {
require_once $class_name . '.php';
}
$objRectangle = new rectangle(100,50, "rectangle.gif");
$objSquare = new square(100, "square.gif");
$objTriangle = new triangle(50,100, "triangle.gif");
$objEllipse = new ellipse(50,100, "ellipse.gif");
$arrShapes = array ($objRectangle,$objSquare,$objTriangle,$objEllipse);
foreach ($arrShapes as $objShape){
$objShape->display();
$objShape->area();
}
?>
B]
WHEN: globals=on, in php.ini =>
<input type="hidden" name="intOkay" value="1"/> = $intOkay
And when is of is not equal and must have:
<input type="hidden" name="intOkay" value="1"/> = $_POST[“intOkay”]
(or GET or REQUEST)
this is correct?
C]
To store md5 strings[actually passwords] to MySQL I must convert them from PHP or may insert plain strings, and mysql convert them?
Md5 code conversion of passwords are the same independently of website [url], or ver of PHP or ver of mysql, ALL are the same?
Re: md5:may insert plain strings, and mysql convert them
1. Place a @ before the object throwing the error.
2. Having globals turned on requires more resources. It also can make reading where variables came from much more difficult. Always use POST or GET. You should stay away from using REQUEST because it doesn't know what to do with duplicate names for POST and GET variables.
3. MySQL has no MD5 library built into it. You must use PHP before inserting or updating.
Re: md5:may insert plain strings, and mysql convert them
If apply md5 from any site i get same result?
Re: md5:may insert plain strings, and mysql convert them
warnings like
Strict Standards: Declaration of square::resize() should be compatible with that of shape::resize() in C:\xampp\htdocs\Stobart2008\ch17\square.php on line 17
must bypassed...? In PHP Polymorphism scripts like this warning must bypassed, hence is common and not fatal error?
Re: md5:may insert plain strings, and mysql convert them
1. MD5 has a specific standard method of hashing. It will be 100% the same anywhere you try it.
2. I already answered your question about warning suppression. (#1 in my first post)
Re: md5:may insert plain strings, and mysql convert them
md5 function exists in mysql
http://dev.mysql.com/doc/refman/5.0/...l#function_md5
Just for testing :
mysql> SELECT MD5('Super Moderator');
+----------------------------------+
| MD5('Super Moderator') |
+----------------------------------+
| c08b301cfbac693539756d1898cd98c5 |
+----------------------------------+
1 row in set (0.00 sec)
Re: md5:may insert plain strings, and mysql convert them
Correct. I was thinking back to MySQL 4.x days...which, unfortunately, many big web hosts still have as the default.