Archive for the 'Hosting' Category

September 7th, 2022
4:10 pm
Running Legacy Places Guide under Windows 11 for reference

Posted under CouchDB & Hosting & Ionic & Knowledge Base & Networks & PrimeNG & Web & Windows 11
Tags ,

Having got CouchDB working under Windows 11 with the legacy places data as per this post here, I then wanted to run the legacy places angular and ionic apps if possible, just for reference and to consider my options going forward.

The angular app was in v6.1.7 which I did not want to revisit and upgrade. Similarly, the ionic app was an earlier legacy version which could be tricky to reinstate under windows 11.

However, I did have already built distributions for both apps, and both were able to run successfully under Windows 11 via http-server without having to install anything else. For angular I used the existing build under the dist subdirectory, and for Ionic I the build is under the www subdirectory. Note that whilst the index.html for the Ionic version did specify that cordova.js was required, and caused a load error in the web console, this was not an issue when using from a browser as it was not needed.

I did want to be able to run them remotely as well, from other PCs and mobiles. I tried installing the distributions under Zen hosting, with remote access to CouchDB running on the local PC. However, this would not run under HTTPS as it meant having mixed content – the access to CouchDB was not HTTPS and I did not want to go to the trouble of installing a self signed cert locally to get it all to work – this excercise was not worth the effort. I could not find an easy way under Zen cpanel of allowing just this app to be HTTP only, with everything else defaulting to HTTPS. If I turned off forced defaulting to HTTPS in cpanel, the app worked fine under HTTP but other access was also allowed to be HTTP only which I did not like, so I dumped the idea of hosting under Zen directly. I did hit a spate of nasty looking cpanel issues when I did this and for a while thought I had broken the domain/ssl/cpanel access entirely whilst messing with domain/alias/redirect settings in cpanel, but in the end it all worked fine again.

I therefore continued to run/host locally via http-server. I did want to be able to potentially remote boot my local PC via Fritz and access the app from anywhere, which would mean auto running the http-servers at boot time. The easiest way to do this turned out to be to use the windows task scheduler, which unlike services can run batch files without any other tools such as srvany which is commonly used to do this for services. Whilst the scheduler is often used with time based triggers, it is perfectly possible to specify a trigger as ‘run at boot time’. I also specified that it should run without any user logged in, therefore with local access only/no user authentication. This worked fine and I could boot the PC and then immediately access the places apps from a mobile without logging in.

Another trick needed was to add some remote port sharing in the Fritz box for both apps, via my static IP addresses. When doing this I also had to add a port share for the CouchDB access, otherwise CouchDB also complained about mixing private CORS stuff with the remote access. Once I did this, and changed the app config to use the remote URL for CouchDB access, it all worked fine. Fortunately, I could also continue to access the same apps locally on the hosting PC even though they were still using the remote URL for CouchDB access – it all worked fine.

I then set up redirects under cpanel from Zen to make the app access look a bit more friendly with salient soft urls, and this all ran fine.

 

Comments Off on Running Legacy Places Guide under Windows 11 for reference

October 18th, 2019
3:41 pm
500 error when connecting to database from Mantis and 2intandem

Posted under Hosting

I received 500 errors from both Mantis and 2intandem, giving this kind of error:-
The server requested authentication method unknown to the client [mysql_old_password]

In the case of 2intandem it was just a straight 500 unable to connect to database error, so the error was not so clear. However once I had fixed mantis, I suspected the issue was the same and indeed it was.

This post here indicated that this was due to a change in the password salt length/old/legacy salt issue, and that simply changing the password would resolve the issue.

This fixed the issue for both – just a password change. Even changing to the same password fixed the issue. In one case I actually changed the password so therefore also had to update the password in the relevant config.php file.

One issue on doing this was that I spent some time finding out where to change DB users/passwords in CPanel, thinking it was in PHPMyAdmin screen per some posts on this.
However it is not done there but under the MySQLDatabases icon in CPanel – this allows user maintenance including password changing etc.

This resolved the issues for both Mantis and the 2intandem hosted web site.

Comments Off on 500 error when connecting to database from Mantis and 2intandem

February 4th, 2017
4:24 pm
MantisBT Upgading

Posted under Hosting
Tags , ,

Update 18/10/2019 – file permission issue after unzip of new version

I upgraded to 2.22.1.  When the install zip was unzipped on the server, all the files and directories had group write access. This was not the case for previous installs/upgrades, and I was not clear on the cause.
This causes the upgrade script to fail, as the version of PHP in use disallowed the scripts from running with this permission present.

To remedy this I tried changing the permissions a directory at a time in the CPanel file manager but this was very time consuming.

