tag:blogger.com,1999:blog-72001986315492783232024-02-20T23:32:16.841-08:00wamp ideasHow to install, upgrade and work with WAMP (Windows, Apache, MySQL and PHP).AlexWhttp://www.blogger.com/profile/13565884393075901110noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-7200198631549278323.post-29146608997966592862008-06-25T14:21:00.000-07:002008-06-25T14:26:19.125-07:00ApacheloungeIf you use the Apache MSI package and are looking for a portable Apache ZIP package, which you can just unpack and install, look for it on <a href="http://www.apachelounge.com/">apachelounge.com</a>. These guys maintaining alternative Apache distribution package that can be unpacked and started from your USB flash drive in seconds.AlexWhttp://www.blogger.com/profile/13565884393075901110noreply@blogger.com0tag:blogger.com,1999:blog-7200198631549278323.post-79089012658297122702008-06-13T15:05:00.000-07:002008-06-13T15:20:15.467-07:00See real script error hidden by "The webside cannot display the page"When you see in your browser "The website cannot display the page" error message like this:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCt2kqNg5-bqaja7825hAykngLL_f7PKxpaiQU0_4wJ5-DdUJPh98ihclN_A_q9R664X4T1uWgusv9nSuQ8dyboNpKH-uJnuC8IGF3yEOqr7mTr178wqXE7m8D0ViiEmolgfIfr6oNAiQ/s1600-h/IE-Friendly-500-HTTP-Error-Message.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCt2kqNg5-bqaja7825hAykngLL_f7PKxpaiQU0_4wJ5-DdUJPh98ihclN_A_q9R664X4T1uWgusv9nSuQ8dyboNpKH-uJnuC8IGF3yEOqr7mTr178wqXE7m8D0ViiEmolgfIfr6oNAiQ/s400/IE-Friendly-500-HTTP-Error-Message.png" alt="" id="BLOGGER_PHOTO_ID_5211492222140012882" border="0" /></a><br /><br />And want to discover a "real" error, just click Tools -> Internet Options, then clear the "Show friendly HTTP error messages" check box on the "Advanced" tab and click Ok.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuJNPjj8FUqbsxbhtMwpci4kB-pbD-KtBoTL1Xq0YaCfIE-bdkOqLbZaUqNgmADiZms_fFuDXM2whDjyNaVvls8hIg3pOE6DAY8LGtoGY7NECSPX2PQMrv3mHP8Lw6jJ77TSdYuX7I3uY/s1600-h/IE-Internet-Options-Show-Friendly-HTTP-Error-Messages.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuJNPjj8FUqbsxbhtMwpci4kB-pbD-KtBoTL1Xq0YaCfIE-bdkOqLbZaUqNgmADiZms_fFuDXM2whDjyNaVvls8hIg3pOE6DAY8LGtoGY7NECSPX2PQMrv3mHP8Lw6jJ77TSdYuX7I3uY/s400/IE-Internet-Options-Show-Friendly-HTTP-Error-Messages.png" alt="" id="BLOGGER_PHOTO_ID_5211493295370634258" border="0" /></a><br /><br />Then just refresh the page.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmzGGXatJ724lWL8jHFh1ePlLamNTaEmrPOmSMJH27TBx6TJjaKX8FeEBQF6yUiSYlIfVBYkuReKlDq1J_42AMYbr44_YrbTA75vTiutCzCRiWz4RcCWqBT76P_EPXiKyPqTK8pa7bZG0/s1600-h/IE-PHP-Error-example.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmzGGXatJ724lWL8jHFh1ePlLamNTaEmrPOmSMJH27TBx6TJjaKX8FeEBQF6yUiSYlIfVBYkuReKlDq1J_42AMYbr44_YrbTA75vTiutCzCRiWz4RcCWqBT76P_EPXiKyPqTK8pa7bZG0/s400/IE-PHP-Error-example.png" alt="" id="BLOGGER_PHOTO_ID_5211494119296326722" border="0" /></a>AlexWhttp://www.blogger.com/profile/13565884393075901110noreply@blogger.com0tag:blogger.com,1999:blog-7200198631549278323.post-79404212715141181832008-06-12T07:27:00.001-07:002008-06-12T07:34:26.471-07:00Starting PHP CLI with custom PHP.iniIf you HTTP server PHP configuration is different from PHP command line configuration and this prevents you from using PHP CLI, you can resolve this by creating different version of the PHP.ini and specify it when you call the PHP.exe from the command line. You can specify the PHP.ini in one of the following ways:<br /><ul><li>Using PHPRC environment variable. <a href="http://www.witsuite.com/support/knowledge-base/general/modify-the-path-environment-variable.php">This</a> tutorial will help you to modify environment variables on Windows.</li><li>With -c command line PHP.exe switch as follows:<br /><span style="font-family: courier new;">C:\> C:\PHP5\php.exe -c C:\PHP5\PHP.CLI.ini script.php</span><br /></li></ul>AlexWhttp://www.blogger.com/profile/13565884393075901110noreply@blogger.com0tag:blogger.com,1999:blog-7200198631549278323.post-28629248080017482062008-05-28T04:37:00.000-07:002008-05-28T04:42:25.890-07:00How to change default documents on IIS7 (Vista, Server 2008)Using the appcmd command you can view, add and delete default documents in IIS configuration.<br /><br />View:<br /><span style="font-family:courier new;">C:\> %SystemRoot%\system32\inetsrv\appcmd list config /section:system.webServer/defaultDocument<br /></span><br />Add:<br /><span style="font-family:courier new;"></span><span style="font-family:courier new;">C:\> %SystemRoot%\system32\inetsrv\appcmd set config /section:system.webServer/defaultDocument /+files.[value='index.php']<br /><br /></span>Remove:<br /><span style="font-family:courier new;"></span><span style="font-family:courier new;">C:\> %SystemRoot%\system32\inetsrv\appcmd set config /section:system.webServer/defaultDocument /-files.[value='index.php']<br /></span>AlexWhttp://www.blogger.com/profile/13565884393075901110noreply@blogger.com0tag:blogger.com,1999:blog-7200198631549278323.post-44025214691920172252008-05-23T16:56:00.000-07:002008-05-23T17:10:29.998-07:00PHP as Apache module vs. PHP via Apache FastCGI<a href="http://apachelounge.com/">apachelounge.com</a> members share very interesting results of their experiment with different PHP configurations.<br /><br /><blockquote><pre>Light blue line: httpd.exe processes Memory Usage<br />Dark blue line: all processes Memory Usage total<br />Fri-Sun : mod_fcgid<br />Mon-Tue : module with php from php.net (VC6)<br />Wed-Thu : module with self build php (VC9)<br />Fri : mod_fcgid</pre><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5zTEy-gOpkvKvq6boGvCBBJe6IVg5Nb5wMiB7WVE60P2-gSTJI788hg2vECjKOmBjSgboMzFQ29Xw7_wQDWBbJE9bsH34ld5WobIgSZ-A95dymzlvCif6cpk5eRaEMoT4muU2npCX5sw/s1600-h/httpd-ram-week.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5zTEy-gOpkvKvq6boGvCBBJe6IVg5Nb5wMiB7WVE60P2-gSTJI788hg2vECjKOmBjSgboMzFQ29Xw7_wQDWBbJE9bsH34ld5WobIgSZ-A95dymzlvCif6cpk5eRaEMoT4muU2npCX5sw/s400/httpd-ram-week.png" alt="" id="BLOGGER_PHOTO_ID_5203729676670856514" border="0" /></a><br /></blockquote><br /><p><a href="http://www.apachelounge.com/forum/viewtopic.php?p=10991">Link</a></p>AlexWhttp://www.blogger.com/profile/13565884393075901110noreply@blogger.com0tag:blogger.com,1999:blog-7200198631549278323.post-35658252605537040632008-05-22T07:05:00.000-07:002008-05-22T07:09:56.075-07:00How to specify PHP.ini for IIS5.1 and IIS6 FastCGIThe specific PHP.ini can be specified in the "Arguments" IIS FastCGI configuration option as follows:<br /><br /><span style="font-family: courier new;">[Types]</span><br /><span style="font-family: courier new;">php=PHP-5.2</span><br /><span style="font-family: courier new;">[PHP-5.2]</span><br /><span style="font-family: courier new;">ExePath=C:\path\to\php-cgi.exe</span><br /><span style="font-family: courier new;">Arguments=-c C:\path\to\php.ini</span><br /><br />You can open the FastCGI configuration file by opening <a href="http://www.witsuite.com/support/knowledge-base/general/working-with-command-prompt.php">Windows command prompt</a> and executing the following command:<br /><br /><span style="font-family: courier new;">notepad C:\WINDOWS\system32\inetsrv\fcgiext.ini</span>AlexWhttp://www.blogger.com/profile/13565884393075901110noreply@blogger.com0tag:blogger.com,1999:blog-7200198631549278323.post-23873533548589381252008-05-21T14:06:00.001-07:002008-05-21T14:27:28.096-07:00Troubleshooting "Fatal error: Maximum execution time exceeded" in PHPThe "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:<br /><ul><li>Sending a lot of queries to a database.</li><li>Some particular database query requires a lot of time to complete.</li><li>Script has a lot of data to process.</li><li>Defect in script code.</li></ul>If you are the script developer, you can profile it and fix bottlenecks. If you an administrator, you can try to increase PHP script time limit in PHP.ini by increasing the value of the <a href="http://ua2.php.net/manual/en/info.configuration.php#ini.max-execution-time">max_execution_time</a> option (in seconds) or call the <a href="http://php.net/set_time_limit">set_time_limit</a> function at the very top of the script in a PHP code block.<br /><br />Examples:<br /><ul><li>PHP.INI: max_execution_time = 600</li><li>PHP script: <?php set_time_limit(600); ?></li><li>.htaccess: php_value max_execution_time 600<br /></li></ul>AlexWhttp://www.blogger.com/profile/13565884393075901110noreply@blogger.com0