Hi everyone, I am a newcomer in this Forum, so please be patient if I make a mistake.
My Company’s PHP script which I wrote in 2006 doesn’t work properly in Rocky 9.1. I will post both error message as well as the script itself. Please help me out to fix this kind of error. Thank you everyone. Due to new user restriction, I will eliminate all internal links in the code.
The error came when I pointed to the following PHP.script (contemporary_main_us.php) which I wrote for Fedora Core 7, several years ago.
Hello folks! Classic Music Performers/Composers Search
Update Note (March, 2017): Due to the development of Contemporary Database,
the Classic Database was stopped developing for the last few years. Now in prallel to the Contemporary Database, sound-videos (mostly in YouTube), are getting linked. During this improvement, some fuzzy search-result pages may appear. Be patient for the expectation of the better shapes.
END;
// (2008-01-10)
// In the case of this [classic_main.php], the following each has double castings of [require].
// Each,
// classic_option_list1_.._(shell).php
// => classic_option_list1_.._(actual_list).php
//
// The shell is in (de:/es/fr:/jp: ... so on), and the actual_list is directly from MySQL ouput.
// This way of codes is easy to read (elegant) and easy to edit (shell)/ update (actual_list).
//
require 'classic_option_list1_select_shell_us.php';
require 'classic_option_list1_all_shell_us.php';
require 'classic_option_list2_shell_us.php';
require 'classic_option_list3_shell_us.php';
echo <<<END
The Rocky 9.1 has PHP 8.0 (and PHP 8.1 as alternative). Which version of PHP did the FC7 have?
You have to port your code from old PHP to PHP 8.0, i.e. figure out what is the proper way in PHP 8.0 to do the operation. That is about PHP, rather than the platform (Rocky Linux).
However, the “Update Note (March, 2017)” implies that your script connects to a database server and that server has evolved too, so you have to adapt your script to talk to the current database (with PHP 8.0). Again, not about platform.
I know. But what is lucky for me is that I always wrote my company’s program scripts in very simple grammatical vocabulary. Wishing that update works also be easy and simple.
Hi ! jletone ! Thank you for your comments. My company never ran/runs MySQL directly from Web-casting Servers. All the Database and MySQL are in possession of TuneFind Hachioji-Tokyo office and TuneFind Los_Angeles office, and those MySQL Server computers are isolated from Internet (never connected to INTERNET), but those Database SQL Servers stay running stand-alone. This is my policy of security. Data-MySQL is only editable at the isolated (non-Internet-connected) computers. So, when it comes to PHP codes updates, I have two fronts; (1, One) updates PHP scripts in Web-Casting Rocky 9.1 , but those scripts are relatively simple. The (2, Second) front is the work in different computers in the office with Database-MySQL software and PHP scripts are mingled together to perform Database business.
I need to study security issue, as you pointed out. I will. It takes a block of time though.
Dear sparesimian, I looked at the error log, and have some insight, but not clear idea to fix the error. So I decided to post a part of error log here down below. Will you also take a look and comment for me. Thanks.
httpd,appache_Error_log_January_27,2023.txt
[Fri Jan 27 05:49:13.839179 2023] [proxy_fcgi:error] [pid 4235:tid 4235] [client 111.239.152.51:41052] AH01079: failed to make connec
tion to backend: httpd-UDS, referer: http://110.3.33.130/cc/index_JP.html
[Fri Jan 27 05:49:27.601163 2023] [proxy:error] [pid 1647:tid 1647] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix
domain socket /var/run/php-fpm/php-fpm.pid () failed
[Fri Jan 27 05:49:27.601219 2023] [proxy_fcgi:error] [pid 1647:tid 1647] [client 111.239.152.51:41056] AH01079: failed to make connec
tion to backend: httpd-UDS, referer: XXXX/cc/index_JP.html
[Fri Jan 27 10:56:51.996456 2023] [proxy:error] [pid 3856:tid 3856] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix
domain socket /var/run/php-fpm/php-fpm.pid () failed
[Fri Jan 27 10:56:51.996507 2023] [proxy_fcgi:error] [pid 3856:tid 3856] [client 196.43.199.70:55454] AH01079: failed to make connect
ion to backend: httpd-UDS
[Fri Jan 27 10:57:15.994204 2023] [proxy:error] [pid 1647:tid 1647] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix
domain socket /var/run/php-fpm/php-fpm.pid (*) failed
Hi ! ganphx, thank you for your comment.
If I get rid of all CGI related codes from PHP file, then PHP will be displayed in simple shape ? Do you think so. Does it worth a try ? Thanks. M.K.
The errors in the log show that php-fpm isn’t responding. You need to install and configure that to use PHP scripts in Apache. I think that changed in RHEL 8. Start with “dnf install php-fpm” and then read its documentation on how to set it up.