View Full Version: Need Help with PhpMyAdmin

MPAM Rebooted Forums > Tutorials & help > Need Help with PhpMyAdmin


Title: Need Help with PhpMyAdmin
Description: Getting the system to see Php Extensions


Lou - June 3, 2007 03:07 AM (GMT)
My problem seems to be that I cannot properly configure phpMyAdmin to allow the extensions and php.ini to be seen by the system.

Below, I have tried to document the equipment, the software, the

problem I am experiencing and the steps I have taken in an attempt to

resolve the problem. I am unable to resolve the problem and I need

help.

System:
Intel Pentium III 650 MHZ

288 MB RAM
This setup is slow, but it works well for learning.

WIN XP SP2

Server and Application Server Installation information:

Apache 2.2.4, PHP Version 5.2.5, and MySQL Essentials X86 5.0,

PhPMyAdmin-2.10.2-english.

Apache is running well.

File timetest.php This page was created at 09:03:40 am indicates that

Apache and Php are working well together.


Also, I believe the PHP Info Page in the browser display indicates

that Apache and PhP are working well together. However, the PHP Info

Page() page indicates the path for php.ini is: Path C:\WINDOWS, and that the php.ini file is not loading: Loaded Configuration File (none). At least that is what I am interpreting, which I may be in correct.

PHP Info Page()
PHP Version 5.2.2

System Windows NT 5.1 build 2600
Build Date May 2 2007 19:17:46
Configure Command cscript /nologo configure.js

"--enable-snapshot-build" "--with-gd=shared"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File (none)
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, data, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp
Registered Stream Filters convert.iconv.*, string.rot13,


MySQL 5.0 is working and accessible via the MySQL Command Line Client

Enter password: XXXXXXXXXXXX
Welcome to the MySQL monitor. Commands end with ; or \g.
....... etc.

My problem is with PhpMyAdmin. When I type

http://127.0.0.1:8080/Restricted/phpMyAdmin/ into my browser, I get

the error:

phpMyAdmin - Error
Cannot load mysql extension. Please check your PHP configuration. -

Documentation

What I have done to solve the problem:
1. Installed PhPMyAdmin by extracting the PhPMyAdmin zip file into the

folder

Apache224\htdocs\Restricted\phpMyadmin\phpMyAdmin-2.10.0.2-english.

I followed these instructions, which have served me well.

"Configuring phpMyAdmin
Create a config directory in your phpMyAdmin folder

(G:\SERVER\HTTP\Restricted\phpMyAdmin for us).
Launch Apache and MySQL (if they aren't already running), and with

your browser, go to http://127.0.0.1:8080/Restricted/phpMyAdmin/ (or

to wherever you installed phpMyAdmin). You get an error message with a

link to the setup script.
Go to the setup script. Find the Servers section and click on Add.
Enter the MySQL root password in the Password for config auth field.
Finish adding this server (click on the green Add button).
In the Configuration section, click on Save.
Copy G:\SERVER\HTTP\Restricted\phpMyAdmin\config\config.inc.php to

G:\SERVER\HTTP\Restricted\phpMyAdmin\config.inc.php.
Go to http://127.0.0.1:8080/Restricted/phpMyAdmin/ again.
Here you are, phpMyAdmin is configured."

I found and went to the set up script, opened it and configured phpMy

Admin.

2. Then I moved the files to

C:\apache224\htdocs\Restricted\phpMyadmin\config, instead of leaving

them in the orginal folder.

3. I found the file setup in the directory

C:\apache224\htdocs\Restricted\phpMyadmin\scripts, then clicked on the tutorial link to the PhpMyAdmin setup file and cofigured the file config.inc. I saved the file in the config directory.

5. Again,with Apache and MySql launched, I opened my browser and went

to http://127.0.0.1:8080/Restricted/phpMyAdmin/, Where I got the

error:
Cannot load mysql extension. Please check your PHP configuration. -

Documentation. I checked the PhP ini.

This is from my Php.ini file:

;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_msql.dll
;extension=php_mssql.dll
extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll


*******************************************


I checked the Path:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\apach

e224;C:\Apache224\conf;c:\php522;C:\apache224\bin;C:\MySQL Server

0\bin.

I copied the files libmysql.dll, php_mysql.dll to C:\apache224.

I copied the files libmysql.dll to C:\apache224\bin.


I set the path C:\Apache224\conf to include the Apache configuration

file httpd in the path.

Thid did not work, so I copied php.in, libmysql.dll, php_mysql.dll,

php_pgsql.dll, php_mbstring.dll,and php_mycrypt.dll to the Windows

directory.

Stiil, Windows does not see the files. Also, I set extension_dir =

"c:\php522\ext".I rebooted and I still get the error. I do not know what else to do and I need help.

patheticcockroach - June 5, 2007 10:56 AM (GMT)
Hi,

In your phpinfo page, you should have a part about MySQL. What does it say ? You should have sth like this :
user posted image
Also, try setting extension_dir = "c:/php522/ext/"

