I have a problem when you want to install Magento via XAMPP for Linux (I use 32-bit Ubuntu), some of the output error in the browser :
screenshoot
I tried changing the file permissions :
sudo chown -R www-data:www-data /opt/lampp/htdocs/shit
and
sudo chmod -R 755 /opt/lampp/htdocs/shit
After that I restart the apache2 :
sudo service apache2 restart
I tried to find a solution in Google, but it does not work, then what is the problem?
Is there a solution?
Related
I installed XAMPP on ubuntu 18.04. But when I visit http://localhost/phpmyadmin/ then I get this error.
And when I am trying to start MySQL database only it not start.
Also on command, I try to start XAMPP I got this error.
/opt/lampp/bin/mysql.server: 264: kill: No such process
There is a Permission denied error.
Try to stop the service as sudo:
sudo service mysql stop
and start it again:
run sudo /opt/lampp/xampp start
I had a similar problem.
If it still doesn't work try changing the permissions:
sudo chmod -R 777 /opt/lampp
sudo chown -hR nobody /opt/lampp
sudo chmod -R 755 /opt/lampp
And then restart it with the previous commands.
I'm running ubuntu 16.04 and installed LAMP this way:
Install Apache
sudo apt-get install apache2
Install MySQL
sudo apt-get install mysql-server
Install PHP
sudo apt-get install php7.0 libapache2-mod-php7.0
Restart Server
sudo /etc/init.d/apache2 restart
Check Apache
Working
Check PHP
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'
Working
Files structure:
/var/www/html/index.html > redirects to index.php
/var/www/html/pages/index.php < this file is not working and all php files
The owner group is set to:
chown -R www-data:www-data /var/www
The folders permissions are 755. The index.php permssions is 644 This is my apache2.conf file: https://ghostbin.com/paste/wwhog
But when i go to: http://localhost/pages/index.php I get this 403 Forbidden error. It seems like i can't see php files.
Here is some ways how to fix it.
chmod files 644 and folders 755 (you have opposite side)
check owner of folders and files and chown them correctly.
Disable SELinux.
Checking error log file of Apache will give you more information about error.
Try chown -R www-data:www-data /var/www, if you still get a 403, that means the problem is in apache2 conf, but i do not think.
I'll complete this response when i'll can see your apache's conf :) (apache2.conf & sites-enabled/000-default.conf -it should be the one you'are using in /var/www/html/-)
I'm using Ubuntu 16.04 and I want to run php files.
I installed Php 7 on it using:
sudo mkdir -p /var/www/html
sudo chown -R $USER:$USER /var/www/html
sudo apt install php
sudo apt install apache2
I created a php file (e.g. test.php) in /var/www/html. I can access it in the browser (e.g. http://localhost/test.php). Instead of executing the <?php ... ?> code, it is displayed as plain text:
I tried to turn short_open_tag to On. So I edited the /etc/php/7.0/fpm/php.ini and enabled it.
Then I ran sudo service php7.0-fpm restart. This didn't make any change in the browser. The php code is still displayed as plain text.
How can I fix this?
You didn't install apache properly, doing an apt-get on apache2 does not install everything.
what #newman stated is correct you can follow that guide, or here is a digitalocean link that is usuable for production server (since you would do this on a droplet). Note this is full stack LAMP, which I would assume you would get to eventually when you want to dab with mysql
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04
I have installed Ubuntu 14.04 on a server for local use.
Apache is working fine. I have see the phpinfo() method in /var/www . I have also changed the document root to /var/www but then also I cannot see the phpinfo on the browser.
HTTP 5000 error is thrown by the browser.
sudo apt-get install php5
sudo chmod -R 755 /var/www/
Try the following:
sudo chmod 777 -R var/www
What your doing here is allowing the read/write permission to your www folder into the var directory. First cd into your root and enter the above into your terminal.
http://www.computerhope.com/unix/uchmod.htm
Read the above link in order to get the detailed idea in chmod in terminal.
This is kind of a n00b question, but I'm a much better developer than a sys admin.
Im setting up an Amazon Linux instance on EC2 and can't seem to get php 5.5 with mcrypt installed. yum seems to throw php 5.3 at me each time i try to do a group install or just as a dependency of mcrypt.
Any suggestions? This is for a Laravel 4.1 application.
Thanks!
If you are using amazon linux, you will need to install the php packages that start with php55.
Older packages are kept for compatability.
Since start configuring an EC2 instance can be tricky and indeed there is not much available support or documentation at the date I'm writting this answer, I'll post the steps I followed that worked for me. So I hope it will be useful to someone else:
Start an EC2 instance as described on the AWS documentation. Do not use elastic beanstalk for deploying your php app.
Start you PuTTY session, it is well described on the AWS documentation.
When PuTTY session is on, install in the following order: apache server (v 2.4), php55, php55-mcrypt, php55-pdo and mysql55
sudo yum install httpd24
sudo yum install php55
sudo yum install php55-mcrypt
sudo yum install php55-pdo
sudo yum install mysql55
Check your server properly working sudo service httpd start. If succesfully installed, you'll see 'OK' and you should be able to see a sample page in the public DNS.
Add a group in order to allow "ec2-user" modifying and writing files inside var/www/html
sudo groupadd www
sudo usermod -a -G www ec2-user
Exit PuTTY and reenter again (so changes will be applied) exit
Reconnect and check membership
groups
Modify permissions on writing and editing files
sudo chown -R root:www /var/www
sudo chmod 2775 /var/www
find /var/www -type d -exec sudo chmod 2775 {} +
find /var/www -type f -exec sudo chmod 0664 {} +
Test your server
echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php
sudo service httpd restart
visit http://publicdomain/phpinfo.php. If properly working (it should) it will display the php info page.
All these steps worked well for me after hours dealing with php versions that are not compatible with laravel 4.1>=