LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-12-2003, 02:47 AM   #31
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30

Quote:
Originally posted by edhan
Yes. I have tried stopping and restarting as well as rebooting the entire server. It is still the same. No error in starting or stopping.

[root@www root]# /usr/local/apache/bin/apachectl stop
/usr/local/apache/bin/apachectl stop: httpd stopped
[root@www root]# /usr/local/apache/bin/apachectl startssl
Apache/1.3.27 mod_ssl/2.8.14 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide us with the pass phrases.

/usr/local/apache/bin/apachectl startssl: httpd started
[root@www root]# tail -n100 /usr/local/apache/log/error.log
tail: /usr/local/apache/log/error.log: No such file or directory
[root@www root]# tail -n100 /usr/local/apache/log/error.log
tail: /usr/local/apache/log/error.log: No such file or directory


Regards
Edward Han
Heh it should be error_log instead of error.log
 
Old 09-12-2003, 02:59 AM   #32
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
Heh it should be error_log instead of error.log
Still no error.

[root@www root]# tail -n100 /usr/local/apache/log/error_log
tail: /usr/local/apache/log/error_log: No such file or directory
[root@www root]#


Opps. should be logs instead. Here it is:

[root@www root]# tail -n100 /usr/local/apache/logs/error_log
[Fri Sep 12 15:28:24 2003] [notice] Apache/1.3.27 (Unix) configured -- resuming
normal operations
[Fri Sep 12 15:28:24 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Sep 12 15:41:45 2003] [notice] caught SIGTERM, shutting down
[Fri Sep 12 15:41:58 2003] [notice] Apache/1.3.27 (Unix) PHP/4.3.1 mod_ssl/2.8.14 OpenSSL/0.9.7b configured -- resuming normal operations
[Fri Sep 12 15:41:58 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)
[root@www root]#


Regards
Edward Han

Last edited by edhan; 09-12-2003 at 03:01 AM.
 
Old 09-12-2003, 03:01 AM   #33
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
Still no error.

[root@www root]# tail -n100 /usr/local/apache/log/error_log
tail: /usr/local/apache/log/error_log: No such file or directory
[root@www root]#


Regards
Edward Han
Edward,

Can you list the contents of /usr/local
Can you list the contents of /usr/local/apache
Can you list the contents of /usr/local/apache/log
Can you list the contents of /usr/local/apache/conf

What distro do you use ? RH 8

Does there exists a scripts dir on your machine?


Last edited by daveo; 09-12-2003 at 03:26 AM.
 
Old 09-12-2003, 06:18 AM   #34
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
Edward,

Can you list the contents of /usr/local
Can you list the contents of /usr/local/apache
Can you list the contents of /usr/local/apache/log
Can you list the contents of /usr/local/apache/conf

What distro do you use ? RH 8

Does there exists a scripts dir on your machine?
drwxr-xr-x 20 root root 4096 Sep 11 20:38 .
drwxr-xr-x 15 root root 4096 Sep 12 02:04 ..
drwxr-xr-x 12 root root 4096 Sep 11 20:38 apache
drwxr-xr-x 2 root root 4096 Sep 12 13:39 bin
drwxr-xr-x 2 root root 4096 Feb 7 1996 doc
drwxr-xr-x 2 root root 4096 Feb 7 1996 etc
drwxr-xr-x 2 root root 4096 Feb 7 1996 games
drwxr-xr-x 4 root root 4096 Sep 11 20:59 include
drwxr-xr-x 2 root root 4096 Sep 11 19:52 info
drwxr-xr-x 4 root root 4096 Sep 11 20:59 lib
drwxr-xr-x 2 root root 4096 Sep 11 19:52 libexec
drwx------ 2 root root 16384 Sep 12 02:00 lost+found
drwxr-xr-x 3 root root 4096 Sep 11 19:52 man
drwxr-xr-x 7 root root 4096 Sep 12 13:53 mysql-test
drwxr-xr-x 2 root root 4096 Feb 7 1996 sbin
drwxr-xr-x 5 root root 4096 Sep 11 19:52 share
drwxr-xr-x 5 root root 4096 Sep 11 19:53 sql-bench
drwxr-xr-x 8 root root 4096 Sep 11 19:20 src
drwx------ 5 mysql mysql 4096 Sep 12 08:53 var
drwxr-xr-x 89 root bin 4096 Sep 11 19:05 webmin
[root@www local]#


