I am in need of assistance. I am unable to access phpMyAdmin on my DO VPS after just recently upgrading the system to PHP5.6. I have done a lot of research over the past few day but to no avail. I want to list out everything that I have to do to see if anybody has any words of wisdom. The most recent this I attempted I found in this SO Answer
Internal server error (HTTP Error 500) after installing phpmyadmin on a certain domain
I checked my Apache Logs and this line stood out
[Tue Nov 29 02:42:20.684526 2016] [:error] [pid 12443] [client 66.169.11.19:56234] PHP Fatal error: require_once(): Failed opening required './libraries/php-gettext/gettext.inc' (include_path='.') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 395
So I did the following:
sudo apt-get install php5.6-gettext
And received the following response
Note, selecting 'php5.6-common' instead of 'php5.6-gettext'
php5.6-common is already the newest version.
php5.6-common set to manually installed.
I would like to point out an oddity that may assist.
Everytime I restart Apache I get this Warning:
[Tue Nov 29 02:42:11.553293 2016] [so:warn] [pid 12438] AH01574: module php5_module is already loaded, skipping
Can anybody assist me with this?
Here is my Vhost for phpMyAdmin
<VirtualHost *:80>
ServerAdmin admin#localhost
DocumentRoot "/usr/share/phpmyadmin"
ServerName pma.example.net
ErrorLog "/var/log/pma-error.log"
CustomLog "/var/log/pma-access.log" combined
<Directory "/usr/share/phpmyadmin">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Not only am I unable to access at the sub domain that I have set up I am also unable to access it from [Server IP Address]/phpmyadmin
I receive an HTTP 500.
Thank you.
One thing that may solve the problem is to remove PHPMyAdmin, and reinstall it.
sudo apt-get remove phpmyadmin
sudo apt-get install phpmyadmin
By doing this, you'll give Ubuntu a chance to install the appropriate dependencies for phpmyadmin. Chances are, this will configure your packages in further ways that just installing a newer PHP version doesn't.
I think you should run http://pma.example.net
And restarted Apache:
sudo service apache2 restart
Related
I have such virtual host settings
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php5.6-fpm.sock|fcgi://localhost/"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
phpinfo() shows that my site has a version of php 5.6. All right!
Now I am trying to restrict the rights with Mod_Ruid2. I added the following to my virtual host
RDocumentChRoot /var /www/html
<Directory "/www/html/">
Require all granted
RMode config
RUidGid admin0 admin0
</Directory>
after trying to get to the site I see an error in the logs
[Sun Oct 13 16:09:02.492117 2019] [proxy:error] [pid 13571] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/run/php/php5.6-fpm.sock (*) failed
[Sun Oct 13 16:09:02.492194 2019] [proxy_fcgi:error] [pid 13571] [client 192.168.0.110:47622] AH01079: failed to make connection to backend: httpd-UDS
Tell me, what am I doing wrong?
I've just faced the same issue while trying to run apache(2.4) + php(7.2) over CentOS 8.
[Thu Jan 09 06:59:10.420499 2020] [proxy:error] [pid 121:tid 139846433412864] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/www.sock (*) failed
[Thu Jan 09 06:59:10.420535 2020] [proxy_fcgi:error] [pid 121:tid 139846433412864] [client 127.0.0.1:55580] AH01079: failed to make connection to backend: httpd-UDS
To solve this, I had to launch a service called "php-fpm" (sudo systemctl enable --now php-fpm), that led me to another error:
[09-Jan-2020 07:07:09] ERROR: unable to bind listening socket for address '/run/php-fpm/www.sock': No such file or directory (2)
[09-Jan-2020 07:07:09] ERROR: FPM initialization failed
That was caused by the folder /run/php-fpm not existing.
mkdir -p /run/php-fpm/
After that, just launched again php-fpm, this time without errors and apache+php worked like a charm.
Note that there is a small difference between your error and mine, the paths are a bit different. Instead of "/run/php-fpm/" you should create "/var/run/php/".
Hope this helps
I faced the same issue, in my case I could fix it by restarting PHP fpm service, by running code:
sudo service phpx.x-fpm restart
OS: centos
Webserver: nginx
i had same issue on CentOS 8 and Apache 2.4.37 and after many hour research in internet , i can't found any solution for unix domain proxy.
i don't know this is a bug or bad document?
for resolve this problem only you must be replace proxy:unix:/YOUR_PATH with proxy:unix://YOUR_PATH.
<FilesMatch \.php$>
SetHandler "proxy:unix:///var/run/php/php5.6-fpm.sock|fcgi://localhost/"
</FilesMatch>
notice : ...|fcgi://localhost/ must be exists.
after your change this setting the new problem appears :
File not found.
this error is good because we were able connected to php-fpm from apache.
i think this problem is bug. please see this link.
https://bugs.php.net/bug.php?id=55322
for resolve this problem you must be implement this structure :
httpd.conf
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /var/www/example.com/public_html
#your configs ....
</VirtualHost>
/etc/php-fpm.d/example.com.conf
[example.com]
;your configs...
chroot = /
access.log = /var/www/$pool/logs/phpfpm-access-$pool.log
php_admin_value[open_basedir] = /var/www/$pool/public_html
;your configs...
I've just faced the same issue, I commented this part of code in my drupal.con (could be another one for you)
#<FilesMatch \.php$>
# SetHandler proxy:unix:/run/php-fpm/www.sock|fcgi://localhost/
#</FilesMatch>
And the website just show up. Apparently I did not need it on this serveur (redhat 7), but I needed it in my CentOS for the same project.
Please note I had this come up today and I found the solution on serverfault. pfrenssen's answer specifically. Note the field name tripped me up for an hour as listen.group and group both exist. I then needed to comment a line listen.acl_users out which was uncommented by default. It important to note that the www-data user I am using is the user I have predefined (non-default) apache user. I believe this to be the underlying cause. Below is my one liner to change these values. Use cp /etc/php-fpm.d/www.conf /etc/php-fpm.d/www.conf.default first to help test as sed modifies the file in place.
sed -i -e 's/user = apache/user = www-data/g' \
-e 's/group = apache/group = www-data/g' \
-e 's/;listen.owner = nobody/listen.owner = www-data/g' \
-e 's/;listen.group = nobody/listen.group = www-data/g' \
-e 's/;listen.mode = 0660/listen.mode = 0660/g' \
-e 's/listen.acl_users = apache,nginx/;listen.acl_users = apache,nginx/g' /etc/php-fpm.d/www.conf
I have updated my working Froxlor installation to PHP 7.
All my customer-sites work perfectly fine (with PHP 7 via FPM).
The only problem is, that if I want to access the Froxlor Backend, I get an Erorr 503.
The apache Error-Log says:
`[Tue Oct 11 10:01:04.067069 2016] [proxy:error] [pid 23949] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.0-fpm.sock (*) failed`
`[Tue Oct 11 10:01:04.089648 2016] [proxy_fcgi:error] [pid 23949] [client xx.xx.xx.xx:1819] AH01079: failed to make connection to backend: httpd-UDS`
The Error-Log of PHP-FPM says nothing.
The same thing happens, if I try to access the server directly via IP.
System-Details:
Debian 8
Apache 2.4
PHP7
PHP7-FPM
Where I have to serach for the Problem? If needed, config-files can be provided.
If you are using PHP-FPM, the problem may also be that you need to start the PHP service.
Apache does not automatically stop the process, so you will either manually start it up or automatically on startup
For PHP 7.x (remember to include your version):
service php7.x-fpm start
For PHP 7:
service php7-fpm start
For PHP 5:
service php-fpm start
This will begin the FPM process for you.
Additionally, you may also want the process to startup on boot. To do that simply enter the following, of course considering your respective version.
systemctl enable php7.x-fpm
I had same issue, on New server having php7.4 and these virtual host configuration files(located in /etc/apache2/sites-available/ directory) i migrated from server having php7.2.
When checked in detail i found
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php7.2-fpm.sock|fcgi://localhost/"
</FilesMatch>
Which then i replaced with
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost/"
</FilesMatch>
Basically updating php version and it worked fine after restarting apache2
Steps I made in order to make it work on my host:
in /etc/apt/sources.list - added non-free to debian repository
apt update
apt install libapache2-mod-fastcgi
a2enmod fastcgi
(That made the "Invalid command 'FastCgiExternalServer' error, I encountered on a new installation", go away).
In Froxlor - "Settings" - "Froxlor VirtualHost settings":
[X] Enable PHP-FPM for the Froxlor vHost If enabled, Froxlor will also be running under a local user.
I also removed all "Listen" entries from apache2's ports.conf
Hi i have a Centos 6 64 bit
it has LAMP installed html works php doesnt work
when i try opening a php gamepanel on : http://51.255.199.40/gpanel/ , i get Server Error 500, and in the error_log of apache i get:
[Sat Mar 05 14:45:58 2016] [error] [client 46.99.49.96] Directory index forbidden by Options directive: /var/www/html/
Here is my httpd.conf my php.conf and a file named welcome.conf , php and welcome.conf are in conf.d folder and httpd.conf is in the conf folder:
http://pastebin.com/xSzPrMmi
Im not that good on coding i need help getting this fixed im since 5 days with this problem and still no fix
my email address is : benjaminselmani5#gmail.com if you guys need to contact me i will watch the topic too.
With Respect
Benjamin Selmani
Change AllowOverride None to AllowOverride All inside httpd.conf's block
<Directory "/var/www/html">
AllowOverride All
</Directory>
I am having errors setting up my webserver on my vps. At the moment I have followed this tutorial: https://www.howtoforge.com/apache_php_mysql_on_centos_6.5_lamp
I am stuck on the /etc/init.d/httpd start part. When I run this command, I get the following output:
[root#localhost conf]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [Mon Feb 23 21:27:02 2015] [warn] NameVirtualHost *:80 has no VirtualHosts
[FAILED]
And there is no more output. Prior to this I was getting this error:
[root#localhost etc]# /etc/init.d/httpd start
Starting httpd: httpd: Could not reliably determine the server's fully
qualified domain name, using localhost.localdomain for ServerName [FAILED]
I googled and managed to get this error to disappear by editting /etc/httpd/conf/httpd.conf - I simply uncommented the ServerName variable and changed the value to localhost. So it looks like:
ServerName localhost - In my mind this makes sense since localhost is the external ip server anyways. [NOTE]: Even if I change it to ServerName <external-ip> I still get the same output when restarting httpd.
Can anyone help me get past this step? I've been googling for about 1-2 hours. Can't find anything. Anyone had the same error and mind pointing me in the right direction?
UPDATE 1:
cat /var/log/httpd/error_log
The output is basically normally operation until it reaches this point at which it just spams the rest of the log with it
(2)No such file or directory: httpd: could not open error log file
/srv/www/java-applet/logs/error.log - Unable to open logs
So I guess the error occurs since it cannot find the specified log file? Where can I change this? Why is this even occurring if I have a default installation of httpd?
Update 2:
Nevermind, I just solved it by making the directory that it said it was missing. Lame...
currently i am trying to setup a hhvm server. PHP Applications works fine for me, hack lang php files not.
My local sandbox returns (every request in error.log):
[Fri Jun 20 15:31:43.725292 2014] [proxy:debug] [pid 26542] proxy_util.c(1694): AH00925: initializing worker fcgi://127.0.0.1:9000/var/www/hhvm.local/$1 shared
[Fri Jun 20 15:31:43.725314 2014] [proxy:debug] [pid 26542] proxy_util.c(1734): AH00927: initializing worker fcgi://127.0.0.1:9000/var/www/hhvm.local/$1 local
[Fri Jun 20 15:31:43.725325 2014] [proxy:debug] [pid 26542] proxy_util.c(1785): AH00931: initialized single connection worker in child 26542 for (127.0.0.1)
My Apache Config:
<virtualhost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin admin#domain.de
ServerName hhvm.local
ServerAlias www.hhvm.local
# Index file and Document Root (where the public files are located)
DirectoryIndex index.php index.html
DocumentRoot /var/www/hhvm.local
# Custom log file locations
LogLevel debug
#LogLevel warn
ErrorLog /var/www/hhvm.local/log/errors.log
CustomLog /var/www/hhvm.local/log/access.log combined
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/hhvm.local/$1
<Directory /var/www/hhvm.local>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo All
Order allow,deny
Allow from all
Require all granted
</Directory>
Apache (2.4) is running, HHVM Daemon (3.0) is running,
~$: hhvm index.hh
<!DOCTYPE html><html><head></head><body>Hello World!<br />Running on HHVM version 3.1.0</body></html>
If i call "hhvm.local" the server response a 500 Internal Server Error.
OS: Ubuntu 14.04
Could anybody help me? :)
What happens when you do hhvm index.php
- index.php with only a echo is enough
Does it ouput something?
Yes?
Try service hhvm start
At least at my setup hhvm did not always start on it's own ...
No?
Then you probably have an install issue. There are 2 ways to install HHVM on ubuntu
- self compiling
- pre built
I personly use the pre built. At least the is the way I got it working :)
Hope it helps
Your ProxyPassMatch isn't set up to sniff out hh file extensions. You should use the following instead...
ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/var/www/hhvm.local/$1