homepage Welcome to WebmasterWorld Guest from 54.211.235.255
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

This 34 message thread spans 2 pages: 34 ( [1] 2 > >     
phpMyAdmin - Help please
Robber




msg:1310246
 12:31 pm on Jun 11, 2002 (gmt 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

 

Nick_W




msg:1310247
 1:01 pm on Jun 11, 2002 (gmt 0)

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

Nick

Robber




msg:1310248
 1:23 pm on Jun 11, 2002 (gmt 0)

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

Cheers

brotherhood of LAN




msg:1310249
 1:25 pm on Jun 11, 2002 (gmt 0)

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

worth a shot

Knowles




msg:1310250
 1:33 pm on Jun 11, 2002 (gmt 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?

Robber




msg:1310251
 1:36 pm on Jun 11, 2002 (gmt 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!!

brotherhood of LAN




msg:1310252
 1:48 pm on Jun 11, 2002 (gmt 0)

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?

Robber




msg:1310253
 1:50 pm on Jun 11, 2002 (gmt 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

Robber




msg:1310254
 2:00 pm on Jun 11, 2002 (gmt 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.

twisty




msg:1310255
 2:00 pm on Jun 11, 2002 (gmt 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.

Robber




msg:1310256
 2:07 pm on Jun 11, 2002 (gmt 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.

twisty




msg:1310257
 2:13 pm on Jun 11, 2002 (gmt 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 ;)

Nick_W




msg:1310258
 2:16 pm on Jun 11, 2002 (gmt 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

Robber




msg:1310259
 2:33 pm on Jun 11, 2002 (gmt 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.

Robber




msg:1310260
 2:35 pm on Jun 11, 2002 (gmt 0)

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

Back to the drawing board then!

Knowles




msg:1310261
 2:39 pm on Jun 11, 2002 (gmt 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.

Nick_W




msg:1310262
 2:40 pm on Jun 11, 2002 (gmt 0)

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

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

Nick

Robber




msg:1310263
 2:47 pm on Jun 11, 2002 (gmt 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?

Robber




msg:1310264
 3:14 pm on Jun 11, 2002 (gmt 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!!

Robber




msg:1310265
 3:18 pm on Jun 11, 2002 (gmt 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?

twisty




msg:1310266
 3:21 pm on Jun 11, 2002 (gmt 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 ;)

Robber




msg:1310267
 3:33 pm on Jun 11, 2002 (gmt 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.

Knowles




msg:1310268
 3:34 pm on Jun 11, 2002 (gmt 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.

Robber




msg:1310269
 3:52 pm on Jun 11, 2002 (gmt 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?

twisty




msg:1310270
 4:03 pm on Jun 11, 2002 (gmt 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.

Knowles




msg:1310271
 4:04 pm on Jun 11, 2002 (gmt 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?

Robber




msg:1310272
 4:08 pm on Jun 11, 2002 (gmt 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.

Robber




msg:1310273
 4:21 pm on Jun 11, 2002 (gmt 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

twisty




msg:1310274
 4:30 pm on Jun 11, 2002 (gmt 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.

Knowles




msg:1310275
 4:37 pm on Jun 11, 2002 (gmt 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 ( [1] 2 > >
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved