Submit Your Article Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Internet Security Discussion Forum This forum is for the discussion of security related issues. If you find a new Phishing scheme, spyware, virus or malicious site - let us know about it. If any of the above found you... here's where you ask for help.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-02-2007, 02:17 AM
WebProWorld New Member
 
Join Date: Jul 2007
Posts: 2
seo111hello RepRank 0
Default PHP Security

I am developing site using php/mysql. I have read some security tutorial and develop function to valid user input ( for registration , login, posting , showing result, search result pages etc.)

I am giving functions,

Is it ok or I am missing something, plz comment on this.

1) on every php page

error_reporting (????);
set_magic_quotes_runtime(0);

???? = tell me exact code

2) Functions to validate user all input
( I don't want any html tag or slashes input from user)

function ValidateString($userinput)
{

if (!get_magic_quotes_gpc()) {
$userinput = stripslashes($userinput);
}

$userinput = strip_tags($userinput);
$userinput = htmlentities($userinput);

return $userinput;
}


function ValidateSQL($userinput)
{
$userinput = ValidateString($userinput);

$userinput = mysql_real_escape_string($userinput);

return $userinput;
}

function ValidateNumber($userinput)
{
$num = 0;

$userinput = ValidateSQL($userinput);
if (is_numeric($userinput)) {
$num = $userinput;
}

return $num;
}


3) storing all session in temp. table

4) I have taken all major steps to protect in php.ini file like register variable security issue etc.
(If you have any check list then plz post it)

5) how many point you will give for funtions
ValidateString, ValidateSQL, ValidateNumber

poor security = 0, 1, 2, .......... 10 = highly secured


6) As I said If you have any security check list (steps) then plz post it


regards
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Internet Security Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Hnadlers - php.ini and .haccess files seorocks Web Programming Discussion Forum 9 06-01-2007 12:37 AM
PHP Security scripts kgun Internet Security Discussion Forum 0 08-14-2006 01:24 PM
Security issues PHP / MySQL. kgun Database Discussion Forum 1 04-19-2006 08:21 AM
PHP falls down security hole mushroom Internet Security Discussion Forum 0 04-19-2005 02:37 PM
Php Includes - A simple solution to use external Php Code mjmls Web Programming Discussion Forum 1 06-27-2004 04:18 PM


All times are GMT -4. The time now is 06:04 PM.



Search Engine Optimization by vBSEO 3.3.0