Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- So I am a beginner trying to install Apache and PHP, and well I made two big mistakes lol. 1) Not installing from the Ubuntu repo. 2) Not experimenting first in a virtual machine.
- Anyways. The Apache I downloaded and compiled manually. At first I went with simply ./configure,
- Some messing with permissions was required to remove a Forbidden error I got while testing the localhost in browser.
- Then while compiling php it says apache wasnt compiled with --enable-so and aborts. Oops. I 'make clean' and rebuild with (as root)
- ./configure --enable-so
- make
- make install
- PHP is still complaining about the same thing. Since it was stuck in the config step only, so I figured it hasnt made any real changes to the system (ie actual installation wasnt started) and apt-getted the default php.
- Now some info about directories.
- apache is installed in /usr/local/apache2
- But I also seem to have files in /usr/lib/apache2/modules
- More importantly the /usr/local/apache2/modules has neither the php7.so nor the mpm so files; both are present in /usr/lib/...
- Theres also another set of files in /etc/apache2
- Anyways. I add the appropriate LoadModule and AddType in main httpd.conf
- Restart server, I get this error:
- Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.
- AH00013: Pre-configuration failed
- I google, apparently there are multiple 'modes' of mpm. I need to use 'mpm_prefork'
- I add the relevant LoadModule and restart. Now it complains I have two mpms. Nowhere in httpd.conf do I find any other mpm LoadModule. The only place I can find is some files in /etc/apache2
- Within that in the mods-available folder I have (among others) these files:
- mpm_event.conf mpm_event.load mpm_prefork.conf mpm_prefork.load mpm_worker.conf mpm_worker.load
- the .load files have LoadModule declarations
- In mods-enabled, I see symlinks to various files in the previous mentioned directory. There only are links for mpm_prefork. Intuition says mods-enabled is the list of stuff that is currently being used, so I am thoroughly confused now why desptile having prefork version the apache is complaining.
- IF INSTEAD OF FIXING THIS COMPLEX MESS YOU KNOW HOW TO CLEANLY UNINSTALL THE APACHE INSTALLED VIA COMPILING, I'LL HAPPILY DO SO AND THEN INSTALL FROM THE REPO.
Advertisement
Add Comment
Please, Sign In to add comment