# First step, download ruby from http://rubyinstaller.org/. Once downloaded click the installer to install Ruby into your desired folder (C:\Ruby). Make sure to add Ruby to your path.
# Once installed, check the version of Ruby installed by typing in
Add the following list of lines into .htaccess file or to vhost configuration file appropriate to the folder within the website
Deny from all
Same will be the case for denying files within directories
<Files ~ “\.ini$”>
Deny from all
The above lines of code will be helpful for us to prevent .svn files, .ini files, .htaccess files, include files from display within Apache
Whitelist validation refers to data validation techniques such as checking the data type, data length, input range, nature of data by its format (for e.g. phone number will be ten digits separated by hyphens satisfying the format nnn-nnn-nnnn). Regular expressions may be used for format validation in inputs.
Blacklist validation refers to rejecting data based on a know bad list filter. This is not a powerful solution as the list of possible exclusions will be many and it is difficult to implement all possible scenarios. Blacklist validation should be used in conjunction with whitelist validation but in cases where whitelist validation cannot be applied at least blacklist validation should be implemented.
Dynamic SQL (concatenated sql string) is a coding practice where by the queries are built in the program and sent to SQL Server for execution. This can allow the code to be injected into the dynamic queries causing a damage to the database.
A good alternative is to use parameterised queries where placeholders are set for the variables. The possibility of queries getting infected with injected code is completely removed with parameterized queries.
In addition to parameterized queries, it is alway a best practice to sanitize the input parameters before using them in queries.
Also the data input should be encoded appropriately especially in case of dynamic sql usage and to apply appropriate encoding when extracted from the database to avoid cross-site script execution.
Follow the simple steps given below to integrate Zend framework with other applications like WordPress, Joomla and other such open source or custom web applications.
i) Setup your Zend framework application as usual.
ii) Set the document root of the Zend application to the public folder within Zend install
iii) Now setup a folder for your wordpress or joomla or custom application. Let us assume that we want to create a custom blog application. Create a folder “blog” within “public” folder. Inside blog folder, create two files – .htaccess and index.php. Code for the two files are given below