Ubuntu Apache: "Module php7 does not exist" [closed]


Question Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. </div> Closed 7 years ago. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.…
Read more ⟶

Check if service exists in bash (CentOS and Ubuntu)


Question What is the best way in bash to check if a service is installed? It should work across both Red Hat (CentOS) and Ubuntu? Thinking: service="mysqld" if [ -f "/etc/init.d/$service" ]; then # mysqld service exists fi Could also use the service command and check the return code. service mysqld status if [ $? = 0 ]; then # mysqld service exists fi What is the best solution? Answer To get the status of one service without "…
Read more ⟶

Error installing Nokogiri 1.5.0 with rails 3.1.0 and ubuntu


Question Here is the error running bundle install vendor/gems on server: Installing nokogiri (1.5.0) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/dtt/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb checking for libxml/parser.h… no libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.…
Read more ⟶

In GTK/Linux, what's the correct way to get the DPI scale factor?


Question Context: Writing a drawing program that's supposed to be cross-platform. So I have multiple frontends responsible for providing a backend class access to a Cairo context, basic event handling, and widget size information. I recently decided to add the current UI scale (for high-DPI displays) to that last bit, primarily because I want to switch graphics to being rendered into a tile cache, so I need to know the highest level of detail the display can support.…
Read more ⟶

How can I install SSL on localhost in Ubuntu?


Question I want to install an SSL certificate on my localhost in Ubuntu environment because I can't work on the production server directly. I have to put some conditions in my code on the basis of whether the page is HTTP or HTTPS. How can I do this? Answer Enable the Apache module by typing: sudo a2enmod ssl After you have enabled SSL, you'll have to restart the web server for the change to be recognized:…
Read more ⟶

Selecting text in terminal without using the mouse


Question If I'm working in a terminal window in Linux, is there a keyboard shortcut I can use to select output displayed on previous lines? If I select something with the mouse I can copy using Ctrl + Shift + C, but is there a way to select without using the mouse at all. I'm using either Gnome terminal or KDE konsole in Ubuntu desktop. For example I often need to copy results from a mysql query and then google them.…
Read more ⟶

cron job not running inside docker container on ubuntu


Question I have a simple Dockerfile as follows FROM ubuntu:latest ADD crontab /etc/cron.d/test-cron RUN chmod a+x /etc/cron.d/test-cron RUN touch /var/log/cron.log CMD cron && tail -f /var/log/cron.log and the content of crontab file is as simple as * * * * * root echo "Hello world" >> /var/log/cron.log 2>&1 # empty line When I run this on my local OS X machine (with docker-machine running), it works fine ("Hello world" is printed to log file every minute).…
Read more ⟶