Guest User

Untitled

a guest
Feb 12th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. 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.
  2.  
  3. Anyways. The Apache I downloaded and compiled manually. At first I went with simply ./configure,
  4. Some messing with permissions was required to remove a Forbidden error I got while testing the localhost in browser.
  5.  
  6. Then while compiling php it says apache wasnt compiled with --enable-so and aborts. Oops. I 'make clean' and rebuild with (as root)
  7.  
  8. ./configure --enable-so
  9. make
  10. make install
  11.  
  12. 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.
  13.  
  14. Now some info about directories.
  15. apache is installed in /usr/local/apache2
  16. But I also seem to have files in /usr/lib/apache2/modules
  17. More importantly the /usr/local/apache2/modules has neither the php7.so nor the mpm so files; both are present in /usr/lib/...
  18. Theres also another set of files in /etc/apache2
  19.  
  20. Anyways. I add the appropriate LoadModule and AddType in main httpd.conf
  21. Restart server, I get this error:
  22.  
  23. Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.
  24. AH00013: Pre-configuration failed
  25.  
  26. I google, apparently there are multiple 'modes' of mpm. I need to use 'mpm_prefork'
  27. 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
  28.  
  29. Within that in the mods-available folder I have (among others) these files:
  30. mpm_event.conf mpm_event.load mpm_prefork.conf mpm_prefork.load mpm_worker.conf mpm_worker.load
  31.  
  32. the .load files have LoadModule declarations
  33.  
  34. 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.
  35.  
  36. 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