I then tried to connect via SSH to the CPanel hosting, but this failed and timed out. It should be possible to enable it in Cpanel as per here but the Zen CPanel does not have this and does not seem to allow it.
The Zen support boards did not have anything on this either.

In the end I found that FileZilla can do it as per this post here.
It can recurse subdirectories, and also crucially all the check boxes are tri-state so they can either be “force on“, “force off“, or “leave as was“, so I could use the same recurse to fix both directories and all files to remove group write but leave everything else alone, given that other directory permissions are different to those of files and I didn’t want to mess with them.

This worked fine, and allowed the Mantis install script (which also does upgrades) to run.

When upgrading, the script helpfully does a precheck of requirements for the upgrqade. It said that a db type in the config script of ‘mysql’ was legacy and not supported in the zen configuration, so it said to change this to ‘mysqli’ in the config_inc.php file.
This then passed all the prechecks and the upgrade ran quickly and cleanly.

Original Version

This is fairly straight forward (apart from the database permissions issue below) and is documented here.

For additional information about initial installation of MantisBT see here.

The steps I performed were as follows:-

  1. Backup the site including the MySQL databases
  2. Rename the existing Mantis installation on the site to another folder for easy backout.
  3. Upload the installation zip to the site, and unzip.
  4. Rename the unzipped directory to the desired target name (in my case, mantis)
  5. Copied the config_inc.php from the old installation to the new one. Note that in my case the config had been moved in the new version to a config subfolder under the installation directory.
  6. Compared the copied config_inc.php with the sample one in config_inc.php.sample, to reconcile any config changes in the new version. In my case, going from version 1.2.4 to version 2.1.0, I had to add an entry for $g_crypto_master_salt which was not present in the old version. To create the salt I used the WordPress salt creation site here as Mantis did not have a convenient one, and it was not straightforward to create a random salt under windows.
  7. Run the database upgrade script (see note below about permission issues).
  8. I also used the Directory Privacy option under cPanel to force a username and password to allow access to Mantis (in addition to the login that Mantis provides). Note that when renaming the existing Mantis installation in step 2/ the existing directory privacy settings moved with the renamed directory.

Database fails to upgrade database due to permission errors

This was found when upgrading from 1.2.4 to the latest version at the time, 2.1.0.Running the upgrade database script gave errors on alter table commands, even though the user for that particular hosted database had full permissions. The solution was to use the overall master account for database access, which allowed the script to run. This is described in more detail here.

No Comments »

February 4th, 2017
4:21 pm
Zen MySQL Hosting and Permission Issues

Posted under Hosting
Tags , ,

cPanel MySQL access is provided by the phpMyAdmin application.

When creating MySQL databases for different applications, each get their own database schema and user, but their is also a master user which has the same username and password as the cPanel hosting (in my case, swoodley/…..).

This is relevant as I have found during upgrading some hosted software where a database upgrade script needs to be run, sometimes the script fails when run under the username for the specific schema with permission errors e.g. on alter table, even though the user has full permissions. This occurred in particular when upgrading Mantis BT. This appears to be because the script in question contains specific database schema references when referring to tables, of the form mydb.tablename. This kind of reference fails when run using the login account for the particular database schema.

Logging in using the master user solved the problem. It may be that modifying the script to take out specific schema references may then allow it to work with the schema/database account rather than the master one. However, this was not necessary in my case.

No Comments »

May 9th, 2011
4:24 pm
Installing MantisBT for Issue Tracking

Posted under Hosting
Tags , ,

I was looking into a suitable tool for software issue/bug tracking. The following were my main goals:-

  1. I wanted access via the internet from anywhere as a prime requirement, so I needed a hosted application.
  2. I did not want to be forced to get custom hosting for it, and already use cpanel hosting extensively as it is readily available and cheap, so ideally I would need a PHP application which was easy to run and install on cpanel.
  3. I wanted Open source/community software if possible.
  4. I did not have much in the way of a feature shopping list, but ideally wanted a stable and feature rich package that could also be customised as required. My initial requirements would be fairly basic but I wanted a package that would accommodate growing needs in the future, such as multiuser features for a software development team, reporting etc.

 

