Why localhost's phpmyadmin is empty with no login window? - apache

I installed phpmyadmin following the instructions here. Installation has completed and I have phpmyadmin inside /usr/share/phpmyadmin and has linked to
sudo ln -s /usr/share/phpmyadmin/ /var/www/html/phpmyadmin
But doesn't show anything (the whole page is blank with no login window) when I access to http://localhost/phpmyadmin
What could be wrong?
My os is Ubuntu14.04 and installed Apache 2.4.7.

For those who has similar problem, please follow the steps below.
Please check error at /var/log/apache2/error.log
My error is PHP Fatal error: require_once(): Failed opening required './libraries/php-gettext/gettext.inc' (include_path='.')
So install sudo apt-get install php-gettext
Then restart sudo service apache2 restart.

Related

How to fix HTTPD (Apache) Error 256 on OSX Monterey 12.5

I have a Apache2 installed with Homebrew on a Mac running OSX Monterey. I haven't done LAMP development for a while, so I'm not sure when the error started, but I've recently updated OSX to 12.5. When I returned to working on a LAMP project, my Apache installation stopped working. Running brew services produced the following output: Name Status User File httpd error 256 root ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist mysql started Nizz0k ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist.
Running the stop, start, and restart commands produces "success" output in the terminal, but Apache doesn't work. I can't navigate to my local vhosts, and of course, running brew services still shows an error.
In running apachectl -e error Apache complains about permissions to the error logs
I have tried:
uninstalling and reinstalling HTTPD
The apr-utilities fix.
confirming Mac installed Apache is stopped.
At this point, I think my problem is that there was conflicting information about how to run Apache on Homebrew. Earlier versions apparently required sudo, but running it this was now produces warnings like this:
Warning: Taking root:admin ownership of some httpd paths:
/usr/local/Cellar/httpd/2.4.54/bin
/usr/local/Cellar/httpd/2.4.54/bin/httpd
/usr/local/opt/httpd
/usr/local/opt/httpd/bin
/usr/local/var/homebrew/linked/httpd
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: httpd must be run as non-root to start at user login!
/Library/LaunchDaemons/homebrew.mxcl.httpd.plist: service already bootstrapped
Bootstrap failed: 37: Operation already in progress
Error: Failure while executing; `/bin/launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.httpd.plist` exited with 37.
The issue is even after removing the paths as suggested in the error, a reinstallation brings Root back as the owner.
I do have the same problem with nginx.
Manually unloaded it and then restarting it worked fine.
Try:
sudo launchctl bootout system /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
sudo brew services start httpd

Brew Install Httpd: Welcome to Nginx?

I'm trying to install the brew package httpd (apache). I'm so confused. Every time I do and navigate to http://localhost:8080 I get a big welcome screen that says "Welcome to Nginx." I don't understand.
Am I running nginx and not apache? How could that be?
I'm on macOS 10.15.6.
I'm running pretty basic commands...
brew install openldap libiconv
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
brew install httpd
sudo brew services start httpd
And then I get get this...
https://www.dropbox.com/s/yia1yk9uhsootpk/Screen%20Shot%202020-09-18%20at%208.53.39%20PM.png?dl=0
"Welcome to nginx"
What don't I know? A lot probably. If I edit the httpd.conf file to listen to another port, I get the same screen.
╰─ brew list
apr gettext jemalloc libidn2 node powerlevel9k
apr-util httpd libev libunistring openldap wget
brotli icu4c libevent ncurses openssl#1.1 zsh
c-ares jansson libiconv nghttp2 pcre zsh-completions
Can anyone shed some light on this for me?
Update:
lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Brave\x20 1225 user 35u IPv6 0xcdbe6ccead8e5deb 0t0 TCP localhost:53261->localhost:http-alt (CLOSE_WAIT)
I think I narrowed it down to "groonga." First I'm hearing of it, but apparently it's a mariadb brew dependency. I found where the "welcome to nginx" text was coming from.
var/www/index.html
Not sure why it's hard coding that text if it will also display with apache running. Very confusing. However, it adds that file to the default apache DocumentRoot.
Had a similar issue to this, discovered the fact that generic start file at usr/local/var/www/index.html, had been hard-coded to contain the "Welcome to nginx" when I installed nginx and
the message remained that way even I uninstalled it. The Apache (httpd) service also happens calls that index.html file upon startup which makes it appear as if it were nginx rendering that file.
Not too sure why nginx doesn't automatically empty the file upon uninstallation but just manually change/remove the contents of that file after uninstalling nginx and your problem should be fixed :)
Similar problem also addressed here: nginx uninstalled, localhost:8080 still showing nginx welcome page

