0
Posted on 3:11 AM by Softminer and filed under ,

Every folder could have different cache (different web.config)

In the Home pane, double-click HTTP Response Headers.
In the HTTP Response Headers pane, click Set Common Headers... in the Actions pane.
In the Set Common HTTP Response Headers dialog box, check the box to expire Web content, select the option to expire after a specific interval or at a specific time, and then click OK.

More Info (Client Cache)
0
Posted on 8:15 AM by Softminer and filed under , ,

To increase fastCGI PHP_FCGI_MAX_REQUESTS,

On the server level, double-click FastCGI Settings.
Select the FastCGI application that you want to configure. In the Actions pane, click Edit....

In the Edit FastCGI Application dialog box, set the InstanceMaxRequests to 10000. Next to the EnvironmentVariables setting, click the Browse (...) button.




In the EnvironmentVariables Collection Editor dialog box, add the PHP_FCGI_MAX_REQUESTS environment variable and set its value to 10000.


Note: If you do not configure these settings, the following default settings will be used: instanceMaxRequests = 200, PHP_FCGI_MAX_REQUESTS = 500 (on most PHP builds).

0
Posted on 7:39 AM by Softminer and filed under , ,


Open IIS Manager, and then move to the server level.

Double-click Handler Mappings.

In the Actions pane, click Add Module Mapping.

In the Add Module Mapping dialog box, specify the configuration settings as follows:

Request path: *.php

Module: FastCgiModule

Executable: C:\[Path to your PHP installation]\php-cgi.exe

Name: PHPviaFastCGI

Click OK.

In the dialog box that asks you to confirm that you want to create a FastCGI application for the executable, click Yes.

To verify that the handler mapping works correctly, create a Phpinfo.php file in the C:\inetpub\wwwroot folder that contains the following:



Open a Web browser, and then navigate to http://localhost/phpinfo.php. If everything was set up correctly, you will see the standard PHP information page.

+
+

PS: if you get "Error Code 0c8007010b" it because of application pool which is different in Plesk

another solution:

Granted Read & execute, List folder contents for Everyone on folder

C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5

and now php is up and running for every Application Pool. The main problem with plesk was, only sites running with Application Pool Identity of a user which is member of psacln.
0
Posted on 10:43 AM by Softminer and filed under , ,

First you have to enable CGI

WINDOWS SERVER 2008

Go to Server Manager -> Roles -> Add Role Services. On the Select Role Services page, select the CGI check box. This enables both the CGI and FastCGI services.

Windows Visa/7

Go to Control Panel -> Programs and Features -> Turn Windows features on or off. In the Windows Features dialog box, select the CGI check box. This enables both the CGI and FastCGI services.


Then from Web Platform installer install "PHP Manager for IIS"
0
Posted on 9:28 AM by Softminer and filed under ,

Download link for Windows Server 2008 R2 VHD
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=16572

Create a VM with OS: Micorosoft Windows
Version: Windows 2008 (64 bit)

Username: administrator, password: Pass@word1 (Administrator account)


MSFT VHD image is created base on the IDE Hard disk. We will need to change the Virtual Box setting.

Delete the SATA Controller shows in the setting and Add the new disk IDE controller and select the VHD image.





Active the Windows
+
1
Posted on 2:06 AM by Softminer and filed under ,

Definition from wikipedia

design pattern that prevents some duplicate form submissions, creating a more intuitive interface for user agents (users). PRG implements bookmarks and the refresh button in a predictable way that does not create duplicate form submissions.

Wikipedia

ASP.NET MVC - Using Post, Redirect, Get Pattern

ASP.NET MVC Tip #6 – Call RedirectToAction after Submitting a Form

PRG Pattern in the ASP.NET MVC Framework
0
Posted on 1:17 AM by Softminer and filed under

If you want to open config extension with XML style in notepad++

Navigate to %APPDATA%\Notepad++ and open the langs.xml file

Find a node like the one below and add "config" as shown

<Language name="xml" ext="xml xsml xsl" bla bla  />

