2015-10-16 48 views
0

我已經從Windows機器上我的USB驅動器上運行DokuWikiStick了好幾個星期沒有任何問題,直到今天窗戶PATH環境變量。的Dokuwiki上一棒斷裂時的路徑本地PHP是在

今天我安裝XAMMP其中,除其他事項外,安裝PHP,並增加了一個路徑PHP目錄到Windows PATH環境變量(C:在我的情況\ XAMPP \ PHP)。

現在,當我開始DokuWikiStick(microapache)我收到日誌中下列錯誤(和維基的應用程序不會在瀏覽器中加載)

 
[Fri Oct 16 14:08:54.069762 2015] [mpm_winnt:notice] [pid 5540:tid 188] AH00418: Parent: Created child process 8920 
PHP Warning: PHP Startup: bz2: Unable to initialize module\nModule compiled with module API=20100525\nPHP compiled with module API=20131226\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: gd: Unable to initialize module\nModule compiled with module API=20100525\nPHP compiled with module API=20131226\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: mbstring: Unable to initialize module\nModule compiled with module API=20100525\nPHP compiled with module API=20131226\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: openssl: Unable to initialize module\nModule compiled with module API=20100525\nPHP compiled with module API=20131226\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: pdo_sqlite: Unable to initialize module\nModule compiled with module API=20100525\nPHP compiled with module API=20131226\nThese options need to match\n in Unknown on line 0 

如果我刪除到PHP的路徑路徑環境變量,然後DokuWikiStick應用程序運行得很好。

如何使用自己的PHP文件運行DokuWikiStick(aka microapache),並保持本地計算機的PHP設置不變?

這裏是爲DokuWikiStick當前設置:

的httpd.conf

 
absolute minimum configuration for DokuWiki on a Stick 
# change the Listen directive if you want to use a different port 

Listen 6608 
ServerName microapache 
ServerRoot . 
DocumentRoot ./../dokuwiki 
ServerAdmin [email protected] 

# load libraries for PHP 
Loadfile ./php/ssleay32.dll 
Loadfile ./php/libeay32.dll 
#Loadfile icuuc51.dll 
#Loadfile php/icuin51.dll 

# load apache modules 
LoadModule access_compat_module modules/mod_access_compat.so 
LoadModule authz_core_module modules/mod_authz_core.so 
LoadModule dir_module modules/mod_dir.so 
LoadModule mime_module modules/mod_mime.so 
LoadModule rewrite_module modules/mod_rewrite.so 

# Load PHP module and add handler 
LoadModule php5_module ./php/php5apache2_4.dll 
AddHandler application/x-httpd-php .php 

# Configure the path to php.ini 
PHPIniDir ./php 

AcceptPathInfo off 
KeepAlive on 
KeepAliveTimeout 15 
TimeOut 30 
DirectoryIndex index.html index.php 

的php.ini

 
; minimal php.ini file, keeps most settings at default 
[PHP] 

date.timezone = Eastern/Detroit 

max_execution_time = 120 
max_input_time = 90 
memory_limit = 128M 
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT 
display_errors = On 
display_startup_errors = On 
post_max_size = 32M 
file_uploads = On 
upload_max_filesize = 15M 


extension_dir= ./php/ext 
extension=php_bz2.dll 
extension=php_gd2.dll 
extension=php_mbstring.dll 
extension=php_openssl.dll 
extension=php_pdo_sqlite.dll 

run.cmd(開始microapache服務器)

 
@echo off 
goto begin 

:usage 
echo Usage: %~n0 
echo. 
echo Starts DokuWiki on a Stick (http://www.dokuwiki.org/dokuwiki_on_a_stick) 
echo and waits for user to press a key to stop. 
goto end 

:begin 
if not "%1"=="" goto usage 
cd server 
start "Apache server" /B mapache.exe 
echo DokuWiki on a Stick started... 
echo. 

:runbrowser 
echo Your web browser will now open http://127.0.0.1:6608 
echo. 
if exist ../dokuwiki\conf\local.php (
    start http://127.0.0.1:6608/ 
) else (
    start http://127.0.0.1:6608/install.php 
) 

:wait 
echo To stop DokuWiki on a Stick 
pause 

:stop 
ApacheKill.exe 
echo ... DokuWiki on a Stick stopped. 
echo You can close this window now. 

:end 

的目錄結構DokuWikiStick USB驅動器上如下:

 
FOLDER E:\DokuWikiStick\ ------- 2 2 136,795 136,795 
FILE out.txt 
FILE run.cmd 
FOLDER E:\DokuWikiStick\dokuwiki\ ------- 6 8 64,093 64,093 
FILE .htaccess.dist 
FILE COPYING 
FILE doku.php 
FILE feed.php 
FILE index.php 
FILE install.php.old 
FILE README 
FILE VERSION 
FOLDER E:\DokuWikiStick\dokuwiki\bin\ ------- 0 7 30,717 30,717 
FILE .htaccess 
FILE dwpage.php 
FILE gittool.php 
FILE indexer.php 
FILE render.php 
FILE striplangs.php 
FILE wantedpages.php 
FOLDER E:\DokuWikiStick\dokuwiki\conf\ ------- 0 22 39,628 39,628 
FILE .htaccess 
FILE acl.auth.php 
FILE acl.auth.php.dist 
FILE acronyms.conf 
FILE dokuwiki.php 
FILE entities.conf 
FILE interwiki.conf 
FILE license.php 
FILE local.php 
FILE local.php.bak 
FILE local.php.dist 
FILE mediameta.php 
FILE mime.conf 
FILE mysql.conf.php.example 
FILE plugins.local.php 
FILE plugins.php 
FILE plugins.required.php 
FILE scheme.conf 
FILE smileys.conf 
FILE users.auth.php 
FILE users.auth.php.dist 
FILE wordblock.conf 
FOLDER E:\DokuWikiStick\dokuwiki\data\ ------- 10 5 39,508 39,508 
FILE .htaccess 
FILE deleted.files 
FILE security.png 
FILE security.xcf 
FILE _dummy 
FOLDER E:\DokuWikiStick\server\conf\ ------- 0 2 2,366 2,366 
FILE httpd.conf 
FILE mime.types 
FOLDER E:\DokuWikiStick\server\logs\ ------- 0 3 87,124 87,124 
FILE error.log 
FILE httpd.pid 
FILE _dummy 
FOLDER E:\DokuWikiStick\server\modules\ ------- 0 8 103,936 103,936 
FILE mod_access_compat.so 
FILE mod_authz_core.so 
FILE mod_dir.so 
FILE mod_env.so 
FILE mod_log_config.so 
FILE mod_mime.so 
FILE mod_rewrite.so 
FILE mod_setenvif.so 
FOLDER E:\DokuWikiStick\server\php\ ------- 1 6 4,123,333 4,123,333 
FILE libeay32.dll 
FILE php-license.txt 
FILE php.ini 
FILE php5apache2_4.dll 
FILE php5ts.dll 
FILE ssleay32.dll 
FOLDER E:\DokuWikiStick\server\php\ext\ ------- 0 5 1,560,576 1,560,576 
FILE php_bz2.dll 
FILE php_gd2.dll 
FILE php_mbstring.dll 
FILE php_openssl.dll 
FILE php_pdo_sqlite.dll 

回答

1

最簡單的解決方案可能會取消設置PATH在run.cmd腳本?

+0

感謝您的建議,因爲它讓我指出了正確的方向。我最終從路徑變量中刪除了有問題的目錄,而不是通過將以下內容添加到run.cmd腳本中來刪除所有內容:set path =%path:c:\ xampp \ php; =% – Drew

相關問題