I can't start apache because I have this error "Apache web server is already running".
I go this code "sudo /opt/lampp/lampp start"
and I obtain:
XAMPP: Starting Apache...fail.
XAMPP: Another web server is already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
have just done:
sudo apt-get remove apache2
But it doesn't resolve my problem. I modify apache port at 81. Anyone can help me?
This work for me
on command line,
ps ax | grep httpd
and
kill -9 [PID]
sudo /opt/lampp/lampp restart
Try this.....
$sudo /etc/init.d/apache2 stop
$sudo /etc/init.d/mysql stop (may be failed, don't worry, move further)
$sudo /etc/init.d/proftpd stop
Related
So I was playing with the sleep method of php. I coded sleep(99999); Now my website won't load lol. Is it because of that? How can I fix it?
I think you can just restart apache, or php-fpm if you are using php-fpm. And why in the world would you try that!
You must restart your server if restarting your web server didn't work. Or, it will just be stuck in a delay until the sleep time ends.
I would advise you not to play with a production server. Use a test server for these tests. Because it is not as easy to reset these issues.
For example, when you are using shared hosting, you cannot restart apache yourself.
How do I setup a test server:
Install some software like XAMPP if you are using Windows in your home PC. Or, if you are using Linux, you can just install apache and php using the following commands on:
Ubuntu/Debian: sudo apt install apache2 php
CentOS/Fedora: sudo yum install epel-release, and sudo yum install httpd php or sudo dnf install httpd php
Arch Linux/Manjaro: sudo pacman -S apache php php-apache
I want to remove output_buffering and want to make change to memory_limit by editing etc/php.ini file
But none of my changes are taking effect.
After editing etc/php.ini file as a super user. I've restarted httpd.service using following command
sudo systemctl restart httpd.service
I am using centOS 8
[root#backend adminuser]# cat /etc/*release
CentOS Linux release 8.0.1905 (Core)
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
CentOS Linux release 8.0.1905 (Core)
CentOS Linux release 8.0.1905 (Core)
php-common packages are as below
[root#backend adminuser]# rpm -qc php-common
/etc/php-zts.d/20-bz2.ini
/etc/php-zts.d/20-calendar.ini
/etc/php-zts.d/20-ctype.ini
/etc/php-zts.d/20-curl.ini
/etc/php-zts.d/20-exif.ini
/etc/php-zts.d/20-fileinfo.ini
/etc/php-zts.d/20-ftp.ini
/etc/php-zts.d/20-gettext.ini
/etc/php-zts.d/20-iconv.ini
/etc/php-zts.d/20-phar.ini
/etc/php-zts.d/20-sockets.ini
/etc/php-zts.d/20-tokenizer.ini
/etc/php.d/20-bz2.ini
/etc/php.d/20-calendar.ini
/etc/php.d/20-ctype.ini
/etc/php.d/20-curl.ini
/etc/php.d/20-exif.ini
/etc/php.d/20-fileinfo.ini
/etc/php.d/20-ftp.ini
/etc/php.d/20-gettext.ini
/etc/php.d/20-iconv.ini
/etc/php.d/20-phar.ini
/etc/php.d/20-sockets.ini
/etc/php.d/20-tokenizer.ini
/etc/php.ini
For SSE Script I want to make output_buffer as null or Off like my another server but its not taking any change. I tested by changing php.ini as a root user and restarted httpd services.
I am assuming you are using php-fpm
Following command worked for me.
Connect via terminal and Make sure you are Super(Root) user
sudo su
Now run following command
sudo systemctl restart php-fpm.service
Note : Test by making small change like increasing or decreasing memory_limit in php config file and run above command and review change using phpinfo()
You don't mention whether you're using mod_php or php-fpm. Running sudo systemctl restart httpd.service only helps for mod_php. If you're using php-fpm, you need sudo systemctl restart php-fpm.service instead.
Changing etc/php.ini does not work any more.
You need to add your own .ini file now under "/etc/php.d" and restart php
confirm the path from phpinfo. Look for
"Scan this dir for additional .ini files /etc/php.d"
create file (30 prefix to file name is like priority or how late to load):
sudo vi /etc/php.d/30-user.ini
Add entries like:
max_execution_time=200
post_max_size=100M
upload_max_filesize=100M
Restart PHP (restarting Apache does not help)
Check the service (if not present ..restarting Apache should work: sudo systemctl restart httpd )
sudo systemctl status php-fpm
Resart the service
sudo systemctl restart php-fpm
I am trying to install a LAMP working environnement but for some reason nothing happen. The lack of error messages makes me wonder what to look for.
I followed the Ubuntu installation process :
sudo apt install apache2 php libapache2-mod-php mysql-server php-mysql
At that stage, localhost should display the "It works!" message but it doesn't.
I have been restarting the apache service several times with no effect:
sudo service apache restart
it looks to be fine anyway.
I have checked the following files as advices on some online tutorial :
/etc/apache2/sites-available/000-default.conf
/etc/apache2/apache2.conf
I am atually clueless on what to troubleshoot at that point.
Any ideas ?
You have apache2 installed. Try running this instead:
sudo service apache2 restart
I tried installing LAMP on WSL too. But I was lucky. I followed these steps:
Step 1: Update and Upgrade the ubuntu subsystem
sudo apt-get update && sudo apt-get upgrade
Step 2: Start bash.exe type:
sudo apt-get install lamp-server^
remember the caret (^) at the end of the command.
add these 2 lines in /etc/apache2/apache2.conf :
Servername localhost
AcceptFilter http none
then you can start apache :
/etc/init.d/apache2 start
Step 3: Test Web Server, PHP and MySQL
Test Apache: Open Web Browser and type this URL:
http://127.0.0.1 or http://localhost
Test PHP: Create below file (info.php) and place it in /var/www/html
<?php
phpinfo();
?>
Open Web Browser and type this URL:
http://127.0.0.1/info.php or http://localhost/info.php
Test MySQL: Type below command in bash prompt
service mysql start
mysql -uroot -ppassword
Hope it works for you.
I'm following this link: click here!
I ran
sudo apt-get update && sudo apt-get install phpmyadmin
Then I restarted apache2 by using this command:
sudo service apache2 restart
Then I went to http://localhost/phpmyadmin in browser and I got this error:
Not Found
The requested URL /phpmyadmin was not found on this server.
Where did things go wrong?
P.S: This is the 3rd time that I'm trying to install phpmyadmin.
Look at this: http://tecadmin.net/install-phpmyadmin-in-ubuntu/
You have to edit your conf file
You must have a LAMP server in order to work with phpmyadmin.
In your case, I think you haven't installed MySQL.
You can install the entire LAMP by the following command.
sudo apt-get install lamp-server^
It’s important to remember the caret (^) at the end of the command.
During the installation, MySQL will ask you to set a root password.
Step by step installation of LAMP server is described in this link.
As you have already installed phpmyadmin, you now need to configure apache.
sudo nano /etc/apache2/apache2.conf
Add the following to the bottom of the file:
# phpMyAdmin Configuration
Include /etc/phpmyadmin/apache.conf
Restart apache with the following command.
sudo service apache2 restart
Now phpmysql will be working in http://localhost/phpmyadmin/.
I am facing the below issue while starting the xampp on linux box.
I am able to start the mysql and proFPD but i couldn't satrt the apache.
It showing another webserver is already running.
XAMPP: Starting Apache fail.
XAMPP: Another web server is already running.
XAMPP: Starting MySQL already running.
XAMPP: Starting ProFTPD already running.
- if you start lampp and are fetching apache starting issue run below
command
sudo /etc/init.d/apache2 stop && sudo /opt/lampp/lampp start
Seems like you have httpd daemon running already.
Go to terminal and type service httpd stop
Then try starting XAMPP