Softaculous


Topic : Installing APC on AMPPS


Posted By: madimar on December 29, 2013, 4:51 pm
Hi, I'm trying to install APC on AMPPS without complete success. I was able to add a precompiled apc.dll and set in php.ini.
Now php_info shows apc as enabled, but if a try to launch apc.php interface, the result is:
"No cache info available. APC does not appear to be running."
I suppose it is something related to Apache configuration but I can't sort it out. Could you please advise?
Thanks,
Max

Posted By: tidus on December 30, 2013, 8:09 am | Post: 1
Hi,

You can download PHP APC for PHP 5.3 from here


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: madimar on December 30, 2013, 8:48 am | Post: 2
Hi, I already donwloaded and installed apc under php and it is correctly shown in phpinfo.
On the other side, it seems Apache is not able to invoke it. If I check Apache configuration files it lists several *.so extensions but not apc one.

Regards,

M

Posted By: tidus on December 31, 2013, 6:32 am | Post: 3
Hi,

It is not related to Apache.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: madimar on December 31, 2013, 6:40 am | Post: 4
Hi, thank you for your constructive answers. I found the solution to all my issues  with ampps and Webuzo.
I switched to xampp for my local environment and cpanel for production ones.  Now I don't have issues anymore and a better support. 
Thanks for all.
M

Posted By: alons on January 2, 2014, 12:01 pm | Post: 5
Quote From : madimar December 31, 2013, 6:40 am
Hi, thank you for your constructive answers. I found the solution to all my issues  with ampps and Webuzo.
I switched to xampp for my local environment and cpanel for production ones.  Now I don't have issues anymore and a better support. 
Thanks for all.
M


Sir, I guess you just needed to add the apc extension in your httpd.conf
If you can give us the TeamViewer view, we will help you out sir.

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP

Posted By: madimar on January 2, 2014, 12:05 pm | Post: 6
If it is just a matter of httpd.conf modification, could you please simply tell me what to do?

Thanks,

M

Posted By: tidus on January 2, 2014, 1:13 pm | Post: 7
Hi,

It is not related to Apache. Can you give me a snippet of your code we will try to run it on our machine and provide you the proper solution.

Also Try the following :

1. Change to PHP Version 5.3 in Ampps.
2. Download this php_apc.dll. Copy the one in the "ts" folder and replace it with Ampps/php/ext/php_apc.dll
3. Add the following Lines in the end of AMPPS Application -> PHP Tab -> Configuration
Code

[apc]
apc.cache_by_default = 1
apc.canonicalize = 1
apc.coredump_unmap = 0
apc.enable_cli = 1
apc.enabled = 1
apc.file_md5 = 0
apc.file_update_protection = 2
;apc.filters =
apc.gc_ttl = 3600
apc.include_once_override = 0
apc.lazy_classes = 0
apc.lazy_functions = 0
apc.max_file_size = 0
;apc.mmap_file_mask =
apc.num_files_hint = 1000
;apc.preload_path =
apc.report_autofilter = 0
apc.rfc1867 = 0
apc.rfc1867_freq = 0
apc.rfc1867_name = APC_UPLOAD_PROGRESS
apc.rfc1867_prefix = upload_
apc.rfc1867_ttl = 3600
apc.serializer = default
apc.shm_segments = 1
apc.shm_size = 128M
apc.slam_defense = 1
apc.stat = 1
apc.stat_ctime = 0
apc.ttl = 0
apc.use_request_time = 1
apc.user_entries_hint = 4096
apc.user_ttl = 0
apc.write_lock = 1


Note: The increased memory apc.shm_size = 128M

4. Confirm in AMPPS application -> PHP Tab -> PHP Extension that php_apc.dll is enabled. Check it if its not enabled.

5. Restart Apache.



Edited by tidus : January 2, 2014, 1:15 pm

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: tidus on January 2, 2014, 1:30 pm | Post: 8
Hi,

Please find the attached screenshot of the output of apc.php.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: clau on March 28, 2014, 5:25 pm | Post: 9
How to enable APC for PHP 5.4. AMPPS is on OS X.

Posted By: tidus on March 29, 2014, 5:19 am | Post: 10
Quote From : clau March 28, 2014, 5:25 pm
How to enable APC for PHP 5.4. AMPPS is on OS X.


Do you have xcode installed ?


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: clau on March 29, 2014, 8:33 am | Post: 11
Quote From : tidus March 29, 2014, 5:19 am

Do you have xcode installed ?

Yes

Posted By: tidus on March 29, 2014, 9:51 am | Post: 12
Hi,

1. Extract source of extension


2. cd path/to/src


3. /Applications/AMPPS/php/bin/phpize


4. LDFLAGS=-L/Applications/AMPPS/extra/lib
CPPFLAGS=-I/Applications/AMPPS/extra/include CFLAGS=-m32 ./configure
--enable-FEATURES


Note: you can check ./configure --help for more options.

