LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-04-2006, 05:52 PM   #1
vrdriver4l
LQ Newbie
 
Registered: May 2006
Posts: 5

Rep: Reputation: 0
MySQL + PHP help me PLEASE


Hey guys here is the deal i rent a dedicated server based in chicago running red hat linux fedora core 5. I am currently trying to set up MySQL, PHP-MyAdmin, and PHP-Nuke. I almost positive my Mysql is set up allright it starts and i can log into it as root and I have set the password. I have everything installed, but can't get it working. When i go to the my site that should show php nuke it is blank then when i go to gamingserversplus.com/phpMyAdmin for setting up php my admin it says Cannot load mysql extension. Please check your PHP configuration. - Documentation. Now from what ive been reading i think the problem is somthing in my PHP, all the posts sais php5 you have to compile your self. Is there anyone that can help me here. Im willing to pay you $ or im willing to advertise ur company on my bussiness sight once you get it up and running. Some one please help me this is realy frustrating lol. Any help is greatly appreciated.
 
Old 05-04-2006, 06:06 PM   #2
puntjuh
Member
 
Registered: Apr 2006
Location: holland
Distribution: Gentoo / debian / suse / mint
Posts: 558

Rep: Reputation: 42
When you installed php and did ./configure did you give it the --with-mysql option ?
 
Old 05-04-2006, 07:16 PM   #3
vrdriver4l
LQ Newbie
 
Registered: May 2006
Posts: 5

Original Poster
Rep: Reputation: 0
I didn't install PHP or mysql it was done when i got the server but im having problems configureing. I actually got past my problem in the first post by update using 'yum update php' and updated the php-mysql package like it said to, and now i am getting a error saying that my server ip is not allowed to connect to the mysql server. (Welcome to phpMyAdmin 2.8.0.3
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server. Error MySQL said:
#1130 - Host '205.145.140.210' is not allowed to connect to this MySQL server)


Ive went over the config.inc.php over and over again and not sure what is wrong. I know i am using the correct hostname and I no for a fact that username and password are right becuase i can log into mysql VIA the command prompt with mysql -u root -p. So Im realy not sure what is wrong, I restarted the server and the httpd service a number of times and doesn't help any. Here is a copy of the server cfg part of my config.inc.php. Any one with expirence with this let me know if it looks right. Thanks for any input.


