Category: Network & Server (網絡及服務器)

Running Multiple PHP Versions on Windows Server

By admin, May 25, 2017 12:33 am

The trick is to create an extra environment variable PHPRC and point to the specific PHP version directory that contains php.ini.

* DO NOT put an extra \ at the end, ie, C:\Program Files (x86)\PHP 7.1.5 is the correct form without the ending \.

* Make sure you downloaded the Non-Thread Safe x86 version for PHP release

php

Extra Note:

For FastCGI on Windows Server 2003, the last supported binary Non-Thread Safe x86 version of PHP is 5.4.9. (ie, php-5.4.9-nts-Win32-VC9-x86.zip)

Enable the User-Defined INI files

If you want to allow Web application owners to control PHP settings themselves, you can enable a user-defined PHP configuration.

  1. Add the following setting, which specifies the name to be used for user-specific INI files, to the main php.ini file. Setting this to an empty value disables the user-defined PHP configuration.

    console
    user_ini.filename = .user.ini
    
  2. Create a file called .user.ini in C:\inetpub\website1.com\ folder, and add the following:

    console
    max_execution_time = 300
    
  3. Add the following to the file .user.ini in C:\inetpub\website2.com\ folder:

    console
    upload_max_filesize = 12M
    

    Note that if your main php.ini file has [PATH] sections that point to the root folders of these sites, then you need to remove those sections; if you do not remove those sections, the user-defined settings will not take effect.

  4. Use phpinfo() or ini_get(”max_execution_time”) to check that the new settings have overwritten the default settings. Create a PHP file with the following text and save it in the Web root folder:

    XML
    <?php phpinfo(); ?>
    
  5. Open the PHP script on the Web site http://localhost/phpinfo.php.

  6. Note also that when you enable the user-defined INI files, the settings in those files are cached by the PHP engine to avoid re-reading those files for every request. This means that if the user makes a change to .user.ini file, then that change may not take effect right away. Instead it may take effect after the cache time to live (TTL) has expired. The cache TTL value is controlled by the php.ini setting user_ini.cache_ttl, which is set to 300 seconds (5 minutes) by default.

Fore detail, please refer to Enable Per-Site PHP Configuration on IIS 7.

PHP Security Recommendations

By admin, May 19, 2017 1:09 pm

The following settings can be used to tighten the security of a PHP installation. To make the recommended changes, locate and open the php.ini file and edit the configuration settings as described below:

Setting Description
allow_url_fopen=Off allow_url_include=Off Disable remote URLs for file handling functions, which may cause code injection vulnerabilities.
register_globals=Off Disable register_globals.
open_basedir=”c:\inetpub\” Restrict where PHP processes can read and write on a file system.
safe_mode=Off safe_mode_gid=Off Disable safe mode.
max_execution_time=30 max_input_time=60 Limit script execution time.
memory_limit=16M upload_max_filesize=2M post_max_size=8M max_input_nesting_levels=64 Limit memory usage and file sizes.
display_errors=Off log_errors=On error_log=”C:\path\of\your\choice” Configure error messages and logging.
fastcgi.logging=0 The IIS FastCGI module will fail the request when PHP sends any data on stderr by using the FastCGI protocol. Disable FastCGI logging to prevent PHP from sending error information over stderr and generating 500 response codes for the client.
expose_php=Off Hide the presence of PHP.

CentOS 7 NIC is “Off” after reboot

By admin, May 15, 2017 9:43 pm

Got a surprise today! It turns out this is the default policy for the new CentOS, all you need is to modify /etc/sysconfig/network-scripts/ifcfg-eth0 and change ONBOOT=no to ONBOOT=yes. In additional Static IP setups would need to set BOOTPROTO=static.

How to Clear a Equallogic RAID label via a CLI command

By admin, April 24, 2017 12:24 pm

GrpName> mem sel <member name> disk select 0

GrpName(member_MEMBERNAME disk_0)> ?

clear-label          - Clears the label on the selected disk if the disk contai

Just make DOUBLE sure you have the correct drive number.  Remember first drive number is ZERO (0) not one (1).

You can issue it as one command.  mem sel membername disk select <number> clear-label

However, I prefer to select the drive first.  Then do a “show” to make sure it’s the disk I want.

show

______________________________ Disk Information _______________________________

Slot: 0                                Status: spare

Model: ST900MM0006                     Revision: LE09

Size: 838.36GB                         Errors: 0

Rpm: 10000                             SectorSize: 512

Health: ok

What’s New in VMware vSphere 6.5?

By admin, November 4, 2016 2:11 pm

After almost 6 years since the release of ESX 4.1 in Aug 2010, vSphere 6.5 has finally arrived. However imoo, I would still prefer to call it ESX 4.5 at max as there are not much new and useful  features added to be honest.

