PDA

View Full Version : Will someone please help?



Henry2630
24th July 2007, 07:22 PM
:confused: I've got a real problem and it's driving me nuts.

I have been threatening to move my Forum and Help Desk etc to a new machine for months now and finally the old box started giving real problems, so this is what I did.

Switched off the old box which was Fedora 5 and installed a new very fancy new box with the same IP address and same DNS name, but installed with Fedora 7. I did a yum update etc. No problems at all.

Then I switched the box off and booted up the old box - I gave the old box a new IP address and a new hostname and then fired up the new box and copied the MySQL Database from the old machine to the new one. Then I copied the cgi-bin which has my Help Desk Perl software (Trouble Ticket Express) and my Simple Machines Forum, and a website from oldmachine/var/www to newmachine/var/www into the same folders (cgi-bin, forum and html respectively.

Then I switched off the old box. BTW it died before I actually switched it off, so I was just in time!

If I go the http://newserver I get my website, If I go to http://newserver/cgi-bin/ttx.cgi, my Help Desk works 100%

BUT and here is where I am at a total loss. If I go to http://newserver/forum/index.php, I get a 404 Error "The webpage cannot be found".

I've been battling now for 2 whole days, the forum is down, not exactly a major emergency, but not nice (especially for me!). I'm sure it's something so simple and stupid, but I am tearing out my hair.

Can anyone PLEASE help? :confused:

InfRecursion
24th July 2007, 07:25 PM
Check your ownership and permissions of the forum directory... I assume it is:
/var/www/html/forum

In that case, post back with the results of this: ls -lastr /var/www/html/forum

Henry2630
24th July 2007, 07:45 PM
No, it's in /var/www/forum. The TT Express is in /var/www/cgi-bin and the website is in /var/www/html

Permissions on /var/www/forum is 777 (it was 755 but I changed it to see if it would help. Owner is root

Files inside the folder have been set according to Simple Machines and are the same as before on the old box.

Henry2630
24th July 2007, 07:48 PM
[root@ics ~]# ls -lastr /var/www/forum
total 660
64 -rwxr--r-- 1 root root 57681 2006-12-18 05:38 SSI.php
16 -rwxr-xr-x 1 root root 14650 2006-12-18 05:38 index.php
428 -rwxr--r-- 1 root root 430955 2006-12-18 05:38 changelog.txt
8 -rwxr--r-- 1 root root 5692 2006-12-18 05:38 ssi_examples.php
4 -rwxr--r-- 1 root root 4001 2006-12-18 05:38 license.txt
40 -rwxr--r-- 1 root root 40542 2006-12-18 05:38 install_1-1.sql
4 drwxrwxrwx 4 root root 4096 2007-01-30 11:53 Smileys
4 drwxrwxr-x 2 root root 4096 2007-01-30 11:53 Sources
4 drwxrwxrwx 5 root root 4096 2007-01-30 11:54 Themes
4 -rw-rw-rw- 1 root root 3785 2007-01-30 12:07 Settings.php~
4 -rwxrwxrwx 1 root root 3330 2007-01-30 12:31 agreement.txt
4 drwxrwxrwx 5 root root 4096 2007-01-30 12:33 avatars
4 -rwxrwxrwx 1 root root 3785 2007-02-03 11:30 Settings_bak.php
4 drwxrwxr-x 2 root root 4096 2007-02-13 07:04 documents
8 -rwxr--r-- 1 root root 5393 2007-02-13 18:46 ssi_examples.shtml
12 -rwxr--r-- 1 root root 8749 2007-02-13 18:46 readme.html
4 -rwxr--r-- 1 root root 2589 2007-02-13 18:46 news_readme.html
4 drwxrwxrwx 3 root root 4096 2007-02-13 23:35 Packages
4 drwxrwxrwx 2 root root 4096 2007-03-25 19:39 attachments
8 drwxrwxrwx 10 root root 4096 2007-07-23 14:44 ..
4 -rwxrwxrwx 1 root root 3791 2007-07-23 19:09 Settings.php
20 -rw-rw-r-- 1 root root 19638 2007-07-23 19:10 repair_settings.php
4 drwxrwxrwx 9 root root 4096 2007-07-23 19:13 .

pparks1
24th July 2007, 07:48 PM
Do you have php installed? Seems simple, but I've seen it before

rpm -q php

yum install php

Henry2630
24th July 2007, 07:48 PM
php-5.2.2-3

pparks1
24th July 2007, 07:53 PM
Have you changed the document root of apache to point to /var/www instead of /var/www/html?

If not, it would be looking for your page at /var/www/html/forum and not /var/www/forum

Henry2630
24th July 2007, 08:04 PM
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www"

lmo
24th July 2007, 08:29 PM
What does /var/www/forum/index.php do?
Does it reference another file that didn't get copied across which is causing the 404?

Remember, any php included files were probably somewhere else than /var/www and the php.ini says where.

pparks1
24th July 2007, 09:22 PM
if you just place a simply index.html file in /var/www/forum can you pull it up?

http://server/forum/index.html

Henry2630
24th July 2007, 09:24 PM
404 Page not found.

I haven't changed anything in PHP.INI. I checked that all the variables in the file were as per specified by Simple Machines. I haven't changed anything. I'm a Delphi programmer what I know about PHP isn't a lot!

Other than the Document root, I haven't changed anything in httpd.conf either.

Henry2630
24th July 2007, 09:28 PM
I copied the index.html from the website to the /var/www/forum. still get 404 whether I specify the index.html or not.

pparks1
24th July 2007, 09:30 PM
The problem seems to be apache then. If you cannot serve up a simply html page from this location...it's the web server.

Have you looked at the apache error logs to see what is being reported when you try to hit the index.html page that you were using for a test????

wintersm
24th July 2007, 09:36 PM
did you check to see if there was any configurations in the http config files for the web sites you are trying to use? It might be you need to check and copy some of the contents of /etc/httpd/conf.d/ on the old box..

InfRecursion
24th July 2007, 09:39 PM
how about this:

chown apache:apache /var/www/forum

lmo
24th July 2007, 09:41 PM
[root@ics ~]# ls -lastr /var/www/forum
total 660
64 -rwxr--r-- 1 root root 57681 2006-12-18 05:38 SSI.php
16 -rwxr-xr-x 1 root root 14650 2006-12-18 05:38 index.php
428 -rwxr--r-- 1 root root 430955 2006-12-18 05:38 changelog.txt
8 -rwxr--r-- 1 root root 5692 2006-12-18 05:38 ssi_examples.php
4 -rwxr--r-- 1 root root 4001 2006-12-18 05:38 license.txt
40 -rwxr--r-- 1 root root 40542 2006-12-18 05:38 install_1-1.sql
4 drwxrwxrwx 4 root root 4096 2007-01-30 11:53 Smileys
4 drwxrwxr-x 2 root root 4096 2007-01-30 11:53 Sources
4 drwxrwxrwx 5 root root 4096 2007-01-30 11:54 Themes
4 -rw-rw-rw- 1 root root 3785 2007-01-30 12:07 Settings.php~
4 -rwxrwxrwx 1 root root 3330 2007-01-30 12:31 agreement.txt
4 drwxrwxrwx 5 root root 4096 2007-01-30 12:33 avatars
4 -rwxrwxrwx 1 root root 3785 2007-02-03 11:30 Settings_bak.php
4 drwxrwxr-x 2 root root 4096 2007-02-13 07:04 documents
8 -rwxr--r-- 1 root root 5393 2007-02-13 18:46 ssi_examples.shtml
12 -rwxr--r-- 1 root root 8749 2007-02-13 18:46 readme.html
4 -rwxr--r-- 1 root root 2589 2007-02-13 18:46 news_readme.html
4 drwxrwxrwx 3 root root 4096 2007-02-13 23:35 Packages
4 drwxrwxrwx 2 root root 4096 2007-03-25 19:39 attachments
8 drwxrwxrwx 10 root root 4096 2007-07-23 14:44 ..
4 -rwxrwxrwx 1 root root 3791 2007-07-23 19:09 Settings.php
20 -rw-rw-r-- 1 root root 19638 2007-07-23 19:10 repair_settings.php
4 drwxrwxrwx 9 root root 4096 2007-07-23 19:13 .root@ics !
You are saying http://server

That is a completely different hostname.
ics != server

What is the output of
hostname
cat /etc/hosts
cat /etc/sysconfig/network
uname -a

Henry2630
24th July 2007, 10:57 PM
Have a cigar that man. NOW I remember, I had the same problem on the old box when I first installed the forum!!!

I even documented it and then forgot all about it. Your comment triggered the right synapses. Need to add the lines below to the httpd.conf file.

#To get the forum running
Alias /forum/ "/var/www/forum/"

<Directory "/var/www/forum">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Yippee! Thanks pal, you saved my bacon. Thanks also to everyone else who tried to help.

It WORKS - Eureka

wintersm
25th July 2007, 12:13 AM
no problem....

pparks1
25th July 2007, 12:53 AM
Thanks for letting us know that you got it resolved. One of the best things about Linux...and Fedora in particular...is the great forum and community support that we have here.