Possible Contenders

  • Jira is very feature rich and is used by a number of major Java projects such as Java.net, Primefaces etc. However it needs Java hosting as it is a Java application, so for me that knocked it out of the frame.
  • Bugzilla was also a possible contender, being written in Perl it might run under cpanel, but having seen a post attempting this it looked a nightmare to install, and it was not clear that it would work under cpanel without elevated permissions which I did not have. I wanted a simple solution not another project!
  • Finally, I looked at MantisBT, and this appeared to tick all the boxes. It is highly feature rich, stable, and easy to install under cpanel. It lacks some nice to have features, such as text formatting for the issues – all the issue text and notes in Mantis are plain text, whereas with other packages, rich text is used so text formatting such as bold, underline etc. can be used. However, the one vital thing I needed was easy/automatic hyperlinking of URLs in the issue text, and fortunately Mantis does this very well and fully automatically. The hyperlinking is basic, just giving you the actual URL as the hyperlink description, but it works perfectly well. Also, whilst nice formatting is icing on the cake, it is important to remember that this is after all an issue/bug reporting tool for use by developers, so sexy formatting is not a primary concern. As I have used it further, I have been very impressed with the feature set. It allows full relationship definition between issues, supports multiple/hierachical projects, and supports both categories for issues and tagging in blog fashion. It also has full notification email support and this may be configured as desired. It is highly customisable, and has many more features than I would need initially.

 

MantisBT Installation and Configuration Notes

The documentation is very comprehensive and installation is straightforward. Basically it is a case of unzipping the kit on the server, creating a MySQL database and associated accounts via cpanel, and editing config_inc.php to put the database/login and other details in. Note the following points :-

  1. You need to pull the database settings out of config_inc.php, merge them with config_inc.php.sample, and create a new version of config_inc.php.
  2. I changed the file upload method from DATABASE to FILE. After doing so, I tested file upload and it was fine. You can leave the upload path blank in the config file. If you then set the upload folder for a project to ‘uploads/xxx/’ this will go to <mantis install directory>/uploads/xxx/, exactly as you would expect.
  3. As long as you set the folder permissions to 755 for the top level mantis folder you will be fine, the install and the file upload will both work. Prior to copying the sample config file, I got file path errors on a file upload (when it was set to the default of DATABASE), but after setting it to FILE it all worked fine.
  4. Note that email notifications work fine, but when testing, you DON’T get notified of your own changes by default (see config file), so you need to make changes using a second account to test email notify. Also, the default for a user is not to receive emails on a status change, so you need to change this as well.

 

Issue Tag Plugin

By default, Mantis supports tagging but does not make the feature very visible – you cannot see tags on the issue list screen by default. An excellent Tag plugin is available here. Having installed this, you can configure a column to display the tags and place it where you like (full instructions on the plugin web site). I placed the tags next to the categories. The plugin gives Mantis comprehensive tag support; you can see all the tags in the issue lists and the tags are clickable links. I highly recommend this plugin and having used it for a while I would not use Mantis without it.

No Comments »

December 6th, 2010
8:09 am
Hosting Providers

Posted under Hosting
Tags , ,

See this post of mine on PCG technical about what I am after, with links to a number of  hosters of interest.

More recently Rapidswitch were recommended, also on PCG. They are Maidenhead based, on the cordwallis estate. They offer dedicated servers starting at £45 pm – a better option than a virtualised one. Iomart Hosting are their parent company who also host under their own name.

Here is a copy of my PCG post, the link needs a login or it won’t show:-

I’m also looking for Java hosting. I’ll need to host Glassfish V3 and MySQL (might get away with just Tomcat and MySQL at a pinch, but Glassfish preferred).
I’ve seen companies such as this JSPZone and [DE]Systems Engineering who offer this starting at roughly £25-£30pm, but not sure they are any good. 2020media might be a possible but they are Tomcat only hosting. JSPZone is also hosted in NZ which is perhaps not the most net bandwidth friendly solution for a uk project.
I would prefer having a VPS running Ubuntu or similar that I could install what I like on – quite often I’ll need to install a particular patch release of some or other component in the software stack, and want complete freedom to be able to do this, along with the ability to bounce it all at will. I can also freely add anything else I fancy. Whilst this means more work in terms of building the server image etc. and maintaining it, I feel the extra freedom would be worth it. I’m assuming I’ve understood VPS hosting correctly here and that I can run whatever I like that runs on the target Linux version – please correct me if any caveats here!
For a VPS solution, I’ve seen companies such as Switchlink, UKHost4U and BOD Host offer this for a tad more (of order £35pm) but I have no idea if they are any good.
As well as particular hosting recommendations, I would be very interested if the panel experts know of a good review site that could help. I saw WebHostingStuff here, but was somewhat dismayed to see that 2 of the companies that our good friend Openstrike was rather less than complimentary about actually got reasonable reviews here and here. Obviously I am only interested in review sites whose opinion is, well, worth taking notice of.
I do get the feeling that finding a good hosting provider is about as easy as finding a good plumber or roofer \:\(
I won’t need this for a while yet, just planning ideas well ahead of time. Until I am a lot further down the road I won’t have any figures for bandwidth and space requirements. I presume I can move up from VPS hosting to dedicated server hosting, and also presume that a cloud solution like Amazon EC2 would allow me scaling on demand if I need it (albeit at a premium price). Again, any comments welcomed.
TIA
Steve

No Comments »