I have installed the latest Nextcloud container on my Ubuntu machine.
It started successfully with the following command:
sudo docker run --name nextcloud --link mysql:mysql -p 9000:9000 -v /data/nextcloud:/var/www/html -d nextcloud:latest
The comand sudo docker logs nextcloud shows:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
[Mon Mar 13 09:41:24.786941 2017] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/5.6.30 configured -- resuming normal operations
[Mon Mar 13 09:41:24.787013 2017] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
I enabled mod_proxy and mod_proxy_fcgi on the Apache configuration of the host machine, so this is not running inside another docker container.
ProxyPreserveHost On
ProxyPass "/cld" "fcgi://127.0.0.1:9000"
ProxyPassReverse "/cld" "fcgi://127.0.0.1:9000"
When opening the URL I get en error 503 Service Unavailable.
The Apache error log is showing:
[Mon Mar 13 11:08:35.102072 2017] [proxy_fcgi:error] [pid 11783:tid 140492205455104] [client 2001:a61:186:d601:f898:e50c:c181:db75:52659] AH01067: Failed to read FastCGI header
[Mon Mar 13 11:08:35.102119 2017] [proxy_fcgi:error] [pid 11783:tid 140492205455104] (104)Connection reset by peer: [client 2001:a61:186:d601:f898:e50c:c181:db75:52659] AH01075: Error dispatching request to :
[Mon Mar 13 11:08:36.866618 2017] [proxy_fcgi:error] [pid 11783:tid 140492197062400] (104)Connection reset by peer: [client 2001:a61:186:d601:f898:e50c:c181:db75:52660] AH01075: Error dispatching request to : (sending empty stdin)
[Mon Mar 13 11:08:38.263875 2017] [proxy_fcgi:error] [pid 11783:tid 140492180276992] [client 2001:a61:186:d601:f898:e50c:c181:db75:52664] AH01067: Failed to read FastCGI header
[Mon Mar 13 11:08:38.263914 2017] [proxy_fcgi:error] [pid 11783:tid 140492180276992] (104)Connection reset by peer: [client 2001:a61:186:d601:f898:e50c:c181:db75:52664] AH01075: Error dispatching request to :
What have I missed?
I think that using nextcloud:latest, you are getting the image using Apache, not the one using fpm.
Try to use nextcloud:fpm with your proxy setup, or using the default image without proxy (ie accessing it directly).
Related
so im trying to run my php app located in /var/www/html but im getting this errors, i tried restarting both the php-fpm and httpd services, can somebody tell me what is wrong?
[Mon Aug 08 12:44:51.592863 2022] [proxy:error] [pid 37442:tid 37620] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/opt/remi/php56/run/php-fpm/www.sock (*) failed
[Mon Aug 08 12:44:51.592890 2022] [proxy_fcgi:error] [pid 37442:tid 37620] [client ::1:38870] AH01079: failed to make connection to backend: httpd-UDS
I'm learning about auto-loading by following a simple PHP tutorial. The code of the classes and the custom autoloader do not seem to be the issue.
But, when it makes no sense at all, I get . . . failed to open stream: No such file or directory in . . . errors.
Then I happened to notice when I refresh my browser a few times the expected correct output does display.
So, it's not working one moment and then it is, after a few refreshes. I'm guessing it has something to do with the server. But how can I diagnose this issue ?
I am using the following docker-compose file:
version: "3"
services:
www:
image: "php:7.4.24-apache"
restart: 'always'
ports:
- '81:80'
volumes:
- ".:/var/www/html"
UPDATE : Docker log output
docker logs --follow complete-object-orient-php-developer-course_www_1 | grep Autoloading
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.0.2. Set the 'ServerName' directive globally to suppress this message
[Tue Oct 05 02:33:20.966439 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.48 (Debian) PHP/7.4.24 configured -- resuming normal operations
[Tue Oct 05 02:33:20.966629 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
[Tue Oct 05 02:33:25.797390 2021] [mpm_prefork:notice] [pid 1] AH00170: caught SIGWINCH, shutting down gracefully
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.21.0.2. Set the 'ServerName' directive globally to suppress this message
[Tue Oct 05 02:33:32.385570 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.48 (Debian) PHP/7.4.24 configured -- resuming normal operations
[Tue Oct 05 02:33:32.385663 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
[Wed Oct 06 01:34:55.303031 2021] [php7:error] [pid 20] [client 172.21.0.1:63858] script '/var/www/html/chapter3/namespaces.php' not found or unable to stat
[Wed Oct 06 01:35:05.608696 2021] [php7:error] [pid 31] [client 172.21.0.1:63856] script '/var/www/html/chapter4/namespaces.php' not found or unable to stat
[Wed Oct 06 01:35:15.729637 2021] [php7:error] [pid 19] [client 172.21.0.1:63862] script '/var/www/html/chapter4/namespaces.php' not found or unable to stat
[Wed Oct 06 03:06:49.384397 2021] [php7:error] [pid 18] [client 172.21.0.1:64066] script '/var/www/html/chapter4/autoloader.php' not found or unable to stat
Version:
OS lsb_release -a : Ubuntu 18.04.5 LTS
PHP php -v : 8.0.5 Apache
pache2 -v : 2.4.29 (Ubuntu)
mysql --version : mysql Ver 14.14
Distrib 5.7.32
Problem:
I'm trying to install LAMP Stack using following article. However, I was getting HTTP 500 Error while accessing phpmyadmin from browser.
And installed phpmyadmin using below command.
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl
Tried:
So, I checked with Error Log tail -f /var/log/apache2/error.log and found that Phpmyadmin was running on depreciated version of PHP.
[Sun May 16 21:11:57.057418 2021] [core:notice] [pid 2711] AH00094: Command line: '/usr/sbin/apache2'
[Sun May 16 21:12:49.262658 2021] [mpm_prefork:notice] [pid 2711] AH00171: Graceful restart requested, doing restart
[Sun May 16 21:12:49.280421 2021] [alias:warn] [pid 2711] AH00671: The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
[Sun May 16 21:12:49.307986 2021] [mpm_prefork:notice] [pid 2711] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Sun May 16 21:12:49.308000 2021] [core:notice] [pid 2711] AH00094: Command line: '/usr/sbin/apache2'
[Sun May 16 21:24:43.439480 2021] [mpm_prefork:notice] [pid 2711] AH00169: caught SIGTERM, shutting down
PHP Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/20200930/json.so (/usr/lib/php/20200930/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/json.so.so (/usr/lib/php/20200930/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[Sun May 16 21:24:43.547262 2021] [mpm_prefork:notice] [pid 2888] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Sun May 16 21:24:43.547290 2021] [core:notice] [pid 2888] AH00094: Command line: '/usr/sbin/apache2'
[Sun May 16 21:24:47.635162 2021] [php:error] [pid 2895] [client 84.251.85.6:56332] PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/share/phpmyadmin/libraries/url_generating.lib.php on line 231
If you have installed php mysql and apache directly on your system. Uninstall them and install only lamp. By so doing there will be no conflict and you stop having internal server error due too deprecated php version.
I am using apache to run php files in firefox dev edition but some of them won't work.
I guess its because of the following errors that are being shown in console for
apache2: [Mon Dec 18 08:57:59.610192 2017] [mpm_prefork:notice] [pid 121] AH00163: Apache/2.4.28 (Unix) PHP/7.1.7 configured --
resuming normal operations
[Mon Dec 18 08:57:59.610276 2017] [core:notice] [pid 121] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' .
If I click "submit" in my self-made register form, it is supposed to open the next file, which fails:
I installed PHP 5.2.17 as per the following tutorial
http://zgadzaj.com/how-to-install-php-53-and-52-together-on-ubuntu-1204
apt-get installed PHP5.5 and apache 2.4.7
PHPINFO reports that the php version of the set host is still 5.5.9
when I restart apache2 service, I get the following in error.log.
[Thu Mar 19 14:18:53.648697 2015] [mpm_prefork:notice] [pid 23518] AH00169: caught SIGTERM, shutting down
[Thu Mar 19 14:18:54.741836 2015] [:notice] [pid 5543] FastCGI: process manager initialized (pid 5543)
[Thu Mar 19 14:18:54.754243 2015] [mpm_prefork:notice] [pid 5541] AH00163: Apache/2.4.7 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 PHP/5.5.9-1ubuntu4.6 configured -- resuming normal operations
[Thu Mar 19 14:18:54.754317 2015] [core:notice] [pid 5541] AH00094: Command line: '/usr/sbin/apache2'
Removing php5.5 solved the problem.
The problem probably was a conflict between the two PHP versions, using same fastcgi implementation.