Fix WAMP server error: local server – 1 of 2 services running

It’s never fun when your WAMP server is not loading up correctly. Have you ever encountered this error before saying local server – 1 of 2 services running?

First, let’s check which service isn’t working. I always check Apache first. Left click WAMP server icon and click Service administration.

If the Apache service is running, we should see the Stop Service option enabled but in this case, it hasn’t even started yet.

So in order for us to fix this problem, we need to know what is causing this to happen. We can then do the following to know why it’s failing to start to begin with.

  1. Press Windows icon on your keyboard or click the Windows icon on your task bar. Search for View event logs.
  2. The Event Viewer window will open. Click the Windows Logs on the left pane and then click Application.
    You will then see a row with Error. Click that row to display the details of the error.
  3. This window will be displayed and will explain the error found
     

    Once you’re done addressing the issue, go give it a try and restart your WAMP server. If it’s still not working, check the event logs again for more details about the error. Once everything has been addressed, your WAMP server should turn GREEN and work properly.

PHP file in Ubuntu not rendering properly

As I was done creating my PHP file in my Ubuntu server, I tried loading up the page and the page wasn’t rendering the PHP code correctly. It was rendering my PHP code as a text.

If this is also happening to your website, here are some stuff you can start doing to properly load up your PHP page file on your Ubuntu server.

The first step is to install the necessary packages on your Ubuntu server.

sudo apt-get install apache2 php7.0 libapache2-mod-php7.0

 

It’s good to verify the PHP module is loaded. You can do so by running the code below.

a2query -m php7.0

 

If not enabled, do the following.

sudo a2enmod php7.0

 

Once all those setups are done, the last step is to restart apache.

sudo service apache2 restart

Go to your browser and try loading up the page again. Your page should load up correctly.

Enjoy coding!