1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP 5.4 and APC

Discussion in 'General PHP and MySQL Discussions' started by Moshe1010, Jun 8, 2013.

  1. Moshe1010

    Moshe1010 Well-Known Member

    Since the stable version (3.1.9) doesn't work with PHP 5.4 (gives segmentation fault while trying to run php command on the server), is their any problem runnning APC 3.1.13 Beta with PHP 5.4?

    Thanks.
     
  2. CyclingTribe

    CyclingTribe Well-Known Member

    I'm using 3.1.13 with PHP 5.4.11 and the only issue I had was with apc.stat - I had to keep it set to the default value of 1 (check all files for changes each time they're requested).
     
  3. xf_phantom

    xf_phantom Well-Known Member

    Drop APC and use Zend Optimizer:D
     
    digitalpoint and akia like this.
  4. Moshe1010

    Moshe1010 Well-Known Member

    Yes, apc.stat is 1 at my server.
    I have a lot Fragmentation (12%), but I guess it's because of my crappy Wordpress. Is there a way to separate APC from different domains on the same VPS? I mean, showing different stats for each on of my domains on the server.
     
  5. Moshe1010

    Moshe1010 Well-Known Member

    What are the advantages? I read many good reviews on XCache or APC + memcached, but I'm not sure if memcached has any advantage for a relatively small boards with 500K posts/2000 visits a day/850MB SQL
     
  6. Teapot

    Teapot Well-Known Member

    Here's a good overview of the relative merits straight from the horse's mouth: https://wiki.php.net/rfc/optimizerplus

    Notably:

     
  7. Moshe1010

    Moshe1010 Well-Known Member

  8. BamaStangGuy

    BamaStangGuy Well-Known Member

    With Zend Optimizer Plus, is their an admin area like in xcache and APC?
     
  9. Arantor

    Arantor Active Member

    Considering that it's an opcode cache only, it doesn't do data caching (unlike APC which does), it would seem that no configuration is actually needed...
     
  10. Moshe1010

    Moshe1010 Well-Known Member

    If I would like Zend Optimizer+ to do data caching, would the configuration be on the server level or XF level (config.php? or anything else) or both?
     
  11. Jeremy P

    Jeremy P Well-Known Member

    ZO+ doesn't offer data caching period.
     
  12. Moshe1010

    Moshe1010 Well-Known Member

    So how does it better/faster than APC? I saw the benchmarks on PHP website that shows 5-20% improvement over APC. Is that with data caching disabled?
     
  13. Jeremy P

    Jeremy P Well-Known Member

    It's an opcode cache, not a data cache. It's opcode cache is better than APCs.
     
  14. Moshe1010

    Moshe1010 Well-Known Member

    So the question is how the benchmark would look like if APC would work with data cache and opcode versus ZO+ with opcode cache alone. Are there any benchmarks like that somewhere?
     
  15. Jeremy P

    Jeremy P Well-Known Member

    Not that I know of but you can use something like memcached for data cache and ZO+. No reason to sacrifice data cache just for ZO+.

    I personally use Redis for data caching in PHP apps but XenForo doesn't support this in the core (yet).
     
  16. Moshe1010

    Moshe1010 Well-Known Member

    memcached should be configured on the server level or/and Xenforo level? I saw some lines that are one should add to the config.php file once memcached installed, but other then that, is there anything else?

    I guess data cache isn't relevant for small boards? (500K posts)?
     
  17. Jeremy P

    Jeremy P Well-Known Member

    Your server must be running http://memcached.org/ and you'd need the PHP extension (IIRC) but once you have that, just change the config.php.

    And it's relevant I'd say. Should still speed things up a bit.
     
    Moshe1010 likes this.
  18. BamaStangGuy

    BamaStangGuy Well-Known Member

    xf_phantom likes this.
  19. Moshe1010

    Moshe1010 Well-Known Member

    I'm a little bit confused. If I would like to install ZO+ on my server, do I need to install Zend Guard first and then ZO+?
     
  20. Moshe1010

    Moshe1010 Well-Known Member

    OK, I got it. ZO+ is only for php 5.2, 5.3 and currently 5.5 (beta/alpha). If you have PHP 5.4 on your server, it's recommended to use Zend Guard instead, which sucks most of the time.

    It looks like APC 3.1.13 isn't stable with PHP 5.4, but I'm not sure if it's a local problem on my server due to configuration or something that other people experience.
     

Share This Page