IIS

Fix “No data was received to import…” in phpMyAdmin with IIS

I have Windows 2008 R2 VPS & already installed IIS v7.5, PHP & MySQL.

I move some of my websites to this new VPS & try to import MySQL database via phpMyAdmin. I was greeted with following error.

No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.

FAQ 1.16 does not help because it only says that my upload database size is too big. I only try to import 5kb database way below the limit.

Further digging reveal that the problem caused by the temporary directory PHP uses for uploads. By default this is C:\Windows\Temp, which is not writable for PHP.

To solve this,

1. Edit “php.ini” file & change

upload_tmp_dir="C:\Windows\temp"

to

upload_tmp_dir="C:\inetpub\temp"

2. Make sure to remove any other “upload_tmp_dir” settings.

3. Set permissions on “C:\inetpub\temp” so that IUSR and IIS_IUSRS have write permission.

4. Restart the web server (IIS)


Enable Incoming Ping to Windows Server 2008 & IIS

If you are installing Microsoft Windows Server 2008 with Internet Information Services (IIS), you may notice that there is no response if you ping to the server. This is because the firewall is blocking it.

In Windows Server 2008 & IIS, the service called “Echo Request – ICMPv4-In” and “Echo Request – ICMPv6-In” for IPv4 & IPv6 respectively.

To enable follow the following

IPv4

Control Panel   Windows Firewall → Advanced settings → Inbound Rules → File and Printer Sharing (Echo Request – ICMPv4-In) → Enable → Apply

IPv6

Control Panel   Windows Firewall → Advanced settings → Inbound Rules → File and Printer Sharing (Echo Request – ICMPv6-In) → Enable → Apply