logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$25
What is the path for Pecl on a Mac?

My first time working with Symfony2. I am at a company with an old, large Symfony2 project. I am setting things up to run locally on a Mac.

I run:

php admin/app/check.php

and get this error:

[[ ERROR ]] Checking that the APC version is at least 3.0.17: FAILED
*** Upgrade your APC extension (3.0.17+) ***
You must fix this problem before resuming the check.

but if I do this:

sudo pecl install apc

I get:

pecl/apc is already installed and is the same as the released version 3.1.13
install failed

I am going crazy with this.

Full transcript below.


12:13:48 : bonsai $ php admin/app/check.php
********************************
* *
* Symfony requirements check *
* *
********************************

php.ini used by PHP: /etc/php.ini

** WARNING **
* The PHP CLI can use a different php.ini file
* than the one used with your web server.
* If this is the case, please ALSO launch this
* utility from your web server.
** WARNING **

** Mandatory requirements **

OK Checking that PHP version is at least 5.3.2 (5.4.15 installed)
OK Checking that the "date.timezone" setting is set
OK Checking that app/cache/ directory is writable
OK Checking that the app/logs/ directory is writable
OK Checking that the json_encode() is available
OK Checking that the SQLite3 or PDO_SQLite extension is available
OK Checking that the session_start() is available
OK Checking that the ctype_alpha() is available

** Optional checks **

OK Checking that the PHP-XML module is installed
OK Checking that the libxml version is at least 2.6.21
OK Checking that the token_get_all() function is available
OK Checking that the mb_strlen() function is available
OK Checking that the iconv() function is available
OK Checking that the utf8_decode() is available
OK Checking that the posix_isatty() is available


[[WARNING]] Checking that the intl extension is available: FAILED
*** Install and enable the intl extension (used for validators) ***


[[WARNING]] Checking that a PHP accelerator is installed: FAILED
*** Install a PHP accelerator like APC (highly recommended) ***


[[ ERROR ]] Checking that the APC version is at least 3.0.17: FAILED
*** Upgrade your APC extension (3.0.17+) ***
You must fix this problem before resuming the check.
12:29:41 : bonsai $
12:35:19 : bonsai $
12:35:19 : bonsai $
12:35:19 : bonsai $ find . -name "params.sh" -type f
12:35:41 : bonsai $ find . -name "params.sh"
12:35:57 : bonsai $
12:55:11 : bonsai $
12:55:12 : bonsai $
12:55:12 : bonsai $
12:55:12 : bonsai $
12:55:12 : bonsai $
12:55:16 : bonsai $
12:55:16 : bonsai $
12:55:16 : bonsai $ php admin/app/check.php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/apc.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/apc.so, 9): image not found in Unknown on line 0
********************************
* *
* Symfony requirements check *
* *
********************************

php.ini used by PHP: /etc/php.ini

** WARNING **
* The PHP CLI can use a different php.ini file
* than the one used with your web server.
* If this is the case, please ALSO launch this
* utility from your web server.
** WARNING **

** Mandatory requirements **

OK Checking that PHP version is at least 5.3.2 (5.4.15 installed)
OK Checking that the "date.timezone" setting is set
OK Checking that app/cache/ directory is writable
OK Checking that the app/logs/ directory is writable
OK Checking that the json_encode() is available
OK Checking that the SQLite3 or PDO_SQLite extension is available
OK Checking that the session_start() is available
OK Checking that the ctype_alpha() is available

** Optional checks **

OK Checking that the PHP-XML module is installed
OK Checking that the libxml version is at least 2.6.21
OK Checking that the token_get_all() function is available
OK Checking that the mb_strlen() function is available
OK Checking that the iconv() function is available
OK Checking that the utf8_decode() is available
OK Checking that the posix_isatty() is available


[[WARNING]] Checking that the intl extension is available: FAILED
*** Install and enable the intl extension (used for validators) ***


[[WARNING]] Checking that a PHP accelerator is installed: FAILED
*** Install a PHP accelerator like APC (highly recommended) ***


