Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Trying To Make Phpmyadmin Work


  • Please log in to reply
21 replies to this topic

#1 Wendy K. Walker

Wendy K. Walker

  • Members
  • 633 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:In The Treeline 300 Yards Behind You, Tracking Your Every Move Through A Sniper Scope
  • Local time:09:57 AM

Posted 17 February 2007 - 03:00 PM

Hi Everybody,

I'm trying to get phpMyAdmin to work and I'm having a fit. First off the download seems to be missing a crucial file. I Googled till I was all blue in the face and found a sample file that was close to what I needed BUTT when I looked for --> $cfg['PmaAbsoluteUri'] <-- in the file that I found it was no where to be found.

Can I just add that line myself? If I can where do I add it?

Thanks for any help.

Wendy
TRUST NO ONE...! EXCEPT For The Beloved Computer Geek Helping You In The MALWARE FORUMS.

Do Unto Others Before They Have A Chance To Do Unto You.

HP Pavilion 512n [Rescued from a pile of trash on the side of the road] 128 MB SDRAM, 60 GB Hard Drive, Windows XP, Home Edition, SP3, COMODO Anti Vitus and Firewall.

BC AdBot (Login to Remove)

 


#2 lucent

lucent

  • Members
  • 172 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:57 AM

Posted 21 February 2007 - 11:52 PM

