Setting up LAMP Stack in Ubuntu 14.04 - php

I am trying to setup LAMP stack on Ubuntu 14.04 LTS by installing each of the packages seperately in terminal and not by using LAMP software bundle packages. The following are the commands that I executed:
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install mysql-server
sudo apt-get install phpmyadmin
Is there any other configuration that needs to be done like configuring the apache2 server, phpmyadmin, etc... I looked it up on google and unable to find recent results.
Appreicate your help
Edit: Updated the query with more information

Go in the apache2 config file by typing:
sudo nano /etc/apache2/apache2.conf
Then, type the following and save the file:
Include /etc/phpmyadmin/apache.conf
Now, restart the apache2 server by typing:
/etc/init.d/apache2 restart

Related

PHP XML Extension: Not installed

So i'm currently installing mybb and went through a very long tutorial on how to do it. The problem is when I get to the requirements check this shows up
How does one go about fixing this? I read that I may need to do
sudo apt-get install php-xml
I have done this and everything went ok but still doesn't change it to installed.
FYI: I have only been using this OS for a few days so please go nice on me :)
You're close
sudo apt-get install php-xml
Then you need to restart apache so it takes effect
sudo service apache2 restart
Had the same problem running PHP 7.2.
I had to do the following :
sudo apt-get install php7.2-xml
I solved this issue with commands bellow:
$ sudo apt-get install php7.3-intl
$ sudo /etc/init.d/php7.3-fpm restart
These commands works for me in homestead with php7.3
In Centos
sudo yum install php-xml
and restart apache
sudo service httpd restart
If you are working with php in windows, you can just access to the file "php.ini" located in your php instalation folder and uncomment the ";extension=xmlrpc" line deleting the ";"
("extension=xmlrpc")

How can enable imap in php.ini

I was trying to install vtiger in my server for installing vtiger we need to enable imap
I tried to enable imap using php.ini by removing ; from extension=php_imap.dll but this does not work. Installing page still showing that imap is not enabled. Can i enable this using any php function. Any help will be greatly appreciated
On Ubuntu and debian a better way is to enable it this way:
sudo apt install php-imap
sudo phpenmod imap
sudo service apache2 restart
On CentOS7+
sudo yum install php-imap
On Ubuntu (<= 14.04) and debian (<= Weezy)
sudo apt-get install php5-imap
sudo php5enmod imap
sudo service apache2 restart
If you are using LAMP server,
First install IMAP using the command on terminal
$ sudo apt-get install php5-imap
Then add this extension=imap.so code to your php.ini file
Restart your server,
$ sudo /etc/init.d/apache2 restart
It will work
sudo apt-get purge php5
sudo apt-get install php5=5.5.9+dfsg-1ubuntu4
sudo apt-get install php5-imap php5-curl
add in php.ini
extension=imap.so
extension=curl.so
reload and restart apache2. clear all your browser history. And Check than.
it may be help.
For PHP7 on LAMP (in Ubuntu)
sudo apt-get install php7.0-imap
sudo service apache2 restart
on centos7 php7
yum install php-imap
Step 1
Open This PC and go to this path mentioned below
Yourdrive:\xampp\php(type : configuration Settings)
Step 2
Open This file in any editor and find ;extension=imap
Step 3
Remove ;(Comment) and save the file and close it.
Step 4
Restart Apache and Mysql from your xampp.
Step 5
Now you'll able to install Laravel-imap Library
Open cmd (Command Prompt) in your project directory and run this command
composer require webklex/laravel-imap

Cannot install LAMP server in UBUNTU

I am new using Ubuntu. Basically I want to set the LAMP package in order to test PHP locally. So I installed tasksel then I executed in the terminal.
sudo tasksel
Which promps a list of servers I can install. I move the cursor to LAMP Server option, hits enter and returns to the command line. Like if I had pressed EXIT.
What am I missing? Can someone experienced help me install LAMP even if it is on another way? I have Ubuntu 13, by the way. I have been struggling with this for a while now.
You can try with.
sudo tasksel install lamp-server
https://help.ubuntu.com/community/ApacheMySQLPHP
To install apache, open terminal and type in these commands:
sudo apt-get update
sudo apt-get install apache2
to test if apache is working use this simple script:
ifconfig eth0 | grep inet | awk '{ print $2 }'
and browse to : http://<you'r ip address>
to install mysql open the terminal and write this:
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
Once you have installed MySQL, we should activate it with this command:
sudo mysql_install_db
Finish up by running the MySQL set up script:
sudo /usr/bin/mysql_secure_installation
The prompt will ask you for your current root password.
Type it in.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Now, its time to install PHP:
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
That's it! restart apache to apply the changes:
sudo service apache2 restart
Hope it helps.
Change user to root
sudo su root
update the repository
sudo apt-get update
install LAMP packages by,
apt-get install apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql
This three simple step is enough to install LAMP.
Courtasy: iGyan: Install LAMP with PHPmyadmin in linux
You can easily install LAMP stack in Ubuntu with one command lines:
apache2 mysql-server mysql-client libapache2-mod-auth-mysql php5 php5-mysql libapache2-mod-php5 php5-mcrypt php5-curl php5-cli php5-gd phpmyadmin apache2-utils

PHPMYADMIN not loading in Ubuntu12.04

I have installed phyMyAdmin on my Ubuntu 12.04 using sudo apt-get.. I configured the Apache2 Server as it was given in the Documentation The problem I am facing is that when i take "http://localhost/phyMyAdmin" nothing is displayed in the browser,instead it downloads a php file. Why is this occuring?How can I resolve this problem?
You're missing PHP.
From the terminal:
sudo apt-get install php5 php5-mysql
Then restart Apache:
sudo service apache2 restart
You can then navigate to http://localhost/phyMyAdmin and it'll work.
This might help you
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo service apache2 restart

How do I configure PHP + Apache on Amazon EC2?

I am new to this of course.
I am trying to configure PHP and Apache on a new Amazon EC2 AMI. This is a very lightweight server so the Micro instance fits the bill.
I just need
Apache
PHP
I ran
sudo yum install apache2
sudo yum install php
I copied info.php to /var/www/html
info.php only contains
<? phpinfo(); ?>
when i browse to http://www.example.com/info.php Apache serves info.php but it does not render it. I looks like apache is not configured to handle php files. What step or steps am I missing?
Thanks,
First try using full tags, so your script would be.
<?php phpinfo(); ?>
instead of <? ?>
If no luck, try:
sudo yum remove php
sudo yum install php
then service httpd restart
Alternatively try using one of the pre-built AMI's. Community AMI's have several LAMP configurations.
Just for those who get here from Google, try this:
sudo yum install -y php
sudo yum -y install httpd
If you need development versions:
sudo yum install -y php-devel
sudo yum -y install httpd
If you need Apache 2.4 and PHP 5.4:
sudo yum install -y php54
sudo yum -y install httpd24
From:
Install Apache, PHP, and MySQL on Amazon Linux
Install Apache 2.4, PHP 5.4, and MySQL on Amazon Linux
Just tar your info.php;
Upload it to another public directory;
Get the file to ec2 with wget;
Untar the file.
That's it ;)

Categories