View previous topic :: View next topic |
Author |
Message |
stardotstar l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/208185412659634e53518ab.png)
Joined: 10 Feb 2006 Posts: 887 Location: 2074/SYD/NSW/AU
|
Posted: Fri Apr 11, 2008 1:44 am Post subject: problem with url formation in phpmyadmin |
|
|
Something is amis;
I have apache2 working and hosting a basic page via port 8000 thus
http://mydyndns.homelinux.org:8000
I also have basic folder permissions in place there from the apache config (ie not .htaccess)
once I sign in I am able to get the login prompt for phpmyadmin at:
http://mydyndns.homelinux.org:8000/phpmyadmin
when I try and sign in the URL gets malformed to
http://localhost//phpmyadmin/index.php?lang=en-utf-8&token=2a4b078a5988776b45c10c7c9a7760e7
so I was thinking that there must be something to do with my hostname resolution/definition...
But I can't find the right place to define the port or name configuration place (other than conf.d/hostname etc which are fine for apache2 so far...)
If I go in and replace localhost// with mydyndns.homelinux.org:8000 It lets me in and the index is fine, browsing around is fine but when I go to execute an sql command it seems to hang and then time out...
I get a
Code: | Unable to connect
Firefox can't establish a connection to the server at localhost.
* The site could be temporarily unavailable or too busy. Try again in a few
moments.
* If you are unable to load any pages, check your computer's network
connection.
* If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web. |
but the url does not change - I assume because it is a php call not an http one...
Can someone point me to somewhere I need to configure the hostname and port so it is not being dropped in as
localhost/
some details:
Code: | mythology bin # cat /var/www/localhost/htdocs/phpmyadmin/config.inc.php
<?php
/* vim: set 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>.
*
* @version $Id: config.sample.inc.php 10142 2007-03-20 10:32:13Z cybot_tm $
*/
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'abcdefg123456'; /* 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'] = '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';
/*
* End of servers configuration
*/
/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>
mythology bin #
|
nb - that was just a default with the blowfish secret applied. I have also tried changing the
$cfg['Servers'][$i]['host'] = 'localhost';
to various host names and what not to no avail...
TIA Will _________________ ]8P |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
_sil n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 31 Dec 2007 Posts: 37 Location: UK
|
Posted: Tue Apr 15, 2008 9:15 pm Post subject: |
|
|
Quote: |
...
$cfg['Servers'][$i]['host'] = 'localhost';
...
|
this one is address of your mysql server
from libraries/config.default.php:
Quote: |
/**
* Your phpMyAdmin URL.
*
* Complete the variable below with the full URL ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/
*
* 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.
*
* In most cases you can leave this variable empty, as the correct value
* will be detected automatically. However, we recommend that you do
* test to see that the auto-detection code works in your system. A good
* test is to browse a table, then edit a row and save it. There will be
* an error message if phpMyAdmin cannot auto-detect the correct value.
*
* @global string $cfg['PmaAbsoluteUri']
*/
|
but I guess it wasn't detected properly with your setup. Adding
Code: |
$cfg['PmaAbsoluteUri'] = 'http://mydyndns.homelinux.org:8000/phpmyadmin/';
|
to your config.inc.php should solve your problems. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
stardotstar l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/208185412659634e53518ab.png)
Joined: 10 Feb 2006 Posts: 887 Location: 2074/SYD/NSW/AU
|
Posted: Wed Apr 16, 2008 2:02 am Post subject: |
|
|
Thank you very much _sil
it is indeed malformed:
Code: | /**
* Your phpMyAdmin URL.
*
* Complete the variable below with the full URL ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/
*
* 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.
*
* In most cases you can leave this variable empty, as the correct value
* will be detected automatically. However, we recommend that you do
* test to see that the auto-detection code works in your system. A good
* test is to browse a table, then edit a row and save it. There will be
* an error message if phpMyAdmin cannot auto-detect the correct value.
*
* @global string $cfg['PmaAbsoluteUri']
*/
$cfg['PmaAbsoluteUri'] = 'http://localhost//phpmyadmin';
|
So i have made it:
Code: |
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* <code>
* N N OOO !! DDDD OOO N N OOO TTTTT EEEE DDDD I TTTTT !!
* NN N O O !! D D O O NN N O O T E D D I T !!
* N N N O O !! D D O O N N N O O T EEEE D D I T !!
* N NN O O D D O O N NN O O T E D D I T
* N N OOO !! DDDD OOO N N OOO T EEEE DDDD I T !!
* </code>
*
* DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!!
*
* phpMyAdmin default configuration, you can copy values from here to your
* config.inc.php
*
* All directives are explained in Documentation.html
*
* @version $Id: config.default.php 11113 2008-02-09 16:09:54Z lem9 $
*/
/**
* Your phpMyAdmin URL.
*
* Complete the variable below with the full URL ie
* http://www.your_web.net/path_to_your_phpMyAdmin_directory/
*
* 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.
*
* In most cases you can leave this variable empty, as the correct value
* will be detected automatically. However, we recommend that you do
* test to see that the auto-detection code works in your system. A good
* test is to browse a table, then edit a row and save it. There will be
* an error message if phpMyAdmin cannot auto-detect the correct value.
*
* @global string $cfg['PmaAbsoluteUri']
*/
$cfg['PmaAbsoluteUri'] = 'http://mydyndns.homelinux.org:8000/phpmyadmin';
/**
|
and it works from the outside world - will I have to add mydyndns.homelinux.org to hosts to ensure that it works from either the local host or within the lan?
I'll see when I get back from interstate - but for now that is a FIX :yay:
Many thanks for your insight ![Smile :)](images/smiles/icon_smile.gif) _________________ ]8P |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
_sil n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 31 Dec 2007 Posts: 37 Location: UK
|
Posted: Wed Apr 16, 2008 10:22 am Post subject: |
|
|
Hi, I'm glad it helped .
However
Quote: |
will I have to add mydyndns.homelinux.org to hosts to ensure that it works from either the local host or within the lan?
|
yes, you'll have to make sure other computers from your lan can reach mydyndns.homelinux.org to make it work. But there's something strange with your config
Quote: |
it is indeed malformed:
Code: |
$cfg['PmaAbsoluteUri'] = 'http://localhost//phpmyadmin';
|
|
by default this variable should be empty, so you propably modified it at some point .
I would suggest you leave it empty, and see if it works
Code: |
$cfg['PmaAbsoluteUri'] = '';
|
and also make sure it's not overriden in you config.inc.php. It tells phpmyadmin to automatically detect its value from the incoming HTTP request. This way (if autodetection works), it won't matter if you reach your site with http://localhost/phpmyadmin or http://mydyndns.homelinux.org:8000/phpmyadmin/ or http://192.168.1.100/phpmyadmin or anything else. Also no additional configuration of your lan will be required.
Try that and tell how it goes . |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
stardotstar l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/208185412659634e53518ab.png)
Joined: 10 Feb 2006 Posts: 887 Location: 2074/SYD/NSW/AU
|
Posted: Fri Apr 18, 2008 1:27 am Post subject: |
|
|
_sil,
I will try what you suggest. That variable must have been populated as part of the ebuild process or some other step in a configuration chain since I definitely did not edit that file until you drew my attention to it. It is strange that it has been populated with the double slashes etc...
Thanks again. Will
[UPDATE] Just checked with the value unset and works perfectly - so thats a bit of a mystery. _________________ ]8P |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|