JFTP::login: Unable to login

While installing a component I encountered the following error JFTP::login: Unable to login JFTP::store: Unable to use passive mode Warning! Failed to move file. After some research i realized that I had changed the FTP login details on my hosing server So I logged in to Joomla Admin and changed the FTP settings under Global […]

php code to save files on user machine

I was trying to save the ‘.xls’, ‘.doc’, ‘.wmv’ on user machine, which works correctly on Firefox(developer friendly) but not on Microsoft’s IE(Microsoft friendly); after searching on the net, i found this code which works on both the browser. here is the code: ————————- <?php // downloading a file $filename = $_GET[‘path’]; // fix for […]

PHP Script to load a PDF

To get PHP to load a PDF (for example) from file, use the following code. <?php $filename = $_SERVER[‘DOCUMENT_ROOT’] . “/path/to/file/my_file.pdf”; header(“Cache-Control: public”); header(“Content-Description: File Transfer”); header(‘Content-disposition: attachment; filename=’.basename($filename)); header(“Content-Type: application/pdf”); header(“Content-Transfer-Encoding: binary”); header(‘Content-Length: ‘. filesize($filename)); readfile($filename); ?>

Cannot modify header information – headers already sent

Warning: Cannot modify header information – headers already sent by (output started at /home/domain/public_html/file.php:42) in home/domain/public_html/includes/main.php on line 302 Solution The “headers already sent” error is usually caused by having white space before or after the opening and closing PHP tags (<?php . . . ?>). Remove the additional spaces , this should solve the […]

Creloaded template gives error

You must have noticd several time that the creloaded template when installed gives error The simplest solution is as follows Eg error 1054 – Unknown column ‘popt.products_options_name’ in ‘field list’ select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from products_options popt, products_options_values poval, products_attributes pa where pa.products_id = ‘698{2}7’ and pa.options_id = ‘2’ and pa.options_id = popt.products_options_id and […]

Change group and owners of files and folders on Linux server

chown command – change the owner of a file You must be either the root user or the owner of the file in order to change the group ownership. To change the group and owners of files and folders on the linux server use the below command Set the file’s owner: $ chown username filename […]

How to restore compressed mysql backup file

To restore compressed backup files you can do the following: gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname] If you need to restore a database that already exists, you’ll need to use mysqlimport command. The syntax for mysqlimport is as follows: mysqlimport -u [uname] -p[pass] [dbname] [backupfile.sql]

Upgrade from WordPress 2.5.x to WordPress 2.6 in easy steps

Step 1 : Backup your existing files of wordpress site . Step 2 : Backup your wordpress database. Step 3 : Deactivate your plugins. A plugin might not be compatible with the new version, so it’s nice to check for new versions of them and deactivate any that may cause problems. You can reactivate plugins […]