/phpmyadmin not found on ubuntu server

I am attempting to install both RStudio and phpmyadmin on an ubuntu server from AWS.
I have spun up a AWS server using RStudio AMI which works successfully (http://www.louisaslett.com/RStudio_AMI/)
I am now attempting to install phpmyadmin on the server.
I have followed the normal steps to do so (installing each individually):
sudo apt-get install apache2 libapache2-mod-php5 php5 mysql-server php5-mysql
mysql_secure_installation
apt-get -y install phpmyadmin
This has installed phpmyadmin correctly. However, whenever I attempt to access the following link:
http://52.56.56.80/phpmyadmin I get the following error:
/phpmyadmin not found
I have included the line: "Include /etc/phpmyadmin/apache.conf" in /etc/apache2/apache2.conf as advised in other issues, however this does not fix the issue.
What do I need to do to be able to access phpmyadmin on my browser?
sudo gedit /etc/apache2/apache2.conf
add "Include /etc/phpmyadmin/apache.conf"
sudo /etc/init.d/apache2 restart

Installing Trac on Ubuntu14.04/Apache2/mod_wsgi

I'm trying to install Edgewall's Trac ticket system on an Ubuntu 14.04 Server, with Apache2 and mod_wsgi.
I have followed the instructions given here: https://help.ubuntu.com/community/TracApacheModWsgi
But after point 9, when i try to view the page, it says:
Forbidden
You don't have permission to access /trac on this server.
What could be the cause?
In step 6 of the referenced instruction, place line Require all granted before the closing tag </Directory>. This is required in order to access directories outside of the default document root.
Please note that under Ubuntu 14.04 you might get a python babel package error that is related to missing "en_US" locale. It can be easily fixed:
sudo apt-get install --reinstall python-babel-localedata

setting up tomcat in Ubuntu

I have gone through many tutorials for installing tomcat in my Ubuntu system. I installed tomcat7. tomcat7-admin, tomcat7-examples and tomcat7-docs by following commands:
apt-get install tomcat7
apt-get install tomcat7-admin
apt-get install tomcat7-docs
apt-get install tomcat7-examples
After this setup I can start, stop the server by:
/etc/init.d/tomcat7 start/stop
I have following files and folders:
/usr/share/tomcat7/
/etc/tomcat7/
/var/lib/tomcat7/
I have added the following user in tomcat-users.xml file under /usr/sharetomcat7/conf/tomcat-users.xml and /etc/tomcat7/tomcat-users.xml
<user username="admin" password="amdin" roles="admin-gui,standard,manager-gui"/>
Now when I open localhost:8080, I get a dull page saying 'It works' unlike the colorful page we get generally. These are the contents of page:
You might consider installing the following packages, if you haven't already done so:
tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking here.
tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking here.
tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.
But when I click on 'click here' link above to open admin, docs or examples I get "HTTP status 404: The requested resource is not available."
But I have installed admin, examples and docs. I am not getting it. Please help! I am using Ubuntu 13.04
on ubuntu 14.04 it worked for me using following command :
sudo apt-get install tomcat7-docs tomcat7-admin tomcat7-examples
Create a link for each application in webapps folder as below:
cd /var/lib/tomcat7/webapps
sudo ln -s /usr/share/tomcat7-examples/examples examples
sudo ln -s /usr/share/tomcat7-docs/docs docs
sudo ln -s /usr/share/tomcat7-admin/manager manager
sudo ln -s /usr/share/tomcat7-admin/host-manager host-manager