Hello Wendy,
It sounds like a variable from the config.inc.php which is located in the phpmyadmin root folder (/var/www/phpmyadmin/ for *nix and I'm not sure where for windows). But there are a few files with the same name if you look in the sub dirs.........
Actually I just had a bit of a scour around and found this:

1. Untar or unzip the distribution (be sure to unzip the subdirectories): tar -xzvf phpMyAdmin_x.x.x.tar.gz in your webserver's document root. If you don't have direct access to your document root, put the files in a directory on your local machine, and, after step 3, transfer the directory on your web server using, for example, ftp.

2. Open the file config.inc.php in your favorite editor and change the values for host, user, password and authentication mode to fit your environment. Here, "host" means the MySQL server. Also insert the correct value for $cfg['PmaAbsoluteUri']. Have a look at Configuration section for an explanation of all values.
Here's what mine look like for local development:
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname

$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
// with 'config' auth_type)

$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin/';

3. It is recommended that you protect the directory in which you installed phpMyAdmin (unless it's on a closed intranet, or you wish to use HTTP or cookie authentication), for example with HTTP-AUTH (in a .htaccess file). See the multi-user sub-section of the FAQ for additional information, especially FAQ 4.4.

4. Open the file <www.your-host.com>/<your-install-dir>/index.php in your browser. phpMyAdmin should now display a welcome screen and your databases, or a login dialog if using HTTP or cookie authentication mode.



The actual page is located at http://www.webmasterworld.com/forum88/4953.htm
The thread is titled Install & Test phpMyAdmin so hopefully it will be of some use. By the way what are you running this on (*nix, windows etc.)?
Hope this helps.
Cheers, Lucent.
Posted Image
Special thanks to efizzer for the signature

#3 Wendy K. Walker

Wendy K. Walker
  • Topic Starter

  • Members
  • 633 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:In The Treeline 300 Yards Behind You, Tracking Your Every Move Through A Sniper Scope
  • Local time:09:57 AM

Posted 22 February 2007 - 06:27 PM

Hi lucent,

OK first off I'm using Windows XP SP2 and I've been told that all of the programs that I'm trying to set up were all meant for use in Linux so nothing seems to work without a lot of effort.

I found this --> $cfg['PmaAbsoluteUri'] = ''; <-- line squirreled away in config.default.php in my phpMyAdmin folder. The install didn't generate a config.inc.php file when I had ran setup so I did the copy/paste/change name thing with the config.sample.php and the $cfg['PmaAbsoluteUri'] line isn't in it.

Now I just noticed something strange about that tile is it supposed to be "config.inc.php" as stated in the documentation or "config.ini.php" ? .inc doesn't right but that's what I used because it was stated that way in the doccumentation.

This is what my config.inc.php file looks like right now;

<?php

/* $Id: config.sample.inc.php 9675 2006-11-03 09:06:06Z nijel $ */
// vim: expandtab sw=4 ts=4 sts=4:

/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use scripts/setup.php
*
* All directives are explained in Documentation.html and on phpMyAdmin
* wiki <http://wiki.cihar.com>.
*/

/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$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';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pmausr';
$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';

/*
* End of servers configuration
*/

/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>


OK so where would I stick the "$cfg['PmaAbsoluteUri'] = '';" line and what the heck goes between the " '' " marks?

Does anything in the above file jump out at you as something that might be problematic?

Thanks for any help.

Wendy

PS I forgot to say 'Thanks' for that link. I already had it and have been doing a lot of reading there too.
Wendy

Edited by Wendy K. Walker, 22 February 2007 - 06:33 PM.

TRUST NO ONE...! EXCEPT For The Beloved Computer Geek Helping You In The MALWARE FORUMS.

Do Unto Others Before They Have A Chance To Do Unto You.

HP Pavilion 512n [Rescued from a pile of trash on the side of the road] 128 MB SDRAM, 60 GB Hard Drive, Windows XP, Home Edition, SP3, COMODO Anti Vitus and Firewall.

#4 lucent

lucent

  • Members
  • 172 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:57 AM

Posted 22 February 2007 - 08:00 PM

Hello, I have to head off now, well a while ago but i just noticed your reply. I have a sample of a default install on a fresh ubuntu server. I'll be in windows next time i promise :flowers:

$cfg['PmaAbsoluteUri'] = '';


From memory this is the absolute path to your phpmyadmin webroot directory, so point this to where the actual directory is located on the hard drive eg, c:\somefolder\with\the\phpmyadmin\directory\here\
And that is what goes between the quote marks (one each side as in 'C:\blah\blah\')

PmaAbsoluteUri = PhpMyAdminAbsoluteUnifiedRescourceIndicator....... maybe, just off the top of my head though.

Here is the sample:

<?php
/**
 * Debian local configuration file
 *
 * This file overrides the settings made by phpMyAdmin interactive setup
 * utility.
 *
 * For example configuration see /usr/share/doc/phpmyadmin/examples/config.default.php.gz
 */

/**
 * Server(s) configuration
 */
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
$i++;

// Uncomment to override the default configuration
//$cfg['Servers'][$i]['host']		  = 'localhost'; // MySQL hostname or IP address
//$cfg['Servers'][$i]['port']		  = '';		  // MySQL port - leave blank for default port
//$cfg['Servers'][$i]['socket']		= '';		  // Path to the socket - leave blank for default socket
//$cfg['Servers'][$i]['connect_type']  = 'socket';	// How to connect to MySQL server ('tcp' or 'socket')
//$cfg['Servers'][$i]['extension']	 = 'mysql';	 // The php MySQL extension to use ('mysql' or 'mysqli')
//$cfg['Servers'][$i]['compress']	  = FALSE;	   // Use compressed protocol for the MySQL connection
//													// (requires PHP >= 4.3.0)
//$cfg['Servers'][$i]['controluser']   = '';		  // MySQL control user settings
//													// (this user must have read-only
//$cfg['Servers'][$i]['controlpass']   = '';		  // access to the "mysql/user"
//													// and "mysql/db" tables).
//													// The controluser is also
//													// used for all relational
//													// features (pmadb)
//$cfg['Servers'][$i]['auth_type']	 = 'cookie';	// Authentication method (config, http or cookie based)?
//$cfg['Servers'][$i]['user']		  = 'root';	  // MySQL user
//$cfg['Servers'][$i]['password']	  = '';		  // MySQL password (only needed
//													// with 'config' auth_type)
//$cfg['Servers'][$i]['only_db']	   = '';		  // If set to a db-name, only
//													// this db is displayed in left frame
//													// It may also be an array of db-names, where sorting order is relevant.
//$cfg['Servers'][$i]['verbose']	   = '';		  // Verbose name for this host - leave blank to show the hostname
//
//$cfg['Servers'][$i]['pmadb']		 = 'phpmyadmin';// Database used for Relation, Bookmark and PDF Features
//													// (see scripts/create_tables.sql)
//													//   - leave blank for no support
//													//	 DEFAULT: 'phpmyadmin'
//$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';// Bookmark table
//													//   - leave blank for no bookmark support
//													//	 DEFAULT: 'pma_bookmark'
//$cfg['Servers'][$i]['relation']	  = 'pma_relation';// table to describe the relation between links (see doc)
//													//   - leave blank for no relation-links support
//													//	 DEFAULT: 'pma_relation'
//$cfg['Servers'][$i]['table_info']	= 'pma_table_info';// table to describe the display fields
//													//   - leave blank for no display fields support
//													//	 DEFAULT: 'pma_table_info'
//$cfg['Servers'][$i]['table_coords']  = 'pma_table_coords';// table to describe the tables position for the PDF schema
//													//   - leave blank for no PDF schema support
//													//	 DEFAULT: 'pma_table_coords'
//$cfg['Servers'][$i]['pdf_pages']	 = 'pma_pdf_pages';// table to describe pages of relationpdf
//													//   - leave blank if you don't want to use this
//													//	 DEFAULT: 'pma_pdf_pages'
//$cfg['Servers'][$i]['column_info']   = 'pma_column_info';// table to store column information
//													//   - leave blank for no column comments/mime types
//													//	 DEFAULT: 'pma_column_info'
//$cfg['Servers'][$i]['history']	   = 'pma_history';// table to store SQL history
//													//   - leave blank for no SQL query history
//													//	 DEFAULT: 'pma_history'
//$cfg['Servers'][$i]['verbose_check'] = TRUE;		// set to FALSE if you know that your pma_* tables
//													// are up to date. This prevents compatibility
//													// checks and thereby increases performance.
//$cfg['Servers'][$i]['AllowRoot']	 = TRUE;		// whether to allow root login
//$cfg['Servers'][$i]['AllowDeny']['order']		   // Host authentication order, leave blank to not use
//									 = '';
//$cfg['Servers'][$i]['AllowDeny']['rules']		   // Host authentication rules, leave blank for defaults
//									 = array();

?>


This may be no help to you whatsoever, but if you cross reference this one and the one in the previous link you may be able to work something out. Also if you read pma as PhpMyAdmin it might make a bit more sense. Sorry i have to go i'm getting yelled at :thumbsup:
Cheers, Lucent
Posted Image
Special thanks to efizzer for the signature

#5 Wendy K. Walker

Wendy K. Walker
  • Topic Starter

  • Members
  • 633 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:In The Treeline 300 Yards Behind You, Tracking Your Every Move Through A Sniper Scope
  • Local time:09:57 AM

Posted 23 February 2007 - 02:45 AM

Hi lucent,

*passes extra set of ear plugs* Hope that you didn't get fussed at too much because of me Boo.

I'm pretty sure that you're right about $cfg['PmaAbsoluteUri'] = ''; needing an absolut path there but I found this in the config.default.php

* Your phpMyAdmin URL.
*
* Complete the variable below with the full url ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/

So that puts two stumbling blocks in front of me: I don't have a web site. All I have is Apache2 setup on my PC at --> C:\Apache\Apache2\http\phpMyAdmin. I don't see anything named "directory" so where do I get the "directory" part from?

That sample that you posted looks king of like the .default.php that I've been going over too.

I've got to cut this short cause I have to catch someone when they get off of work.

Thanks for your help.

Wendy
TRUST NO ONE...! EXCEPT For The Beloved Computer Geek Helping You In The MALWARE FORUMS.

Do Unto Others Before They Have A Chance To Do Unto You.

HP Pavilion 512n [Rescued from a pile of trash on the side of the road] 128 MB SDRAM, 60 GB Hard Drive, Windows XP, Home Edition, SP3, COMODO Anti Vitus and Firewall.

#6 lucent

lucent

  • Members
  • 172 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:57 AM

Posted 25 February 2007 - 07:59 PM

Hello again :thumbsup: sorry about the wait......big weekend. Okay, so a couple of questions first.
  • 1. Do you have MySQL installed as well? This is needed for phpmyadmin to run and will allow you to create database driven sites. If you haven't you can get it here:
    http://dev.mysql.com/downloads/mysql/5.0.html#downloads
    But please read my second question first and consider WAMP5
  • 2. Are you setting this server just to learn on? If you just want to learn and play around with php and mysql you may be better off having a look at removing apache2 and php and downloading a complete self installing package such as WAMP ( Windows, Apache, MySQL and PHP ). On the other hand if you are creating a production server you will probably not want to go with this option because you will want to tweak config files and patch the individual packages for security flaws. You may also want to make sure you have the most up to date packages as well. If you are just starting out and want to start coding I would highly recommend downloading and installing WAMP for now and when you get used to things you could have a go at installing the individual components then, you can get it here:
    http://www.wampserver.com/en/download.php
    There is a nice video tutorial I just found and you might want to look at it before you download WAMP to see how easy and painless this server installation is, this can be found here:
    http://www.phpvideotutorials.com/lesson01/

* Your phpMyAdmin URL.
*
* Complete the variable below with the full url ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/

So that puts two stumbling blocks in front of me: I don't have a web site. All I have is Apache2 setup on my PC at --> C:\Apache\Apache2\http\phpMyAdmin. I don't see anything named "directory" so where do I get the "directory" part from?


The directory path you need to fill in is the one you have stated above.

C:\Apache\Apache2\http\phpMyAdmin\

This is what you want to fill in for the $cfg['PmaAbsoluteUri'] = ''; line. So it should look like this,
$cfg['PmaAbsoluteUri'] = 'C:\Apache\Apache2\http\phpMyAdmin\';
I'm not sure but you may have to have the slashes (\) reversed so it would look like this:
$cfg['PmaAbsoluteUri'] = 'C:/Apache/Apache2/http/phpMyAdmin/';
Once again i'm a bit rusty on the Windows side of things.......
As for your website, it should reside in C:\Apache\Apache2\http\ and if you open a browser to point to http://127.0.0.1/ you should see the default install apache webpage :flowers:

I hope this covers your questions properly. Again if you just want to get coding and don't want to deal with all of the configuration details, unistall apache and php then give the WAMP5 option a go.
Cheers, Lucent.
Posted Image
Special thanks to efizzer for the signature

#7 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:57 AM

Posted 26 February 2007 - 09:27 PM

Does Apache have a default port that it runs on? I use Tomcat for my web apps, and by default it runs on port 8080. To access it I use: localhost:8080/sample

Have you tried on:
http://localhost/

Not that I know too much about Apache, but I already have several other servers and databases already running on my development system. I have been considering putting Apache on it and PHP, since I've never tinkered with either.

#8 Wendy K. Walker

Wendy K. Walker
  • Topic Starter

  • Members
  • 633 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:In The Treeline 300 Yards Behind You, Tracking Your Every Move Through A Sniper Scope
  • Local time:09:57 AM

Posted 27 February 2007 - 12:30 AM

Hi lucent,

First to answer your second question. I wanted Apache so that I could access the .onion network. If I did it right I have it set so that Apache will only bind to localhost. It's not supposed to be accessible by everybody and their dog that goes out trolling across the Internet and is only supposed to be accessible by someone with the right address for my server like http://6sxoyfb3h2nvok2d.onion. [EDITED] That URL it "IS NOT" a URL that will get you to my server, however, it is a valid URL to an information page that is hiding somewhere out there in cyberspace.

So at first I was just setting Apache up for that but then my curiosity took over :thumbsup: when I was doing some reading [Here] to learn how to set Apache up. Then I decided to give it a go so I downloaded, installed and tested PHP to make sure that it was working with Apache. [It was]

Then I downloaded and installed MySQL. Then downloaded and installed phpMyAdmin and that's where I'm at right now. I'm kind of stuck trying to figure out what all should go into the confic.ini.php file to make that thing work right though. I mean according to the documentation phpMyAdmin looks for config.default.ini.php [first] at start-up then for config.ini.php to get its self going. I don't understand 'why' it does that but it does and I have to get the config.ini.php set up so that it overrides the .default thing.

Right now I'm like kind of stuck right outside of the door to phpMyAdmin so to speak because I can't figure out what password its welcome screen is asking for when I enter http://localhost:8080/phpMyAdmin in my browser.

I keep getting --> Error #1045 - Access denied for user 'pmausr'@'localhost' (using password: YES) or Error
#1045 - Access denied for user 'pmausr'@'localhost' (using password: NO) <-- every time I try to use the

Log in
Username:
Password:

boxes. I don't understand how to get past that because I haven't set a username name or password yet. I tried using 'root' and root as usernames but that didn't work so right now I'm at a loss.

As for the URL thing --> $cfg['PmaAbsoluteUri'] = 'C:\Apache\Apache2\http\phpMyAdmin\'; seems to be right because when I tried it with '/' I got a different ERROR message about bad syntax or something to that effect. I think it might be in MySQL and Apache that I have to use the '/' or the '\\'.

Thanks for the info on WAMP5. I had given it a look and it didn't seem like it would be letting anyone get to me through the .onion network so I decided against using it. Besides I'm really trying to learn how this stuff works and how to make it all work together and a precompiled kit-n-a-can kind of defeats that. Maybe I'm just a glutton for punishment. Thanks for that video link too, I'll give it a peep.

Here's some of what my config.ini.php looks like right now. Does anything just jump out at you that might be keeping me from being able to log into phpMyAdmin? Or maybe that needs to have something added between the --> '' <-- to make it work better? I've tried adding a password to blowfish_secret but that didn't work either.

$cfg['PmaAbsoluteUri'] = 'C:\Apache\Apache2\http\phpMyAdmin';
$cfg['PmaNoRelation_DisableWarning'] = FALSE;

/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = FALSE;
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pmausr';
$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';

/*
* End of servers configuration
*/


Hi groovicus,

Thanks for the reply Boo. Yeah Apache uses port 80 for its default but I set it to 8080 when I set it up. Http://localhost:8080 gets me to my Apache Index page, and that works just fine. If you're planning on tinkering with Apache and PHP you better get a big bottle of Aspirin cause this stuff can sure give you a head ache.


Thanks for any help that you guys might be able to give me with this.

Wendy

Edited by Wendy K. Walker, 27 February 2007 - 12:39 AM.

TRUST NO ONE...! EXCEPT For The Beloved Computer Geek Helping You In The MALWARE FORUMS.

Do Unto Others Before They Have A Chance To Do Unto You.

HP Pavilion 512n [Rescued from a pile of trash on the side of the road] 128 MB SDRAM, 60 GB Hard Drive, Windows XP, Home Edition, SP3, COMODO Anti Vitus and Firewall.

#9 lucent

lucent

  • Members
  • 172 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:57 AM

Posted 27 February 2007 - 05:04 AM

Hello :flowers:
It seems like we are on the right track. Just quickly, sorry but i don't have much time again, Sorry :thumbsup:, but it looks like you need to change these lines:
$cfg['Servers'][$i]['controluser'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
To this:
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '';
Then depending on how MySQL has been configured you may have to reset the root password or create one. I'm not too sure how MySQL functions under windows but if it is like *nix environments it will install without a password set. So when you get to the phpmyadmin page on your browser try entering:

Username:root
Password:

Note: Just leave the password field blank and hit enter or click on th "Go" button.
If you still get errors you may have to manually reset the password you can see how to do this here:
http://dev.mysql.com/doc/refman/5.0/en/res...ermissions.html
If all goes well and you don't have to reset the password, please, please make sure you set one once you get in there. Also have a read of this:
http://dev.mysql.com/doc/refman/5.0/en/sec...guidelines.html
The link is also available in the first link I gave you and is quite brief but touches on a couple of things you should be aware of.
I hope you finally have success.
Cheers, Lucent.

Oh, Groovicus thanks for checking in on this post :trumpet: Is there anything else that you can think of. Sadly I'm realising how badly my Windows programming has lapsed.....

Edited by lucent, 27 February 2007 - 05:10 AM.

Posted Image
Special thanks to efizzer for the signature

#10 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:57 AM

Posted 27 February 2007 - 08:24 AM

Nope. You already caught that Wendy was getting a MySql error. On Windows, it should have prompted to put in a user name and password for top level access. When you install on Linux, it uses the 'user' password.

Would I be correct to assume that PHP needs to have a database set up for it, or does the install take care of that.

#11 lucent

lucent

  • Members
  • 172 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:57 AM

Posted 27 February 2007 - 07:54 PM

Groovicus, I have always thought that because PHP by itself is not dependant on MySQL it doesn't need to to have access to a database to run. My thinking is that while the language itself is capable of making calls to databases it doesn't rely on them to function but rather relies on hard coded or on the fly variables that are written in scripts or entered into forms (still hard coded i guess, just not defined?). PhpMyAdmin on the other hand ships with it's own set of SQL scripts to create and populate it's own database and tables as well as granting default root privileges. These are run on installation. That being said, I don't know what would happen if you installed everything out of "order" or if it's even possible to do so. I guess you would be able to but you would have to do a fair bit of config file hacking to get it right and probably would have to run the SQL scripts yourself to create a working database for PhpMyAdmin to function correctly. It would be interesting to try though.....
Thanks again for your input, it is always (very much) appreciated.
Cheers, Lucent.
Posted Image
Special thanks to efizzer for the signature

#12 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:03:57 AM

Posted 27 February 2007 - 08:01 PM

Ok, so my thinking on the issue (given that I know nothing of PHP, but am very well versed in mysql) is that mysql will not allow access except to those who have been granted the necessary permissions. IMHO, it would be a huge security issue if an installed application (like PHPAdmin, or whatever) could issue itself admin permissions. I may tinker with this next week since it is something I have been wanting to do for awhile anyway.. this gives me a perfect excuse.

<me shudders>
I just remember Apache being a bear to get to work properly with Tomcat..on Linux it is a breeze (relatively speaking). On Windows it just sucks.

Sorry Wendy, didn't mean to hijack your thread. :thumbsup:

#13 Wendy K. Walker

Wendy K. Walker
  • Topic Starter

  • Members
  • 633 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:In The Treeline 300 Yards Behind You, Tracking Your Every Move Through A Sniper Scope
  • Local time:09:57 AM

Posted 27 February 2007 - 10:56 PM

Hi lucent,

Thanks for the reply. OK I changed these as you suggested --> $cfg['Servers'][$i]['controluser'] = 'pmausr';
$cfg['Servers'][$i]['controlpass'] = 'pmapass'; and succeded in getting a different ERROR message;

--> Error The configuration file now needs a secret passphrase (blowfish_secret). <-- So I added one and tried it again and got this -->

Log in
Username: root
Password:

So I entered the new password and got this --> Error #2003 - The server is not responding so I restarted Apache made sure that the MySQL Server was running then tried again and got this --> Error
#1045 - Access denied for user 'root'@'localhost' (using password: NO) <-- I had used the password that I had set for 'blowfish_secret' then tried it with no password, then tried it with several different passwords that I've used during previous installs of MySQL but all I keep getting is the same ERROR message.

Thanks for that link to the MySQL reference manual. I've been reading in it for several days and have already tried just about everything there and the best I can get from it is;

C:\>C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt --init-file=C:\mysql-init.txt
'C:\Program' is not recognized as an internal or external command,
operable program or batch file. <-- or some similar message depending on what I had tried to do.

Actually the only thing that I've found in that manual that works in a command console window is the commands --> NET START MySQL, NET STOP MySQL. Other than those two commands I haven't found any commands in that manual that will work as set forth.

This is killing me here! There is yet one other possible answer to my dilemma but I don't know the name of the file to look for or even exactly where to look for it.

On one of the re-installs that I did with MySQL I saw a notice saying that if I had uninstalled a previous installation of MySQL that the uninstall program DOES NOT automatically remove the old password and that I will need to edit a file in the Windows Directory manually, however, the named file was no where to be found in the Windows directory so I'm stumped.



Hi groovicus,

Hey Boo, Hi-Jack all you want cause I need all the help I can get here. I installed Apache > tested it > it worked right > then I installed PHP > tested it > it worked right > then I installed MySQL I didn't see anywhere to enter a username but there was a place to enter a 'root' password which I did > no test was called for so I don't know if it works > then I installed phpMyAdmin > when I try to test it I can't get past the the sign in screen!

I've uninstalled and reinstalled all of those programs several times over in an attempt to over come this problem but haven't gotten anywhere with it past being able to get Apache up and running and PHP doing whatever it is that it does with Apache.

Thanks for anything that you might want to toss into the mix that might help.

Wendy
TRUST NO ONE...! EXCEPT For The Beloved Computer Geek Helping You In The MALWARE FORUMS.

Do Unto Others Before They Have A Chance To Do Unto You.

HP Pavilion 512n [Rescued from a pile of trash on the side of the road] 128 MB SDRAM, 60 GB Hard Drive, Windows XP, Home Edition, SP3, COMODO Anti Vitus and Firewall.

#14 lucent

lucent

  • Members
  • 172 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:05:57 AM

Posted 28 February 2007 - 01:00 AM

G'day again :flowers:, This is again a good thing... What we need to do now is put a value in this section:
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
So make it look like this:
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'holla'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
This should solve your "The configuration file now needs a secret passphrase (blowfish_secret)." error. Next up, if things are still failling to work.
I'm going to paste in the instructions from http://dev.mysql.com/doc/refman/5.0/en/res...ermissions.html
for easy reference for you.

1. Log on to your system as Administrator.

2. Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager:

Start Menu -> Control Panel -> Administrative Tools -> Services

Then find the MySQL service in the list, and stop it.

If your server is not running as a service, you may need to use the Task Manager to force it to stop.

3. Create a text file and place the following command within it on a single line:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
Save the file with any name. For this example the file will be C:\mysql-init.txt.

4. Open a console window to get to the DOS command prompt:
Start Menu -> Run -> cmd

5. We are assuming that you installed MySQL to C:\mysql. If you installed MySQL to another location, adjust the following commands accordingly.

At the DOS command prompt, execute this command:

C:\> C:\mysql\bin\mysqld-nt --init-file=C:\mysql-init.txt

The contents of the file named by the --init-file option are executed at server startup, changing the root password. After the server has started successfully, you should delete C:\mysql-init.txt.

If you install MySQL using the MySQL Installation Wizard, you may need to specify a --defaults-file option:

C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"
--defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini"
--init-file=C:\mysql-init.txt

The appropriate --defaults-file setting can be found using the Services Manager:

Start Menu -> Control Panel -> Administrative Tools -> Services

Find the MySQL service in the list, right-click on it, and choose the Properties option. The Path to executable field contains the --defaults-file setting.

6. Stop the MySQL server, then restart it in normal mode again. If you run the server as a service, start it from the Windows Services window. If you start the server manually, use whatever command you normally use.

7. You should be able to connect using the new password.


Okay, you need to find out first where you have mysql installed, well you need to know that and the install path. So if you don't know where it it do a search for it and take note of it's location. If the location address is the same as the one you listed in your last post,

C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt

Type the same thing in again but notice the quotation marks in the help reference? You will need to include these or you will have to shorten program files to something like progra~1 and MySQL Server 5.0 to something else entirely. This is because terminals usually see spaces as a seperate command line argument and will try to execute or do something with the next lot of letters thrown at it. If your location is different, just substitute your application (mysql) path here. The command you need to enter should look like this:

C:\> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"
--defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini"
--init-file=C:\mysql-init.txt

Once again make sure you use the quotation marks(" "). Actually you should be able to copy and paste the whole command into the terminal ( minus the leading C:\>, just start with the first set of quotations ), just make sure you created the mysql-init.txt file ( or whatever you decided to call it ) at the same location. If you decided to name the file something else and put it somewhere else you will have to substute the name and/or location.
You are doing well as not to having given up, this shows a lot of promise and dedication and with that type of perseverence you are bound to be learning, Errors are bound to happen and guarentee you will have a deeper understanding of how these things work (and don't :thumbsup: ) Keep trying and keep posting we honestly don't mind, that is why we are here :trumpet:
And Groovicus, I should have said that php has the ability to embed mysql scripts rather than make direct calls to databases. Also only root can install phpmyadmin on *nix systems but that does lead to an interesting point about windows systems as most users on XP systems will run as admin. I'm wondering if a phpmyadmin app was set up without a root password set ( if this can in fact actually happen ) could another user log on (with admin status) later and reset the root password using the above techniques? Just thought you might like to give it a try if you plan on giving it go on Windows :inlove:
Cheers, Lucent.
Posted Image
Special thanks to efizzer for the signature

#15 Wendy K. Walker

Wendy K. Walker
  • Topic Starter

  • Members
  • 633 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:In The Treeline 300 Yards Behind You, Tracking Your Every Move Through A Sniper Scope
  • Local time:09:57 AM

Posted 28 February 2007 - 10:27 PM

Hi lucent, G'day yourself mate. What part of the Queen's land are you in Boo?

As for those first two pieces of code, I've tried putting a password in this -->
$cfg['blowfish_secret'] = 'secretword'; and it doesn't have any effect other than stopping the error message saying that I needed to put a password there and it doesn't matter whether I use a password when trying to log on or not this is the message that I get both ways;

--> Error #1045 - Access denied for user 'root'@'localhost' (using password: NO)

I have also followed all of those steps from 1 to 5 where I get the following -->

C:\>"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"--defaults-file="
C:\Program Files\MySQL\MySQL Server 5.0\my.ini"--init-file=C:\mysql-init.txt
'"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe"--defaults-file' is
not recognized as an internal or external command,
operable program or batch file.

C:\>


That's what I meant when I said that NOTHING wants to work like it's supposed to work. I've been using that reference manual for several days with no success. The only thing that works like the manual says is these two commands --> NET START MySQL and NET STOP MySQL <-- those WILL start and stop the MySQL server.

There's supposed to be a file lurking about some where in the Windows directory that I might have to edit manually to remove the old password from previously installed versions of MySQL but I have no idea what the name of the file is. I was told to look for that password in my.cnf but my little search dog says that that file isn't on my PC so I'm kind of a loss :thumbsup: .

I guess I'll give uninstalling MySQL and phpMyAdmin and try reinstalling them a go [yet again] and see if I might be missing something.

If you can think of anything else let me know. Thanks again for your help.

Wendy
TRUST NO ONE...! EXCEPT For The Beloved Computer Geek Helping You In The MALWARE FORUMS.

Do Unto Others Before They Have A Chance To Do Unto You.

HP Pavilion 512n [Rescued from a pile of trash on the side of the road] 128 MB SDRAM, 60 GB Hard Drive, Windows XP, Home Edition, SP3, COMODO Anti Vitus and Firewall.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users