Welcome to WebmasterWorld Guest from 54.163.25.166

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

phpMyAdmin - Help please

     
12:31 pm on Jun 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


I'm trying to set up a little webserver on my local machine so that I can develop my skills a bit. - so it is purely for deveopment work. I am running XP and so far I have got Apached 2.0.36, Perl, PHP 4.2.1 all running fine. I am noe trying to get phpMyAdmin running, I have set things up in the config file as per the instruction, but now whatever I try, when I go to view [localhost...] (which is where I set it up) I return the error:
The $cfgPmaAbsoluteUri directive MUST be set in your configuration file!

The trouble is, I set that variable to 'http://localhost/phpMyAdmin/';

If anyone has any ideas on what I have done wrong I would be most appreciative.

Cheers

1:01 pm on June 11, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Only a guess, but have you tried adding 'index.php' to the var?

Nick

1:23 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


Thanks Nick, but I've tried that and I still get the same, any other ideas???

Cheers

1:25 pm on June 11, 2002 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
posts:4842
votes: 1


Try the file destination ... ie c://inetpub/wwwroot/phpmyadmin/

worth a shot

1:33 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


Are you sure $cfgPmaAbsoluteUri is meaning the address of index? Could it possibly be the address of MySQL? I did notice you didnt mention MySQL as being installed. Could this be part of the problem?
1:36 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


Again, thanks, but its not it! Since the message I am getting is this:
The $cfgPmaAbsoluteUri directive MUST be set in your configuration file!

Does that mean the $cfgPmaAbsoluteUri varibale is incorrect or that there is another problem meaning phpMyAdmin isnt reading it properly? Because, it is set, it might be wrong but it is definitely set!!

1:48 pm on June 11, 2002 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
posts:4842
votes: 1


also check out the case of the characters - that might be a factor, and

I believe a version of php requires diff file extensions ie php3 as opposed to php. Maybe this comes into play?

1:50 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


I missed your post their Knowles, thanks for joining in! But I dont think that is the answer either, this is what the documentation says:

$cfgPmaAbsoluteUri string
Sets here the complete url (with full path) to your phpMyAdmin
version. E.g.
[your_web.net...]

Well I reckon I have done that exactly and its just not happening for me. Perhaps I'll just have to go back to square one. Hope not though!

Cheers

2:00 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


Its good BoL, but its still not right, I have tried changing cases and the php extensions. At least when I tried a different extension I got a different error message, but unfortunately I didnt get it working.
2:00 pm on June 11, 2002 (gmt 0)

New User

10+ Year Member

joined:Apr 30, 2002
posts:25
votes: 0


Robber,

Just checked my installation and what you tried all looks good. Try putting this after the point where you set the var:

print("<h1>cfgPmaAbsoluteUri: $cfgPmaAbsoluteUri</h1>");
exit;

if you see the var then at least you'll know that the config is being included, and if your var is being set.

otherwise, you may revert back a few versions of php to something less bleeding edge - i'm not sure phpMyAdmin offically supports 4.2 yet?

good luck.

2:07 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


Hi Twisty,

do you mean to put that extra couple of lines in the actual config file? Just gave it a go and got the same problem - your other suggestion of getting an older vershion is liking like the favourite otion at the moment.

2:13 pm on June 11, 2002 (gmt 0)

New User

10+ Year Member

joined:Apr 30, 2002
posts:25
votes: 0


Robber, yes - i just stuck those lines in my config to see what happened - it should print the variable value out big on screen and that's all... another thought is to up your error reporting level to see if that throws a bit more light on the matter... off the top of my head its a line like this in your php.ini file:

error_reporting = E_ALL

More good luck ;)

2:16 pm on June 11, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


If you put those lines directly after the declaration you should not get the same problem. You should just see the var or a blank page.

Are you getting any error msg's other than the one you've said.

It sounds like another script is using that one and the error is being reported by the last.

Nick

2:33 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


OK I put those two lines of code into my config.inc.php, so I now have this:

$cfgPmaAbsoluteUri = 'http://localhost/phpMyAdmin';
print("<h1>cfgPmaAbsoluteUri: $cfgPmaAbsoluteUri</h1>");
exit;

But the error is exactly the same:
The $cfgPmaAbsoluteUri directive MUST be set in your configuration file!

I'll see if that error reporting level helps.

2:35 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


Oh well tried that, and we're already set to:
error_reporting = E_ALL & ~E_NOTICE

Back to the drawing board then!

2:39 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


Make sure the $cfgPmaAbsoluteUri is not commented out in the config file. Also make sure you are putting it in the right place. These are all mistakes I have made. Sometimes they like give an example then right below it put the actual varible. So if you put it where they had the example that might be part of the problem. Sorry I am at work so I cant check against mine. The error sounds like its not storing the data or its not there.
2:40 pm on June 11, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


$cfgPmaAbsoluteUri = 'http://localhost/phpMyAdmin';

I'm almost certain that was a typo? There should be a '/' at the end...

Nick

2:47 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


Well thanks for the continued help here. I checked for comments - they all seem fine. Also, yeah that was a typo, it was in there earlier and it is again now, and still no solution.

