Best way to learn PHP
#6
If it's something like MyBB, the trickiest thing there is probably maintainability and security.
Especially security, I can't list the sheer number of ways there are for someone to completely screw you over.

Timing attacks, XSS, SQL Injections, Spectre, CSRF, XML surprises, serialize() being insecure, Apache running bah.php.txt as a PHP file, and the list goes on.
If you have code that looks like this:
->query("SELECT uid FROM users WHERE uid = $uid")
Then it is insecure.

If you use eval, then you are probably insecure.

If you do permission checks on the client, then you are probably insecure.

If you think that randomising a filename makes it impossible to deduce, you are probably insecure.

If your code looks like this:
<title><?php echo "Page Title"; ?></title>
Then, you are probably insecure.

If you use XML, you are probably insecure.

If you think that XSS in one tab doesn't affect others for your site, then Spectre has some surprises for you.

Frameworks are usually good for somewhat protecting you from these things, but even they aren't omnipotent.
Laravel in particular seems to be good to stop you from tripping over yourself too badly. I believe you get a template engine (largely solves XSS), a query builder (solves SQL Injections), has functionality for dealing with CSRF, is probably not that stupid about timing attacks, etc. and so forth.
Reply


Messages In This Thread
Best way to learn PHP - by Ikerepc - 2017-12-19, 08:21 PM
RE: Best way to learn PHP - by Wildcard - 2017-12-19, 10:37 PM
RE: Best way to learn PHP - by Ikerepc - 2017-12-19, 11:25 PM
RE: Best way to learn PHP - by dragonexpert - 2018-01-23, 12:21 PM
RE: Best way to learn PHP - by Ikerepc - 2018-01-23, 09:38 PM
RE: Best way to learn PHP - by Azah - 2018-08-18, 02:32 PM
RE: Best way to learn PHP - by Spooking - 2019-07-09, 05:55 PM
RE: Best way to learn PHP - by samkhan - 2019-10-09, 04:18 PM
RE: Best way to learn PHP - by WallBB - 2019-10-10, 12:56 PM
RE: Best way to learn PHP - by [ExiTuS] - 2019-10-10, 11:03 PM
RE: Best way to learn PHP - by MasonHill - 2021-04-23, 06:55 AM
RE: Best way to learn PHP - by effone - 2021-04-23, 11:25 PM
RE: Best way to learn PHP - by HLFadmin - 2021-04-24, 12:57 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)