I need to install php5 source debian package with zend thread safety enable (ZTS=1)
but in default this config is disable.
how can rebuild package with my configuration ?
Download and extract package sources with apt-get source php5
Edit debian/rules file and add --enable-roxen-zts or --enable-maintainer-zts to COMMON_CONFIG (confirm which one you need with ./configure --help).
sudo apt-get build-dep php5 to install build dependencies.
From directory where package source were extracted run dpkg-buildpackage -uc -b.
Optionally if you have devscripts package installed you may run debuild -uc -b instead of dpkg-buildpackage -uc -b.
Dont worry, it really takes a long time for the package build, and it also looks like it is in loop, but it will come to an end, eventually.
Related
I am told by PHPStorm that I need to composer require ext-zip, however, that command is failing...
PHPStorm says
The command I am issuing is
composer require ext-zip
results in
Your requirements could not be resolved to an installable set of packages.
and
Installation failed, reverting ./composer.json to its original content.
Solution #1 - add ext-zip to your required section of composer.json:
{
"require" : {
"ext-zip": "*"
}
}
Solution #2 - install php-zip extension:
Windows:
Uncomment this line in your php.ini
;extension=php_zip.dll
Linux:
sudo apt-get install php-zip
or
sudo apt-get install php7.0-zip (make sure you typed YOUR php version, you can check your version by doing php -v command)
Then, you need to restart your web server.
sudo service apache2 restart
If your code runs OK - you've already got the zip extension installed on your machine. PHPStorm adds this suggestion to ensure that anywhere else that the project is deployed also has the right extensions too.
Manually adding the line in your composer.json file (require block) "ext-zip": "*", (and others that it can suggest, such as ext-apc, ext-redis and ext-json, as well as any others that you might be using) will make sure that when you deploy it composer can also check that the appropriate extra items are installed.
It's only a warning though, and you could ignore it - or you can allow composer to make sure that your servers are setup as they would be needed to run your code, and do things with zip-files. If your server doesn't have ext-zip installed, composer install would complain, and stop - saving issues later when you discover that code fails without the zip extension, et al.
The given hint comes from PhpStorm, not from composer itself: your IDE has detected that your code uses a method (or in this case: the ZipArchive class) that is only available when the ZIP extension is enabled. But your composer.json did not contain that requirement so far.
So, PhpStorm asks you to add this requirement to the JSON file to make the requirements to run your code more precise. How you solve that requirement is up to you: the best way would be to install that extension, but that is out of composer's scope
I got a website which I need to maintain and after looking at the files and code, I thought there are some missing files in project/vendor folder.
After talking to the current maintainer, he told me I need to use composer in order to see those files. I have installed composer but I don't know how to "fill" the folder with the files.
From reading online I understood I need to extract and install dependencies using the composer.json file but even after searching the web for more then an hour I didn't find how to do it.
Go to the root of you project and run
composer install
after that composer will download all package that are in the composer.json file in the require and require-dev section
First, install the composer, take a look here composer, after this try to run composer install, in some cases I do update with composer update too.
Remember to run the command composer install on the same path where composer.json
Apparently I had to install php7.0-curl using the sudo apt-get install php7.0-curl.
After that I just used composer install again and it's good now
I am faced with this problem when I run any artisan commands on Heroku. Its a Lumen-PHP Project. I have added the "ext-memcached" to the require section of the composer.json but still gets the same result.
Screenshot of my terminal
I finally got my hands around this and thanks to the Heroku Docs on Memcached. I quote Heroku Docs:
The php-memcached client is not a pure PHP client but a PECL extention that makes use of libmemcached. You thus need to install php-memcached via your OS package manager.
Make sure you have Memcached Installed on your local machine. You can check a gist I created on how to do this for Mac OSx. I will post it here anyways.
brew install libevent
brew install autoconf
brew install libmemcached
//go to
cd /Applications/MAMP/bin/php/php{{VERSION}}/bin
//compile memcached
./pecl install memcached
//go back
cd ../
//Add the memcached.so extension to your php.ini file
echo -e "\n[memcached]\nextension=memcached.so" >> conf/php.ini
//start memcached server
memcached -m 24 -p 11211 -d
//restart MAMPP
You’ll need to modify your composer.json file to include the module:
{
"require": {
"php": ">=7.0.0",
"ext-memcached": "*"
}
}
Ensure that your new requirements are “frozen” to composer.lock by running:
composer update
Afterwards, commit your changes and run
git push heroku master
Thats it!!
I am trying to run behat on my vendor folder. I have installed composer globally, have installed the behat package, but every time I run bin/behat I keep getting this message from composer
You must set up the project dependencies, run the following commands:
curl -s http://getcomposer.org/installer | php
php composer.phar install
I am not sure how to fix this. I see the files are in the vendor folder, and when I type "composer" on the terminal, I see the manual.
If anyone can help me resolve this I would really appreciate it. Thanks!
There are several possible problems leading to this situation:
Make sure that composer is installed in your $PATH. That is, running composer at a command prompt should work, and you shouldn't need to run an explicit path like ~/Downloads/composer.phar
Execute the composer install instruction as the error message suggests. A common error is the message
Mcrypt PHP extension required
in which case you need to install the specified extension. For example, brew install php56-mcrypt on a Mac or sudo apt-get install php5-mcrypt on Ubuntu.
Here is my command on the terminal and I got a notice message
Note: PHPUnit is required in order to generate controller test stubs.
volition#volition-H61M-DS2:/var/www/register$ zf create action root Authentication
Note: PHPUnit is required in order to generate controller test stubs.
Creating an action named root inside controller at /var/www/register/application/controllers/AuthenticationController.php
Updating project profile '/var/www/register/.zfproject.xml'
Creating a view script for the root action method at /var/www/register/application/views/scripts/authentication/root.phtml
Updating project profile '/var/www/register/.zfproject.xml'
This is my include_path:
include_path .:/usr/share/php:/usr/share/pear
I don't know what I'm doing wrong here.
and also I want to know what is the use of phpUnit ??
It just is what it says. If you want to create test stubs, you need to have PHPUnit installed. Zend can automatically create tests for you when you generate code. It's not an error or a notice (as in E_NOTICE), it's simply a Note.
PHPUnit is a unit testing framework that helps you to test your code. If you don't know what that means, by all means go read the PHPUnit documentation.
First, install PEAR.
sudo apt-get install php-pear
Next, tell PEAR to update its own channel.
sudo pear channel-update pear.php.net
Then, tell PEAR to upgrade itself to the newest version.
sudo pear upgrade-all
You should now have the newest version of PEAR installed.
To install PHPUnit, let PEAR know where to find PHPUnit.
sudo pear channel-discover pear.phpunit.de
Then install PHPUnit. (the -a makes sure all dependency packages are also installed)
sudo pear install -a phpunit/PHPUnit
Update:
At Last Restart Apache
sudo /etc/init.d/apache2 restart
ohh You are using zend Framework
phpunit is installed in
C:\Zend\ZendServer\bin\PEAR
Add this line
include_path=".:/usr/share/php:/usr/share/pear:/usr/share/php/PHPunit:/usr/share/php/PEAR"