vCenter Server Appliance 6.5 (VCSA) is probably the most interesting one as it comes with native high availability, so no more worry about that single point of failure.

Other than that, I bet most of the 99% out there won’t really find those so called new feature useful in their daily operation.

In additional, seems there is no major change in VMware’s licensing model, remember that horrible vRAM tax back in 2012? :)

Finally, I am looking for Total SSD storage solution recently, and my eyes are on Pure Storage, but why their stock PSTG is dropping like hell?

vSphere-6.5-Whats-New-2

Virtualization came-in and changed everything!

By admin, November 2, 2016 12:36 pm

Come across this photo of my previous project today, can’t believe it’s almost 10 years already!…Used to setup a lot of cables, servers and network equipment before.

Then Virtualization came-in and changed everything, now with just after a few mouse clicks you have all the pieces ready in the photo, everything is software defined…well, at least it’s much more Eco-friendly for data center environment nowadays, and most importantly virtualization made my life much easier finally! (The answer is VMW if you know what I mean)

14940189_10205556792639017_27051369326164148_o

Dell PowerEdge FX2

By admin, February 2, 2016 5:54 pm

Lovely design, everything is so compacted, looks like this is something from S.H.I.E.L.D.. I like it very much and it’s going to be my next 2U selection for VMware! Here is the review for FD332 and FC830 by StorageReview, also a video for FD332, the 16 disks component, finally most importantly, the GUI, hum…it does look like a Blade somehow.

Alternative SMD (Sunday Morning Drive), pushing up some IOPS

By admin, January 31, 2016 10:29 am

smd

Gifts from Equallogic

By admin, January 16, 2016 7:14 pm

Professional compensation from Dell for their previous very unprofessional services.

IMG_2287

IMG_2281

IMG_2282

It’s a bit different than the one back in 2011, which has Firmware version EN03 and Made in China.

eql_15k



Blocked by Hotmail.com: 550 SC-001 (BAY004-MC4F44)

By admin, January 8, 2016 10:31 am

Recently my client has encountered problem that all their email sent to hotmail.com got bounced back immediately with the following error message.

Server response to MAIL FROM:
550 SC-001 (BAY004-MC4F44) Unfortunately, messages from xxx.xxx.xxx.xx weren’t sent. Please contact your Internet service provider since part of their network is on our block list. You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors.

It turns out their email server IP got blacklisted by hotmail.com due to suspicious spam activities, given the fast even their IP isn’t listed on any of the RBL anti-spam database.

The solution is quite straight forward but does with a bit of luck, simply fill in the form and PRAY Microsoft will get back to you shortly. (and they did recently, average reply time is about 10-30 mins)

The following is the actual reply from Microsoft:

We have completed reviewing the IP(s) you submitted. The following table contains the results of our investigation.

Conditionally mitigated
xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx, xxx.xxx.xxx.xxx,

Our investigation has determined that the above IP(s) qualify for conditional mitigation. These IP(s) have been unblocked, but may be subject to low daily email limits until they have established a good reputation.

Please note that mitigating this issue does not guarantee that your email will be delivered to a user’s inbox.

Ongoing complaints from users will result in removal of the mitigation.

Mitigation may take 24 – 48 hours to replicate completely throughout our system.

If you feel your issue is not yet resolved, please reply to this email and one of our support team members will contact you for further investigation.

Regardless of the deliverability status, Outlook.com recommends that all senders join two free programs that provide visibility into the Outlook.com traffic on your sending IP(s), the sending IP reputation with Outlook.com and the Outlook.com user complaint rates.

Of course, the above is just the normal scenario. Worst case, your email to hotmail.com could be never bounced back but disappeared totally in darkness.

After filled in the above form, you get a very discouraging reply from Microsoft saying your IP cannot be unblocked.

Not qualified for mitigation
xxx.xxx.xxx.xxx
Our investigation has determined that the above IP(s) do not qualify for mitigation.

Please ensure your emails comply with the Outlook.com policies, practices and guidelines found here: http://mail.live.com/mail/policies.aspx.

To have Deliverability Support investigate further, please reply to this email with a detailed description of the problem you are having, including specific error messages, and an agent will contact you.

Don’t worry, the next step is to reply to that particular email and explain the situation in detail and politely, normally, Microsoft will grand you the rights to unblock your IP again.

My name is xxx and I work with the Outlook.com Deliverability Support Team.

Recent activity coming from your IP (xxx.xxx.xxx.xxx) has been flagged by our system as suspicious, causing your IP to become blocked. I have conducted an investigation into the emails originating from your IP space and have implemented mitigation for your deliverability problem. This process may take 24 – 48 hours to replicate completely throughout our system.

Please note that lifting the block does not guarantee that your email will be delivered to a user’s inbox. However, here are some things that can help you with delivery:

Pages: Prev 1 2 3 4 5 6 7 8 9 10 ...26 27 28 Next