Archive

Posts Tagged ‘php’

Dreamweaver CS5 Supports Content Management Systems!

May 5th, 2010

For those of you ahead of the curve, I realize this post is a couple weeks late.  However, I just got my first chance to play with CS5 today.  I must say, the hype had me excited.  I’ve been using Adobe products since version 6.  And I’ve been using Macromedia products since… well… since Macromedia existed.  I’ve said it before and I will say it again.  Dreamweaver is my favorite program.  Ever!  Now with full CMS support in CS5.. it’s my favorite, favorite program!

Joomla, Drupal, and WordPress are supported out of the box… as far as code hints go that is.  But, with the new live view and site-specific code hints, Dreamweaver can pretty much let you edit any type of dynamic content.  It will even provide code hints for your own custom functions.

There’s not a lot of content out there yet explaining how these new features work.  However, I found a youtube video that does a pretty good job of highlighting these features and how to use them.  It’s an example using WordPress, but the concepts will work for any dynamic pages you throw at it.  You can watch the video here.

How to add MySQL servers to phpMyAdmin

May 10th, 2009

Question: How do I add a server to phpMyAdmin?

Answer: Browse to your root phpMyAdmin installation.  Locate and open the config.inc.php file in a text editor.  You will see your default server listed.  (You will see the following block of code as of version 3.1.4. :

*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = ‘cookie’;
/* Server parameters */
$cfg['Servers'][$i]['host'] = ‘localhost’;
$cfg['Servers'][$i]['connect_type'] = ‘tcp’;
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = ‘mysql’;

/* rajk – for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = ’32M’;
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = ’32M’;

/* User for advanced features */
// $cfg['Servers'][$i]['controluser'] = ‘pma’;
// $cfg['Servers'][$i]['controlpass'] = ‘pmapass’;
/* Advanced phpMyAdmin features */
// $cfg['Servers'][$i]['pmadb'] = ‘phpmyadmin’;
// $cfg['Servers'][$i]['bookmarktable'] = ‘pma_bookmark’;
// $cfg['Servers'][$i]['relation'] = ‘pma_relation’;
// $cfg['Servers'][$i]['table_info'] = ‘pma_table_info’;
// $cfg['Servers'][$i]['table_coords'] = ‘pma_table_coords’;
// $cfg['Servers'][$i]['pdf_pages'] = ‘pma_pdf_pages’;
// $cfg['Servers'][$i]['column_info'] = ‘pma_column_info’;
// $cfg['Servers'][$i]['history'] = ‘pma_history’;
// $cfg['Servers'][$i]['designer_coords'] = ‘pma_designer_coords’;
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = ‘/etc/swekey-pma.conf’;

For each additional server that you wish to add, just copy this block of code and simply change the host line to the address of your mysql server.

Example: $cfg['Servers'][$i]['host'] = ‘192.168.1.110‘;

Most of the above block is commented out, so you really only need to copy the active lines.  But as you can see, there are additional options.  For example, you can add the user name and password so you don’t have to enter them every time. (NOTE: if you are using a public server, entering login info for your mysql server is not a good idea.)

Important:  When you copy the code to add extra servers, make sure you include the following line at the top of each server:

$i++;

This increases the servers array by 1 each time it loads a new server.  Otherwise only the last server in your configuration will show up.

Finally, the above code is for phpMyAdmin version 3.1.4.  You should make sure you copy the code from your configuration as it may change in subsequent versions of the software.    That’s it.  You should see the new servers in a drop down list when you reconnect to phpMyAdmin.  Enjoy!

Author: Curtis Categories: PHP/MYSQL, Web Tags: , , ,