草庐IT

php - httpd 不会以为 php 添加的行开始

coder 2024-01-04 原文

我今天在 Arch for ARM 上更新了我的 httpd 和 php 版本。

当前版本是:
apachectl -V 服务器版本:Apache/2.4.7 (Unix) 服务器构建:2014 年 3 月 6 日 17:04:51 服务器的模块魔数(Magic Number):20120211:27 服务器加载:APR 1.5.0,APR-UTIL 1.5.3 编译使用:APR 1.5.0,APR-UTIL 1.5.3 架构:32 位 服务器 MPM:事件 线程化:是(固定线程数) fork :是(可变进程数)

我还需要 php 用于 owncloud 和其他 php 项目,因此我添加了以下行:

LoadModule php5_module       modules/libphp5.so
AddHandler php5-script php
Include conf/extra/php5_module.conf

到文件/etc/httpd/conf/httpd.conf。

在更新之前这个配置工作正常,在更新之后apache将不再启动并且总是显示错误:

Mar 07 03:43:59 alarm apachectl[1006]: [Fri Mar 07 03:43:59.408232 2014] [:crit] [pid 1008:tid 3070083072] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP.
Mar 07 03:43:59 alarm apachectl[1006]: AH00013: Pre-configuration failed
Mar 07 03:43:59 alarm systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 07 03:43:59 alarm systemd[1]: Failed to start Apache Web Server.
Mar 07 03:43:59 alarm systemd[1]: Unit httpd.service entered failed state.

删除并重新安装 php 没有帮助。我该如何解决这个问题?

最佳答案

要在 Apache/2.4.7 上切换到 prefork MPM(就像以前版本的 Apache),在 /etc/httpd/conf/httpd.conf 中执行此操作:

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so   
#LoadModule mpm_event_module modules/mod_mpm_event.so

在 httpd 重启后,在我的树莓派上。

2.4.7 中的 apache 升级:

Mar 07 19:33:56 rasperus systemd[1]: Starting Apache Web Server...
Mar 07 19:33:56 rasperus apachectl[23469]: [Fri Mar 07 19:33:56.909344 2014] [:crit] [pid 23471:tid 3069247488] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP.
Mar 07 19:33:56 rasperus apachectl[23469]: AH00013: Pre-configuration failed
Mar 07 19:33:56 rasperus systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 07 19:33:56 rasperus systemd[1]: Failed to start Apache Web Server.
Mar 07 19:33:56 rasperus systemd[1]: Unit httpd.service entered failed state.

在 httpd.conf 中修改后:

Mar 07 19:45:11 rasperus systemd[1]: Starting Apache Web Server...
Mar 07 19:45:12 rasperus systemd[1]: PID file /run/httpd/httpd.pid not readable (yet?) after start.
Mar 07 19:45:12 rasperus systemd[1]: Started Apache Web Server.

关于php - httpd 不会以为 php 添加的行开始,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22248003/