[[ ERROR ]] Checking that the APC version is at least 3.0.17: FAILED
*** Upgrade your APC extension (3.0.17+) ***
You must fix this problem before resuming the check.
12:55:21 : bonsai $ brew install autoconf
Warning: Your Xcode (4.6) is outdated
Please install Xcode 4.6.2.
Warning: autoconf-2.69 already installed
13:28:58 : bonsai $ autoconf
autoconf: error: no input file
13:29:12 : bonsai $ brew install pcre
Warning: Your Xcode (4.6) is outdated
Please install Xcode 4.6.2.
Warning: pcre-8.32 already installed
13:29:12 : bonsai $
13:29:12 : bonsai $ sudo pecl install apc
Password:
pecl/apc is already installed and is the same as the released version 3.1.13
install failed
13:29:32 : bonsai $ sudo pecl install apc
pecl/apc is already installed and is the same as the released version 3.1.13
install failed
13:29:50 : bonsai $ which apc
13:30:19 : bonsai $ which pecl
/usr/local/bin/pecl
13:31:55 : bonsai $ which pecl/apc
13:32:02 : bonsai $ which pecl apc
/usr/local/bin/pecl
13:32:06 : bonsai $ php admin/app/check.php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/apc.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/apc.so, 9): image not found in Unknown on line 0
********************************
* *
* Symfony requirements check *
* *
********************************

php.ini used by PHP: /etc/php.ini

** WARNING **
* The PHP CLI can use a different php.ini file
* than the one used with your web server.
* If this is the case, please ALSO launch this
* utility from your web server.
** WARNING **

** Mandatory requirements **

OK Checking that PHP version is at least 5.3.2 (5.4.15 installed)
OK Checking that the "date.timezone" setting is set
OK Checking that app/cache/ directory is writable
OK Checking that the app/logs/ directory is writable
OK Checking that the json_encode() is available
OK Checking that the SQLite3 or PDO_SQLite extension is available
OK Checking that the session_start() is available
OK Checking that the ctype_alpha() is available

** Optional checks **

OK Checking that the PHP-XML module is installed
OK Checking that the libxml version is at least 2.6.21
OK Checking that the token_get_all() function is available
OK Checking that the mb_strlen() function is available
OK Checking that the iconv() function is available
OK Checking that the utf8_decode() is available
OK Checking that the posix_isatty() is available


[[WARNING]] Checking that the intl extension is available: FAILED
*** Install and enable the intl extension (used for validators) ***


[[WARNING]] Checking that a PHP accelerator is installed: FAILED
*** Install a PHP accelerator like APC (highly recommended) ***


[[ ERROR ]] Checking that the APC version is at least 3.0.17: FAILED
*** Upgrade your APC extension (3.0.17+) ***
You must fix this problem before resuming the check.
13:33:16 : bonsai $ pecl list-all

Warning: lstat(): Lstat failed for /var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T//pear/cache/c2d1a60433ecd5bceb8756e268e2ebb3rest.cacheid in PEAR/REST.php on line 276

Warning: lstat(): Lstat failed for /var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T//pear/cache/c2d1a60433ecd5bceb8756e268e2ebb3rest.cacheid in /usr/local/Cellar/php54/5.4.15/lib/php/PEAR/REST.php on line 276
Could not open /var/folders/kr/pgx6tzks6kg48hgdnj1f7dt80000gn/T//pear/cache/c2d1a60433ecd5bceb8756e268e2ebb3rest.cacheid for writing.

This question has been answered.

Lawrence Krubner | 05/14/13 at 5:41pm Edit
Tutorial: How to assign prize money


(20) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    05/14/13
    7:00pm
    Luis Cordova says:

    use brew install those things and you will be fine

    /usr/local/Cellar/php54/5.4.15/include/php/ext/apc

    and that is with brew

    Previous versions of this answer: 05/14/13 at 7:00pm

  • avatar
    Last edited:
    05/14/13
    10:32pm
    Martin Palacio says:

    as stated in the INSTALL file (php-apc for ubuntu, original source package):


    ; Suggested Configuration (in your php.ini file)
    ; -------------------------------------------
    extension=apc.so
    apc.enabled=1
    apc.shm_size=128M
    apc.ttl=7200
    apc.user_ttl=7200
    apc.enable_cli=1


    Please note that there is some insight about APC + PHP 5.4 in StackOverflow.

    Good luck!

    Previous versions of this answer: 05/14/13 at 10:28pm | 05/14/13 at 10:32pm

  • avatar
    Last edited:
    05/15/13
    1:24am
    mullerivan says:

    buy a linux machine

  • avatar
    Last edited:
    05/16/13
    8:34pm
    farfanoide says:

    hi! firs of all, have you properly updated your PATH after installing homebrew?
    you should have something like

    PATH="/usr/local/bin:${PATH}"
    in your .bashrc/.bash_profile
    after checking that i'd fix permissions for pear and reinstall apc, although the problem seems to be your PATH.
    it should say :
    * Configuration file used by PHP: /usr/local/etc/php/5.4/php.ini

    to fix pear permissions
    chmod -R ug+w /usr/local/Cellar/php54/5.4.15/lib/php

    pear config-set php_ini /usr/local/etc/php/5.4/php.ini

  • avatar
    Last edited:
    05/14/13
    6:29pm
    Lawrence Krubner says:

    What do you mean? Brew install what? Everything is installed. That is the confusion. I get:

    pecl/apc is already installed and is the same as the released version 3.1.13

    and:

    [[ ERROR ]] Checking that the APC version is at least 3.0.17: FAILED

  • avatar
    Last edited:
    05/14/13
    6:30pm
    Lawrence Krubner says:

    Clearly, "sudo pecl install apc" is installing apc to one path, but Symfony2 is checking some other path. But I can not figure out what either of the paths are. If I knew the Symfony path, I would just "ln -s target alias" and fix this.

  • avatar
    Last edited:
    05/14/13
    6:44pm
    Lawrence Krubner says:

    And this:

    find / -name "apc"

    gives me:

    find: /backups/livedbs-dumps/Maildir: Permission denied
    find: /dev/fd/3: Not a directory
    find: /dev/fd/4: Not a directory
    /usr/local/Cellar/php54/5.4.15/include/php/ext/apc

  • avatar
    Last edited:
    05/14/13
    6:59pm
    Lawrence Krubner says:

    And I see this in check.php:



    $accelerator =
    (function_exists('apc_store') && ini_get('apc.enabled'))
    ||
    function_exists('eaccelerator_put') && ini_get('eaccelerator.enable')
    ||
    function_exists('xcache_set')
    ;
    check($accelerator, 'Checking that a PHP accelerator is installed', 'Install a PHP accelerator like APC (highly recommended)', false);
    check(function_exists('apc_store') && ini_get('apc.enabled') && version_compare(phpversion('apc'), '3.0.17', '>='), 'Checking that the APC version is at least 3.0.17', 'Upgrade your APC extension (3.0.17+)', true);

  • avatar
    Last edited:
    05/14/13
    6:59pm
    Lawrence Krubner says:

    I see this issue was brought up 2 years ago:

    https://github.com/symfony/symfony-standard/pull/163/files

  • avatar
    Last edited:
    05/14/13
    8:35pm
    Lawrence Krubner says:

    I added this to php.ini:

    extension=/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so

    which points to the correct file. Now when I do:

    php admin/app/check.php

    I get:

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so' - dlopen(/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so, 9): Symbol not found: _zend_signal_globals
    Referenced from: /usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so
    Expected in: flat namespace
    in /usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so in Unknown on line 0
    ********************************
    * *
    * Symfony requirements check *
    * *
    ********************************

    php.ini used by PHP: /etc/php.ini

    ** WARNING **
    * The PHP CLI can use a different php.ini file
    * than the one used with your web server.
    * If this is the case, please ALSO launch this
    * utility from your web server.
    ** WARNING **

    ** Mandatory requirements **

    OK Checking that PHP version is at least 5.3.2 (5.4.15 installed)
    OK Checking that the "date.timezone" setting is set
    OK Checking that app/cache/ directory is writable
    OK Checking that the app/logs/ directory is writable
    OK Checking that the json_encode() is available
    OK Checking that the SQLite3 or PDO_SQLite extension is available
    OK Checking that the session_start() is available
    OK Checking that the ctype_alpha() is available

    ** Optional checks **

    OK Checking that the PHP-XML module is installed
    OK Checking that the libxml version is at least 2.6.21
    OK Checking that the token_get_all() function is available
    OK Checking that the mb_strlen() function is available
    OK Checking that the iconv() function is available
    OK Checking that the utf8_decode() is available
    OK Checking that the posix_isatty() is available


    [[WARNING]] Checking that the intl extension is available: FAILED
    *** Install and enable the intl extension (used for validators) ***


    [[WARNING]] Checking that a PHP accelerator is installed: FAILED
    *** Install a PHP accelerator like APC (highly recommended) ***


    [[ ERROR ]] Checking that the APC version is at least 3.0.17: FAILED
    *** Upgrade your APC extension (3.0.17+) ***
    You must fix this problem before resuming the check.



  • avatar
    Last edited:
    05/14/13
    10:32pm
    Luis Cordova says:

    do not keep hacking stuff, remove all your stuff and install cleanly only with brew the stuff even apc, do not play manually with stuff

  • avatar
    Last edited:
    05/15/13
    3:50pm
    Lawrence Krubner says:

    Luis Cordova, I have installed most things with brew, but I don't remember what things were not installed with brew.

    Still, the question remains, what path does Symfony check? Why does it not see that I have APC installed?

    I currently have this in my php.ini:

    ;;;;;;;;;;;;;;;;;;;;;;
    ; Dynamic Extensions ;
    ;;;;;;;;;;;;;;;;;;;;;;

    ; If you wish to have an extension loaded automatically, use the following
    ; syntax:
    ;
    ; extension=modulename.extension
    ;
    ; For example, on Windows:
    ;
    ; extension=msql.dll
    ;
    ; ... or under UNIX:
    ;
    ; extension=msql.so
    ;
    ; ... or with a path:
    ;
    ; extension=/path/to/extension/msql.so
    ;
    ; If you only provide the name of the extension, PHP will look for it in its
    ; default extension directory.
    ;

    extension=/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so

  • avatar
    Last edited:
    05/15/13
    3:54pm
    Luis Cordova says:

    you can uninstall and reinstall with brew and it will tell you where things are

  • avatar
    Last edited:
    05/15/13
    3:54pm
    Lawrence Krubner says:

    mullerivan, my client has a team that mostly develops on Macs. They also have a VM of our Centos environment. They suggested that I install it on the Mac using VirtualBox, but I could not get the network settings to work. I kept getting "Invalid settings". One of the instructions was "refresh your MAC address" but the setting was frozen and I could not find a way to get the dialogue box to unfreeze that option.

    All the same, it would be easy to switch to a Linux machine, if I thought this would be easier on a Linux machine. But I've wasted 2 whole days trying to get setup on this Mac, and I am fairly sure I would waste 2 whole days trying to get set up on Linux.

  • avatar
    Last edited:
    05/16/13
    6:25pm
    Lawrence Krubner says:

    Let's focus on this:

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so' - dlopen(/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so, 9): Symbol not found: _zend_signal_globals
    Referenced from: /usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so
    Expected in: flat namespace



    Has anyone seen this error before?

  • avatar
    Last edited:
    05/17/13
    2:19pm
    Martin Palacio says:


    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so' - dlopen(/usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so, 9): Symbol not found: _zend_signal_globals

    Referenced from: /usr/local/Cellar/php54/5.4.15/lib/php/extensions/no-debug-non-zts-20100525/apc.so

    Expected in: flat namespace


    Does not look good at all. Looks your apc extension (installed via pecl?) is not "compatible" with your PHP (maybe is missing some compilation flag, but can't find which one).

    I would try to remove APC and PHP, and start over with brew.

    BTW which OS do you have on your Mac?

  • avatar
    Last edited:
    05/17/13
    2:38pm
    Martin Palacio says:

    Please note that APC 3.1.13 is marked as beta. Try to download the latest stable source (3.1.9) and compile it yourself with:

    phpize
    ./configure
    make
    [copy extension file to desired location]

    This may sound unrelated (if not crazy): The installation wizard on XDebug site can help you for this process (instead of download and compile XDebug source, try with the APC source). It's great because it will detect your OS / PHP settings and will give you "tailored instructions" that may work for you.

  • avatar
    Last edited:
    05/17/13
    2:41pm
    Martin Palacio says:

    sorry, forgot the XDebug Wizard link: http://xdebug.org/wizard.php.

  • avatar
    Last edited:
    05/20/13
    9:26am
    Lawrence Krubner says:

    Martin, that was a useful tip. I compiled it myself and now it seems to be working.

  • avatar
    Last edited:
    05/20/13
    9:27am
    Lawrence Krubner says:

    farfanoide, thank you, I am not sure, but there might have been a permissions issue.

This question has expired.



Lawrence Krubner voted on this question.



Current status of this question: Completed



Please log in to add additional discourse to this page.





Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.