[root@www apache]# ls -la
total 60
drwxr-xr-x 12 root root 4096 Sep 11 20:38 .
drwxr-xr-x 20 root root 4096 Sep 11 20:38 ..
drwxr-xr-x 2 root root 4096 Sep 11 20:38 bin
drwxr-xr-x 2 root root 4096 Sep 11 20:38 cgi-bin
drwxr-xr-x 7 root root 4096 Sep 12 14:51 conf
drwxr-xr-x 2 root root 16384 Sep 12 14:27 htdocs
drwxr-xr-x 3 root root 4096 Sep 11 20:38 icons
drwxr-xr-x 3 root root 4096 Sep 11 20:38 include
drwxr-xr-x 2 root root 4096 Sep 11 20:59 libexec
drwxr-xr-x 2 root root 4096 Sep 12 16:04 logs
drwxr-xr-x 4 root root 4096 Sep 11 20:38 man
drwxr-xr-x 2 nobody nobody 4096 Sep 11 20:38 proxy
[root@www apache]#


[root@www logs]# ls -la
total 20
drwxr-xr-x 2 root root 4096 Sep 12 16:04 .
drwxr-xr-x 12 root root 4096 Sep 11 20:38 ..
-rw-r--r-- 1 root root 3216 Sep 12 15:42 access_log
-rw-r--r-- 1 root root 522 Sep 12 16:04 error_log
-rw-r--r-- 1 root root 1450 Sep 12 15:41 ssl_engine_log
-rw-r--r-- 1 root root 0 Sep 12 15:41 ssl_request_log
[root@www logs]#


[root@www conf]# ls -la
total 336
drwxr-xr-x 7 root root 4096 Sep 12 14:51 .
drwxr-xr-x 12 root root 4096 Sep 11 20:38 ..
-rw-r--r-- 1 root root 348 Sep 11 20:38 access.conf
-rw-r--r-- 1 root root 348 Sep 11 20:38 access.conf.default
-rw-r--r-- 1 root root 47672 Sep 12 14:51 httpd.conf
-rw-r--r-- 1 root root 47672 Sep 12 14:06 httpd.conf~
-rw-r--r-- 1 root root 47672 Sep 12 13:39 httpd.conf.bak
-rw-r--r-- 1 root root 47466 Sep 11 20:38 httpd.conf.default
-rw-r--r-- 1 root root 12965 Sep 11 20:38 magic
-rw-r--r-- 1 root root 12965 Sep 11 20:38 magic.default
-rw-r--r-- 1 root root 12381 Sep 11 20:38 mime.types
-rw-r--r-- 1 root root 12381 Sep 11 20:38 mime.types.default
-rw-r--r-- 1 root root 41 Sep 12 13:45 php.ini
-rw-r--r-- 1 root root 29236 Sep 11 21:11 php.ini~
-rw-r--r-- 1 root root 357 Sep 11 20:38 srm.conf
-rw-r--r-- 1 root root 357 Sep 11 20:38 srm.conf.default
drwxr-xr-x 2 root root 4096 Sep 11 20:38 ssl.crl
drwxr-xr-x 2 root root 4096 Sep 11 20:38 ssl.crt
drwxr-xr-x 2 root root 4096 Sep 11 20:38 ssl.csr
drwx------ 2 root root 4096 Sep 11 20:38 ssl.key
drwxr-xr-x 2 root root 4096 Sep 11 20:38 ssl.prm
[root@www conf]#


I got this disks from the SAMS Teach Yourself RH Linux 8 in 24 Hours book.

Arrgggh! I am thinking of re-installing the entire server with my previous configuration that works and troubleshoot from there.

Regards
Edward Han
 
