How to know where did php extension install to in linux - php

I installed with this command
cd ~
mkdir setups
cd setups
wget http://pecl.php.net/get/APC-3.1.8.tgz
tar -xvf APC-3.1.8.tgz
cd APC-3.1.8
phpize
./configure
make
then where did apc.so install to ?
Edit: Right answer is morre's

could always try "ls -R | grep apc.so" on the root.

Related

Can't install composer on OS X

I did this on terminal:
$ curl -sS https://getcomposer.org/installer | php
the output was:
All settings correct for using Composer
Downloading...
Composer successfully installed to: /Applications/XAMPP/xamppfiles/htdocs/composer.phar
Use it: php composer.phar
then I entered:
$ sudo mv composer.phar /usr/local/bin
No issues with this (it should work because usr/local/bin is in my $PATH). But how do I run it now? When I enter composer or composer.phar on the command line, I get:
-bash: composer: command not found
-bash: composer.phar: command not found
.phar is short for PHP Archive - it's a format that the php executable can read, not an executable on it's own right. To run it you should use:
$ php /usr/local/bin/composer.phar
To make your life a tad easier you could, of course, define an alias:
$ alias composer="php /usr/local/bin/composer.phar"
And then just call composer from your shell.
Did u check what do u have now in your path
ls -al /usr/local/bin
Check the right to execute.
To be sure u can do:
sudo chmod a+x /usr/local/bin/composer.phar
First look like should be composer.phar as you did not precise a new name in ur mv command like:
sudo mv composer.phar /usr/local/bin/composer
Did you made composer.phar executable ?
if not, just do sudo chmod a+x /usr/local/bin/composer.phar
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
mv: rename composer.phar to /usr/local/bin/composer.phar: No such file or directory
Solution:
make sure composer.phar and directory local ,bin composer exist (/usr/local/bin/composer) in $PATH
else
$ cd usr
usr$m kdir local
usr/local$m kdir bin
usr/local/bin$ mkdir composer
now we're sur local/bin/composer exist than
$sudo mv /path to composer.phar /usr/local/bin/composer
Password:
toto:~ macbookpro$ your composer.phar now is move to directory usr/local/bin/composer

PhantomJS and CasperJS what files do i need to put on my cpanel

Okay so i have finally build a test.js file that works on my ubuntu machine.
I just want to know how to i add phantomjs and casperjs on my cpanel and is there any way i can tet that they both work once on cpanel?
You can SSH / Shell Access from your cPanel account if you have permissions. Contact your host provider to be certain.
Here are the following commands that you can copy and paste into SSH to install dependencies, PhantomJS, and CasperJs. Dependents tested using docker.io:
apt-get install -y libfreetype6 libfontconfig libreadline-dev wget tar bzip2 vim git
mkdir -p /srv/var
cd /srv/var
PhantomJS:
wget http://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2
tar -xjf phantomjs-1.9.2-linux-x86_64.tar.bz2
ln -s `pwd`/phantomjs-1.9.2-linux-x86_64/bin/phantomjs /usr/bin/
phantomjs -v
CasperJS:
git clone https://github.com/n1k0/casperjs.git
ln -s `pwd`/casperjs/bin/casperjs /usr/bin/
casperjs --version
If they worked, You can type phantomjs -v or caspjer --version to verify installation.

phpunit and yii - (PHPUnit/Autoload.php): failed to open stream:

Having a lot of problems installing phpunit with Yii. I run:
$ phpunit unit/dbTest.php
But it turns out this error:
PHP Warning: require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory in /opt/yii-1.1.10.r3566/framework/test/CTestCase.php on line 12
(include_path='.:/usr/bin:/usr/share/php:/usr/bin/pear:/usr/share/php/Zend/:/opt/php5.3.10/lib/php/PHPUnit'
Some details about my installation:
$ phpunit --version
PHPUnit 3.4.5 by Sebastian Bergmann.
php --version
PHP 5.3.10 (cli) (built: Apr 6 2012 20:06:37) ( rebuilt didn't help :( )
pear list phpunit/phpunit
....
php /opt/php5.3.10/lib/php/PHPUnit/Autoload.php
According to that info, autoload is installed, and is on the include path.
I'm unsure what else I need to do - can anyone shed a light please?
I hope this is of some use to someone:
It seems on ubuntu PEAR is broken for this task and apt-get won't help either.
This is how i solved it
Manually download from http://pear.phpunit.de/
phpunit/PHPUnit
and
phpunit/File_Iterator
PHPUnit_MockObject
phpunit/PHPUnit_Selenium
PHP_CodeCoverage
Manually dezip and put correctly in php lib or wherever you want them to go. Put the head of this library on your include path (PHP, PHPlib, PEAR are all at this root level on my setup.)
Goddam, hope that helps someone i spent about 6 hours getting this to work last nite...
As rix shows in his answer, you have to download some files manually.
I got it working on Ubuntu 10.04 following these commands:
wget http://pear.phpunit.de/get/PHPUnit-3.6.10.tgz
wget http://pear.phpunit.de/get/File_Iterator-1.3.1.tgz
wget http://pear.phpunit.de/get/PHPUnit_MockObject-1.1.1.tgz
wget http://pear.phpunit.de/get/PHPUnit_Selenium-1.2.6.tgz
wget http://pear.phpunit.de/get/PHP_CodeCoverage-1.1.2.tgz
wget http://pear.phpunit.de/get/PHP_TokenStream-1.1.3.tgz
wget http://pear.phpunit.de/get/Text_Template-1.1.1.tgz
wget http://pear.phpunit.de/get/PHP_Timer-1.0.2.tgz
sudo vi /etc/php5/cli/php.ini
=> add /usr/share/php/PHPUnit/ to include_path directive
tar xzf PHPUnit-3.6.10.tgz
cd PHPUnit-3.6.10/
sudo cp -r PHPUnit/ /usr/share/php/
sudo ln -s /usr/share/php/PHPUnit /usr/bin/PHPUnit
tar xzf File_Iterator-1.3.1.tgz
sudo cp -r File/ /usr/share/php/PHPUnit/
tar xzf PHP_CodeCoverage-1.1.2.tgz
cd PHP_CodeCoverage-1.1.2/
sudo cp -R PHP/ /usr/share/php/PHPUnit/
tar xzf PHP_TokenStream-1.1.3.tgz
cd PHP_TokenStream-1.1.3/PHP/
sudo cp -r Token* /usr/share/php/PHPUnit/PHP/
tar xzf Text_Template-1.1.1.tgz
cd Text_Template-1.1.1/
sudo cp -r Text/ /usr/share/php/PHPUnit/
tar xzf PHP_Timer-1.0.2.tgz
cd PHP_Timer-1.0.2/
sudo cp -r PHP/Timer* /usr/share/php/PHPUnit/PHP/
tar xzf PHPUnit_MockObject-1.1.1.tgz
cd PHPUnit_MockObject-1.1.1/
sudo cp -r PHPUnit/Framework/MockObject/ /usr/share/php/PHPUnit/Framework/
tar xzf PHPUnit_Selenium-1.2.6.tgz
cd PHPUnit_Selenium-1.2.6/
sudo cp -r PHPUnit/Extensions/* /usr/share/php/PHPUnit/Extensions/

Where can I find my extensions for php in centos when using yum install memcache

Just as the title says. I need my memcache.so to put it in the php.ini, but I cannot find it after installing it with package manager yum install memcached.
Anyone please help me.
Thanks
I don't think memcached RPM includes php extension, or centos doesn't maintain the extension. You may need to install it manually:
cd /usr/src
wget http://pecl.php.net/get/memcache-2.2.6.tgz
tar zxvf memcache-2.2.6.tgz
cd memcache-2.2.6
phpize
./configure
make
make install
If you are using XAMPP(Linux), you need to install xampp-linux-devel and use phpize in /opt/lampp/bin/. If you haven't installed devel files of Xampp yet, first you need to isntall XAMPP-devel package(expecting your XMAPP version is 1.7.7):
wget http://www.apachefriends.org/download.php?xampp-linux-devel-1.7.7.tar.gz
mv download.php\?xampp-linux-devel-1.7.7.tar.gz xampp-linux-devel-1.7.7.tar.gz
tar xvfz xampp-linux-devel-1.7.7.tar.gz -C /opt
Then try the same installation but use /opt/lampp/bin/phpize instead of phpize
cd /usr/src
wget http://pecl.php.net/get/memcache-2.2.6.tgz
tar zxvf memcache-2.2.6.tgz
cd memcache-2.2.6
/opt/lampp/bin/phpize
./configure --with-php-config=/opt/lampp/bin/php-config
make
make install
Hope this helps!

Having huge problems getting memcached plugin working on ub 9.04

Heya, so I've spent about 6 hours now trying to get this working. I had the following set of rules I uses to compile in the memcached plugin to php, installing libmemcached dependency first. Here are the steps:
cd ~
sudo wget http://download.tangent.org/libmemcached-0.35.tar.gz
sudo tar -zxf libmemcached-0.35.tar.gz
cd libmemcached-0.35
sudo ./configure
sudo make
sudo make install
cd /usr/lib
sudo ln -s /usr/local/lib/libmemcached.so
sudo pecl install memcached
sudo rm -r ~/libmemcached-0.35
sudo rm ~/libmemcached-0.35.tar.gz
php.ini-edit
Search for Dynamic Extensions and add in the extension memcached.so. Do this by adding: extension=”memcached.so”
:wq
It used to work; last time I rebuilt my box was back in Feb or March, but I've heard that since then there are some changes that go on. When I run sudo make above I get some erroring out. I'm not sure if I included the error anyone could help me debug, so does anyone have a set of instructions they used to get memcached working properly on their ub box? With the libmemcached dependency?
I've seen this: Can I install the memcached PHP extension with PECL?
The author of memcached basically told the guy how to do, but I've tried that to no avail. Help with be really appreciated. Thanks.
cd ~
sudo apt-get -y install g++
wget http://launchpad.net/libmemcached/1.0/0.39/+download/libmemcached-0.39.tar.gz
tar zxvf libmemcached-0.39.tar.gz
cd libmemcached-0.39/
./configure
make
sudo make install
cd /usr/lib
sudo ln -s /usr/local/lib/libmemcached.so
sudo pecl install memcached
sudo rm -r ~/libmemcached-0.39
sudo rm ~/libmemcached-0.39.tar.gz
php.ini-edit
Search for Dynamic Extensions and add in the extension memcached.so
:wq

Categories