Tag Archives: htaccess

Php Interview Questions and Answers – Part 5

php3




1- How to reset/destroy a cookie ? Reset a cookie by specifying expire time in the past: Example: setcookie(‘Test’,$i,time()-3600); // already expired time Reset a cookie by specifying its name only Example: setcookie(‘Test’); 2- What types of images that PHP supports ? Using imagetypes() function to find out what types of images are supported in your PHP engine. imagetypes() – Returns the image types supported. This function returns a bit-field corresponding to the image formats supported by the version of […]

PHP Security

script-secuity




When it comes to PHP, some 99% of amateur sites and 60-70% of all sites use the professional scripting language called PHP. But is it safe to use PHP? Does the implementation of the language not have any gaps that are critical to the operation of our applications? But remember that security problems do not arise just from the language itself, but also from the programming skills of those who write PHP scripts. Of course, most of the errors can […]

How Affects DoFollow, NoFollow and NoIndex on Your Google Page Rank

dofollow-nofollow-noindex-s




In SEO community these 3 technical language are quite popular – DoFollow, NoFollow and NoIndex. Despite its popularity lots of webmasters and newbie bloggers still unclear and face difficulties while differentiating these 3 terms. This may be due to the overlapping of certain properties between each other. Or, may be due to the laxity of knowing technical things (SEO) which they consider not so important. Importance of DoFollow and NoFollow Links By judicious use of these link attributes you can […]

Best Way to Prevent WordPress Spam Comment

prevent-spam-comment




After tweaking codes to protect my blog from hackers and malicious bots, I wanted to prevent wordpress spam. My blogs have been receiving ton of spam and it gets annoying every time. By the way, I didn’t use Akismet until now. I know most of you do but Akismet alone can’t combat spam. I did some research, read some good posts written by others, and finally implemented whatever worked for me. I was a little ignorant last year; as a matter […]

Increase Maximum Eexecution Time Limit

imgres




PHP scripts are by default only allowed to be executed for a certain period of time, and when it reaches the time limit, it will stop and produce the following error; Fatal error: Maximum execution time of 30 seconds exceeded in yourscript.php This is to make sure a bad script don’t consume too much resource. To allow your PHP script to run at a longer time, you’ll need to increase the maximum execution time limit of PHP scripts using any […]

Increase PHP Memory Limit

php-memory-limit




 When you saw an error reads “Fatal Error: Allowed memory size of xxxxxx bytes exhausted” either in browser or server logs , that means PHP had exhausted the max memory limit. Mostly, this’s due to the insufficient memory allocated for the script. This article will teach how to increase the momory limit. Check The Memory Limit To see how much memory allocated for you php, you need create a file on your server (like view-php-info.php), and put following code in […]

Top Checks For Securing PHP

php_security




Obviously, PHP+ MySQL + Apache is a popular web technology.Its components are powerful, versatile and Free. However, the default settings ship with PHP is not suitable for production sites. Here, it is a check list of settings that are intended to harden the default PHP installation. 1) Disable Remote URLs for File Handling Functions File handling function like fopen, contents which accepts URLs as file parameters (for example: fopen(‘http://www.yoursite.info’,’r’)).These function facilitate the ease of development on accessing remote resources; however, […]

Improve SEO and Site Performance

seo-webduos




Here is a tips which will improve SEO performance and site performance. Like, I have a domain yourdomain.tk. You can access the site through www.yourdomain.tk or yourdomain.tk . By accessing these two URL paths, the same web page are displayed as well. However, from system perspective, they are different. The problem of www and non-www A lot of people do think yourdomain.info and www.yourdomain.info are the same; in fact, www is a sub-domain. This can be verified by Drupal. If you have […]

Increase OSCommerce Performance

oscommerce




Dramatically Increase OSCommerce Performance with ‘Pagespeed’ on Firefox. Recommended in Google’s Webmaster Tools, Pagespeed will quickly and easily analyze your site’s performance. More importantly, this analysis will also give you the exact reasons why your site performs as it does, list out the specific steps you can do to improve it AND gives you the tools to do it plus the links to understand what you are doing.

Redirect 301 in PHP and .htaccess

Redirect 301 in PHP and .htaccess




What is 301 redirect ? You have a website and its all pages are ranked in the search engine. And now you’ve moved these files to a new domain. What will happen in this scenario!!. You are sending the visitor to “Error 404 – File not found” page when they follow your website in the search engine. Furthermore, if you place the custom error page, then also you will be keep loosing ranking in upcoming days in search engines as […]