So if I cant even print out the variable using those 2 lines of code does that imply the actual index.php is failing to access the config file somehow?

3:14 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


I have found this:
$strPmaUriError = 'The <tt>$cfgPmaAbsoluteUri</tt> directive MUST be set in your configuration file!';

Which appears to ne what generates the error. This seems to hard code this value to the variable - no if statement to test whether it has been supplied. I found this in:
C:\apache\htdocs\phpMyAdmin\lang\english.inc.php

Time to have a play with that and see what else we can break then!! If only I knew what I was doing here!!

3:18 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


One other thing, if I don't specify a URL in there should it not just take that as meaning it should treat the current location as the base URL?
3:21 pm on June 11, 2002 (gmt 0)

New User

10+ Year Member

joined:Apr 30, 2002
posts:25
votes: 0


If you're *absolutley* sure the var isn't commented <me>trying not to sound patronising</me>, this is most weird. You should get a PHP error if the config file isn't being found. If it helps, here's a snip from my working config file...

-- start --
/**
* Your phpMyAdmin url
*
* Complete the variable below with the full url ie
* [your_web.net...]
*
* It must contain characters that are valid for a URL, and the path is
* case sensitive on some Web servers, for example Unix-based servers.
*/
$cfgPmaAbsoluteUri = 'http://intranet.localdomain/phpMyAdmin/';

/**
* Server(s) configuration
*/
-- end --

see libraries/common.lib.php arround line 384 for the code that prints your error.

more good luck ;)

3:33 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


Its absolutely, certainly, most definitely NOT commented out. I reckon I must have tried just about everything now, this is obviously just not supposed to work today. Oh well!!

Thanks for trying - if you have any more brainwaves please let me know.

3:34 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


Robber why dont you post the part of your config in question like twisty did? That might help us know exactly whats going on on the way your setting it. Also make sure you are putting it in single quotes.
3:52 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


OK, here goes:

****start****

/**
* Your phpMyAdmin url
*
* Complete the variable below with the full url ie
* [your_web.net...]
*
* It must contain characters that are valid for a URL, and the path is
* case sensitive on some Web servers, for example Unix-based servers.
*/
$cfgPmaAbsoluteUri = 'http://localhost/phpMyAdmin/';

/**
* Server(s) configuration
*/
$i = 0;

****end****

Am I right in thinking I give it the http path rather than c:\ path if I am running Apache?

4:03 pm on June 11, 2002 (gmt 0)

New User

10+ Year Member

joined:Apr 30, 2002
posts:25
votes: 0


robber, that looks okay! i'm guessing now it's a php 4.2 problem, maybe with regard to global variable scope... i'd have a cup of tea, and then maybe try a slightly older release of php, or check out the phpMyAdmin support forum on sourceforge. cheers. tim.
4:04 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


Yes I do beleive thats how you set it up since your running on windows. Is it possible localhost is not denfind in hosts? Does even have to be though?
4:08 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


Never mind a cup of tea, I reckon I need a beer! Why didnt I download the package that installs it all for you, would've been so much simpler!

Thanks for your help, im off to download a different version of PHP.

4:21 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:May 15, 2001
posts:462
votes: 0


One more thing then, before I go and download a different php version which version would you recommend that definitely works on XP, Apache 2.0.36, phpMyAdmin 2.2.6?

Cheers

4:30 pm on June 11, 2002 (gmt 0)

New User

10+ Year Member

joined:Apr 30, 2002
posts:25
votes: 0


I'm running Win2k, Apache/1.3.20, MySQL 3.23.47-nt, PHP Version 4.1.1, phpMyAdmin 2.2.6, fingers crossed no major problems for a long while. i'd still recommend checking the phpMyAdmin support forum, see if this has come up before.
4:37 pm on June 11, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 17, 2002
posts:601
votes: 0


Try this

All configurable data is placed in config.inc.php3.

$cfg['PmaAbsoluteUri'] string
Sets here the complete url (with full path) to your phpMyAdmin version. E.g. [your_web.net...]
Don't forget the slash at the end of your url. The url must contain characters that are valid for a url, and on some servers, the path is case-sensitive.

This setting can be dynamically completed. For example, you can try to use such a kind of code:
$cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
. $_SERVER['HTTP_HOST']
. (!empty($_SERVER['SERVER_PORT']) ? ':' . $_SERVER['SERVER_PORT'] : '')
. substr($_SERVER['PHP_SELF'], 0, strrpos($['PHP_SELF'], '/')+1);

or

$cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
. $_SERVER['SERVER_NAME']
. (!empty($_SERVER['SERVER_PORT']) ? ':' . $_SERVER['SERVER_PORT'] : '')
. substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')+1);
Please note that the $_SERVER array doesn't exist in PHP < 4.1.0. Try to replace $_SERVER by $HTTP_SERVER_VARS or $GLOBALS in this case.


Not sure if this will fix or help but it should work with 4.2+ So downloading an older php is probably not going to fix it. I have to go back to work before I get fired. Ill check back in later.
This 34 message thread spans 2 pages: 34