发新话题
打印

首次运行php的故障

首次运行php的故障

打开info.php时出现好几个弹出窗口,内容是
function registration failed-duplicate name-readgzfile之类的
请问怎么会出现这样的问题?

还有我的dll扩展是在从c:\php4\extensions里面,而我的php.ini里面的路径也是设置这个,但是像刚才那样打开info.ini时就会说有些dll找不到!?

我用的是xp操作系统,apache测试成功      

TOP

你可以先在IIS里测试一下~~~~

你的PHP加入了apache吗?

extensions的dll文件在需要的时候才用

phpinfo()还用不到,      
@&#\※★○◎◆□△─┄╀┾┮┭┬

TOP

那function registration failed-duplicate name-readgzfile是怎么回事?
php加入apache是不是就是在httpd.conf里面加入scriptalias /php/ "c:/php4"      

TOP

不是

你去你的PHP目录下,看install.txt文件,那里面有详细的介绍~~~

function registration failed-duplicate name-readgzfile
这个我没有遇到过

[php]
Installing PHP on Windows with Apache 1.3.x

------------------------------------------------------------
ATTENTION: Apache 2 Users

   At this time, support for Apache 2 is experimental.  It's
   highly recommended you use PHP with Apache 1.3.x and not
   Apache 2.  Documentation for installing Apache 2 on windows
   can be seen here:

      http://www.php.net/manual/en/install.apache2.php

   With the basic difference being that when installing as a
   module you'll use php4apache2.dll instead of php4apache.dll
   Both files are included within this release.
  ------------------------------------------------------------


  There are two ways to set up PHP to work with Apache 1.3.x
  on Windows. One is to use the CGI binary (php.exe),
  the other is to use the Apache module dll. In either case
  you need to stop the Apache server, and edit your
  httpd.conf or srm.conf to configure Apache to work with PHP.
  We'll refer to either of these files with httpd.conf in the
  text.

  Although there can be a few variations of configuring PHP
  under Apache, these are simple enough to be used by the
  newcomer. Please consult the Apache Docs for further
  configuration directives.


  Installing PHP for Apache as module
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  Now that version 4.1 introduces a safer sapi module, we recommend
  that you configure PHP as a module in Apache.

  To accomplish this, you have to load the php4apache.dll in your
  Apache httpd.conf.

  !! NOTE !!
  Whereever you load php4apache.dll from, php4apache.dll also
  needs the php4ts.dll also included in the PHP4 distribution.
  php4apache.dll depends on php4ts.dll which is loaded as soon as
  Apache loads php4apache.dll. If php4ts.dll can't be found, you
  usually get an error like (also see the "roblems?" section at
  the end of the file):

    Cannot load c:/php/sapi/php4apache.dll into server

  So where does php4ts.dll has to be to be properly loaded ?
  php4ts.dll is searched in the following order:

  1) in the directory where apache.exe is start from
  2) in the directory where php4apache.dll is loaded from
  3) in your %SYSTEMROOT%\System32, %SYSTEMROOT%\system and
     %SYSTEMROOT% directory.
     Note: %SYSTEMROOT%\System32 only applies to Windows NT/2000/XP)
  4) in your whole %PATH%

  Note: What is %SYSTEMROOT% ? Depending on your Windows
        installation this may be for example c:\winnt or C:\windows

  Usually you would just copy it over to %SYSTEMROOT%\System32.
  But if you want to have multiple PHP installations (for
  whatever reason) this is a bad idea. For this circumstance the
  safest thing is to let php4ts.dll reside in the same directory
  where php4apache.dll is loaded from (see point 2 above).


  After you've set up the file layout properly, you're ready to
  finally configure Apache to load the PHP4 module. Just add the
  following lines to your httpd.conf:

   LoadModule php4_module c:/php/sapi/php4apache.dll
   AddModule mod_php4.c
   AddType application/x-httpd-php .php

  Note: Especially newer versions of Apache do not need the
        AddModule directive anymore, your milage may vary.


  Where do I have to put the php.ini ?
   The php.ini files is only searched in two places:
   1) in your Apache installation directory (e.g. c:\apache\apache)
   2) in your %SYSTEMROOT% directory.
[/php]

将php4ts.dll复制到system32目录      
@&#\※★○◎◆□△─┄╀┾┮┭┬

TOP

这个dll文件我已经复制到system32目录了.
现在我已经可以打开info.php了,问题是明明我的extensions路径里有的dll插件他说找不到,很奇怪   所以我不得不禁止加载所有的dll      

TOP

发新话题