我有一个运行RHEL 6.7的服务器:Apache:2.2.15 PHP 5.3.3 getenforce =>禁用
因为,它的工作很好。 服务器的Web主服务器告诉我,PHP-5.3将不再适用于Facebook的API,我需要升级到5.4或更高版本。 试图做到这一点,我已经遵循http://developerblog.redhat.com/2013…6-using-rhscl/的步骤我唯一真正的变化是做:'rhn-channel –add – channel = rhel-x86_64-server-6-rhscl-1',因为文章有点过时。 除此之外,我紧跟着这些步骤。 我甚至得到了
"[warn] module php5_module is already loaded, skipping"
为了解决这个问题,我使用了'/v/etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.php5.3'来防止Apache启动时运行。 然后我重新启动apache。 这是我得到的错误日志。
[Wed Nov 11 11:41:59 2015] [notice] caught SIGTERM, shutting down [Wed Nov 11 11:41:59 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Nov 11 11:41:59 2015] [notice] Digest: generating secret for digest authentication ... [Wed Nov 11 11:41:59 2015] [notice] Digest: done [Wed Nov 11 11:41:59 2015] [notice] Apache/2.2.15 (Unix) PHP/5.4.40 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
'httpd -M | grep php'显示:
Syntax OK php5_module (shared)
当我尝试加载网页而不是像之前那样执行index.php时,我所得到的只是一个空白页面。 我想我错过了一些简单的事情。 以下是我目前的/etc/httpd/conf.d/php54-php.conf
有没有人有任何想法,我可以使其正确运行index.php? 非常感谢您的参与。
麦克风
我的评论由3#开头。 喜欢 ###
# # PHP is an HTML-embedded scripting language which attempts to make it # easy for developers to write dynamically generated webpages. # <IfModule prefork.c> LoadModule php5_module modules/libphp54-php5.so </IfModule> # # Cause the PHP interpreter to handle files with a .php extension. # <FilesMatch \.php$> ### Shows a blank page instead of running the PHP code. SetHandler application/x-httpd-php ### Shows the PHP source code instead of running it #SetHandler application/x-httpd-php5 </FilesMatch> # # Allow php to handle Multiviews # # AddHandler php5-script .php AddType text/html .php ### Seems to have no effect #AddType application/x-httpd-php .php ### Seems to have no effect #AddType application/x-httpd-php-source .phps # # Add index.php to the list of files that will be served as directory # indexes. # DirectoryIndex index.php # # Uncomment the following lines to allow PHP to pretty-print .phps # files as PHP source code: # #<FilesMatch \.phps$> # SetHandler application/x-httpd-php-source #</FilesMatch> # # Apache specific PHP configuration options # those can be override in each configured vhost # php_value session.save_handler "files" php_value session.save_path "/opt/rh/php54/root/var/lib/php/session"