PHP script error when upgraded from Fedora Core 7 to Rocky 9.1

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.

<?php echo <<<END Search for Classic Music Performers and Composers .alternate_0 {background: rgb(240, 240, 255); font-size: 14px; margin-top: 12px; } .alternate_1 {background: rgb(255, 255, 255); font-size: 14px; margin-top: 2px; margin-left: 18px} table {border:1px}

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
BY WORD : Search by clue word(s) in title

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.

What is probably more platform-related is that in el9 the security policies are more strict and support for older (insecure) ciphers is gone (or disabled). That can affect connection to servers. See Chapter 8. Applying security policies Red Hat Enterprise Linux 9 | Red Hat Customer Portal

Fedora 7 has PHP 5.2…
So huge work to update

Looks like Perl CGI is not configured in Apache.

Internal Server Error

Did you check Apache’s error_log to see what error was reported when the script ran? PHP’s error messages are usually pretty good.

Thanks for your message about appache’s error log. I will check it out soon. Thanks again, bye now.

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.

Thanks again, jlehtone ! Bye now.

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.


[Fri Jan 27 05:49:13.839179 2023] [proxy_fcgi:error] [pid 4235:tid 4235] [client] AH01079: failed to make connec
tion to backend: httpd-UDS, referer:
[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/ () failed
[Fri Jan 27 05:49:27.601219 2023] [proxy_fcgi:error] [pid 1647:tid 1647] [client] 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/ (
) failed
[Fri Jan 27 10:56:51.996507 2023] [proxy_fcgi:error] [pid 3856:tid 3856] [client] 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/ (*) 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.