dqxmf02844 2014-02-26 09:04
浏览 39

配置Apache时出现“指定的过程无法找到”错误

I try to configure Apache 2.4.2 for localhost so that it worked with PHP and PostgreSQL. I added following code to the end of httpd.conf file (updated after @Galadai's answer):

PHPIniDir "D:/Programy/php"

LoadFile "D:/Programy/php/php5ts.dll"
LoadFile "D:/Gis/PostgreSQL/9.3/bin/libpq.dll"

LoadModule php5_module "D:/Programy/php/php5apache2_4.dll"

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Trying to start Apache returns an error. When I run "Test Configuration", it shows following error message:

httpd.exe: Syntax error on line 519 of D:/Programy/Apache/httpd.conf: Cannot load D:/Programy/php/php5ts.dll into server: Specified procedure could not be found.

I had some path issues before, and the error message was almost the same, just there was "module" instead of "procedure". I have found quite a few hints for the "module" version, but their solution was usually to make sure whether the paths fit (I did this), both versions are 32/64 bit (both are 32 bit) and PHP is thread safe (it is). I didn't find any hint how to solve the "procedure" version of the error. I thought it might have been caused by difference in versions (I tried Apache 2.2 before), but this proved to be wrong.

EDIT: now I added PHPIniDir and the first LoadFile before the rest of the document ending, and only difference is that now the problem occurs on php5ts.dll too. The path is correct (if it wasn't there would be "module", not "procedure" problem - tested again).

Any other idea?

My PHP is 5.5.9 (thread safe) and PostgreSQL 9.3, my system is Windows XP 32 bit.

EDIT2: workaround through EnterpriseDB LAPP is not as good as I thought for the first time, so I'm still looking for an answer to this question.

  • 写回答

1条回答 默认 最新

  • douzhangkui2467 2014-02-26 09:12
    关注

    According to php.net manual

    httpd.conf should look like this:

    #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
    PHPIniDir "c:/PHP/"
    Loadfile "C:\php\php5ts.dll"
    Loadfile "C:\php\libpq.dll"
    LoadModule php5_module "c:/PHP/php5apache2_2.dll"
    #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
    AddHandler application/x-httpd-php .php
    AddHandler application/x-httpd-php-source .phps
    
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。