how to run drush with cron from cpanel for your drupal installation

Type this command on the cron command line on cpanel.
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin /usr/local/bin/drush --root=/home/yourhome/public_html/ cron run

You can copy and past it on your cpanel command line. Change this line to your home /home/yourhome/public_html/

Warning: file_put_contents(temporary://fileAawlcV) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed (solved)

Don't panic don't panic

Just go the admin/config and media and change your file system. It is usually /sites/default/files and /tmp and also your private files if you have one.
You probably move your site from your local environment to production environment.

cpanel DISKWARN: problem, where is my disk gone?

If you want to find out where your disk has gone run the following command on your shell

du -h /usr/ | grep ^[0-9.]*G | sort -nr
This will find all the directories with GB s
now repeat for other directories until you find the problem

du -h /var/ | grep ^[0-9.]*G | sort -nr /var is usually the biggest pain. Also run it for /home
du -h /home/ | grep ^[0-9.]*G | sort -nr .
Enjoy

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 FROM {feeds_source} WHERE id = :id AND feed_nid = :nid LIMIT 0, 1; Array ( [:id] => storyimport [:nid] => 0 ) in FeedsSource->save() (line 506

Additional uncaught exception thrown while handling exception.
Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 FROM {feeds_source} WHERE id = :id AND feed_nid = :nid LIMIT 0, 1; Array ( [:id] => storyimport [:nid] => 0 ) in FeedsSource->save() (line 506 of /Applications/MAMP/htdocs/

Linux ls command list just the directories

To list just the directory in your current directory structure type the following command on your command line:
find ./ -maxdepth 1 -type d

then once you get the list type the command: I usually copy and paste it.

ls -l | grep ^d

You will get all the directories under your current directory structure. but make sure that you navigate to desired destination by using cd /required directory/another-dirctory
Enjoy

how to disable all non core module in drupal with drush

how to disable all non core module in drupal with drush.
First print all non core module with this command (warning it may take sometime)
drush pm-list --type=module --status=enabled | sed '/\((.*)\)/!d;/[Cc]ore.*-.*[Rr]equired/d;s/.*(\(.*\)).*/\1/' | sort > noncoremod.txt

Second issue the below command to disable all found modules
drush pm-disable $(cat noncoremod.txt)

And finally enable them again with this command
drush pm-enable $(cat noncoremod.txt)

Isn't drush and drupal fantastic?

Apache Yahoo News Feed

Drupal Yahoo News

Linux Yahoo News Feed

Mysql Yahoo News Feed