Using the appcmd command you can view, add and delete default documents in IIS configuration.
View:
C:\> %SystemRoot%\system32\inetsrv\appcmd list config /section:system.webServer/defaultDocument
Add:
C:\> %SystemRoot%\system32\inetsrv\appcmd set config /section:system.webServer/defaultDocument /+files.[value='index.php']
Remove:
C:\> %SystemRoot%\system32\inetsrv\appcmd set config /section:system.webServer/defaultDocument /-files.[value='index.php']
Wednesday, May 28, 2008
Friday, May 23, 2008
PHP as Apache module vs. PHP via Apache FastCGI
apachelounge.com members share very interesting results of their experiment with different PHP configurations.
Light blue line: httpd.exe processes Memory Usage
Dark blue line: all processes Memory Usage total
Fri-Sun : mod_fcgid
Mon-Tue : module with php from php.net (VC6)
Wed-Thu : module with self build php (VC9)
Fri : mod_fcgid
Thursday, May 22, 2008
How to specify PHP.ini for IIS5.1 and IIS6 FastCGI
The specific PHP.ini can be specified in the "Arguments" IIS FastCGI configuration option as follows:
[Types]
php=PHP-5.2
[PHP-5.2]
ExePath=C:\path\to\php-cgi.exe
Arguments=-c C:\path\to\php.ini
You can open the FastCGI configuration file by opening Windows command prompt and executing the following command:
notepad C:\WINDOWS\system32\inetsrv\fcgiext.ini
[Types]
php=PHP-5.2
[PHP-5.2]
ExePath=C:\path\to\php-cgi.exe
Arguments=-c C:\path\to\php.ini
You can open the FastCGI configuration file by opening Windows command prompt and executing the following command:
notepad C:\WINDOWS\system32\inetsrv\fcgiext.ini
Wednesday, May 21, 2008
Troubleshooting "Fatal error: Maximum execution time exceeded" in PHP
The "Fatal error: Maximum execution time of [some number] seconds exceeded in [php file name] on line [some number]" error message indicates that the called PHP script reach the time limit and was terminated by the PHP language engine. There are number of reasons for that and most common of them are:
Examples:
- Sending a lot of queries to a database.
- Some particular database query requires a lot of time to complete.
- Script has a lot of data to process.
- Defect in script code.
Examples:
- PHP.INI: max_execution_time = 600
- PHP script:
- .htaccess: php_value max_execution_time 600
Labels:
max_execution_time,
PHP,
PHP.ini,
set_time_limit,
settings
Subscribe to:
Posts (Atom)