PHP Doesn't run when using rsync on mirror

Discussion in 'General' started by Toucan, Jun 13, 2010.

  1. Toucan

    Toucan Member


    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:

    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?
  2. falko

    falko Super Moderator ISPConfig Developer

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

    Toucan Member

    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

    Attached Files:

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
  5. Toucan

    Toucan Member

    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.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
  7. Toucan

    Toucan Member

    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

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

Share This Page