xampp: username and password for mysql

Usually during the installation of xampp in mac OSX username is root and no password set. But it can set later. Navigate through the directory and type the command. cd /Applications/XAMPP/xamppfiles/bin/ mysqladmin -u root password sqlpass Hit enter. Above command will set password for the mysql.

Script to locate php.ini

Simple script to locate php.ini file from your directory. Save this script in a php file let’s say locate-php-ini.php. Access the file from your local server. It will show exact path location. $inipath = php_ini_loaded_file(); if ($inipath) { echo ‘Loaded php.ini: ‘ . $inipath; } else { echo ‘A php.ini file is not loaded'; } […]

Prepend-Append!

Rather than having to call / include a file you need on every single page, you can have them automatically prepended (top of file) or appended (bottom of file) automatically through your .htaccess file. php_value auto_prepend_file “/real/path/to/file/functions.php” php_value auto_append_file “/real/path/to/file/footer.php”