I had an Apache configured to run on HTTPS. Also a Tomcat application running without the 8080 port and in HTTPS.
Everything perfect since I had to install Drupal 10 (using composer) that needed a different PHP version
Problem: my Apache is still in HTTPS. I can use Drupal 10 now. BUT the Tomcat app now only runs if :8080 is added (and there is a warning that says that the site is insecure, so I assume it only runs now in HTTP)
The message error that appears when I use https://myserver.com/myTomcat_application
is This combination of host and port requires TLS
(and also HTTPS seems not to work, it appears as 'Not secure' and in red)
I did not touch anything in Tomcat or Apache configuration.
I am wondering at which point everything went wrong.
So, even if my phpconfig.php was saying that I was using php 8.2, Drupal keeped saying that I was using a PHP version lower than 8 (I have several PHP versions installed)
These are some of the actions I did:
sudo apt purge libapache2-mod-php8.2 libapache2-mod-php
(i think this was a mistake, as it re-installed all? so for example I had to reconfigure pgsql)
sudo a2dismod php7.1
sudo a2enmod php8.2
Some maybe relevant info from phpinfo.php:
OpenSSL is enabled. Loaded Modules: mod_ssl
Registered Stream Socket Transports: tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Apache environment: SSL_TLS_SNI =>mywebsite.com
Thanks for any kind of guidance
Related
First, I'm running macOS High Sierra, with Homebrew's PHP 7.1
I've also followed the Valet documentation to the letter, as well as trying what was on these asks: Valet (Laravel): DNS address can not be found and Laravel valet It works aaaaaand, despite all of that, when I navigate to project.dev, I just get "It works!" I was having issues pinging, but that turned out to be Stealth Mode in the macOS Firewall.
I have Laravel set up in this directory, so I SHOULD be getting the default splash page, right?
Also, in case it matters, here's the line I used to install PHP 7.1 itself: brew install php71 --with-httpd --with-pear --with-postgresql --with-thread-safety --with-homebrew-curl
You should check your settings related to firewall. Make sure you are allowing pings and ICMP.
To check it on a Mac :
System Preference > Security & Privacy > Firewall > Firewall Options
This sounds like the Apache that comes pre-installed with macos is running in the port 80. Before starting valet, make sure that Apache is stopped.
You can these commands: sudo apachectl stop or sudo apachectl -k stop to stop Apache, and after that, then you can proceed with your valet process.
Hope it helps.
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
I am trying to connect to localhost and I am getting the following error on the browsers (chrome and ff and safari)
Browsers connection attempt to localhost was rejected.
i tried
telnet 127.0.0.1
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
and
Barry$ / : curl localhost
curl: (7) Failed to connect to localhost port 80: Connection refused
the httpd.conf is set to LISTEN : 80
However I can connect using thin on localhost:3000 for a rails project
I've looked at other similar Q's and answers but cannot find a fix.
Check your Apache config with this command:
sudo apachectl -t
This tests the config files and tells you if there's an error. Running sudo apachectl start does not output config file syntax errors to the logs for some reason.
Do u have skype or pow installed ?
I just wanted to post my solution to getting localhost working again.
I used the following process to reinstall apache and update the ports.
It worked for me so I hope it can help someone else.
I do mention at the bottom that im still getting an unfound url error, so if anyone can help, that would be great.
RE-BUILDING APACHE
port search apache2
Warning: port definitions are more than two weeks old, consider using selfupdate
sudo port uninstall apache2
sudo port -v selfupdate
Ensure that Xcode command line tools are installed or else you get a warning:
Warning: The Xcode Command Line Tools don't appear to be installed; most ports will likely fail to build.
xcode-select —install
sudo port upgrade outdated
sudo port search apache2
then i did a reinstall of apache2
sudo port install apache2
sudo port load apache2
This got Localhost back up and running on port 80 for me however I'm not out of the woods yet.
when i go to my dev sites using
localhost/~barrymcmahon/
im getting the following error
Not Found
The requested URL /~barrymcmahon/php_5_advanced/ was not found on this server.
I was trying to install XAMPP on my windows machine and while it is installing it says installing Apache server failed because port 80 and 443 are already in use.
Since Skype is also using this port, i have uninstalled Skype and started re-installing XAMPP server.
But still after uninstalling Skype i get the same error message when XAMPP server is installing. Could someone has faced this issue before share your ideas with me
Thanks in advance for any help
At a command prompt type
netstat -a -n -o
to see which process is using the ports.
It's probably IIS if you've got that installed.
One way to fix it is to specify non-standard ports for XAMPP to use, such as 8080 and 8443.
Have You IIS Service running?
just check that IIS Service, when it running just stop it, you can stop it from Computer managment > Services
I recently installed PHP5 with Macports using sudo port install php5 +imap. However, when I run /opt/local/bin/php -i, I don't see the IMAP module listed under the other modules. Is there an additional step or change I need to make to php.ini or otherwise to get this module enabled?
Also, running /usr/bin/php -i (I believe this is the php NOT installed by Macports) also does not show IMAP configured.
PHP modules have been available as variants in previous versions of the php5 port, but have been moved into their own ports long time ago. You can see the available variants with port variants php5, which does not list that +imap anymore. Most probably you followed an oudated tutorial.
To get the IMAP module install the port php5-imap:
sudo port install php5-imap