View Full Version : phpmysql installation problem
penguinhead
2-16-02, 08:32 PM
I am trying to install phpmyadmin and have followed all the instructions on the FAQs and Forumms as best as possible. Where I am unsure is what variables I need to fill out in the config.inc.php file, for the index.php file to work correctly..eg:
$cfgServers[1]['host'] = 'venus.powweb.com';
$cfgServers[1]['port'] = ''; // do I leave this blank for default port???
$cfgServers[1]['socket'] = ''; // do I leave this blank for default socket???
$cfgServers[1]['connect_type'] = 'tcp'; // should this be 'tcp' or 'socket'???
$cfgServers[1]['stduser'] = ''; // Do I need to put anything here???
$cfgServers[1]['stdpass'] = ''; // Do I need to put anything here???
$cfgServers[1]['auth_type'] = 'config'; // What method do I use???
$cfgServers[1]['user'] = 'penguinhead'; // MySQL user
$cfgServers[1]['password'] = '*****'; // MySQL password (only needed with 'config' auth)
$cfgServers[1]['only_db'] = 'penguinhead'; //
$cfgServers[1]['verbose'] = ''; // I assume this is not essential? $cfgServers[1]['bookmarkdb'] = ''; // I assume this is not essential?
$cfgServers[1]['bookmarktable'] = ''; //I assume this is not essential?
Please help!
regards Mike
Your config script seems to be in order. Have you added the shebang line (#!/usr/local/bin/php) to the top of all the .php (not .inc) scripts in the phpMyAdmin home directory?
I have just installed phpMyAdmin and went through the same problem, so just thought to help.
Cheers,
nabil
penguinhead
2-17-02, 01:17 AM
Hi nabil, good to see another Aussie in the forum!
I have got the #!/usr/local/bin/php line at the top (but was unsure whether it should replace the <?php line which was originally at the top or just push it down a line. The first few lines of my index.php file look like this...
#!/usr/local/bin/php
/* $Id: index.php,v 1.24 2001/11/25 12:20:49 loic1 Exp $ */
/**
* Gets core libraries and defines some variables
*/
require('./libraries/grab_globals.lib.php');
require('./libraries/common.lib.php');
When I try to call this file up through my browser, I get the following...
/* $Id: index.php,v 1.24 2001/11/25 12:20:49 loic1 Exp $ */ /** * Gets core libraries and defines some variables */ require('./libraries/grab_globals.lib.php'); require('./libraries/common.lib.php'); // Gets the default font sizes PMA_setFontSizes(); // Gets the host name // loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+ if (empty($HTTP_HOST)) { if (!empty($_ENV) && isset($_ENV['HTTP_HOST'])) { $HTTP_HOST = $_ENV['HTTP_HOST']; } else if (!empty($HTTP_ENV_VARS) && isset($HTTP_ENV_VARS['HTTP_HOST'])) { $HTTP_HOST = $HTTP_ENV_VARS['HTTP_HOST']; } else if (@getenv('HTTP_HOST')) { $HTTP_HOST = getenv('HTTP_HOST'); } else { $HTTP_HOST = ''; } } /** * Defines the frameset */ $url_query = 'lang=' . $lang . '&server=' . $server . (empty($db) ? '' : '&db=' . urlencode($db)); ?>
Any thoughts???
regards Mike
penguinhead
2-17-02, 01:27 AM
nabil
Just another quick question (or two).
When you say not to put the line #!/usr/local/bin/php at the top of .inc files does that refer to files such as config.inc.php?
Also, I have the files stored in a phpmyadmin sub-directory in the htdocs directory. Is that ok?
Do I need to add the line #!/usr/local/bin/php to all the php files in the sub-directores such as "libraries" and "lang" etc?
I think someone was going to create some instructions for installing phpmyadmin on Powweb but I don't think its been done yet.. does anybody know for sure?
regards Mike
Mike,
No, the '#!/usr/local/bin/php' line is placed on a line by itself at the top of your script and does not replace the <?php tag. The whole purpose of this line is to tell the webserver where it can find the php.exe program to parse the following code. This is only necessary for the cgi version of php, which is, of course, what Powweb is running.
The reason you are getting a load of garbage when you try to access phpmyadmin is that you have replaced the beginning php tag <?php with the shebang line, so the webserver doesn't know that what is next is code and just sends it out as is.
Having said that, it is only necessary to place the shebang line at the top of .php pages that will be directly accessed from the browser and not .php's that get included by other pages. If you place the shebang line on each and every .php in phpmyadmin you will get a whole bunch of '#!/usr/local/bin/php' lines scattered through the pages you are accessing. Therefore, I have made a list of the files that need to have the '#!/usr/local/bin/php' added to (they are all under the home phpmyadmin dir):
- db_create.php
- db_details.php
- db_printview.php
- db_stats.php
- index.php
- ldi_check.php
- ldi_table.php
- left.php
- main.php
- phpinfo.php
- read_dump.php
- sql.php
- tbl_addfield.php
- tbl_alter.php
- tbl_change.php
- tbl_create.php
- tbl_dump.php
- tbl_indexes.php
- tbl_move_copy.php
- tbl_printview.php
- tbl_properties.php
- tbl_qbe.php
- tbl_rename.php
- tbl_replace.php
- tbl_select.php
- user_details.php
As with regards to having phpmyadmin installed in a subdirectory - yes it is possible; in fact it is much more desireable to do so, because if you place phpmyadmin in the home directory, the first page your visitors will see is the phpmyadmin homepage, which isn't very good :).
To access your phpmyadmin under a subdirectory, just point your browser to www.yoursite.com/path_to_phpmyadmin/.
Hope this helps - if there is anything else just give me a cooee :)
Cheers,
nabil
penguinhead
2-19-02, 08:50 AM
your a sensation nabil. Thx for everything.. I finally got it going and it works like a dream. Now to tackle PmpNuke!
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.