LAMP in Mint (MATE) 18

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
ingeva
Level 3
Level 3
Posts: 188
Joined: Wed Jun 20, 2012 3:39 am
Location: Sandvika, Norway

LAMP in Mint (MATE) 18

Post by ingeva »

After installing Mint MATE 18 I had trouble installing MySQL, Apache and php.
After checking around I found the solutions to the first 2, but php only works in command mode, not under the Apache server. What happens is that the source file is simply listed.
Short example from starting phpMyAdmin:

Code: Select all

addJSON( 'list', RecentFavoriteTable::getInstance('recent')->getHtmlList() ); exit; } if ($GLOBALS['PMA_Config']->isGitRevision()) { if (isset($_REQUEST['git_revision']) && $GLOBALS['is_ajax_request'] == true) { PMA_printGitRevision(); exit; } echo '
'; } // Handles some variables that may have been sent by the calling script $GLOBALS['db'] = ''; $GLOBALS['table'] = ''; $show_query = '1'; // Any message to display? if (! empty($message)) { echo PMA\libraries\Util::getMessage($message); unset($message); } $common_url_query = 
etc.
I have installed all thinkable php modules without errors, but this still happens.

My current install statement for apache is

Code: Select all

apt-get -y install apache2 apache2-data apache2-utils php php-gd php-mcrypt
Ideas?
Mint rules! (20 MATE) Cinnamon go home! :)
UncleBaldie

Re: LAMP in Mint (MATE) 18

Post by UncleBaldie »

Hi,

I have installed and working a webserver on LinuxMint XFCE.
I installed the LAMPP package for Linux from https://www.apachefriends.org/index.html
Everything works fine, MySQL/PHP works OOTB.

The quickest and easiest way to set up a webserver.

HTH,
Phil
User avatar
ingeva
Level 3
Level 3
Posts: 188
Joined: Wed Jun 20, 2012 3:39 am
Location: Sandvika, Norway

Re: LAMP in Mint (MATE) 18

Post by ingeva »

UncleBaldie wrote:Hi,
I have installed and working a webserver on LinuxMint XFCE.
I installed the LAMPP package for Linux from https://www.apachefriends.org/index.html
Everything works fine, MySQL/PHP works OOTB.
The quickest and easiest way to set up a webserver.
HTH,
Phil
Thanks for responding, and I'm sure it worked for you. It did not for me. Firstly, when I tried to start FireFox it complained it was already running. Then when I restarted, my whole setup for FireFox had disappeared.
Of course, my problem with php was not solved.
Last but not least, this was a graphical setup that required manual input. I'm running an unattended script and I do not like interruptions.

Fortunately, I have backup. :)

I see now that I wrote LAMPP. Should be LAMP.
Mint rules! (20 MATE) Cinnamon go home! :)
bbobbo
Level 1
Level 1
Posts: 16
Joined: Sun Jul 17, 2016 9:40 am

Re: LAMP in Mint (MATE) 18

Post by bbobbo »

you also need to install libapache2-mod-php so apache can talk to php, and php-mysql so php can talk to mysql:

sudo apt-get install libapache2-mod-php php-mysql
User avatar
ingeva
Level 3
Level 3
Posts: 188
Joined: Wed Jun 20, 2012 3:39 am
Location: Sandvika, Norway

Re: LAMP in Mint (MATE) 18

Post by ingeva »

bbobbo wrote:you also need to install libapache2-mod-php so apache can talk to php, and php-mysql so php can talk to mysql:

sudo apt-get install libapache2-mod-php php-mysql

Code: Select all

inge@Plato:/Store/inge/bin$ sudo apt-get -y install apache2 apache2-data apache2-utils libapache2-mod-php php-mysql php php-gd php-mcrypt
E: Malformed entry 4 in list file /etc/apt/sources.list.d/mysql.list (Component)
E: The list of sources could not be read.
E: Malformed entry 4 in list file /etc/apt/sources.list.d/mysql.list (Component)
E: The list of sources could not be read.
inge@Plato:
AND, of course, it made no difference but MySQL was already installed and working.
Also, this is new. The same installation works perfectly in Mint 17.3.

However I made the following change:

Code: Select all

apt-get -y install php php-pear php-mysql php-gd php-mcrypt
apt-get -y install apache2 apache2-data apache2-utils libapache2-mod-php
By installing the php-related modules first, everything worked as a charm. However, I also commented out the erroneous line 4 in ...../mysql.list. It was evidently not required.

I also note that I'm now running php 7. So we have skipped version 6 ... I just hope there won't be too many surprises! :)
Thank you for your help!
Mint rules! (20 MATE) Cinnamon go home! :)
Post Reply

Return to “Software & Applications”