its also available via setting -> style configuration
0
Posted on 8:01 AM by Softminer and filed under ,

key_buffer_size – Very important if you use MyISAM tables. Set up to 30-40% of available memory if you use MyISAM tables exclusively. Right size depends on amount of indexes, data size and workload – remember MyISAM uses OS cache to cache the data so you need to leave memory for it as well, and data can be much larger than indexes in many cases. Check however if all of key_buffer is used over time – it is not rare to see key_buffer being set to 4G while combined size of .MYI files is just 1GB. This would be just a waste. If you use few MyISAM tables you’ll want to keep it lower but still at least 16-32Mb so it is large enough to accommodate indexes for temporary tables which are created on disk.

innodb_buffer_pool_size This is very important variable to tune if you’re using Innodb tables. Innodb tables are much more sensitive to buffer size compared to MyISAM. MyISAM may work kind of OK with default key_buffer_size even with large data set but it will crawl with default innodb_buffer_pool_size. Also Innodb buffer pool caches both data and index pages so you do not need to leave space for OS cache so values up to 70-80% of memory often make sense for Innodb only installations. Same rules as for key_buffer apply – if you have small data set and it is not going to grow dramatically do not oversize innodb_buffer_pool_size you might find better use for memory available.
innodb_additional_mem_pool_size This one does not really affect performance too much, at least on OS with decent memory allocators. Still you might want to have it 20MB (sometimes larger) so you can see how much memory Innodb allocates for misc needs.
innodb_log_file_size Very important for write intensive workloads especially for large data sets. Larger sizes offer better performance but increase recovery times so be careful. I normally use values 64M-512M depending on server size.
innodb_log_buffer_size Default for this one is kind of OK for many workloads with medium write load and shorter transactions. If you have update activity spikes however or work with blobs a lot you might want to increase it. Do not set it too high however as it would be waste of memory – it is flushed every 1 sec anyway so you do not need space for more than 1 sec worth of updates. 8MB-16MB are typically enough. Smaller installations should use smaller values.
innodb_flush_log_at_trx_commit Crying about Innodb being 100 times slower than MyISAM ? You probably forgot to adjust this value. Default value of 1 will mean each update transaction commit (or each statement outside of transaction) will need to flush log to the disk which is rather expensive, especially if you do not have Battery backed up cache. Many applications, especially those moved from MyISAM tables are OK with value 2 which means do not flush log to the disk but only flush it to OS cache. The log is still flushed to the disk each second so you normally would not loose more than 1-2 sec worth of updates. Value 0 is a bit faster but is a bit less secure as you can lose transactions even in case MySQL Server crashes. Value 2 only cause data loss with full OS crash.
table_cache – Opening tables can be expensive. For example MyISAM tables mark MYI header to mark table as currently in use. You do not want this to happen so frequently and it is typically best to size your cache so it is large enough to keep most of your tables open. It uses some OS resources and some memory but for modern hardware it is typically not the problem. 1024 is good value for applications with couple hundreds tables (remember each connection needs its own entry) if you have many connections or many tables increase it larger. I’ve seen values over 100.000 used.
thread_cache Thread creation/destructions can be expensive, which happen at each connect/disconnect. I normally set this value to at least 16. If application has large jumps in amount of concurrent connections and I see fast growth of
Threads_Created variable I boost it higher. The goal is not to have threads created in normal operation.
query_cache_size If your application is read intensive and you do not have application level caches this can be great help. Do not set it too large as it may slow things down as its maintenance may get expensive. Values from 32M to 512M normally make sense. Check it however after a while and see if it is well used. For certain workloads cache hit ratio is lower than would justify having it enabled.
Note: as you can see all of these are global variables. These variables depend on hardware and mix of storage engines, while per session variables are typically workload specific. If you have simple queries there is no reason to increase sort_buffer_size even if you have 64GB of memory to waste. Furthermore doing so may decrease performance.
I normally leave per session variable tuning to second step after I can analyze workload.