Forum

php_flag in .hiawatha ?

Christopher
7 April 2008, 11:28
I gotta disable eacclerator in a dir and a way to do that in apache is using the .htaccess php_flag command but is there a way to do so in hiawatha
Hugo Leisink
7 April 2008, 13:12
You have to disable PHP options in php.ini (the location of that file depends on your OS, but it is probably in /etc/ or /etc/php). If you want the config of PHP only changed for a certain virtual host and not for all virtual hosts, you can use PHPRC (see http://www.php.net/configuration) via the Setenv config option (see the Hiawatha manpage for that) if you are using PHP as CGI, or you have to start a separate PHP-FastCGI server if you use PHP as a FastCGI server. You can give each PHP FastCGI server a separate configfile via the php-fcgi tool (see the php-fcgi manpage for more info) which comes with Hiawatha.
Christopher
7 April 2008, 13:51
This is a windows system though, I am running the webserver in a portable enviroment ( Created a batch file following this example http://hiawatha.leisink.org/index.php?page=forum&topic=28 ), just isnt there a way to only disable the option only in that dir like how u could with apache?
Christopher
7 April 2008, 13:59
Sorry for the double post ( Couldnt find any edit button )

My server root current looks like this:

-start.bat ( Starts the server )
-stop.bat ( Stops the server )
--bin
--php
--python
--config
--log
--eaccelerator ( all the cache and stuff )
--web ( All the web files )

And yes php is running in fcgi mode
Hugo Leisink
7 April 2008, 18:49
I don't know if it's gonna work, but try the following:

Directory {
Path = c:\path\to\dir
Setenv PHPRC = c:\path\to\php.ini
}


In the specified php.ini, you enter the PHP settings you need to be changed.
Christopher
8 April 2008, 17:05
Tried it didnt seem to work...

My config as follows

# Hiawatha httpd.conf
#

Binding {
Port = 80
MaxKeepAlive = 30
TimeForRequest = 3,20
}

ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /Hiawatha/log/system.log

TimeForCGI = 10
CGIextension = com,exe
CGIhandler = /python/php-cgi.exe:py

FastCGIserver {
FastCGIid = PHP5
Extension = php
ConnectTo = 127.0.0.1:2005
}

Hostname = 127.0.0.1
WebsiteRoot = /Hiawatha/web/Aerion_http
StartFile = index.php
AccessLogfile = /Hiawatha/log/access.log
ErrorLogfile = /Hiawatha/log/error.log
ExecuteCGI = yes
FastCGI = PHP5
PIDfile = /Hiawatha/log/Hiawatha.pid
GarbageLogfile = /Hiawatha/log/garbage.log

Directory {
Path = /Hiawatha/web/eyeos
Setenv PHPRC = /Hiawatha/php/php-no_eacclerator.ini
}
Hugo Leisink
9 April 2008, 01:17
Since you are using Hiawatha on Windows, shouldn't you be using the c:\some\path format instead of the /some/path format?
Christopher
9 April 2008, 14:49
Well like i just said i am using it in a portable enviroment so the path is relative to the dir

Well at least the webserver works though this way
This topic has been closed.