有关php - httpd 不会以为 php 添加的行开始的更多相关文章

  1. ruby - 我需要将 Bundler 本身添加到 Gemfile 中吗? - 2

    当我使用Bundler时,是否需要在我的Gemfile中将其列为依赖项?毕竟,我的代码中有些地方需要它。例如,当我进行Bundler设置时:require"bundler/setup" 最佳答案 没有。您可以尝试,但首先您必须用鞋带将自己抬离地面。 关于ruby-我需要将Bundler本身添加到Gemfile中吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/4758609/

  2. ruby - 将 Bootstrap Less 添加到 Sinatra - 2

    我有一个ModularSinatra应用程序,我正在尝试将Bootstrap添加到应用程序中。get'/bootstrap/application.css'doless:"bootstrap/bootstrap"end我在views/bootstrap中有所有less文件,包括bootstrap.less。我收到这个错误:Less::ParseErrorat/bootstrap/application.css'reset.less'wasn'tfound.Bootstrap.less的第一行是://CSSReset@import"reset.less";我尝试了所有不同的路径格式,但它

  3. ruby - Highline 询问方法不会使用同一行 - 2

    设置:狂欢ruby1.9.2高线(1.6.13)描述:我已经相当习惯在其他一些项目中使用highline,但已经有几个月没有使用它了。现在,在Ruby1.9.2上全新安装时,它似乎不允许在同一行回答提示。所以以前我会看到类似的东西:require"highline/import"ask"Whatisyourfavoritecolor?"并得到:Whatisyourfavoritecolor?|现在我看到类似的东西:Whatisyourfavoritecolor?|竖线(|)符号是我的终端光标。知道为什么会发生这种变化吗? 最佳答案

  4. ruby - 续集在添加关联时访问many_to_many连接表 - 2

    我正在使用Sequel构建一个愿望list系统。我有一个wishlists和itemstable和一个items_wishlists连接表(该名称是续集选择的名称)。items_wishlists表还有一个用于facebookid的额外列(因此我可以存储opengraph操作),这是一个NOTNULL列。我还有Wishlist和Item具有续集many_to_many关联的模型已建立。Wishlist类也有:selectmany_to_many关联的选项设置为select:[:items.*,:items_wishlists__facebook_action_id].有没有一种方法可以

  5. ruby-on-rails - 项目升级后 Pow 不会更改 ruby​​ 版本 - 2

    我在我的Rails项目中使用Pow和powifygem。现在我尝试升级我的ruby​​版本(从1.9.3到2.0.0,我使用RVM)当我切换ruby​​版本、安装所有gem依赖项时,我通过运行railss并访问localhost:3000确保该应用程序正常运行以前,我通过使用pow访问http://my_app.dev来浏览我的应用程序。升级后,由于错误Bundler::RubyVersionMismatch:YourRubyversionis1.9.3,butyourGemfilespecified2.0.0,此url不起作用我尝试过的:重新创建pow应用程序重启pow服务器更新战俘

  6. ruby - 可以通过多少种方法将方法添加到 ruby​​ 对象? - 2

    当谈到运行时自省(introspection)和动态代码生成时,我认为ruby​​没有任何竞争对手,可能除了一些lisp方言。前几天,我正在做一些代码练习来探索ruby​​的动态功能,我开始想知道如何向现有对象添加方法。以下是我能想到的3种方法:obj=Object.new#addamethoddirectlydefobj.new_method...end#addamethodindirectlywiththesingletonclassclass这只是冰山一角,因为我还没有探索instance_eval、module_eval和define_method的各种组合。是否有在线/离线资

  7. ruby - 如何在 Ruby 中向现有方法定义添加语句 - 2

    我注意到类定义,如果我打开classMyClass,并在不覆盖的情况下添加一些东西我仍然得到了之前定义的原始方法。添加的新语句扩充了现有语句。但是对于方法定义,我仍然想要与类定义相同的行为,但是当我打开defmy_method时似乎,def中的现有语句和end被覆盖了,我需要重写一遍。那么有什么方法可以使方法定义的行为与定义相同,类似于super,但不一定是子类? 最佳答案 我想您正在寻找alias_method:classAalias_method:old_func,:funcdeffuncold_func#similartoca

  8. ruby-on-rails - 添加回形针新样式不影响旧上传的图像 - 2

    我有带有Logo图像的公司模型has_attached_file:logo我用他们的Logo创建了许多公司。现在,我需要添加新样式has_attached_file:logo,:styles=>{:small=>"30x15>",:medium=>"155x85>"}我是否应该重新上传所有旧数据以重新生成新样式?我不这么认为……或者有什么rake任务可以重新生成样式吗? 最佳答案 参见Thumbnail-Generation.如果rake任务不适合你,你应该能够在控制台中使用一个片段来调用重新处理!关于相关公司

  9. ruby - 我如何添加二进制数据来遏制 POST - 2

    我正在尝试使用Curbgem执行以下POST以解析云curl-XPOST\-H"X-Parse-Application-Id:PARSE_APP_ID"\-H"X-Parse-REST-API-Key:PARSE_API_KEY"\-H"Content-Type:image/jpeg"\--data-binary'@myPicture.jpg'\https://api.parse.com/1/files/pic.jpg用这个:curl=Curl::Easy.new("https://api.parse.com/1/files/lion.jpg")curl.multipart_form_

  10. Observability:从零开始创建 Java 微服务并监控它 (二) - 2

    这篇文章是继上一篇文章“Observability:从零开始创建Java微服务并监控它(一)”的续篇。在上一篇文章中,我们讲述了如何创建一个Javaweb应用,并使用Filebeat来收集应用所生成的日志。在今天的文章中,我来详述如何收集应用的指标,使用APM来监控应用并监督web服务的在线情况。源码可以在地址 https://github.com/liu-xiao-guo/java_observability 进行下载。摄入指标指标被视为可以随时更改的时间点值。当前请求的数量可以改变任何毫秒。你可能有1000个请求的峰值,然后一切都回到一个请求。这也意味着这些指标可能不准确,你还想提取最小/

随机推荐