Jump to content

Recommended Posts

1. escape all user data before using in an SQL statement using mysql_real_escape_string (assuming your db server is MySQL). This will prevent SQL injection and XSS. however it is preferred to use PDO with prepared statements.

 

2. Do not use $_SERVER['PHP_SELF'] as a forms action, this will leave your forms open to XSS.

 

3. Make sure files and directories have the proper permissions so user cannot view and/or tamper with them.

 

There is a list of things that you can do for added security, I'm sure other users will list more. I will leave you with some reading from php.net on the security subject: http://php.net/manual/en/security.php

Link to comment
https://forums.phpfreaks.com/topic/257764-possible-hacks/#findComment-1321136
Share on other sites

Off the top of my sleep deprived head (I'm at 21 hours I think):

SQL injection, XSS injection, cross-site request forgery, SSL, and encryption practices to start. There are also a few nuances with PHP like the downsides of loose typing, how form variables are strings, scalars versus arrays from forms and how PHP can barf on them.

Link to comment
https://forums.phpfreaks.com/topic/257764-possible-hacks/#findComment-1321139
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.