Compile PHP by source. Stuck at phar.phar

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I am trying to install PHP (Version - 5.5.11) by source since I need php installation with enable-debugand enable-maintainer-zts options.

  • Downloaded the package
  • ./configure --enable-maintainer-zts --enable-debug --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
  • and when I do make, the steps are all fine until I reach "Generating phar.phar" where the make seems to be stuck

On inspecting (with make -n) the steps to be run are,

echo "Generating phar.phar"
rm -f ext/phar/phar.phar
rm -f /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/ext/phar/phar.phar
` if test -x "/usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/sapi/cli/php"; then /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/build/shtool echo -n -- "/usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/sapi/cli/php -n"; if test "x" != "x"; then /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/build/shtool echo -n -- " -d extension_dir=/usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/modules"; for i in bz2 zlib phar; do if test -f "/usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/modules/$i.la"; then . /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/modules/$i.la; /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/build/shtool echo -n -- " -d extension=$dlname"; fi; done; fi; else /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/build/shtool echo -n -- "/usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/sapi/cli/php"; fi;` -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' ext/phar/phar.php pack -f ext/phar/phar.phar -a pharb.com/tag/command">command -c auto -x \\.svn -p 0 -s /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/ext/phar/phar/phar.php -h sha1 -b "`/usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/build/shtool echo -n -- "/usr/local/bin/php";`"  /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/ext/phar/phar/
chmod +x ext/phar/phar.phar
echo
echo "Build complete."
echo "Don't forget to run 'make test'."
echo

I ran the command manually and in ps aux I see,

 /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/sapi/cli/php -n -d open_basedir= -d output_buffering=0 -d memory_limit=-1 -d phar.readonly=0 -d safe_mode=0 ext/phar/phar.php pack -f ext/phar/phar.phar -a pharb.com/tag/command">command -c auto -x \.svn -p 0 -s /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/ext/phar/phar/phar.php -h sha1 -b /usr/local/bin/php /usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11/ext/phar/phar/

and another b.com/tag/command">command invoked by this b.com/tag/command">command,

 sh -c cd '/usr/local/PHP_5.5.11_INSTALLATION/php-5.5.11' ; b.com/tag/pear">pear -q info PHP_Archive 2>/dev/null|grep 'API Version'

From what I see, b.com/tag/pear">pear is a directory in the php folder. So what is happening here? Why are arguments being passed to it?

Have I missed some step ? Do I need to install PEAR or something?

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.