Lou - June 6, 2007 04:16 PM (GMT)
Thank you for your repsonse. I re-installed Php and PhPMyAdmin. I used PHP version 5.2.3. The paths are changed and I changed this in the environment. Below is the copy of the MySql information:

mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.0.37

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off


odbc
ODBC Support enabled
Active Persistent Links 0
Active Links 0
ODBC library Win32

Directive Local Value Master Value
odbc.allow_persistent On On
odbc.check_persistent On On
odbc.default_db no value no value
odbc.default_pw no value no value
odbc.default_user no value no value
odbc.defaultbinmode return as is return as is
odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes
odbc.max_links Unlimited Unlimited
odbc.max_persistent Unlimited Unlimited


pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 7.0 18-Dec-2006


phpdoc
phpdoc support enabled
PHPDoc Version 0.0.1


Reflection
Reflection enabled
Version $Id: php_reflection.c,v 1.164.2.33.2.39 2007/05/29 08:44:05 helly Exp $


session
Session Support enabled
Registered save handlers files user
Registered serializer handlers php php_binary wddx

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 Off Off
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 5 5
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path C:\DOCUME~1\Luther\LOCALS~1\Temp\php\session C:\DOCUME~1\Luther\LOCALS~1\Temp\php\session
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0


SimpleXML
Simplexml support enabled
Revision $Revision: 1.151.2.22.2.26 $
Schema support enabled


SPL
SPL support enabled
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException


standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Internal Sendmail Support for Windows enabled

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
user_agent no value no value


tokenizer
Tokenizer Support enabled


wddx
WDDX Support enabled
WDDX Session Serializer enabled


xml
XML Support active
XML Namespace Support active
libxml2 Version 2.6.26


xmlreader
XMLReader enabled


xmlwriter
XMLWriter enabled


zlib
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value


Additional Modules
Module Name


Environment
Variable Value
ALLUSERSPROFILE C:\Documents and Settings\All Users
CommonProgramFiles C:\Program Files\Common Files
COMPUTERNAME LUTHER-6LCHTDHH
ComSpec C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK NO
NUMBER_OF_PROCESSORS 1
OS Windows_NT
Path C:\Program Files\PHP\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\apache224;C:\Apache224\conf;c:\php522;C:\apache224\bin;C:\MySQL Server 5.0\bin
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PHPRC C:\Program Files\PHP\
PROCESSOR_ARCHITECTURE x86
PROCESSOR_IDENTIFIER x86 Family 6 Model 8 Stepping 1, GenuineIntel
PROCESSOR_LEVEL 6
PROCESSOR_REVISION 0801
ProgramFiles C:\Program Files
SystemDrive C:
SystemRoot C:\WINDOWS
TEMP C:\WINDOWS\TEMP
TMP C:\WINDOWS\TEMP
USERPROFILE C:\Documents and Settings\LocalService
windir C:\WINDOWS
AP_PARENT_PID 1032


PHP Variables
Variable Value
_SERVER["HTTP_ACCEPT"] image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us
_SERVER["HTTP_UA_CPU"] x86
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; YPC 3.2.0; .NET CLR 1.1.4322)
_SERVER["HTTP_HOST"] 127.0.0.1:8080
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["PATH"] C:\Program Files\PHP\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\apache224;C:\Apache224\conf;C:\apache224\bin;C:\MySQL Server 5.0\bin
_SERVER["SystemRoot"] C:\WINDOWS
_SERVER["COMSPEC"] C:\WINDOWS\system32\cmd.exe
_SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_SERVER["WINDIR"] C:\WINDOWS
_SERVER["SERVER_SIGNATURE"] no value
_SERVER["SERVER_SOFTWARE"] Apache/2.2.4 (Win32) PHP/5.2.3
_SERVER["SERVER_NAME"] 127.0.0.1
_SERVER["SERVER_ADDR"] 127.0.0.1
_SERVER["SERVER_PORT"] 8080
_SERVER["REMOTE_ADDR"] 127.0.0.1
_SERVER["DOCUMENT_ROOT"] C:/apache224/htdocs/
_SERVER["SERVER_ADMIN"] hertl@pacbell.net
_SERVER["SCRIPT_FILENAME"] C:/apache224/htdocs/somename.php
_SERVER["REMOTE_PORT"] 2682
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /somename.php
_SERVER["SCRIPT_NAME"] /somename.php
_SERVER["PHP_SELF"] /somename.php
_SERVER["REQUEST_TIME"] 1181144823


After reinstalling and reconfiguring PhP and PHpMyAdmin, I now cosisently get the error:

"Welcome to phpMyAdmin 2.10.1

Probably reason of this is that you did not create configuration file. You might want to use setup script to create one.

Error
MySQL said:

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

when I type http://127.0.0.1:8080/Restricted/phpMyAdmin/ into my browser.

In an attempt to find a solution, I have repeatedly re-configured the setup script and continually get the error after restarting.

In the setup script, I am using config auth with the sign on password for MySql. I tried using the password, re-configuring the setup script with no password, and nothing seems to work.

