HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   PHP Doesn't run when using rsync on mirror (http://www.howtoforge.com/forums/showthread.php?t=46525)

Toucan 13th June 2010 02:15

PHP Doesn't run when using rsync on mirror
 
--------------------------------------------------------------------------------

I have server A running lenny and server B set as a mirror.

I'm using rsync to copy all content.

Static content will serve fine on the mirror, but my joomla sites don't work correctly on server B.

I get this message:

Code:
Fatal error: Class 'JError' not found in /var/www/clients/client3/web21/web/libraries/joomla/factory.php on line 564I've eliminated database issues as this is before any attempts to connect to a database have been raised. I've literally just copied the installation files for test purposes which rsync then copies to server B and produces the above error.

It doesn't seem to be a PHP problem through and through as I've also beat rsync and copied the files there manually and everything works fine on server B.

So the question is, why does it not like the files that rsync copies, but handles the files I've copied as root just fine?

How do I overcome this please?

falko 13th June 2010 18:45

Was the second server set up exactly as the first one? Maybe a package is missing?
Are configurations (Apache, PHP) also exactly the same?

Toucan 13th June 2010 20:14

2 Attachment(s)
Both were built using the perfect server lenny guide although be it 6 months apart and one as a slave.

Attached is a copy of the phpinfo for each. There do seem to be some slight differences in the core settings?

Is this causing the problems?

Please see attached

till 15th June 2010 10:05

If it does not work when you use rsync but it works when the files were copied, then I see only 2 possible reasons:

1) The files have the wrong owner or permissions after the ywere synced with rsync.
2) Not all files got synced.

Please compare the files and permissions of a working copy and the rsynced copy.

Toucan 15th June 2010 10:23

Thanks Till, I did consider the permissions might be an issue. For test purposes I was going to use the command:

chmod -R 777 web

Then every file and directory in that tree should have read write and execute access eliminating that problem

Next, I guess a good test would be to copy the files across manually to ensure all are getting copied across.

I'll post the results back here.

till 15th June 2010 10:25

Quote:

Thanks Till, I did consider the permissions might be an issue. For test purposes I was going to use the command:

chmod -R 777 web
Thats not a good idea as access might get denied then to the files by apache for security reasons. You have to set the permissions exactly as on the other server.

Toucan 16th June 2010 19:21

Thanks, noted about the open permissions for apache.

I've tried a couple of sites now using the scp command to copy to the back up server and each site seems to work fine with this process.

When I use the scp command i'm doing it as root both on the master and slave.

When i set up rsync I created 'someuser' as per this guide
http://www.howtoforge.com/mirroring_with_rsync

So I guess you're right, it's either down to permissions, or rsync not copying all files. How do i determine which?


All times are GMT +2. The time now is 04:06.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.