Thread: Learning PHP
View Single Post
Old 10-25-2016, 04:43 AM  
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by mikeworks View Post
I am trying to learn php/mysql and have completed a couple of courses so far on udemy. Still a lot to learn, but my goal is to code my own cms system that I could use on a network of high traffic sites. But while working through online course some questions don't seem to be answered or discussed much yet.

1. How to make script secure? A lot of courses so far are fairly brief on this, are there any good sources for information or books to study?

2. Caching? What caching should I be learning about to help run high traffic sites. I have experience with sites running memcache/smarty template cache.
1. By trying to hack your own script, you can also ask other programmers to trying to hack it.
Basically you need to check your script against any kind of injections, regardless is it mysql or any other kind. But sometime even trivial solutions can block most of injections, for example command htmlentities which turns characters which are required to execute injection into html code.

2. I am using memcached and it do the fine job, page loads fast once is runned for first time, and it stil loads fast even if you make a change on page. There are additional caching engines, like Opcache and Ioncube which you can use as well with it, but also pay attention to your queries - a lot of optimization can be done by simply using either better queries or better data structure. For example,
you can organize data by dividing tables to frequently used data and settings data.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote