I am on High Sierra 10.13.6 and I recently ran into an issue with my Homebrew environment for local dev work. I can't seem to figure out what is the problem. Any Composer or Drush commands will give this
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Abort trap: 6
I restarted my computer and when I try to start apachectl; I get
httpd: Syntax error on line 179 of /usr/local/etc/httpd/httpd.conf: Cannot load /usr/local/Cellar/php71/7.1.12_23/libexec/apache2/libphp7.so into server: dlopen(/usr/local/Cellar/php71/7.1.12_23/libexec/apache2/libphp7.so, 10): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib\n Referenced from: /usr/local/Cellar/php71/7.1.12_23/libexec/apache2/libphp7.so\n Reason: image not found
I think this is because the path is looking for openssl, but in the Brew list, I don't have openssl anymore, it is now openssl#1.1
Bash profile has the following:
export PATH="/usr/local/opt/openssl#1.1/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl#1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl#1.1/include"
$which openssl returns
/usr/local/opt/openssl#1.1/bin/openssl
What can I do to resolve this? Maybe I'm missing the obvious.
So in case anyone runs into this. I managed to fix this myself.
First I commented out the following line in my usr/local/etc/httpd/httpd.conf file
LoadModule php7_module /usr/local/Cellar/php71/7.1.12_23/libexec/apache2/libphp7.so
Next I ran
$brew install php#7.3
I added the following lines to .bash_profile
export PATH="/usr/local/opt/php#7.3/bin:$PATH"
export PATH="/usr/local/opt/php#7.3/sbin:$PATH"
Then added the following line to usr/local/etc/httpd/httpd.conf file
LoadModule php7_module /usr/local/Cellar/php#7.3/7.3.13/lib/httpd/modules/libphp7.so
Then I restarted my computer then ran
$brew services start php#7.3
$brew services restart httpd
$sudo apachectl -k restart
Then I had some sql connection issues.
$brew upgrade mariadb
$brew services restart mariadb
$brew services restart httpd
$sudo apachectl -k restart
And everything came together. Hope this helps.
If that helps somebody else not willing to reinstall PHP:
ln -s /usr/local/Cellar/openssl/1.0.2s/lib/libcrypto.1.0.0.dylib /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
ln -s /usr/local/Cellar/openssl/1.0.2s/lib/libssl.1.0.0.dylib /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Before I could use terminal to start Apache service as:
sudo apachectl start
But recently it doesn't work, even after I restart my PC. Instead, I can use XAMPP to start Apache easily. Who can tell me why the terminal doesn't work at all?
Besides, since I'm a beginner with command line, I know the statement
ps aux | grep httpd
can show if apache is running. But I don't know the exact meaning of each field, like:
yy 1708 0.0 0.0 2432772 604 s000 R+ 8:05PM 0:00.00 grep httpd
what does those numbers or characters mean? Is anyone can help? Thanks!
Try sudo apachectl configtest to check that nothing prevents Apache from starting like a syntax error in one of its config files.
If it can't start, then it must throw an error in its log, check in var/log/, ususally there's a apache2 or httpd folder there, containing error and access logs.
The numbers of the ps aux command are explained at the top of each column when you run this command without any grep pipe (which strips the header, because nothing matches httpd in the first line).
More info here: https://www.wikiwand.com/en/Ps_(Unix).
In your case, httpd is not obviously not running since you only get your own ps command as a result so the numbers don't really matter ;-)
I was trying to make apache mysql php and phpmyadmin running together and following this instructions https://echo.co/blog/os-x-1010-yosemite-local-development-environment-apache-php-and-mysql-homebrew I made a big mistake.
When I run on the terminal apachectl configtest or apachectl start, etc It looking into /usr/local/etc/apache2/2.2/httpd.conf and I want to restore to the original location.
I have my apache runnning http://localhost and is 2.4 because when I try http://localhost/test.php ( < ? php phpinfo() ?> ) and it says "Apache Version Apache/2.4.16 (Unix) PHP/5.5.29" but when I want to see the version apachectl -v it says is 2.2 and I know that I had per default 2.4 I want to restore all the changes that I made on apache and get rid of what I did with the other tutorial.
I don't mind if I cant use apachectl anymore but I want to know how can I continue control de apache 2.4 that is on the mac start,restart and stop commands.
I found the solution doing apachectl -V go to the root of config placed on /Cellar and paste the httpd.conf with the original.
Setting up a development environment with Ubuntu 14.04 running in VirtualBox, following this guide: http://klau.si/dev
After installing phpmyadmin, it seems I should be able to access it at http://localhost/phpmyadmin but apache returns a Not Found error. Did this guide leave out a configuration step somewhere? I have already tried restarting the apache service.
There is no phpmyadmin.conf file in apache2/sites-enabled or apache2/sites-available, is this required?
If so, where can I find these files?
using 127.0.0.1 instead of localhost returns the same error. The default apache page at http://localhost works just fine.
the console in the browser shows nothing of value, simply Not Found.
I have also tried rerunning the install script with dpkg-reconfigure -plow phpmyadmin
This issue was resolved thanks to this guide: https://help.ubuntu.com/community/ApacheMySQLPHP#Troubleshooting_Phpmyadmin_.26_mysql-workbench by adding
Include /etc/phpmyadmin/apache.conf
...to the /etc/apache2/apache2.conf file and restarting the service.
Try this
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo systemctl restart apache2
sudo dpkg-reconfigure -plow phpmyadmin
Select No when asked to reconfigure the database. Then when asked to choose apache2, make sure to hit space while [ ] apache2 is highlighted. An asterisk should appear between the brackets. Then hit Enter. Phpmyadmin should reconfigure and now http://localhost/phpmyadmin should work. for further detail https://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-13.04-lamp
The easiest way to do in ubuntu (I tested in ubuntu-20.04):
Step 1. Open the file:
sudo nano /etc/apache2/apache2.conf
Step 2: Add the following line at the end of file:
Include /etc/phpmyadmin/apache.conf
Step 3: Restart apache2:
sudo systemctl restart apache2.service
Create a link in /var/www like this:
sudo ln -s /usr/share/phpmyadmin /var/www/
Note: since 14.04 you may want to use /var/www/html/ instead of /var/www/
If that's not working for you, you need to include PHPMyAdmin inside apache configuration.
Open apache.conf using your favorite editor, mine is nano :)
sudo nano /etc/apache2/apache2.conf
Then add the following line:
Include /etc/phpmyadmin/apache.conf
For Ubuntu 15.04 and 16.04
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo service apache2 reload
Finally I got the solution
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin
sudo service apache2 reload
More about
https://askubuntu.com/questions/55280/phpmyadmin-is-not-working-after-i-installed-it
Create a link in /var/www/html like this to fix the error:
sudo ln -s /usr/share/phpmyadmin /var/www/html
For anyone still running into issues with this- check that you're actually using apache! I knocked my head against this for 20 minutes or so before I remembered...I use NginX on this server...=). #john-smith, this one's for you buddy.
To get it working on nginx, all you should have to do is create a sim link and restart php:
sudo ln -s /usr/share/phpmyadmin /var/www/html
Note that for you, it may be /var/www/ and not /var/www/html, depending on your dir structure.
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
sudo service apache2 restart
Run above commands issue will be resolved.
Run the following command in terminal:
sudo ln -s /usr/share/phpmyadmin /var/www/html/
It seems like sometime during the second half of 2018 many php packages such as php-mysql and phpmyadmin were removed or changed. I faced that same problem too. So you'll have to download it from another source or find out the new packages
You will need to configure your apache2.conf to make phpMyAdmin works.
sudo nano /etc/apache2/apache2.conf
Then add the following line to the end of the file.
Include /etc/phpmyadmin/apache.conf
Then restart apache
sudo service apache2 restart
I had the same issue where these fixes didn't work.
I'm on Ubuntu 20.04 using hestiaCP with Nginx.
Today after adding
Include /etc/phpmyadmin/apache.conf
into both Apache and Nginx, Nginx failed to restart. It was having an issue with "proxy_buffers" value.
Yesterday I had to modify the Nginx config to add and increase these values so Magento 2.4 would run. Today I altered "proxy_buffers" again
proxy_buffers 3 64k;
proxy_buffer_size 128k;
proxy_busy_buffers_size 128k;
After the second alteration and the removal of "Include /etc/phpmyadmin/apache.conf" from both Apache and Nginx, Magento 2.4 and PHPMyAdmin are working as expected.
I didn't try Rashmi Jain's symlink answer. It seems like it would work. But if it doesn't work for you, perhaps try this.
I just created the file `/etc/apache2/conf-available/phpmyadmin.conf' and added this line to it:
Include /etc/phpmyadmin/apache.conf
(rather than putting it into /etc/apache2/apache2.conf as in Anonymous Man's answer)
Then:
sudo a2enconf phpmyadmin
sudo systemctl reload apache2
I had the same problem after installing mysql, apache2, php and finally phpmyadmin after each other. In my case it was solved by restarting apache2 (no need to update any configuration file):
sudo systemctl restart apache2
#John smith, I was facing the same issue of not being able to access phpmyadmin for 3 days, I found the solution.
-- Get xampp, check this tutorial https://youtu.be/VHfij95yOpo
-- Run this command before starting xampp app
sudo /etc/init.d/apache2 stop
sudo service mysql stop
That's it, it worked for me
first go to the location of phpmyadmin via terminal then type this
code php -S localhost:8001
First check PhpMyAdmin is install or not. If it is installed then search PhpMyadmin folder. After search cut and paste that folder in location Computer->var->www->html->paste folder. Open browser and type localhost/phpMyAdmin and login using username and password.
If you are having this problem in 2019, go to your 000-default.conf file, by typing this subl /etc/apache2/sites-enabled/000-default.conf (in your terminal to open the file in sublime editor)
When the file loads, locate "The ServerName directive sets the request scheme" and place this "Include /etc/phpmyadmin/apache.conf" on top .
Then restart your apache with the command...service apache2 restart That will certainly fix the issue. Hope it helps!
I have just made a new setup of Fedora 20 on my laptop, earlier I was using Linux Mint, running NGINX / PHP-FPM.
I have been trying to run php scripts that write files or upload files to server, but I am unable to do so, everything else seems to work fine.
I have already tried the obvious "chmod 777" and "chown -R nginx", etc. but the problem still persists.
Got it working with SELinux enabled,
Last command was:
setsebool -P httpd_can_network_connect 1
Referred to this blog: http://blog.frag-gustav.de/2013/07/21/nginx-selinux-me-mad/