Deprecated: Hook custom_css_loaded is deprecated since version jetpack-13.5! Use WordPress Custom CSS instead. Jetpack no longer supports Custom CSS. Read the WordPress.org documentation to learn how to apply custom styles to your site: https://wordpress.org/documentation/article/styles-overview/#applying-custom-css in /srv/www/srvfail.com/public_html/wp-includes/functions.php on line 6078
SysAdminStuff ⋆ Page 13 of 15 ⋆ My Online Notebook

How to export WordPress comments to csv, xls, or some other file format

This is a repost of a post from an old blog, made on September 18, 2012, that used to be on:

http://wp.me/p25nt4-8z

http://adminramble.com/export-wordpress-comments-csv-xls-file-format/

Original post:

Here is a short tutorial on how to export WordPress comments to a excel .xls file, but you can also export them to PDF, Word or some other file type if you want.

You can export your comment either through the phpMyAdmin which most web hosting providers today have or by connecting to you MySQL server some other way and using a SQL query. The both are nothing else then just exporting the wp_comments table to a file

In both cases you will need to have a username and password for your MySQL server, to connect with.

There is also a plugin called Export comments to export comments to a csv file, which seems to be working with WordPress 3.4.2, but the file you get this way is pretty messy, you will get much more structured data by exporting directly from the MySQL.

Export through phpMyAdmin web interface

Connect to your phpMyAdmin and login with you username and password.

On home screen, click the plus sign by the database for your WordPress blog and select the wp_comments table. Then click on the export tab and select the format of the file you want to export to. Press the Go button and download the file to your computer. (The procedure might be a little different for you, depending on which version of phpMyAdmin you have installed)

You can then edit your .xls file further to contain only the information you need.

How to setup FortiGate to use 3G USB mobile internet modem as the WAN connection

This is a repost of a post from an old blog, made on August 10, 2012, that used to be on:

http://wp.me/p25nt4-8d

http://adminramble.com/setup-fortigate-3g-usb-mobile-internet-modem-wan-connection/

Original post

I was setting up a FortiGate device today to use a 3G modem as an Internet connection instead of a standard WAN interface so here is a little tutorial how to do it.

I was using:

  • FortiGate 50B device with FortiOS v4.0,build0320,110419 (MR2 Patch 6)
  • Huawei Mobile Connect E169 HSDPA USB stick with a SIM card for a Vodafone Mobile Connect services

Configuration steps:

  • connect the modem in the USB port on the FortiGate device and enable the modem with the following command:
    config system modem
        set status enable
    end
  • Detect the custom vendor and product ID of the USB modem with the following command:
    diagnose sys modem wireless-id

    you should get something like this:
    vendor: 0x12d1, product: 0x1003, registered: yes

    0x12d1 is the vendor ID for the Huawei, and 0x1003 is the product ID for Huawei E169, for Huawei E367a the product ID should be 0x1446 and for Huawei E367b 0x1506

  • Configure your modem interface with the following commands:
    config system modem
        set status enable
        set pin-init "at+cpin=YOUR_SIM_CARD_PIN#"
        set auto-dial enable
        set wireless-custom-vendor-id 0x12d1 (HUAWEI ID)
        set wireless-custom-product-id 0x1003 (E169 ID)
        set phone1 "*99***1#"(VODAFONE NUMBER)
        set extra-init1 "at+cgdcont=1,\"ip\",\"data.vip.hr(YOUR APN)\""
    end
  • Dial the modem with:
    execute modem dial

If you are using the web interface of your FortiGate device, when you enable the modem interface you will get Modem option under System > Network section on the left side menu. You can set up some of the options, like phone or Extra Initialization String there too. Also you can condial or hang-up your 3g connection from there too.

These are the pages I referenced when I was setting up my modem connection:

Blue squares and bars when connected with remote desktop

This is a repost of a post from an old blog, made on February 18, 2013, that used to be on:

http://adminramble.com/blue-squares-bars-connected-remote-desktop/

Original post:

Sometimes when you connect to the remote machine using a remote desktop connection you might get blue or black bars, stripes, squares or boxes on the white spaces of the screen of the remote machine. This issue is more often on thin client then other machines.

 

This issue can be resolved by disabling bitmap caching on the RDP client machine.

 

Bitmap caching is by default enabled for all remote desktop connections and it is used for enhancing the user experience on slow links by storing the often used images locally on the client machine.

Remote Desktop Licensing Error

This is a repost of a post from an old blog, made on February 29, 2012, that used to be on:

http://adminramble.com/remote-desktop-licensing-error/

Original post:

Today I got a call from client that he can’t connect to his Terminal Server from his Windows XP client.

He would get following error:

The remote computer disconnected the session because of an error in the licensing protocol. Please try connecting to the remote computer again or contact your server administrator.

Since I was sure the licensing was in order I searched for another possible problems.

The cause of the problem was in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing.

So here is one of possible solutions if you are getting this error when trying to connect to Terminal Server (Be sure to backup your registry before you do this or export the MSLicensing keys, in case this isn’t the cause of your problems):

  1. Open registry editor (Start > Run > regedit)
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ and find MSLicensing folder
  3. Right click on it and select delete
  4. Start Remote Desktop Client (Start>Run>mstsc) as local administrator to rebuild the deleted keys

Iif you are getting some other type of licensing error or if this doesn’t work for you try looking to http://technet.microsoft.com/en-us/library/cc756826%28v=ws.10%29.aspx for some other possible solutions.

YUM fails in clean CentOS 7 install, Exiting on user cancel

If you are installing CentOS 7, you might get an issue with yum update exiting, when it starts downloading packages with the message  Exiting on user cancel even though you haven’t pressed any key, or did anything else that might have cancelled the process.

This seems to be a known bug on Red Hat Enterprise Linux / CentOS 7.1, but it happened on version 7.0.1406 for me.

https://bugzilla.redhat.com/show_bug.cgi?id=1091740

[root@CentOS70x86-001 ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)

After running yum update it would connect to repository any resolve all the dependencies, and list all the packages that need to be updated, but once you would confirm the download, it would initiate download of packages, and then failed with the message indicating that the process was interrupted from keyboard.

Transaction Summary
=================================================================================================================================
Install    8 Packages (+6 Dependent packages)
Upgrade  202 Packages

Total size: 203 M
Total download size: 194 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Traceback (most recent call last):
  File "/usr/libexec/urlgrabber-ext-down", line 75, in 
    main()
  File "/usr/libexec/urlgrabber-ext-down", line 61, in main
    fo = PyCurlFileObject(opts.url, opts.filename, opts)
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1258, in __init__
    self._do_open()
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1589, in _do_open
    self._do_grab()
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1723, in _do_grab
    self._do_perform()
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1517, in _do_perform
    raise KeyboardInterrupt
KeyboardInterrupt


Exiting on user cancel

After running bash -c 'yum clean metadata && yum upgrade' as suggested on CentOS forums, yum has downloaded all the packages, and upgraded to latest CentOS version

https://www.centos.org/forums/viewtopic.php?t=47372

[root@CentOS70x86-001 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

Alternate solution

Another possible solution, to this might be to edit /usr/lib/python2.7/site-packages/urlgrabber/grabber.py file, and change the line number 1510 as below:

Change “elif errcode in (42, 55, 56):” to “elif errcode == 42:”

https://infologs.wordpress.com/2015/01/25/url-grabber-error-on-yum-updateinstall-on-centos7/