Posts Tagged: "php"

What is “Notice: Undefined variable”, “Notice: Undefined index”, “Warning: Undefined array key”, and “Notice: Undefined offset” using PHP and how to fix it

Understanding the Errors in PHP PHP provides notices and warnings to indicate potential issues in your code. Here’s a detailed explanation of the errors mentioned and how to fix them: 1. Notice: Undefined Variable This occurs when you try to use a variable that has not been declared or initialized. Example: <?phpecho $undefinedVar; // Undefined […]

How to prevent SQL injection in PHP?

Preventing SQL injection is crucial for securing a PHP application that interacts with a database. SQL injection occurs when an attacker manipulates input to execute malicious SQL commands. The best practices to prevent SQL injection involve properly validating and sanitizing user inputs and using secure database interaction methods. Here are key techniques to prevent SQL […]

Codeception web testing using phantomjs and selenium2 webdriver

Pre Requisites – PHP 5.3, PHP UNIT What is phantomjs This is used for headless webtesting Run functional tests with frameworks such as Jasmine, QUnit, Mocha, Capybara, WebDriver, and many others for screen capture Programmatically capture web contents, including SVG and Canvas. Create web site screenshots with thumbnail preview for Page automation Access and manipulate webpages […]

Error: Apache shutdown unexpectedly in windows 8 or windows 7 – xampp/wamp server

If you are getting this error 00:06:05 [Apache] Error: Apache shutdown unexpectedly. 00:06:05 [Apache] This may be due to a blocked port, missing dependencies, 00:06:05 [Apache] improper privileges, a crash, or a shutdown by another method. 00:06:05 [Apache] Check the “/xampp/apache/logs/error.log” file 00:06:05 [Apache] and the Windows Event Viewer for more clues follow these steps […]