Old 09-12-2003, 07:17 AM   #35
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
[
I got this disks from the SAMS Teach Yourself RH Linux 8 in 24 Hours book.

Arrgggh! I am thinking of re-installing the entire server with my previous configuration that works and troubleshoot from there.

Regards
Edward Han [/B]
Do you mean that the previous install worked correctly incl php??
 
Old 09-12-2003, 07:21 AM   #36
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
Do you mean that the previous install worked correctly incl php??
Yes, the previous setup works as I can see phpinfo.php. I am now re-installing. Will get back once I have completed the installation. Will let you know the setup and if encounter any problem thereafter to see how to resolve my problems.

Regards
Edward Han
 
Old 09-12-2003, 07:25 AM   #37
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
Yes, the previous setup works as I can see phpinfo.php. I am now re-installing. Will get back once I have completed the installation. Will let you know the setup and if encounter any problem thereafter to see how to resolve my problems.

Regards
Edward Han
It's okay ..well I assume that I make a huge mistake here ...ahum
You might also contact me at my forums ...
 
Old 09-12-2003, 07:37 AM   #38
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
It's okay ..well I assume that I make a huge mistake here ...ahum
You might also contact me at my forums ...
Okay. Once I have completed the new setup, I will contact you at your forum.

Regards
Edward Han
 
Old 09-12-2003, 11:06 PM   #39
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Hi Dave

Okay. I have completed the re-installation and now the phpinfo is showing the detail when runs. I will continue to setup the database [mysql] and see if php can get info from mysql as the last time I was unable to do so. BTW, is there any way that I can test the link between php and mysql ? I have loaded in the php-mysql.

Regards
Edward Han
 
Old 09-13-2003, 04:16 AM   #40
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
Hi Dave

Okay. I have completed the re-installation and now the phpinfo is showing the detail when runs. I will continue to setup the database [mysql] and see if php can get info from mysql as the last time I was unable to do so. BTW, is there any way that I can test the link between php and mysql ? I have loaded in the php-mysql.

Regards
Edward Han
Hi Edward,

Sorry for the delay, but currently I'm trying to build a new server I just bought from somebody...it eats a lot of time...anyway:

Yes there is, but you should do this with php code, I asssume that the database is on the same machine ...

<?php
$ mysql_link = mysql_connect ("127.0.0.1", "mysqlusername", "mysqlpassword");
$ testresult = mysql_select_db ( "testdb" ,$mysql_link);
$query="select * test_table";
$ mysql_result = mysql_query ($query,$mysql_link);
if ( mysql_num_rows ($mysql_result)>0){
print "Yes I've found a matching row!";
}

Make a database named testdb
make a table in the database named test_table
In that table make a row with a name what ever you like, and put some data in it, it doesn't ,matter what kind of data (text)

Then run the php file and if it find data, it should say: Yes I've found a matching row!

The easyest way to manage a mysql database, is controll it by web. Download phpMyAdmin

Hope this helps
 
Old 09-13-2003, 06:18 AM   #41
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Hi

A few questions about MySQL that I have encountered problems now.

I have installed too many versions of mysql in my system like:

1. version 3.23.57 that comes with RH8.0
2. Install using rpm version 4.0.0-1
3. version 4.0.15

Now it is in a mess as I can't run it.

Before that, when I install 4.0.15, I tried to execute mysqladmin -u root password 'newpassword', it gave this error:

mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL Server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

So, can I remove all the versions of MySQL so that I can do a fresh installation ??

Thanks!

Regards
Edward Han
 
Old 09-13-2003, 06:42 AM   #42
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
Hi

A few questions about MySQL that I have encountered problems now.

I have installed too many versions of mysql in my system like:

1. version 3.23.57 that comes with RH8.0
2. Install using rpm version 4.0.0-1
3. version 4.0.15

Now it is in a mess as I can't run it.

Before that, when I install 4.0.15, I tried to execute mysqladmin -u root password 'newpassword', it gave this error:

mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL Server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

So, can I remove all the versions of MySQL so that I can do a fresh installation ??

Thanks!

Regards
Edward Han
Hmm actually I never had something like this before. But de-install them one by one and then install the lastest version of mysql by using rpm. Correct me if i'm wrong but ain't it possible to update a rpm package, so you'll never have more than one version within RH ?

Anyway ...before trying mysqladmin -u root password 'newpassword', start the database first with: mysqld_safe &
 
Old 09-13-2003, 08:54 PM   #43
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Hi

I have this weird problem when executing the php to access mysql. First of all, I have defined the path to mysql.sock to be at: /var/lib/mysql/mysql.sock but when I execute the php to link with the database, it keeps saying cannot connect as it cannot find the path to /tmp/mysql.sock .... why is this so? i have defined it in my.cnf. I tried to run the phpMyAdmin, it says the same thing.

Any idea?

Regards
Edward Han
 
Old 09-13-2003, 09:05 PM   #44
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
I was a bit confused myself, looked up the good word book:

Parse error: an error that manifests when miscommunications has occured between one or more parties, commonly occurs in marriages or similar situations.
 
Old 09-14-2003, 04:12 AM   #45
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
Hi

I have this weird problem when executing the php to access mysql. First of all, I have defined the path to mysql.sock to be at: /var/lib/mysql/mysql.sock but when I execute the php to link with the database, it keeps saying cannot connect as it cannot find the path to /tmp/mysql.sock .... why is this so? i have defined it in my.cnf. I tried to run the phpMyAdmin, it says the same thing.

Any idea?

Regards
Edward Han
Does the database run at all?
Please print the output of: ps aux |grep mysql
 
  


Reply



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
Parse Error, but why? Mistro116@yahoo.com Programming 2 11-13-2005 02:38 PM
in gcc compiler error: parse error before string constsnt cynthia_thomas Linux - Networking 1 10-20-2005 01:29 AM
parse error with bc fisayo Programming 7 08-04-2005 09:23 AM
Parse Error verbatim Programming 3 04-22-2005 09:16 AM
Parse Error in G++ ashwinipahuja Programming 1 04-29-2004 01:47 AM

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

All times are GMT -5. The time now is 03:30 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
Open Source Consulting | Domain Registration