You are not logged in.

#1 2021-07-26 18:00:54

malacology
Member
Registered: 2021-04-24
Posts: 152

error 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal e

I found error log undeer  /var/log/nginx

2021/07/27 01:45:33 [error] 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/lib/wallabag/var/logs/prod.log" could not be opened in append mode: failed to open stream: Permission denied in /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:110
Stack trace:
#0 /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\StreamHandler->write()
#1 /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(59): Monolog\Handler\AbstractProcessingHandler->handle()
#2 /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php(92): Monolog\Handler\AbstractHandler->handleBatch()
#3 /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php(113): Monolog\Handler\FingersCrossedHandler->activate()
#4 /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handl" while reading response header from upstream, client: 120.192.37.36, server: read.malacology.net, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php74-fpm/php-fpm.sock:", host: "read.malacology.net"

I am wondering the documents ask to install PHP extension php-mysql, but I can't find it in AUR or packages, and I just modified the /etc/php74/php.ini

;extension=bcmath
;extension=curl
;extension=gd
;extension=iconv
;extension=mysqli
;extension=pdo_mysql
;extension=zip

remove the ";", is it okay? Or the error report means other error. And the webpage shows "HTTP ERROR 500"


Don't speak to silly man. Keep Minimalism.

Offline

#2 2021-07-26 18:42:04

loqs
Member
Registered: 2014-03-06
Posts: 19,008

Re: error 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal e

2021/07/27 01:45:33 [error] 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/lib/wallabag/var/logs/prod.log" could not be opened in append mode: failed to open stream: Permission denied in /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:110

How are you connecting this error to mysql?  Have you determined the error is not accurate or not relevant?

Offline

#3 2021-07-27 03:50:39

malacology
Member
Registered: 2021-04-24
Posts: 152

Re: error 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal e

It seems that the offical guide asks me to clear the cache to update the configure

To apply changes to parameters.yml, you have to clear your cache by deleting everything in var/cache with this command: bin/console cache:clear --env=prod.

I'm afraid that everything will be in error after cleaning, and this command seems not work. It reports here

