Archive for the ‘Web hosting’ Category

Remote access to MySQL – error 10061 can’t connect to MySQL server – host is not allowed – user is not allowed

Sunday, February 15th, 2015

I’ve just been reviving my ubuntu (linux) server on the LAN to do some interface development and testing, and thought it would be easier to work if I had remote access to the MySQL databases to use something a little more productive than phpMyAdmin.

Poof! What a palaver! All up and running now, but time to make some notes in case I ever have to do this again. In case it matters, it’s the long term support LTS version of Ubuntu 12.04 (purple pangolin IIRC).

Anyhow, the default install of a LAMP server (linux/apache/mysql/php) doesn’t allow remote access, so you have to set it up.

The original error was

SQL Error (2003): Can't connect to MySQL server on hostname (10061)


cgi on cloud hosting

Thursday, October 4th, 2012

Copying a site from cpanel hosting to cloud hosting… contact page uses cgiemail to send the message.

Testing the contact page (using the domain alias before changing the nameservers) fails with a not found error on accessing the script and include file.

Trying to access the mail script without the following bit of the path attempts to download the file instead of run it, so it appears to be a web server config problem.

Try adding a handler in a .htaccess file in the cgi-bin directory:

<FilesMatch “cgiemail”>
SetHandler cgi-script

Following that, if you get an Internal Server Error (500), try setting the file permissions to 755.

osCommerce 2.2 Errors on copying a store to a new server

Sunday, August 5th, 2012

Recently I’ve been setting up a test server within the LAN (to be able to use Quickbooks Web Connector without an SSL licence) and have had to resolve several errors relating to setting up a copy of an osCommerce 2.2 store.

Some issues relating to .htaccess files:
– these are used particularly in shared hosting to set specific system options that you might better set as server options on your own server
– a new LAMP installation typically defaults to not processing .htaccess files, so they are ignored
– when copying a store with URL rewriting enabled, the page links within the store are set to the rewritten URLs, but the server rewriting rules for the store are contained in the .htaccess file in the catalog directory and being ignored by default
– enabling the .htaccess files causes both the catalog and admin sides of the store to fail with Internal Error 500s
– the catalog side fails because other default server settings do not allow the .htaccess files to override server settings so you have to set AllowOverride to On for the URL rewriting
– the admin side fails because the password protection settings for the directory refer to paths and files on the old server