XCache packages updated to 1.2.1

July 3, 2007 by · 27 Comments 

Now that the final version of XCache 1.2.1 has been released I've updated the binaries in my repositories to the newest version. This update fixes several bugs including segfaulting when using the var cache functions when the var cache is disabled and improves compatibility with Apache httpd 1.3.x and the Zend Optimizer.

Repository users will need to run a 'yum update' to pull down this package. Please note that the config file has changed somewhat so I've set this package to rename your old 'xcache.ini' file to 'xcache.ini.rpmsave'.

The new config file has updated default settings (my defaults, not the developer's) that seem to work well for most of my sites. Copying, rather than overwriting, will allow you to manually copy over anything you changed in the old config (don't forget to copy over your MD5'd password so that you can use the admin panel). I've also enabled TTL (1 hour) and the garbage collector (every 5 minutes) by default because I know that some of the users of this package are simply increasing the size of the cache when they reach an OOM condition even though that's not necessarily the optimal solution, particularly for a VPS environment (which many of your are using).

Update (9/24/2009): Packages deleted, use the yum repository instead.

Comments

27 Responses to “XCache packages updated to 1.2.1”
  1. Sychev says:

    Hello Jason,
    I have a question for you. I am a complete noob when it comes to installing and managing servers. What are the steps that have to be taken in order to install this rpm through cpanel? is it even possible?
    Thank you

  2. Jason says:

    @Sychev,

    Sorry, but I don't provide any support for using my packages on CPanel systems because that idiotic piece of software compiles httpd, php, etc. from source rather than using RPMs. I would suggest that you download the source tarball for 1.2.1 from the main XCache site and then compile using the directions at the link below.

    http://www.jasonlitka.com/2007/01/30/how-to-compiling-xcache-from-source/

  3. linuxamp says:

    Rebuilt on CentOS 5 PHP 5.1.6 in 4 easy steps.

    rpm -qp --requires php-xcache-1.2.1-jason.1.src.rpm
    yum install php-devel autoconf automake libtool
    rpmbuild --rebuild php-xcache-1.2.1-jason.1.src.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/php-xcache-5.1.6_1.2.1-jason.1.i386.rpm

    Vast improvement in page load time. Thanks!

  4. Ken Savage says:

    What about Plesk8? Is it as bad as CPanel?

  5. Jason says:

    @Ken,

    Nope, I'm actually a pretty big fan of Plesk. While it is a bit bloated, it is by far the most compatible panel I've found when it comes to replacing httpd/php/mysql. The only problem that I know of that you might encounter is if you're using Tomcat w/ Plesk as it requires an httpd module that will no longer work.

  6. Jcink says:

    Hello,

    I don't know if this is the right place to ask for help, so I apologize for doing it here, but I'm unable to post at vBulletin because I don't have a license I think (I don't use vB). I really some need help as I'm not sure what I'm doing wrong and was hoping you could point me in the right direction if possible. Idea of my system:

    Centos 4, php 4.3.9, apache 2 no cpanel no nothing. this is all stock stuff straight from the CD. I installed your RPM file without any problems, all your default settings, except I can't tell at all if this is working or not. I tried to go to the administration section and this is what I see (static html i copied and pasted:)

    http://s1.jcink.com/temp/xcache.html

    Visiting pages like phpmyadmin and whatnot, nothing comes up in there. everything is just not showing up like it does in the normal pictures.

    I googled, and read the forums, maybe I'm missing something, but this is a weird problem. This isn't supposed to happen, is it? Nothing shows up. But, phpinfo(); and php -v definitely see it's installed... thanks a lot for this RPM and any assistance you can give me with it.

  7. Jason says:

    @Jcink,

    I do not offer an XCache RPM for PHP 4.3.9. If you installed it then that is your problem. If you actually meant that you installed my src.rpm and then built a binary package then please continue reading.

    Try changing the mmap_path to something like '/tmp/xcache' and then turning readonly_protection on. If that doesn't help, you may want to try XCache version 1.0.3 instead. It's end-of-life but may offer better compatibility with PHP versions that old.

    You might also try checking your httpd error_log for any messages that correspond to your blank pages.

  8. Jcink says:

    Hi, thanks for the reply.

    I think I was unclear when I said nothing comes up, sorry. What I meant by that was that, while it shows that it's loaded, the administration page is showing nothing. All of my PHP pages are displaying fine, but the admin page looks nothing like other peoples, where it shows the little image bar, what's cached, and all that.

    None of that comes up, as you can see in the link.

    So, I can't tell if this is working...

    No errors come out on that page, nor in my logs, checked both.

    I meant that I installed your src.rpm from here, because it said "(I've tested the src.rpm with my PHP 5.1.6 and 5.2.0 tutorials, as well as the stock 4.3.9 install for CentOS 4.)"... and that is exactly what I have, stock install for 4.3.9. That's what I meant by that. So I don't know why it's not working.

    http://www.jasonlitka.com/2006/12/20/php-caching-and-acceleration-with-xcache/

    Maybe just the administration section isn't working. Is there any other way to verify what's wrong? Also I already tried the /tmp/xcache thing, but it didn't work.

    Thanks

  9. Jason says:

    @Jcink,

    After you installed the src.rpm, you did build it into a binary package and then install that as well, correct? If so, I'd again suggest that you try 1.0.3 instead as 1.2.x was really designed for PHP 5.x.

  10. Corman says:

    To install this on CentOS4 with Plesk 8.2 I did the following:

    wget http://www.jasonlitka.com/media/files/SRPMS/php-xcache-1.2.1-jason.1.src.rpm
    rpm -qp --requires php-xcache-1.2.1-jason.1.src.rpm
    yum install php-devel autoconf automake libtool
    rpmbuild --rebuild php-xcache-1.2.1-jason.1.src.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/php-xcache-5.2.3_1.2.1-jason.1.i386.rpm

    Took me days to figure out what to type. But I think I did it 🙂

    Thanks Jason!

  11. Ken Savage says:

    Damn Corman, I seem to haev the same setup as you and I tripped up on the rpmbuild part.

    I got this error when running you 4th line:

    -bash: rpmbuild: command not found

    any ideas?

  12. Ken Savage says:

    hmmmmm maybe I should have run this first:

    yum install rpm-build

    ^--- IDIOT

  13. Jason says:

    @Corman & Ken,

    This link may also help you out if you're having permission issues.

    http://www.jasonlitka.com/2007/05/21/setting-up-an-rpm-build-environment/

  14. Corman says:

    Just to let everyone know, I had just purchased a new Plesk 8.3 server and did exactly what I had done before (above) and it works great - AGAIN 🙂

    To install this on CentOS4 with Plesk 8.2 I did the following:

    wget http://www.jasonlitka.com/media/files/SRPMS/php-xcache-1.2.1-jason.1.src.rpm
    rpm -qp --requires php-xcache-1.2.1-jason.1.src.rpm
    yum install php-devel autoconf automake libtool
    rpmbuild --rebuild php-xcache-1.2.1-jason.1.src.rpm
    rpm -ivh /usr/src/redhat/RPMS/i386/php-xcache-5.2.3_1.2.1-jason.1.i386.rpm

  15. paul says:

    hi there jason, jcink & corman,

    i am currently running on PHP Version 4.4.0 which is i believe a stock php from the fedora 3 distro. i was wondering if i can use the same methods to do the installation as jcink or corman have described.

  16. Jason says:

    @paul,

    The source rpm I've provided should work for you using the procedure Corman posted. If you run into trouble you can always build from source.

  17. paul says:

    http://download.fedoraproject.org/pub/fedora/linux/core/updates/3/i386/gcc-c++-3.4.4-2.fc3.i386.rpm: [Errno 4] IOError: HTTP Error 404: Not Found
    Trying other mirror.
    Error: failure: gcc-c++-3.4.4-2.fc3.i386.rpm from updates-released: [Errno 256] No more mirrors to try.

    hi there jason, jcink & corman,

    i tried the method corman posted but this is the failure response when i do a
    > yum install php-devel autoconf automake libtool

    What should i do now? feeling like a total lost sheep. please advice

  18. Jason says:

    @paul,

    Are updates still provided for FC3? I think most mirrors have removed the files for that version since it's so old. Your best bet for those updates is going to be to find a mirror that still has them and then to specify that site in your repos file so that it doesn't use the mirror list script.

  19. paul says:

    i did a direct download from the fc3 website, i uploaded rpm to the server but i am not sure what to do next? Is it possible to point the yum repos to a local folder? or what do you suggest?

  20. paul says:

    hi there fellas, i did a manual update of the repository files and got that step correct. I went on to finish the steps and i guess i successfully installed xcache on an FC3!

    Hmm... how do i check for a successful install? Do i need to restart httpd?

  21. Jason says:

    @paul,

    If you manually downloaded some RPMs you can install them by running "rpm -Uvh filename1 filename2 ...".

    As to checking to see if XCache is working, once you restart httpd you should see an "XCache" section in your phpinfo().

  22. paul says:

    No worries with the downloaded rpms, i added new repos : )

    i am working on a custom apache build, got my apache not working after i restarted httpd. Then had to upgrade to Apache2 which is good haha but right now it seems that xcache cannot be found on php info.

    Currently on Apache 2.0.63 & php 4.4.8.

    viewing the xcache directory gives me this
    XCache is not loaded
    Please check /usr/local/lib/php.ini

    Tried running the rpms again but it gave me a php needed error

  23. paul says:

    just upgraded to php 5.2.4...

  24. Jason says:

    @paul,

    Did you create an xcache.ini file with the XCache settings or did you add them directly to your php.ini? If the former, make sure that the separate file is being parsed (additional ini files are shown near the top of your phpinfo()). If the latter, make sure that you edited the correct php.ini (the path for the file is given at the top of your phpinfo()).

  25. paul says:

    hey jason, i have to thank you for being nice & patient to try help me installing xcache.
    Anyway i did not create a new xcache.ini file nor did i add anything to the php.ini. The xcache.ini was created along with the installtion.

    After reading the docs at http://xcache.lighttpd.net/wiki/InstallingAsPhpExtension
    I tried to do this

    # cat xcache.ini >> /etc/php.ini (changed to the correct directory as stated in PHP info)
    # vi /etc/php.ini
    and edited the default password & username

    restarted apache, got php -v
    with this error

    Failed loading /usr/local/lib/php/extensions/no-debug-non-zts-20020429/xcache.so:

    checked my apache log. it has the same error as well.
    Failed loading /ur/local/lib/php/extensions/no-debug-non-zts-20020429/xcache.so:

    Anyway apache worked fine, just that xcache is not working.
    I tried to locate the xcache.so file, it is there physically.

  26. paul says:

    great news! i finally got xcache working! I uninstall the previous xcache package with an rpm -e php-xcache which was installed with php 4.4.8.

    I reinstall the packages with --nodeps and appended the xcache.ini to php.ini file, restarted my httpd and voila!! haha hey jason many thanks for this package! Great Stuff!

  27. Justin says:

    I am trying to use your xcache src.rpm. I am running CentOS 5.2 with lighttpd and php 5.1.6 ONLY php-cli. I don't have the main php package installed, as I don't need it, and it requires installing httpd (apache), again don't want apache.

    The problem is that it appears I need php-devel, but when I try to install php-devel with yum, yum wants to install the main php package, and therefore requires httpd (apache). Is there anyway around this, or do I need to just bite the bullet and install php-devel, php, and httpd (apache) even though I won't be using apache.

    Thanks very much.

This site is no longer updated. If you have a need for RHEL/CentOS LAMP Stack updates outside the normal channels, I recommend ART. https://updates.atomicorp.com/channels/