Perhaps, I should have set up MySql with no password when I first installed it. It seems that I am close to making this work,but I seem to be missing something in the PhpMyAdmin config script setup. Obviously, I am new to this and trying to learn. Would it be appropriate for me to post the config script in the forum?
Thank you again for helping.

patheticcockroach - June 6, 2007 07:52 PM (GMT)
QUOTE
Welcome to phpMyAdmin 2.10.1

Probably reason of this is that you did not create configuration file. You might want to use setup script to create one.

Error
MySQL said:

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

when I type http://127.0.0.1:8080/Restricted/phpMyAdmin/ into my browser.

In an attempt to find a solution, I have repeatedly re-configured the setup script and continually get the error after restarting.
Did you move the config.inc.php file where appropriate ? The setup script is a real pain IMO, took me a lot of time to figure out how to use it. Here is my config file to make things easier, save it as config.inc.php in your phpMyAdmin folder (edit the root password first).
CODE
<?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 2.10.0.2 setup script by Michal Čihař <michal@cihar.com>
* Version: $Id: setup.php 9697 2006-11-13 08:32:28Z nijel $
* Date: Sat, 10 Mar 2007 17:35:02 GMT
*/

/* Servers configuration */
$i = 0;

/* Server localhost (config:root) [1] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '****';

/* End of servers configuration */

$cfg['AllowAnywhereRecoding'] = false;
$cfg['DefaultCharset'] = 'iso-8859-1';
$cfg['RecodingEngine'] = 'iconv';
$cfg['IconvExtraParams'] = '//TRANSLIT';
?>

Lou - June 6, 2007 08:30 PM (GMT)
Thank you very much. I have to leave,but I will try to adapt your config for my usage this evening. This is tough, but I am learning through trial by fire!
Thank you

Lou - June 8, 2007 12:58 AM (GMT)
Thank you very much for the coaching and hand holding.

After re-installing and re-configuring Php, PhpMyAdmin, And MySql 5.0; I got another error message, but it was more meaningful and to the point. The error message in the latest PhPMyAdmin told me that there was an error in my Php Configuration Script and I should check the Server and localhost fields.

I was suspicious of my entries in those fields as they differred slightly from the documentation recommendation to use "localhost." I had used localhost in the Php configuration file and I had used 127.0.0.1:8080 in my Apache2.0 Configuration file. Also, I added the information from your Php Configuration file that is located beneath the server information.

Very Important!:
The solution that worked for me was to change my Php Configuration file to read the same as my Apache 2.0 Confiuration file: Server 127.0.0.1:8080 and ['host'] = '127.0.0.1:8080. Now the MySql server can communicate with the Apache 2.0 server.

When MySql came up, I did not readily recognize it because I have never seen it in a browser . It came up with what looks like some test databases with a Biobar Menu, a Search drop down list box, a text search drop down list box, and a text search box for input. I looked into the Search drop dpwm box and found MSD, Default database, and some other databases. I got to all of this by entering http://127.0.0.1:8080/Restricted/phpMyAdmin/ into my Firefox browser and waiting for the databases to load.

I guess my next step is to learn how to use MySql. I understand database theory, but I an not familiar with the MySql command line interface. A graphical interface would be a lot easier for me to use and start to develop tables, databases, and soforth. Any tips or recommendations where I should start or what my next step should be? Again, I am grateful to you for your assistance.

patheticcockroach - June 8, 2007 05:50 AM (GMT)
Well, glad that you managed to get the stuff to work... I find it weird that you needed to set ['host'] = '127.0.0.1:8080', but well, if you did some strange stuff in your Apache configuration maybe it's normal ;)
Anyway, the databases that you see the first time you connect to phpmyadmin are NOT test databases. They are needed by phpmyadmin to work properly, so don't touch them unless you know what you're doing :helpbook:
As for learning MySQL syntax, well, you already have a garphical interface (phpMyAdmin is one, although you can also type MySQL queries by yourself). Then, you have 2 solutions :
- I suppose you could read the MySQL documentation, but this is pretty boring
- If you just want to do basic queries, just use phpMyAdmin : create a DB, then create a table inside, then add an entry, update it, delete it, etc : everytime you do something with phpMyAdmin, it will tell you what command it uses. Then, if you need more details, you'll just have to read the parts of the documentation about the specific commands you used for these operations (mostly INSERT, SELECT, UPDATE and DELETE), and it will be enough ;)

Lou - June 10, 2007 02:39 AM (GMT)
Thanks again! I am in the process of setting up the server as a development server to do web site development. Are there any open source tools that make it easier to code web pages, like Dream Weaver covers development in Windows. I am looking for something that will work well with developing web sites in Linux, Unix, and with or without Windows.

patheticcockroach - June 10, 2007 05:42 AM (GMT)
Well, personnally I prefer to use notepad/notepad++, but for open source XHTML editor I know Nvu (never tried it though, but ppl seem to like it).




Hosted for free by InvisionFree