faqts : Computers : Operating Systems : Microsoft : bilal

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 2 people (50%) answered Yes
Recently 1 of 2 people (50%) answered Yes

Entry

Database: MySql: GUI: PHPMyAdmin: How to add it to the WAMP installation on the USB stick?

May 6th, 2005 04:30
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 06 April 2005 - 06:58 pm ----------------------

Database: MySql: GUI: PHPMyAdmin: How to add it to the WAMP 
installation on the USB stick?

---
---

Steps: Overview:

 1. -Install MySql + Apache + PHP on the USB stick

 2. -Download and install PHPMyAdmin

 3. -Copy the resulting directory to the web htdocs directory on the
     USB stick

     1. -E.g. on the MSDOS command line (using 4DOS/4NT)

       copy "c:\Program Files\Apache Group\Apache2\htdocs\phpMyAdmin-
2.6.2-rc1\" "h:\pdrive\apache\Apache2\htdocs\phpMyAdmin-2.6.2-rc1\" /s

        (you will have to adapt the path to the conditions on your 
system)

 4. -Add the PHPAdmin program to the startup

     1. -On the USB stick, using your favorite text editor, open the
         file

         start.php

        1. Add the line

--- cut here: begin --------------------------------------------------

echo "opening PHPAdmin\n";
exec( 'start http://localhost/phpMyAdmin-2.6.2-rc1/index.php');

--- cut here: end ----------------------------------------------------

         (you will have to adapt the path to the conditions on your
          system)

     2. Now your start.php file looks possibly like:

--- cut here: begin --------------------------------------------------

<?php
// --------------------------------------------------------------------
echo "stopping any (other) running MySQL ....\n";
exec( 'mysqladmin stop' );
// --------------------------------------------------------------------
echo "starting MySQL ....\n";
pclose( popen( 'start \\pdrive\\mysql\\MySQL_Server_4.1\\bin\mysqld-
nt.exe --defaults-file="/pdrive/mysql/MySQL_Server_4.1/my.ini" --
basedir="/pdrive/mysql/MySQL_Server_4.1/" --
datadir="/pdrive/mysql/MySQL_Server_4.1/data/" --standalone', 'r' ) );
// --------------------------------------------------------------------
echo "opening MySQL command line\n";
pclose( popen( 'start \\pdrive\\mysql\\MySQL_Server_4.1
\\bin\mysql.exe', 'r' ) );
// --------------------------------------------------------------------
echo "stopping Microsoft Internet Information server (IIS)....\n";
exec( GetEnv( 'WINDIR' ) . "\\system32\\iisreset.exe /stop" );
// --------------------------------------------------------------------
echo "starting Apache....\n";
flush();
pclose( popen( 'start \\pdrive\\apache\\Apache2
\\bin\\Apache.exe','r') );
flush();
sleep(5);
// --------------------------------------------------------------------
echo "opening localhost\n";
exec( 'start http://localhost');
// --------------------------------------------------------------------
echo "opening PHPAdmin\n";
exec( 'start http://localhost/phpMyAdmin-2.6.2-rc1/index.php');
// --------------------------------------------------------------------
echo "starting WinRadius RADIUS server\n";
pclose( popen( 'start \pdrive\radius\winradius.exe', 'r' ) );
// --------------------------------------------------------------------
?>

--- cut here: end ----------------------------------------------------

     2. -Save the file

         start.php

 5. -Start MySql + Apache + PHP + PHPAdmin

     1. -On the USB disk, run the file

          h:\start.bat h:

---
---

Tested successfully on

Microsoft Windows XP Professional (service pack 2),

running

-PHPMyAdmin v2.6.2

-MySql v4.1

-Apache v2

-PHP v5

---
---

Internet: see also:

---

Database: MySql: GUI: PHPMyAdmin: Link: Overview: Can you give an 
overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/35971/fid/1806

---

Database: Relational: MySql: Link: Overview: Can you give an overview 
of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/35331/fid/52

----------------------------------------------------------------------