[root@archlinux cache]# php74  bin/console cache:clear --env=prod
PHP Warning:  PHP Startup: Unable to load dynamic library 'gd' (tried: /usr/lib/php74/modules/gd (/usr/lib/php74/modules/gd: cannot open shared object file: No such file or directory), /usr/lib/php74/modules/gd.so (/usr/lib/php74/modules/gd.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php74/modules/intl (/usr/lib/php74/modules/intl: cannot open shared object file: No such file or directory), /usr/lib/php74/modules/intl.so (/usr/lib/php74/modules/intl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'tidy' (tried: /usr/lib/php74/modules/tidy (/usr/lib/php74/modules/tidy: cannot open shared object file: No such file or directory), /usr/lib/php74/modules/tidy.so (/usr/lib/php74/modules/tidy.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Could not open input file: bin/console

After I install php74-intl php74-tidy and php74-gd, it shows

                                                                                                         
 [WARNING] Some commands could not be registered:                                                        
                                                                                                         

In AbstractMySQLDriver.php line 110:
                                                                                                     
  An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'                                                                          

In PDOConnection.php line 31:
                                                                    
  SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'  
                                         

In PDOConnection.php line 27:
                                                                    
  SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'                                     

In AbstractMySQLDriver.php line 110:
                                                                                                     
  An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'  

In PDOConnection.php line 31:
                                                                    
  SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'  

In PDOConnection.php line 27:
                                                    
  SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'  

 // Clearing the cache for the prod environment with debug false                                         
                                                                                                       
 [OK] Cache for the "prod" environment (debug=false) was successfully cleared.                                                                     

It still shows that the same error report in error.log

Last edited by malacology (2021-07-27 04:00:08)


Don't speak to silly man. Keep Minimalism.

Offline

#4 2021-07-27 04:49:09

loqs
Member
Registered: 2014-03-06
Posts: 19,008

Re: error 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal e

What is the output of

stat /var/lib/wallabag/var/logs/
stat /var/lib/wallabag/var/logs/prod.log

Offline

#5 2021-07-27 05:31:04

malacology
Member
Registered: 2021-04-24
Posts: 152

Re: error 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal e

Here

[root@archlinux ~]# stat /var/lib/wallabag/var/logs/
  File: /var/lib/wallabag/var/logs/
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: fe01h/65025d	Inode: 1836197     Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (   33/    http)
Access: 2021-07-27 01:43:46.652570352 +0800
Modify: 2021-07-25 23:11:57.728393402 +0800
Change: 2021-07-27 01:07:09.877395590 +0800
 Birth: 2021-07-25 23:11:57.728393402 +0800
[root@archlinux ~]# stat /var/lib/wallabag/var/logs/prod.log
stat: cannot statx '/var/lib/wallabag/var/logs/prod.log': No such file or directory

no /var/lib/wallabag/var/logs/prod.log

[root@archlinux ~]# cd /var/lib/wallabag/var/logs/
[root@archlinux logs]# ls
[root@archlinux logs]# ls -al
total 8
drwxr-xr-x 2 root http 4096 Jul 25 23:11 .
drwxr-xr-x 4 root http 4096 Jul 25 23:17 ..

Don't speak to silly man. Keep Minimalism.

Offline

#6 2021-07-27 05:33:34

loqs
Member
Registered: 2014-03-06
Posts: 19,008

Re: error 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal e

What if you change the permissions so http can write to /var/lib/wallabag/var/logs/ ?

Offline

#7 2021-07-27 05:39:09

malacology
Member
Registered: 2021-04-24
Posts: 152

Re: error 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal e

I change it

[root@archlinux ~]# cd /var/lib/wallabag/var/logs/ 
[root@archlinux logs]# ls
[root@archlinux logs]# cd ..
[root@archlinux var]# ls -o
total 88
-rw-r--r-- 1 root 42998 Jul 24 00:46 bootstrap.php.cache
drwxr-xr-x 3 root  4096 Jul 27 13:35 cache
drwxr-xr-x 2 root  4096 Jul 25 23:11 logs
-rw-r--r-- 1 root 33831 Jul 24 00:46 SymfonyRequirements.php
[root@archlinux var]# chmod -R 777 logs
[root@archlinux var]# ls -o
total 88
-rw-r--r-- 1 root 42998 Jul 24 00:46 bootstrap.php.cache
drwxr-xr-x 3 root  4096 Jul 27 13:35 cache
drwxrwxrwx 2 root  4096 Jul 25 23:11 logs
-rw-r--r-- 1 root 33831 Jul 24 00:46 SymfonyRequirements.php

and the web shows

Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

Output is changed

[root@archlinux var]#  stat /var/lib/wallabag/var/logs/
  File: /var/lib/wallabag/var/logs/
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: fe01h/65025d	Inode: 1836197     Links: 2
Access: (0777/drwxrwxrwx)  Uid: (    0/    root)   Gid: (   33/    http)
Access: 2021-07-27 13:37:47.129710658 +0800
Modify: 2021-07-27 13:37:55.259709826 +0800
Change: 2021-07-27 13:37:55.259709826 +0800
 Birth: 2021-07-25 23:11:57.728393402 +0800
[root@archlinux var]# stat /var/lib/wallabag/var/logs/prod.log
  File: /var/lib/wallabag/var/logs/prod.log
  Size: 2207      	Blocks: 8          IO Block: 4096   regular file
Device: fe01h/65025d	Inode: 1836096     Links: 1
Access: (0644/-rw-r--r--)  Uid: (   33/    http)   Gid: (   33/    http)
Access: 2021-07-27 13:37:55.259709826 +0800
Modify: 2021-07-27 13:37:55.709709780 +0800
Change: 2021-07-27 13:37:55.709709780 +0800
 Birth: 2021-07-27 13:37:55.259709826 +0800

the log of /var/log/nginx/wallabag_error.log

2021/07/27 13:35:31 [error] 325#325: *2771 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught UnexpectedValueException: The stream or file "/var/lib/wallabag/var/logs/prod.log" could not be opened in append mode: failed to open stream: Permission denied in /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:110
Stack trace:
#0 /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\StreamHandler->write()
#1 /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php(116): Monolog\Handler\AbstractProcessingHandler->handle()
#2 /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\FingersCrossedHandler->handle()
#3 /usr/share/webapps/wallabag/vendor/monolog/monolog/src/Monolog/Logger.php(740): Monolog\Logger->addRecord()
#4 /usr/share/webapps/wallabag/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php(101): Monolog\Logger->critical()" while reading response header from upstream, client: 120.192.37.36, server: read.malacology.net, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php74-fpm/php-fpm.sock:", host: "read.malacology.net"

And now I change the file access

[root@archlinux ~]# cd /var/lib/wallabag/var/logs/
[root@archlinux logs]# ls
prod.log
[root@archlinux logs]# ls -o
total 12
-rw-r--r-- 1 http 11035 Jul 27 14:08 prod.log
[root@archlinux logs]# chmod -R 777 prod.log
[root@archlinux logs]# ls
prod.log
[root@archlinux logs]# ls -o
total 12
-rwxrwxrwx 1 http 11035 Jul 27 14:08 prod.log

and no new error log but the web still can't be opened

Last edited by malacology (2021-07-27 06:23:58)


Don't speak to silly man. Keep Minimalism.

Offline

#8 2021-07-27 06:39:10

loqs
Member
Registered: 2014-03-06
Posts: 19,008

Re: error 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal e

wallabang is from https://aur.archlinux.org/packages/wallabag/? you replaced php7 with php74?
Can you please link to the official guide you are following and detail the steps from the guide you have performed.
Also what is the current status of the mysql/mariadb database server?

Offline

#9 2021-07-27 06:51:29

malacology
Member
Registered: 2021-04-24
Posts: 152

Re: error 325#325: *27 FastCGI sent in stderr: "PHP message: PHP Fatal e

Right, I use AUR. I replace it because php74 and php7 are the same versions. Both are 7.4.21.
The official install guide is https://doc.wallabag.org/en/admin/insta … eadme.html
And I also refer this link https://www.linuxbabe.com/arch/install- … riadb-php7
But replace the install via git and composer with AUR. and remove ";" to essentail extension of php.ini (more than linuxbabe guide), also I modified the parameters.yml file.
For the database, I follow the archwiki https://wiki.archlinux.org/title/MariaDB , configure of nginx is referred the official guide of wallabag.
the status is here

[root@archlinux ~]# systemctl status mariadb
● mariadb.service - MariaDB 10.6.3 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2021-07-27 01:42:01 CST; 13h ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 247 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 8 (limit: 4697)
     Memory: 91.6M
        CPU: 6.107s
     CGroup: /system.slice/mariadb.service
             └─247 /usr/bin/mariadbd

Jul 27 11:34:34 archlinux mariadbd[247]: 2021-07-27 11:34:34 35 [Warning] Access denied for user 'root'@>
Jul 27 11:36:46 archlinux mariadbd[247]: 2021-07-27 11:36:46 36 [Warning] Access denied for user 'root'@>
Jul 27 11:36:46 archlinux mariadbd[247]: 2021-07-27 11:36:46 37 [Warning] Access denied for user 'root'@>
Jul 27 11:57:30 archlinux mariadbd[247]: 2021-07-27 11:57:30 38 [Warning] Access denied for user 'root'@>
Jul 27 11:57:30 archlinux mariadbd[247]: 2021-07-27 11:57:30 39 [Warning] Access denied for user 'root'@>
Jul 27 11:57:30 archlinux mariadbd[247]: 2021-07-27 11:57:30 40 [Warning] Access denied for user 'root'@>
Jul 27 11:57:30 archlinux mariadbd[247]: 2021-07-27 11:57:30 41 [Warning] Access denied for user 'root'@>
Jul 27 12:55:26 archlinux mariadbd[247]: 2021-07-27 12:55:26 44 [Warning] IP address '47.99.135.205' cou>
Jul 27 12:55:26 archlinux mariadbd[247]: 2021-07-27 12:55:26 44 [Warning] Aborted connection 44 to db: '>
Jul 27 12:55:35 archlinux mariadbd[247]: 2021-07-27 12:55:35 45 [Warning] Aborted connection 45 to db: '>

Timezone is Asia/Shanghai, so all the warnings are present before configure.

Last edited by malacology (2021-07-27 06:56:47)


Don't speak to silly man. Keep Minimalism.

Offline

Board footer

Powered by FluxBB