Drupal Blog

User login

Your PHP MySQL library version 5.0.91 differs from your MySQL server version 5.1.50. This may cause unpredictable behavior | phpMyAdmin

Right after a fresh installation of phpMyAdmin, you open the main page with your favorite browser (ie explorer no doubt) and view the contents. Our beloved third party displays just fine, but at the bottom there lies the following warning:

Your PHP MySQL library version 5.0.91 differs from your MySQL server version 5.1.50. This may cause unpredictable behavior.

Nobody likes unpredictable behaviors. Check again... Nope, PHP and MySQL newer versions installed. Where does the warning come from? How to deal with this?

Reset admin password in Kloxo : How to

Locked out, ha? No worries, we have all been there. In order to reset the admin's password for Kloxo, open a shell and type

/script/update --class=client --name=admin --subaction=password --v-password=XXX

where XXX is the new password.
That should do it :)

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’

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".

Pages

Subscribe to Drupal Blog