Author Topic: Skuzzy... PHP and MySQL on LINUX  (Read 439 times)

Offline Mini D

  • Parolee
  • Platinum Member
  • ******
  • Posts: 6897
      • Fat Drunk Bastards
Skuzzy... PHP and MySQL on LINUX
« on: May 14, 2005, 07:23:59 PM »
I'm running Fedora FC-3_64 on my system and it seems that during the setup, PHP did not associate with the MySQL stuff very well. My understanding is that I have to re-compile PHP with the MySQL path.

The only real problem is that I have absolutely no idea how to do this. Any help would be appreciated.

Offline LePaul

  • Platinum Member
  • ******
  • Posts: 7988
Skuzzy... PHP and MySQL on LINUX
« Reply #1 on: May 14, 2005, 09:31:37 PM »
Bleah, I had this happen to me with Fedora.  I had to do a complete reinstall...and get the latest versions of PHP and MySQL.  It finally took, I had to do a few things in Webmin too.

Zorg is a good source for this too, I dont know how often he visits CheckSix tho

Offline Mini D

  • Parolee
  • Platinum Member
  • ******
  • Posts: 6897
      • Fat Drunk Bastards
Skuzzy... PHP and MySQL on LINUX
« Reply #2 on: May 14, 2005, 10:27:37 PM »
I found a checkbox in the install program, but couldn't do an "after the fact" install. I had to re-install it.

Offline Kev367th

  • Platinum Member
  • ******
  • Posts: 5290
Skuzzy... PHP and MySQL on LINUX
« Reply #3 on: May 15, 2005, 01:01:45 AM »
Is it possible to install Fedora on a SATA RAID setup yet?
I remember reading it may be included in a future release way back in core 2.
I think as it stood then you had to install on a non SATA RAID disk then re-compile your own kernel with SATA RAID support and migrate it onto the RAID.
« Last Edit: May 15, 2005, 01:04:26 AM by Kev367th »
AMD Phenom II X6 1100T
Asus M3N-HT mobo
2 x 2Gb Corsair 1066 DDR2 memory

Offline Skuzzy

  • Support Member
  • Administrator
  • *****
  • Posts: 31462
      • HiTech Creations Home Page
Skuzzy... PHP and MySQL on LINUX
« Reply #4 on: May 15, 2005, 08:09:57 AM »
Make sure the /etc/ld.so.conf file contains the path to the MySQL library.  If you add it manually, then run ldconfig afterwards.

Then run the PHP configure as follows:

./configure --with-mysql
Roy "Skuzzy" Neese
support@hitechcreations.com

Offline DREDIOCK

  • Plutonium Member
  • *******
  • Posts: 17775
Skuzzy... PHP and MySQL on LINUX
« Reply #5 on: May 15, 2005, 09:45:16 AM »
Pardon me for asking.

But wtf is Fedora?
Death is no easy answer
For those who wish to know
Ask those who have been before you
What fate the future holds
It ain't pretty

Offline Mini D

  • Parolee
  • Platinum Member
  • ******
  • Posts: 6897
      • Fat Drunk Bastards
Skuzzy... PHP and MySQL on LINUX
« Reply #6 on: May 15, 2005, 10:14:53 AM »
Fedora is the 64bit implimentation of RedHat LINUX that is based on all free software. I imagine it's called "fedora" because that is a type of hat.

Skuzzy, we are now ready for MySQL basics. I re-installed Fedora with the PHP-MySQL associations correct (was a box I should have know to click, I guess). Unfortunately, I have no idea how to configure MySQL and add databases and users to it. I don't have a GUI control for it and have no idea where it is installed.

Any suggestions?

Offline Mini D

  • Parolee
  • Platinum Member
  • ******
  • Posts: 6897
      • Fat Drunk Bastards
Skuzzy... PHP and MySQL on LINUX
« Reply #7 on: May 15, 2005, 02:01:15 PM »
OK... I think I've figured out what the problem was. mysqld wasn't started. Once I started that, the mysql commands seem to work. I've successfully logged into mysql and set a password, and I think I've managed to create a database, but it doesn't look like php is seeing it.

Is there a way to verify the database has started?

Offline Mini D

  • Parolee
  • Platinum Member
  • ******
  • Posts: 6897
      • Fat Drunk Bastards
