Drupal Blog

phpMyAdmin: Change the root password of phpmyadmin after a fresh installation on your server

After a fresh install of phpMyAdmin, you can use your browser to login (http://www.yoursite-or-IP.com/phpmyadmin) using the credentials root and empty passwort. Obviously this is a security hole that needs to be fixed asap. Not so obvious, however, is how.

Using your terminal (or Putty in Windows), you can use the following command to change the password for root:

/usr/local/mysql/bin/mysqladmin -u root password ’somepassword’

blog: 

Drupal: Run simple JS Scripts on a specific node

Let's say that you have a simple input form, on a specific node in your drupal site and you just want to reset it, using a button. There are a few ways you could go about it, but this one is probably the simplest one.
  1. Initialize global variable $base_url to gain access to functions base_path() and path_to_theme(), so that you can generate the script's path dynamically.

Drupal time ago function in template.php

Would you like to make time appear as an interval like "4 days 3 hours ago"? Possibly you have worked with such formatters (drupal time ago) in views and date fields, but what about editing a node.tpl.php for example? Or programmaticaly include the last login time of a node's author, as time ago, in a block?

It comes in handy when there is a reusable function to format our time statements as drupal time ago - and php in general. So here comes a little function to be included in the template.php file. You can easily use it in your themes to display a timestamp as "Time ago".

Drupal: MySQL server has gone away

The other day I was working on a website, when the following error came up out of the blue:

PHP Warning: MySQL server has gone away

blog: 

YouTube validation errors: a quick fix

In one of our latest projects we were asked to implement a video gallery for a famous choreographer, using videos already uploaded in YouTube.

Well, it so appears that the code provided by Youtube fails the validation test with multiple errors, mostly concerning the "embed" element.

Here is the code, as provided by YouTube.


<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/
v/FAM3tyAJ8Vw&hl=en&fs=1"></param>
<param name="allowFullScreen" value="true"></param>

Recent Comments

Forward by Dries Buytaert, Founder and Project Lead, Drupal; CTO Acquia.

Order now from:

Managing Expectations Podcast with DrupalEasy

Author Interview http://tinyurl.com/8a8nxno

We provide the most Shiny Drupal Bits & Pixels

Since Drupal 4.x