5. sudo make


6. sudo make install





-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: GuyVerville on October 5, 2014, 5:18 pm | Post: 13
I have tried to install on my Mac with your instructions, but to no avail. I got several errors when calling "sudo make"

Quote
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:62:20: error: no member named 'Ts' in 'struct _zend_execute_data'
            return APC_EX_T(node->var).var.ptr;
                  ^~~~~~~~~~~~~~~~~~~
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:51:86: note: expanded from macro 'APC_EX_T'
#define APC_EX_T(offset)                    (*(temp_variable *)((char*)execute_data->Ts + offset))
                                                                      ~~~~~~~~~~~~  ^
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:64:33: error: no member named 'Ts' in 'struct _zend_execute_data'
            return (*freeval = &APC_EX_T(node->var).tmp_var);
                                ^~~~~~~~~~~~~~~~~~~
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:51:86: note: expanded from macro 'APC_EX_T'
#define APC_EX_T(offset)                    (*(temp_variable *)((char*)execute_data->Ts + offset))
                                                                      ~~~~~~~~~~~~  ^
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:67:42: error: no member named 'CVs' in 'struct _zend_execute_data'
            zval ***ret = &execute_data->CVs[node->var];
                          ~~~~~~~~~~~~  ^
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:170:29: error: no member named 'Ts' in 'struct _zend_execute_data'
            ALLOC_INIT_ZVAL(APC_EX_T(opline->result.var).var.ptr);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:51:86: note: expanded from macro 'APC_EX_T'
#define APC_EX_T(offset)                    (*(temp_variable *)((char*)execute_data->Ts + offset))
                                                                      ~~~~~~~~~~~~  ^
/Applications/AMPPS/php-5.5/include/php/Zend/zend.h:748:13: note: expanded from macro 'ALLOC_INIT_ZVAL'
        ALLOC_ZVAL(zp);        \
                  ^
/Applications/AMPPS/php-5.5/include/php/Zend/zend_gc.h:206:4: note: expanded from macro 'ALLOC_ZVAL'
                (z) = (zval*)emalloc(sizeof(zval_gc_info));            \
                ^
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:170:29: error: no member named 'Ts' in 'struct _zend_execute_data'
            ALLOC_INIT_ZVAL(APC_EX_T(opline->result.var).var.ptr);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:51:86: note: expanded from macro 'APC_EX_T'
#define APC_EX_T(offset)                    (*(temp_variable *)((char*)execute_data->Ts + offset))
                                                                      ~~~~~~~~~~~~  ^
/Applications/AMPPS/php-5.5/include/php/Zend/zend.h:748:13: note: expanded from macro 'ALLOC_INIT_ZVAL'
        ALLOC_ZVAL(zp);        \
                  ^
/Applications/AMPPS/php-5.5/include/php/Zend/zend_gc.h:207:16: note: expanded from macro 'ALLOC_ZVAL'
                GC_ZVAL_INIT(z);                                                                \
                            ^
/Applications/AMPPS/php-5.5/include/php/Zend/zend_gc.h:64:19: note: expanded from macro 'GC_ZVAL_INIT'
        ((zval_gc_info*)(z))->u.buffered = NULL
                        ^
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:170:29: error: no member named 'Ts' in 'struct _zend_execute_data'
            ALLOC_INIT_ZVAL(APC_EX_T(opline->result.var).var.ptr);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:51:86: note: expanded from macro 'APC_EX_T'
#define APC_EX_T(offset)                    (*(temp_variable *)((char*)execute_data->Ts + offset))
                                                                      ~~~~~~~~~~~~  ^
/Applications/AMPPS/php-5.5/include/php/Zend/zend.h:749:13: note: expanded from macro 'ALLOC_INIT_ZVAL'
        INIT_ZVAL(*zp);
                  ^
/Applications/AMPPS/php-5.5/include/php/Zend/zend.h:745:22: note: expanded from macro 'INIT_ZVAL'
#define INIT_ZVAL(z) z = zval_used_for_init;
                    ^
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:171:23: error: no member named 'Ts' in 'struct _zend_execute_data'
            ZVAL_TRUE(APC_EX_T(opline->result.var).var.ptr);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/guyverville/Downloads/APC-3.1.9/APC-3.1.9/apc_zend.c:51:86: note: expanded from macro 'APC_EX_T'
#define APC_EX_T(offset)                    (*(temp_variable *)((char*)execute_data->Ts + offset))
                                                                      ~~~~~~~~~~~~  ^
/Applications/AMPPS/php-5.5/include/php/Zend/zend_API.h:615:38: note: expanded from macro 'ZVAL_TRUE'
#define ZVAL_TRUE(z)                                    ZVAL_BOOL(z, 1)
                                                                  ^
/Applications/AMPPS/php-5.5/include/php/Zend/zend_API.h:553:16: note: expanded from macro 'ZVAL_BOOL'
                zval *__z = (z);

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.