Skuzzy... PHP and MySQL on LINUX
« Reply #8 on: May 15, 2005, 02:38:10 PM »
Just a brief status update:

I was able to create a database (I think), though I'm not exactly sure how to check to make sure it's running.

I used the following line to create the database:

mysqladmin -u username -p create database

It prompted me for a password and I entered the password for the username and all seemed well.

When I type the following:

mysql -u username -p database

It takes me to a password screen where my passord gets me access to the following prompt:

mysql>

If I type "status" there, I get the following:

mysql  Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (x86_64)

Connection id:          34
Current database:       database
Current user:           username@localhost
Current pager:          stdout
Using outfile:          ''
Server version:         3.23.58
Protocol version:       10
Connection:             Localhost via UNIX socket
Client characterset:    latin1
Server characterset:    latin1
UNIX socket:            /var/lib/mysql/mysql.sock
Uptime:                 50 min 12 sec

Threads: 1  Questions: 39  Slow queries: 0  Opens: 6  Flush tables: 1  Open tables: 0 Queries per second avg: 0.013

Note: I didn't use the database name "database" nor username "username".

Anyways, this looks like I set the database up OK to me. When I edited the config.php, I entered the following:

// ****** DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$dbusername = 'username';
$dbpassword = 'password';

// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$dbname = 'database';

Everything is entered the same as what gives me access to the prompt. When I try to run the install program, I still get an "unable to connect to database" error.
« Last Edit: May 15, 2005, 02:40:48 PM by Mini D »

Offline Skuzzy

  • Support Member
  • Administrator
  • *****
  • Posts: 31462
      • HiTech Creations Home Page
Skuzzy... PHP and MySQL on LINUX
« Reply #9 on: May 15, 2005, 04:57:41 PM »
Depending on the version of MySQL, you can nab a Windows GUI thing for managing MySQL.  Probably would be a lot easier for you.

For MySQL 3.x.x you can use MySQLCC (on MySQL's WEB site and no longer supported).
Makes it pretty trivial to manage MySQL then.  Just FYI.

With PHP, you just need to use the mysql_connect function to make the connection to the database, then you can access the tables in the database.

If you give me an idea of what you are trying to do, I can toss you some simple connection scripts.
« Last Edit: May 15, 2005, 05:00:50 PM by Skuzzy »
Roy "Skuzzy" Neese
support@hitechcreations.com

Offline Mini D

  • Parolee
  • Platinum Member
  • ******
  • Posts: 6897
      • Fat Drunk Bastards
Skuzzy... PHP and MySQL on LINUX
« Reply #10 on: May 15, 2005, 05:05:18 PM »
I'm trying to install vbulletin (BBS software).

It runs a php file from an installation directory and attempts to connect to your database through an internet connection to set up the vbulletin configuration.

I can't get it to see my database. I almost wonder if PHP just can't see the new database I configured.

Offline LePaul

  • Platinum Member
  • ******
  • Posts: 7988
Skuzzy... PHP and MySQL on LINUX
« Reply #11 on: May 15, 2005, 05:11:22 PM »
Get Webmin, as I posted over to CheckSix, that'll make managing MySQL a whole lot easier.

Edit:  Its a very easy to install RPM

Offline Mini D

  • Parolee
  • Platinum Member
  • ******
  • Posts: 6897
      • Fat Drunk Bastards
Skuzzy... PHP and MySQL on LINUX
« Reply #12 on: May 15, 2005, 05:48:18 PM »
Well... webmin wasn't much help except that it confirmed I'd done everything right. The problem was with my .cfg file for vBulletin. It did not like "localhost" and I had to go with the server host name instead. Then all was peachy.

Offline Mini D

  • Parolee
  • Platinum Member
  • ******
  • Posts: 6897
      • Fat Drunk Bastards
Skuzzy... PHP and MySQL on LINUX
« Reply #13 on: May 15, 2005, 07:26:54 PM »
Damn... now I'm hanging up while it tries to import the language. From what I'm reading, this is because XML support is not enabled under PHP. Any ideas how to do this?

Offline Mini D

  • Parolee
  • Platinum Member
  • ******
  • Posts: 6897
      • Fat Drunk Bastards
Skuzzy... PHP and MySQL on LINUX
« Reply #14 on: May 15, 2005, 07:58:59 PM »
I ran a cool program called phpinfo that pretty much said that xml is enabled. I've put a service request in with vbulletin.