I'm not using php or php-fpm, but it's hogging port 9000. I need port 9000. I'd like to change the port. I changed it in /etc/php-fpm.conf and /etc/php-fpm.d/www.conf. listen = 127.0.0.1:9005. Still listening on 9000. If I kill it it just loads back up instantly with a different PID.
I'm ok uninstalling it too, but I can't figure out how to do that either. Any ideas?
which php version do you have and did you install it via homebrew?
I was having this problem today and solved it by changing the configuration of the listening port:
in the config file in:
/usr/local/etc/php/7.2/php-fpm.d/www.conf
change the line listen = 127.0.0.1:9000 to whatever port you want
If you don't have the config file it might have been a brew problem when copying files. You have to do something like this before attempting to change www.conf:
cd $(brew --prefix php#7.2)
cp -R .bottle/* /usr/local/
All the credits go to this blogpost: https://www.dionysopoulos.me/custom-apache-and-php-server-on-macos-the-definitive-2019-edition/
Update for Apple Silicon Chips
Although the current answer is correct for Mac's on Intel chips it's not correct for changing the PHP-FPM Port on Mac with Apple Silicon chips.
If following the blogpost https://www.dionysopoulos.me/custom-apache-and-php-server-on-macos-the-definitive-2019-edition/
Do Not copy the brew files to /usr/local/ as this is for intel chips.
Instead, after installing php with brew, the file should already exist in:
/opt/homebrew/etc/php/8.0/php-fpm.d/www.conf
Or for php 5.6: /opt/homebrew/etc/php/5.6/php-fpm.conf
Where you can then change listen = 127.0.0.1:9000 to the port you like.
Remember to then restart apache.
Related
Whenever I try to serve project from VS Code, after Windows restart I get message like this:
J���
8.0.29����MNguts]�ےےے�ےك����������uE&)c^L:{�caching_sha2_password�!��ے„#08S01Got packets out of order
After I reinstall Wamp everything works, until I restart Windows.
It was port 3000 being taken by TCP.
You should open CMD as an administrator and follow up to solve this error.
netstat -ano | findstr :<PORT>
Port, in my case, was 3000
and then
taskkill /PID <PID> /F
After that, reload the server and enjoy!
Problem:
I can't access localhost/phpmyadmin/
before I can access localhost/phpmyadmin/ but today when I'm trying to access this page I got weird page
also I can access localhost/xampp/ without any problem
Question:
How can I solve this problem ?
what you need to do is to add phpmyadmin to the apache configuration:
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
then restart apache:
sudo service apache2 restart
On windows, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
A cleaner way is to create the new configuration file:
/etc/apache2/conf-available/phpmyadmin.conf
and write the following in it:
Include /etc/phpmyadmin/apache.conf
then, soft link the file to the directory /etc/apache2/conf-enabled:
sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled
You should use localhost:portnumber/phpmyadmin
Here the Portnumber is the number which you set for your web server or if you have not set it until now it is by Default - 80.
Make sure that both apache webserver and MySQL server are running. I had the same failure because I forgot to start my webserver.
when you run Xampp, check the apache port no. ex: if it is displaying port 80, then type
http://localhost:80/phpmyadmin/
After that it will display automatically
http://localhost/phpmyadmin/
I am using Linux Mint :
After installing LAMP along with PhpMyAdmin, I linked both the configuration files of Apache and PhpMyAdmin. It did the trick. Following are the commands.
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
sudo apt-get -y --reinstall install phpmyadmin;
sudo service apache2 restart;
Hope this helps.
It generally occurs when your default port for localhost is being used by another application (like apache tomcat). Easy fix is to stop the application and simply go to localhost/phpmyadmin.
In my case it worked after stopping apache tomcat.
Sometimes it's case sensitive. Have you tried going to http://localhost/phpMyAdmin?
Based on your output, one of your plugins is messing up with the phpmyadmin. Try disabling all plugins to see if that works.
If it does, enable them one by one and check again, to find the problematic one.
Resolving same problem on Ubuntu 14.04, I use code:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
it is because since Ubuntu 13, Apache loads configuration files from the /etc/apache2/conf-enabled directory.
Ubuntu Documentation
You need reload the server.
If you use apache server
systemctl reload apache2
If you use nginx server
systemctl reload nginx
Judging by the output of the image which you linked in one of your comments:
http://imageshack.us/photo/my-images/638/erroruh.png/
... maybe you accidentally downloaded some form of the website from where you thought you were downloading phpMyAdmin. The text contains references to "Dropbox" which makes me think that the information displaying is in no way related to phpmyadmin.
Try re-installing and see if that helps...
http://www.phpmyadmin.net
Or it could be that Skype is running on the same port (it does by default).
Disable Skype or configure Skype to use another port
I also faced the same issue.
i worked on it and found out ,this is simply because i have mistakenly moved my "phpmyadmin" folder in to a some folder inside Xampp. Go through all the other folders which are inside the main "XAMPP" folder.
Then if you find the "phpmyadmin" inside another folder other than "xampp" move it back to the main "XAmpp" folder and refresh the page.
:)
A cleaner way to include the phpmyadmin config into apache2 is to create a new config file by:
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
and write in it:
Include /etc/phpmyadmin/apache.conf
Run the Apache server, note down the port number(eg:8081)
Open your browser and type localhost:8081(or apache's port number)
Just change -
$cfg['Servers'][$i]['host'] = 'localhost';
in config.inc.ph. i.e. from existing to localhost if you installed it locally
Restarting the xampp services helped me
Make sure you still have phpMyAdmin maybe you deleted it in your htdocs folder?
Get the latest version: http://www.phpmyadmin.net/home_page/downloads.php
Unzip then place the phpMyAdmin (rename the folder if it has version numbers) in your htdocs folder.
Make sure Skype is disabled as it will some times run on the same port as your XAMPP install... I'm not sure why but apache installed via xampp on some windows 7 machines ive seen apache not run if skype is on after 10years of IT work.
So make sure apache is running, mysql is running and hit:
localhost/phpMyAdmin
You should get some kind of install prompt. Step through this you will learn lots along the way. But basically its one config file that needs some settings.
I had the same problem. Couldn't access http://localhost/joomla neither.
and I did not quite understand the other answers.
The simple solution for me:
stop all actions in xampp (I had apache and mysql running. apache on port 80 and 7000something)
quit firefox
restart the actions (apache and mysql)
restart firefox.
open http://localhost/phpmyadmin (or http://localhost/joomla - whatever it be)
voila!
Now apache runs on port 80 and 443 and mysql on 3306.
What you need to do is to add phpmyadmin to the apache configuration:⠀⠀⠀⠀⠀⠀⠀
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
Then restart apache:
sudo service apache2 restart
On ubuntu 18.0.1, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
http://127.0.0.1/phpmyadmin/
I have a Homestead vagrant VM setup. Xdebug is all setup for remote debugging out of the box.
I can see this in here /etc/php5/fpm/conf.d/20-xdebug.ini
and by doing a php -i | grep 'xdebug'
I've setup a breakpoint in my default index.php and clicked the 'start listening for PHP debug connections' in my IDE PHPstorm.
I have installed xdebug helper for chrome and turned it on, also setting my IDE string to PHPstorm in it's settings.
I've tried setting different ports in both my IDE and xdebug settings.
I've also tried listening to these ports with sudo nc -l 9002
on both host and guest machines, nothing connects so the problem here is definitely with xdebug settings in the PHP server.
Posting my own answer here for posterity in the hope it saves someone time as I trawled google for an answer and spent several hours stuck on this.
When doing a sudo netstat -taupen I saw HHVM was listening on port 9000 on the VM which should have been a clue to why it wasn't working, I set hhvm: false in my homestead.yaml to no avail.
After more fiddling I saw that phpinfo() was giving a message of 'HipHop', A quick look at Google again led me to HHVM.
What I didn't do before was reprovision my homestead which sometimes is needed when changing stuff in the config. So after a homestead provision HHVM was fully disabled and xdebug was working.
Also word of warning, editing xdebug settings in the ini requires a restart of php fpm, nginx alone is not enough. Do a sudo service php5-fpm restart.
Just a quick note I tried all of the above provided solutions
My Solution:
for PHP7, Laravel 5.3 and homestead
vagrant ssh
sudo apt-get purge hhvm && sudo service nginx restart
After purging hhvm from the system xDebug works as expected.
Description:
In newer versions of laravel/homestead hhvm is not supported anymore but is still running!
They took all descriptions out of the documentation. (Laravel 5.3)
hhvm: false in the Homestead.yml config does not work anymore!
Tried it in every possible location of the Homestead.yml file, but if you reprovision and boot up homestead the hhvm instance is still running and listening on port 9000...
First I tried to change xDebugs listening port to 9089 which did not work. (yes I restarted fpm)
At some point I got annoyed and purged hhvm from the homestead vm.
Now everything works as expected.
Note: The provisioning is not reinstalling it.
Hope this helps someone and thanks for pointing me into the right direction
Problem:
I can't access localhost/phpmyadmin/
before I can access localhost/phpmyadmin/ but today when I'm trying to access this page I got weird page
also I can access localhost/xampp/ without any problem
Question:
How can I solve this problem ?
what you need to do is to add phpmyadmin to the apache configuration:
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
then restart apache:
sudo service apache2 restart
On windows, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
A cleaner way is to create the new configuration file:
/etc/apache2/conf-available/phpmyadmin.conf
and write the following in it:
Include /etc/phpmyadmin/apache.conf
then, soft link the file to the directory /etc/apache2/conf-enabled:
sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled
You should use localhost:portnumber/phpmyadmin
Here the Portnumber is the number which you set for your web server or if you have not set it until now it is by Default - 80.
Make sure that both apache webserver and MySQL server are running. I had the same failure because I forgot to start my webserver.
when you run Xampp, check the apache port no. ex: if it is displaying port 80, then type
http://localhost:80/phpmyadmin/
After that it will display automatically
http://localhost/phpmyadmin/
I am using Linux Mint :
After installing LAMP along with PhpMyAdmin, I linked both the configuration files of Apache and PhpMyAdmin. It did the trick. Following are the commands.
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
sudo apt-get -y --reinstall install phpmyadmin;
sudo service apache2 restart;
Hope this helps.
It generally occurs when your default port for localhost is being used by another application (like apache tomcat). Easy fix is to stop the application and simply go to localhost/phpmyadmin.
In my case it worked after stopping apache tomcat.
Sometimes it's case sensitive. Have you tried going to http://localhost/phpMyAdmin?
Based on your output, one of your plugins is messing up with the phpmyadmin. Try disabling all plugins to see if that works.
If it does, enable them one by one and check again, to find the problematic one.
Resolving same problem on Ubuntu 14.04, I use code:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
it is because since Ubuntu 13, Apache loads configuration files from the /etc/apache2/conf-enabled directory.
Ubuntu Documentation
You need reload the server.
If you use apache server
systemctl reload apache2
If you use nginx server
systemctl reload nginx
Judging by the output of the image which you linked in one of your comments:
http://imageshack.us/photo/my-images/638/erroruh.png/
... maybe you accidentally downloaded some form of the website from where you thought you were downloading phpMyAdmin. The text contains references to "Dropbox" which makes me think that the information displaying is in no way related to phpmyadmin.
Try re-installing and see if that helps...
http://www.phpmyadmin.net
Or it could be that Skype is running on the same port (it does by default).
Disable Skype or configure Skype to use another port
I also faced the same issue.
i worked on it and found out ,this is simply because i have mistakenly moved my "phpmyadmin" folder in to a some folder inside Xampp. Go through all the other folders which are inside the main "XAMPP" folder.
Then if you find the "phpmyadmin" inside another folder other than "xampp" move it back to the main "XAmpp" folder and refresh the page.
:)
A cleaner way to include the phpmyadmin config into apache2 is to create a new config file by:
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
and write in it:
Include /etc/phpmyadmin/apache.conf
Run the Apache server, note down the port number(eg:8081)
Open your browser and type localhost:8081(or apache's port number)
Just change -
$cfg['Servers'][$i]['host'] = 'localhost';
in config.inc.ph. i.e. from existing to localhost if you installed it locally
Restarting the xampp services helped me
Make sure you still have phpMyAdmin maybe you deleted it in your htdocs folder?
Get the latest version: http://www.phpmyadmin.net/home_page/downloads.php
Unzip then place the phpMyAdmin (rename the folder if it has version numbers) in your htdocs folder.
Make sure Skype is disabled as it will some times run on the same port as your XAMPP install... I'm not sure why but apache installed via xampp on some windows 7 machines ive seen apache not run if skype is on after 10years of IT work.
So make sure apache is running, mysql is running and hit:
localhost/phpMyAdmin
You should get some kind of install prompt. Step through this you will learn lots along the way. But basically its one config file that needs some settings.
I had the same problem. Couldn't access http://localhost/joomla neither.
and I did not quite understand the other answers.
The simple solution for me:
stop all actions in xampp (I had apache and mysql running. apache on port 80 and 7000something)
quit firefox
restart the actions (apache and mysql)
restart firefox.
open http://localhost/phpmyadmin (or http://localhost/joomla - whatever it be)
voila!
Now apache runs on port 80 and 443 and mysql on 3306.
What you need to do is to add phpmyadmin to the apache configuration:⠀⠀⠀⠀⠀⠀⠀
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
Then restart apache:
sudo service apache2 restart
On ubuntu 18.0.1, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
http://127.0.0.1/phpmyadmin/
I have run into a problem. I do both pHp development and JSF development. But i ran into a problem. You see, a while ago I installed Apache2 so that I could do pHp. But then a month later I had to install Apache Tomcat. That's when the problem arose. I followed all the instruction give on the tomcat.apache.org site for Ubuntu. It did not install. And 127.0.0.1 always pointed to Apache2's page. I tried 127.0.0.1:8080 but that did not return anything.
So I am here to ask you if there is anyway I can turn off Apache2 when i want to work with Tomcat? And turn it back on whenever I want?
The two servers should be configured to listen on different ports if you want them both available on the same host.
Instructions for changing ports for Apache2 on Ubuntu
Instructions for changing ports for Apache Tomcat on Ubuntu
Now, if you've configured Apache to listen on 80 and Tomcat to listen on port 8080, you should be able to access them at http://localhost:80 (or just http://localhost) and http://localhost:8080 respectively.
You should ensure both the servers are actually up as well. netstat -npl | grep :8080 and netstat -npl | grep :80 should help you identify what processes are bound to these two ports. If the ports are bound but don't say java or apache2, you've got some other process listening on these ports and that's going to stop the server that tries to bind to that port from starting up.
For Apache2, you could also run service apache2 status to see what the status is.
If however, you want to run both servers bound to the same port( perhaps 80) then as you seem to have guessed, you'll have to stop the other.
To stop Apache2, execute the command service apache2 stop
Stopping Tomcat depends on how you started it. You might simply run the shutdown.sh script in ${CATALINA_HOME}/bin i.e. the bin directory in your Tomcat installation folder.
Note
You will [probably] need to execute the commands as root so you'll need to prefix sudo.