Announcement

Collapse
No announcement yet.

Anyone tried OwnCloud?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SteveRiley
    replied
    Hm. OwnCloud appears to ship with its own version of that.

    Please:
    Code:
    sudo apt-get install pastebinit
    
    diff -y --suppress-common-lines /usr/share/doc/php-apc/apc.php /home/pi/owncloud/lib/cache/apc.php | pastebinit
    Let me know the URL that appears after running the second line so that I can take a look.

    Leave a comment:


  • Feathers McGraw
    replied
    Yep.

    Code:
    pi@owncloud ~ $ sudo locate apc.php
    /home/pi/owncloud/lib/cache/apc.php
    /usr/share/doc/php-apc/apc.php
    /var/www/lib/cache/apc.php
    The first is just from where I extracted owncloud before moving it when I installed.

    Feathers

    Leave a comment:


  • SteveRiley
    replied
    Hey...check something. Are there any other copies of apc.php anywhere in your filesystem?

    Code:
    sudo apt-get install mlocate
    sudo updatedb
    sudo locate apc.php

    Leave a comment:


  • SteveRiley
    replied
    There is a Clear opcode Cache button on the page after you log in.

    TBH, I have not spent a lot of time investigating the innards of APC. As is usually the case, if you want to learn more, Google is your friend.

    Leave a comment:


  • Feathers McGraw
    replied
    Yeah, I had to remove it and restart (to clear the cache, is there an easier way to clear the cache?).

    Feathers

    Leave a comment:


  • SteveRiley
    replied
    Presumably, completely removing /var/www/apc.php fixes OwnCloud, right?

    Might need to create a separate virtual server for this in Apache.

    Leave a comment:


  • Feathers McGraw
    replied
    I'm not sure, it could have been a coincidence. But that's what I suspect.

    Owncloud didn't reject my login in the normal sense, it just couldn't show me the index page (or any other page that would require a login) because of those redirect loop errors.

    Feathers

    Leave a comment:


  • SteveRiley
    replied
    Are you saying that the presence of apc.php broke your ability to log into the OwnCloud interface?

    Leave a comment:


  • Feathers McGraw
    replied
    Oh and it was asking me to log in again to begin with. I cleared the cookies from my browser thinking that might help but apparently not!

    Leave a comment:


  • SteveRiley
    replied
    That is really weird. OwnCloud might be changing the default behavior of Apache in some way that I'm not familiar with.

    I'll have to ponder this one for a bit and get back to you.

    Leave a comment:


  • Feathers McGraw
    replied
    That's a cool feature.

    I tried it out, but when I tried to log in to owncloud I got an infinite redirect loop error. Removed apc.php to apc.php.BAK and the next time I tried to access the page (just to check it was gone) I downloaded the source... complete with the password I had chosen!! I guess that was apc caching the file?

    Restarting apache didn't stop the redirect problem, but a reboot did. I guess that might have had something to do with a cached version of the index page too, as rebooting will have cleared the RAM?

    Feathers

    Leave a comment:


  • SteveRiley
    replied
    Originally posted by Feathers McGraw View Post
    Where does the PHP cache store pages that have already been compiled? In RAM, or in a temp file on the hard drive?
    In RAM.

    Want to see something interesting? Do this.

    1. Run
    Code:
    cp /usr/share/doc/php-apc/apc.php /var/www/apc.php
    2. Open /var/www/apc.php in your favorite editor. Find the line:
    Code:
    defaults('ADMIN_PASSWORD','password');
    And change password to a password of your choice. Save your change and exit the editor.

    3. Now browse to http://your-server/apc.php. Look at the stats and pretty graphs that show you cache hits and misses. In another browser tab, go do some stuff in OwnCloud. Then come back and click the Refresh Data button. Click around the other buttons to see the compiled objects that are cached and how often they're used. Now remember: before you installed APC, Apache had to recompile each object every single time your browser requested it.

    4. Want more? In the upper right corner, click the Login button. Now login in, with the user apc and the password you placed in the file in step #2. Now you can see full paths of the objects and you'll have another button with yet more data.

    NOTE: if you don't see graphs, then install the PHP GD module:
    Code:
    sudo apt-get install php5-gd
    Last edited by SteveRiley; Oct 14, 2013, 12:20 AM.

    Leave a comment:


  • Feathers McGraw
    replied
    I see. That makes sense, the sync always seemed much faster than the web interface.

    Where does the PHP cache store pages that have already been compiled? In RAM, or in a temp file on the hard drive?

    Feathers

    Leave a comment:


  • SteveRiley
    replied
    Originally posted by Feathers McGraw View Post
    I don't really understand the inner workings of ownCloud, is PHP only used when you log in on a web browser, or will the cache affect the desktop sync client too?
    All of the code for OwnCloud's browser-based activity is written entirely in PHP, a language designed specifically for server-side processing. Pages that require the server to process a ton of PHP will perform more slowly, because the browser has to wait for the server to compile each page.

    OwnCloud's sync is different. Their client is based on CSync and Mirall, both of which are compiled binaries. Mirall is the notifier that sits in your system tray; CSync is the backend synchronization mechanism. While there is a little PHP code that manages the server-side syncing process, that code is not doing the major heavy lifting of the actual sync process. Adding APC won't speed up your syncs.

    Leave a comment:


  • Feathers McGraw
    replied
    I'll definitely be remembering php-apc!

    I don't really understand the inner workings of ownCloud, is PHP only used when you log in on a web browser, or will the cache affect the desktop sync client too?

    Will consider switching to Sqlite. The main objective of all the tinkering is to learn, not because I really need 500GB of stuff in the cloud! In fact, I probably don't need 500GB of stuff at all.

    As for Nginx... someday! I'm just starting to get my head around how Apache is configured, it was pretty daunting at first. Would love to learn how to use Nginx but I'd like to be in a position where I know enough about Apache to be able to make a meaningful comparison between the two.

    Feathers

    Leave a comment:

Users Viewing This Topic

Collapse

There are 0 users viewing this topic.

Working...
X