Apache2 + Php + Pthreads HowTos

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'm running Ubuntu 14.04 LTS 64 bit. What I would really love to do is sudo apt-get install libapache2-mod-php5 but compile PHP with --enable-maintainer-zts so I could later install pthreads with pecl install pthreads. Sadly, I understand that it is not possible. I know that the easiest way is to recompile PHP together with apache support and zts. However I really like the way the standard Ubuntu PHP package is configured and I am used to the paths for CLI php.ini config, Apache php.ini config and other paths for modules and files that this Ubuntu package defines. So I just want to change the package source a little bit and install it.

# Get the stuff necessary to build the package
sudo apt-get build-dep php5-common

# Get the package source
sudo apt-get source php5-common

At this point I am getting sources not for the php5-common package but the whole php5 package. If I would sudo make && make install at this point, would it mean that I am installing a lot of unnecessary stuff?

# Add configuration b.com/tag/option">options
./configure --enable-maintainer-zts

Does this b.com/tag/mean">mean that I am appending a configuration b.com/tag/option">option? Or am I generating a whole new config?

Alternative at this point Is there a way of getting the config options that this package defines, so that I can grab a php source from php.net and compile it with

$ ./configure  --prefix=package_prefix \ // Option 1 from package
--enable-embed \ // Option 2 from package
--with-regex=php \ // Option 3 from package

Continuing the main idea ...

Solution 1

# Compile (Not compiling)
sudo make && make install

Will I be building PHP with EVERYTHING at this point? If I compile like this, I will not be able to remove the mess I made using sudo apt-get purge php5?

Solution 2

# ReCompile the package
dpkg-buildpackage -rfakeroot -uc -b

This does not compile also. Please correct my steps, so I can install everything correctly.

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.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community