Posts

htaccess: Redirecting multiple domains to the main domain

Let's say this is the main domain: mywebsite.com.au And you'd like to redirect several other domains that you have purchased to this main domain.The steps shown below redirects all www, non-www, http and https variations and also matches the internal pages. Step 1: Go to your DNS provider's website and point each of those purchased domains to the server that is hosting your main domain. In other words, add the IP address of your hosting server in the A record. Step 2: Log in to your WHM. Then park each domain on top of the main domain. You may be able to do this in cPanel > Aliases but I haven't tried. Step 3: If you have AutoSSL enabled, all the additional parked domains will automatically get SSL added. This may take some time. Alternatively, you can go to WHM > Manage AutoSSL and Run AutoSSL Check. Step 4: Add your parked domains to your .htaccess file as shown below. Note the "$" at the end of this line: ^www\.mywebsite\.com$ . This ...

Getting iframe tag to work in TinyMCE

If iframe tag does not work in TinyMCE (ie when iframe tag is inserted into the HTML editor, the code is simply removed), it must be enabled by modifying the tinyMCE.init function in the application and adding the extended_valid_elements option: tinyMCE.init({   ...   extended_valid_elements : "iframe[src| allowfullscreen |frameborder|style|scrolling|class|width|height|name|align]" }); This will make the iframe tag immediately available in the editor. To check if the new settings have been added, tinyMCE.settings.extended_valid_elements can be typed into the Firefox or Chrome console.

Increase the redo log size using innodb_log_file_size

Got this error while trying to import a large .sql file in MySQL Workbench: ERROR 1118 (42000) at line 171970: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size. Solution to the above error in XAMPP is as follows: In xampp\mysql\bin\my.ini file, set innodb_log_file_size = 128M (the default value was around 20M) Save the file and restart MySQL server.

How to resolve 'res://ieframe.dll/acr_error.htm#' error (Internet Explorer stopped working while viewing a website)

While testing a website I was developing, I got an error message saying "Internet Explorer has stopped working". This is followed by this line added before the URL: res://ieframe.dll/acr_error.htm# . I was using Internet Explorer 11 in Windows 7 64-bit machine. I tried disabling all add-ons in IE but that did not resolve the issue. I've found this solution to my problem: From Tools menu, open "Internet options". Go to the Advanced tab. Under "Accelerated graphics", tick the box that says "Use software rendering instead of GPU rendering". Click Apply and Ok. Test your website. You might need to restart your computer if it does not immediately show any effect. This worked for me.

XAMPP MercuryMail shutdown unexpectedly

When MercuryMail shuts down unexpectedly, you get the following message on XAMPP control panel: Error: Mercury shutdown unexpectedly. 6:25:56 PM  [mercury]     This may be due to a blocked port, missing dependencies, 6:25:56 PM  [mercury]     improper privileges, a crash, or a shutdown by another method. I restarted Mercury but that did not help. However this worked for me. Open up your Mercury's /QUEUE directory. It should be located somewhere at "C:\xampp1.8.3\MercuryMail\QUEUE". There should be one or more *.QCF files. Delete all of them. Then start Mercury from XAMPP Control Panel.

Cygwin cygintl-2.dll issue with 'ls' command in Win 7

After installing Cygwin, there was a warning on the Win 7 command prompt that says 'cygintl-2.dll' file is missing. It turned out to be a conflict between Cygwin and OpenSSH program, which I had installed prior to Cygwin. 'ls.exe' was part of both Cygwin's /bin and OpenSSH's /bin directories and it looked like the 'ls' command was running off OpenSSH's path. I just uninstalled OpenSSH. Then it started working again. Alternatively, I could simply remove OpenSSH from the Window's PATH. That might have resolved the issue too but didn't try. If you have found another solution, free free to share.

MySQL: How to find tables that are using a certain column name?

This SQL helps you list the tables with a certain column name. As you can see in the script, you can also use comma-separated multiple column names. SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN ('column_name1', 'column_name2') AND TABLE_SCHEMA='database_name' You may also use "COLUMN_NAME LIKE" to find a closer match of something you are looking for such as: SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME LIKE 'column_name%' AND TABLE_SCHEMA='database_name'