$cfg['Servers'][$i]['host'] = 'gamingserversplus.com'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension'] = 'mysql'; // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
// (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser'] = 'username'; // MySQL control user settings
// (this user must have read-only
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables).
// The controluser is also
// used for all relational
// features (pmadb)
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = '*****'; // MySQL password (only needed
// with 'config' auth_type)
$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only
// this db is displayed in left frame
// It may also be an array of db-names, where sorting order is relevant.
$cfg['Servers'][$i]['hide_db'] = ''; // Database name to be hidden from listings
$cfg['Servers'][$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname

$cfg['Servers'][$i]['pmadb'] = ''; // Database used for Relation, Bookmark and PDF Features
// (see scripts/create_tables.sql)
// - leave blank for no support
// DEFAULT: 'phpmyadmin'
$cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table
// - leave blank for no bookmark support
// DEFAULT: 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc)
// - leave blank for no relation-links support
// DEFAULT: 'pma_relation'
$cfg['Servers'][$i]['table_info'] = ''; // table to describe the display fields
// - leave blank for no display fields support
// DEFAULT: 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF schema
// - leave blank for no PDF schema support
// DEFAULT: 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf
// - leave blank if you don't want to use this
// DEFAULT: 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = ''; // table to store column information
// - leave blank for no column comments/mime types
// DEFAULT: 'pma_column_info'
$cfg['Servers'][$i]['history'] = ''; // table to store SQL history
// - leave blank for no SQL query history
// DEFAULT: 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables
// are up to date. This prevents compatibility
// checks and thereby increases performance.
$cfg['Servers'][$i]['AllowRoot'] = TRUE; // whether to allow root login
$cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use
= '';
$cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults
= array();

// If you have more than one server configured, you can set $cfg['ServerDefault']
// to any one of them to autoconnect to that server when phpMyAdmin is started,
// or set it to 0 to be given a list of servers without logging in
// If you have only one server configured, $cfg['ServerDefault'] *MUST* be
// set to that server.
$cfg['ServerDefault'] = 1; // Default server (0 = no default server)
 
Old 05-04-2006, 07:50 PM   #4
vrdriver4l
LQ Newbie
 
Registered: May 2006
Posts: 5

Original Poster
Rep: Reputation: 0
If i switch to the method that you sign in like the http or cookie i know get a screen for username and password but when i put in my username and password for mysql it doesn't work. Just doesn't make sence i know for a fact what my username and password are i can log into mysql through my command line any ideas?
 
Old 05-04-2006, 08:21 PM   #5
hisnumber666
Member
 
Registered: Mar 2006
Distribution: Debian Sarge, Windows Server 2003
Posts: 66

Rep: Reputation: 15
basically in order for php to be able to talk to your SQL server it must be linked to an extesnsion. on your case you are using MySQL.

you should have this line in your php.ini file:

extension=mysql.so

if that doesnt work check if you have the right extension path(search your system for mysql.so file) and include this line BEFORE the line above:

extension_dir = "path to your sql extension"

i had to do that to get sql working on my server to get my forums up.
hope this helps.
 
Old 05-04-2006, 08:56 PM   #6
vrdriver4l
LQ Newbie
 
Registered: May 2006
Posts: 5

Original Poster
Rep: Reputation: 0
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=mysql.so
; extension=modulename.extension
;
; For example:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.

Tried that and im a little lost on the second idea that you explained, when i did a search on mysql.so it came up with these--
/usr/lib/dbd/libdbdmysql.so
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.so
/usr/lib/python2.4/site-packages/_mysql.so
/var/lib/mysql/mysql.sock

Which one do i edit and exactly what do i put in there? Thanks for the help, greatly appraciated
 
Old 05-04-2006, 09:09 PM   #7
hisnumber666
Member
 
Registered: Mar 2006
Distribution: Debian Sarge, Windows Server 2003
Posts: 66

Rep: Reputation: 15
i guess it would be this one... /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.so

here is how it looks like on my server:

extension_dir = "/usr/lib/php4/20020429"

extension=mysql.so

the 20020429 is not some strange numbers its a package build date.
 
Old 05-04-2006, 09:48 PM   #8
vrdriver4l
LQ Newbie
 
Registered: May 2006
Posts: 5

Original Poster
Rep: Reputation: 0
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=mysql.so
; extension_dir="/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-threadmulti/auto/DBD/mysql/mysql.so"
; extension=modulename.extension
;
; For example:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.

Thats what i have know, and it still wouldn't work, i read also that mabye downgrading to the lower verson of PHP and mysql may help i have php5 and the latest mysql, any ideas if that is a solution. Somthing about PHP5 you have to build everything and PHP4 you don't.
 
Old 05-04-2006, 10:09 PM   #9
hisnumber666
Member
 
Registered: Mar 2006
Distribution: Debian Sarge, Windows Server 2003
Posts: 66

Rep: Reputation: 15
LOL
no thats wrong.

you directory name should not have the actual file name.
it should be like so:

extension_dir="/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-threadmulti/auto/DBD/mysql"

and uncomment the extension. ; means the line is not read.
it should be like so:

extension=mysql.so

and NOT

; extension=mysql.so



i hope that fixes it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade to MySQL-5.0.18 breaks PHP mysql functions MarkVickers Slackware 5 05-03-2006 12:10 AM
php-mysql dependancy problem after nitemare mysql upgrade. RHEL4 andrewc Red Hat 1 01-03-2006 04:16 PM
Problem getting PHP to recognize MySQL, Using PHP 4.0 and MySQL 4.0.20 d2army Programming 4 06-27-2004 08:54 PM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration