Zend Server 6 with OSX 10.8.2 ... issues with PHPUnit - zend-framework

I really like ZS6, but I'm having issues with PEAR and PHPUnit on OSX 10.8.x.
After ZS6 installation to default paths, PEAR seems to working fine from the command line, however, for some strange reason it installs the phpunit package in a pear folder with a bin, docs, and share folder at /Users/myusername/pear location. That in itself doesn't make sense to me at all. Further, PHPUnit isn't setup to be run from the terminal (command not found).
If you run 'pear list' pear says there are no extensions installed from channel pear.php.net.
my .bash_profile has the following:
export PATH=/usr/local/bin:$PATH
PATH=$PATH:/usr/local/zend/bin:/usr/local/zend/mysql/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib
the php.ini file is still setup as the default locations:
.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear
So far I've tried changing the php.ini path, I've tried changing the .bash_profile export path, I'm tried uninstalling and removing all traces I could find of pear and reinstalling ZS6, and even installing pear manually again... I have the same issue each time.
Is it possible there's a conflict with previous settings on this box?

You can adjust those config values with pear config-set, for example
$ pear config-set php_dir /usr/share/pear/php
$ pear config-set data_dir /usr/share/pear/data
Do that for all config values with "broken" paths.
After that, either manually move the files from the old to the new directories, or reinstall all packages.

Related

Nagios webconf - Web directory

I'm following this guide.
I'm launching:
make install-webconf
The problem is that I already have Apache2 installed in /etc/apache2 directory, but thee Nagios installer looks for /etc/httpd ..
How can I resolve it?
As newbie, I tried to change the path in Makefile, but it doesn't work.
Back before web install section in the guide, it showed a 'configure' command. If you type './configure --help', you will see in the output:
--with-httpd-conf=<path_to_conf>
sets path to Apache conf.d directory
That configure option can be used to change your path to /etc/apache2, with something like:
./configure --with-httpd-conf=/etc/apache2/conf.d

How to tell PEAR where to extract the downloaded files?

I set up a local pear repository/client, however you call it. I discovered a channel and already downloaded a package, which worked fine. As far as I know pear separates the php and data files in two folders, after it extracted the files. But I want ALL files being together in one directory which I can specify. How can I do this?
I already tried:
pear config-set data_dir my-specified-directory
pear config-set php_dir my-specified-directory
But that does not work because it expects directories called data and php. Is there any way to do this? Background: I use pear to deploy packages on a test server and I need everything in one directory to run the application.
So finally I found it:
pear config-set www_dir my-specified-directory

CanĀ“t add less-compiler lessc on Netbeans 7.4

At first I downloaded Less from GitHub and saved the folder on my disk. After that, I tried to locate the compiler (file lessc) in my Netbeans IDE (7.4 Beta). After that, I got the following Error-Message:
I'm not sure if Less compiler can work without NodeJS. So I would do following:
install NodeJS (nodejs.org)
install less compiler using npm
npm install -g less
then NetBeans should find it, if not, you need to specify path to lessc.cmd, e.g.
C:\Users\lada\AppData\Roaming\npm\lessc.cmd
to find where is your lessc.cmd, run following in command line
where lessc.cmd
The lessc (without cmd) is for Linux and Mac OSX
I downloaded lessc from here:
https://github.com/duncansmart/less.js-windows
unzipped the zip-file and copied all files to C:\bin\lessc but you can copy it anywhere you like.
Then just point Netbeans to that folder and lessc.cmd and it should work.
Try:
Install nodejs
Install less in nodejs "cmd: npm install less"
less path netbeans: C:\nodejs\node_modules.bin\lessc.cmd

Mountain Lion Zend Install - You must enable the openssl extension to download files via https

I've been trying to get Zend installed on my Mac Pro for some time. I've tried installing it manually, with homebrew, and with port. I've changed php's, reinstalled php, updated php, reinstalled openssl multiple times.
php.ini has openssl in it and it is uncommented, curl is also enabled.
no matter which way I go about it I always get a message like this or very similar (always ssl)
You must enable the openssl extension to download files via https
I also installed a certificate for ssl.
currently I have downloaded the zip for the Zend 2.2.2 'tutorial', extracted to a sites directory and have run
composer install
which as given me:
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing zendframework/zendframework (2.2.2)
[RuntimeException]
You must enable the openssl extension to download files via https
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
I know its installed. I've reinstalled it 3 times. Only thing I can think of is maybe there is more than one php.ini but I haven't been able to find a second one.
thanks in advance for any advice.
I ran php info in apache and got the old install of php version 5.3, when I run it from the command line I get the new 5.4 ?
$ openssl version
OpenSSL 1.0.1e 11 Feb 2013
$ composer diag
Checking platform settings: FAIL
The openssl extension is missing, which will reduce the security and stability of Composer.
If possible you should enable it or recompile php with --with-openssl
Checking http connectivity: OK
Checking composer.json: OK
Checking disk free space: OK
Checking composer version: OK
There is more than one php.ini - the command line version of PHP has a separate one. To see what that is, run php -i | grep ini from the command line - the output should include the .ini files being used near the top.
(Disclaimer: I'm not a Mac user so things may be different in Apple world.)
I'd like to say there was an easy fix. My suggestion is to use homebrew, install everything, then make sure your php.ini is in the right spot (probably have to move it) and also that you change the permissions on local\openssl so that homebrew can write to it. Eventually by moving php.ini around and installing php54 I was able to get it to work.
these are great resources
http://juniorgrossi.com/2013/working-with-multiple-php-versions-on-mac-os-x/
http://railsapps.github.io/openssl-certificate-verify-failed.html

Can't get MAMP to load xdebug (phpinfo())

MAC OSX 10.7.5 -- MAMP 2.1.3 -- XDEBUG 2.2.3
I used the xdebug wizzard to download and install using the terminal. After following the steps
Rebooted MAMP but no xdebug in phpinfo();
I thought it was weird that the wizzard says all you have to do it paste zend_extension = /Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so in the end of your php.ini file
I did add quotes around the pathname - the pathname from the wizzard came without them
Every other tutorial says there is more than just this one line that needs to be added
MAMP seems to have its own 'zend_extension = "/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"' that just needs to becommented out. Anyway I tried both the pasting from the wizzard as well as uncommenting.
Since I'm trying to use xdebug with my PHPstorm trial, I checked for the steps layed you at http://www.dotvoid.com/2012/09/using-xdebug-in-mamp/
Again it's weird: Here it says that all you need to do it add these 2 lines
xdebug.remote_host=127.0.0.1
xdebug.remote_enable = 1
It's weird because other tutorials make you add more lines (back when I tried to get xdebug on an older version of MAMP to go with netbeans without success) about the localhost.
Here's what's in my php.ini file now:
[xdebug]
zend_extension= "/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
I also checked if I'm configuring the right php.ini file, looking in phpinfo(); where it says which php.ini file is loaded. In this case /Applications/MAMP/bin/php/php5.4.10/conf/php.ini I verified if this is the correct php.ini file that I'm edititing and it is.
The last anwser in this SO question here speaks of two certain files that need to be the same binary maybe one file is 32bit binary and the other one is 64bit. When I tried to check this, the files mentioned in that question (/path/to/mamp/Library/modules/php5.3/libphp5.so) are not in my current installation of MAMP. In my current installation, I can go to Applications/MAMP/Library/modules, but there is no folder in that modules folder, leave alone one that says php of any sort.
In this tutorial, there is a mention of updating PEARL. This may not be relevant to my issue but I just followed it because I don't know really, I thought it wouldn't hurt. When I try to do that in my terminal the error message says
Xdebug requires Zend Engine API version 220090626.
The Zend Engine API version 220100525 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.
I found this issue in the xdebug FAQ. I quote
it is most likely because you compiled Xdebug against PHP headers that belong to a different PHP version that you're running
Further explanation confirms that the message about the zend api version points to the same issue and that two versions of PHP are colliding somehow.
The solution to this is explained on the same FAQ page where it says
Q: How do I find which phpize to use? [...]If it doesn't match up, and perhaps the wrong "phpize" binary is found on the path, you can
run configure as follows:
1. /full/path/to/php/bin/phpize
2. ./configure --with-php-config=/full/path/to/php/bin/php-config
I don't know how to interpret this in practice. But here's what I have tried
I was still in the /usr/bin and tried the first command usr/bin/phize. this returned Cannot find config.m4. Make sure that you run '/usr/bin/phpize' in the top level source directory of the module
I don't know what they mean by the top level source directory of the module. Maybe 1. and 2. are 1 command? And the module means xdebug.so?
No matter what I try though, I keep getting the Cannot find config.m4 error whenever I just even try to run phpize. I tried running phpize from /usr/bin/phpize or from /Applications/MAMP/bin/php/php5.4.10/bin/phpize. Same error came