LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-21-2005, 11:22 AM   #1
alpineedge3
LQ Newbie
 
Registered: Jul 2005
Location: Boston
Posts: 7

Rep: Reputation: 0
problems installing MySQL & PHP on FC4


I'm running Fedora Core 4 with Gnome. I am asking how to set up PHP/MySQL to
create a LAMP server. I got apache up and running, so I have an LA, so now I
need to get the MP.

1. I did ./configure, make, and make install last week, and I can't really
remember if there were error messages, but I don't think there were errors.
I also changed the owner from root to mysql; although I don't know if it
worked or not. So now I'm at the step of mysql_install_db:

I enter:
# /usr/src/mysql-4.1.12/scripts/mysql_install_db --user=mysql

returns:
/usr/src/mysql-4.1.12/scripts/mysql_install_db: line85: my_print_defaults:
command not found
Could not find help file 'fill_help_tables.sql' in .support-files or inside
..

At some point during the past few days, I tried running mysqld and got this
(from mysqld.log)

050719 15:21:10 InnoDB: Flushing modified pages from the buffer pool...
050719 15:21:10 InnoDB: Started; log sequence number 0 43634
050719 15:21:10 [ERROR] /usr/local/src/mysql/mysql-4.1.12/bin/mysqld: Can't
create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
050719 15:21:11 [ERROR] Can' start server: can't create PID file: No such
file or directory
050719 15:21:11 mysqld ended

I've searched forums online and read messages about this error being a
permissions problem. I've dabbled with commands they provide as solutions
but i don't think they are working.

Thanks for any help. As for PHP, I tried to make with mysql extension, but I
got a mysql error and it didn't work. so i tried make and installing it
without mysql to see if i could just get it running, and make & make install
seemed to work fine with no errors. I made sure the httpd.conf file has the
line to tell the server to recognize php files. Then I put a php file called
test.php in the html directory, and tried to make it executable (chmod u+x
test.php) I got the error message

chmod: cannot access 'test.php': No such file or directory.

when i look in the directory (dir) there are 4 files: hello.html index.html
\ test.php \ test.php~

hello.html & index.html both work. what does the backslash mean in front of
the test.php? so maybe php is working alright but the problem is I can't
make the file executable?

everything i've done has been done on the root username.

so i just want to have them up and running, and i've searched around a bunch of posts but nothing seems to work. thanks for any help.
 
Old 07-21-2005, 12:01 PM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
looks like the blackslash is part of the filename; do `mv "\test.php" test.php`

You don't need to make test.php or \test.php executable, the user apache is running as just needs read access to the file.

At the MySQL site it is recomended to use the binaries and not compile from source, If I were you I would follow their advice and follow the installtation instructions absolutely to the letter, MySQL spits its dummy if the slightest thing is not to its liking
 
Old 07-21-2005, 01:38 PM   #3
hlyrad
Member
 
Registered: Jul 2005
Location: Ab Ca
Distribution: Redhat EL Sun Mac OSX FC 3.0 & 4.0
Posts: 44

Rep: Reputation: 15
I think the backslash is there to escape a space in front of the file name.
mv \ test.php test.php should fix this.
 
Old 07-21-2005, 01:54 PM   #4
hus
Member
 
Registered: Dec 2003
Location: Bangkok- Thailand
Distribution: Mandriva 10.0,Fedora Core 4
Posts: 79

Rep: Reputation: 15
For mysql problem
the owner of /var/run/mysqld/ must be mysql
if not you must change it with "chown -R mysql /var/run/mysqld" but you must create
mysql user before.

OR
Try XAMPP
with xampp you can manage the hole system easily.
 
Old 07-21-2005, 02:27 PM   #5
deviance99
Member
 
Registered: Jun 2004
Location: Mount Pleasant, MI
Posts: 41

Rep: Reputation: 16
hrm: why not just:
yum update
yum install apache
yum install mysql
yum install php

-- there you have it, your LAMP server installed --
 
Old 07-21-2005, 03:52 PM   #6
alpineedge3
LQ Newbie
 
Registered: Jul 2005
Location: Boston
Posts: 7

Original Poster
Rep: Reputation: 0
php works, mysql: new error

i just renamed the files and now php works. how simple.

regarding mysql, i yum installed mysql per deviance99's post. now i try to start the mysqld, and i get the following error:

[ERROR] Can't find messagefile '/usr/local/mysql/share/mysql/english/errmsg.sys'
[ERROR] Aborting

i searched and found the english files here:
/usr/share/mysql/english and
/usr/local/src/mysql/mysql-4.1.12/share/mysql/english


i think it would be easiest just to start over with mysql and install using an RPM. But I don't know which one to get for x86, FC4. can someone look at the download site and let me know which to get? also, how can i uninstall whatever mysql files are already on the hard drive? thanks
 
Old 07-21-2005, 04:25 PM   #7
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
I always use this package from http://dev.mysql.com/downloads/mysql/4.1.html and follow these instructions to install and it has never failed
 
Old 07-21-2005, 05:04 PM   #8
hlyrad
Member
 
Registered: Jul 2005
Location: Ab Ca
Distribution: Redhat EL Sun Mac OSX FC 3.0 & 4.0
Posts: 44

Rep: Reputation: 15
Re: php works, mysql: new error

Quote:
Originally posted by alpineedge3
i just renamed the files and now php works. how simple.

regarding mysql, i yum installed mysql per deviance99's post. now i try to start the mysqld, and i get the following error:

[ERROR] Can't find messagefile '/usr/local/mysql/share/mysql/english/errmsg.sys'
[ERROR] Aborting

i searched and found the english files here:
/usr/share/mysql/english and
/usr/local/src/mysql/mysql-4.1.12/share/mysql/english


i think it would be easiest just to start over with mysql and install using an RPM. But I don't know which one to get for x86, FC4. can someone look at the download site and let me know which to get? also, how can i uninstall whatever mysql files are already on the hard drive? thanks

Create a symlink from
/usr/local/src/mysql/mysql-4.1.12/ to /usr/local/mysql/
eg.
ln -s /usr/local/src/mysql/mysql-4.1.12/ /usr/local/mysql/
Your better off using the binary distros provided
 
Old 07-22-2005, 09:13 AM   #9
alpineedge3
LQ Newbie
 
Registered: Jul 2005
Location: Boston
Posts: 7

Original Poster
Rep: Reputation: 0
thanks. I eventually installed both with no errors.
 
Old 07-23-2005, 06:00 PM   #10
alpineedge3
LQ Newbie
 
Registered: Jul 2005
Location: Boston
Posts: 7

Original Poster
Rep: Reputation: 0
ok well it looks like the mysql extension was not included on the php installation. when i look at the phpinfo(), the configuration includes "--without-mysql". however, i've configured & installed it it twice using --with-mysql and i haven't had any errors.

i searched the filesystem for mysql.so, and it's not there.

what else can i do? do i just need to get the .so file?

thanks
 
  


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
MySQL & pgSQL problems w/ PHP dolvmin Linux - Software 2 10-28-2005 11:36 PM
Problems on installing PHP 4.4 in FC4 MAGI Linux - Software 4 09-16-2005 10:20 PM
problems in installing php with mysql krunal Linux - Newbie 3 08-18-2005 09:38 AM
Problems installing MySql & PHP from rpms? Nelsond Fedora 3 08-12-2005 12:09 PM
Installing Apache,MySQL&PHP on Linux foo_mulan Linux - Newbie 1 07-16-2004 02:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:37 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration