Blog | Kilburnlad KilburnladBlog

Using MAMP to develop a PHP site

I built a site for my daughter some time ago and recently I've been developing a registration system using Sitelok by Vibralogix, a sophisticated piece of PHP software with a superb manual and incredible after sales support; something I've needed as I've struggled with the certain aspects of the site development. Mainly it must be said to do with the Paypal interface rather than the basic registration system.

MAMP

I use RapidWeaver and with new and existing web pages now being controlled by PHP it has not been possible to preview them before publishing. As most of what I've done so far is on hidden pages, locked with Sitelok, it hasn't impacted too greatly on the live site. But I had reached the stage of modifying live pages for Sitelok, making live publishing a slightly risky way of checking modifications or additions. So I decided to try MAMP, which comes in two versions, MAMP (free) and MAMP Pro. The free version was adequate for my limited requirements.

I had looked into MAMP some time ago, for a different project, but hadn't managed to use it properly. Lack of knowledge, I would add, rather than any failings with the application. But this time I did my research and watched a couple of videos on YouTube. It still took a bit of trial and error to set things up, but having now done so it's working a treat.

MAMP establishes an Apache server (in my case, an alternative being Nginx) and MySQL on your computer, thus enabling you to view PHP controlled content without publishing to a web-based server. By supporting MySQL databases it enabled me to replicate the Sitelok installation. MAMP creates a local folder in which you can replicate your remote server files. In this folder I first created a folder named RapidWeaver and simply copied the RapidWeaver 8 app into it.

In RapidWeaver I created a new local publishing destination for the project, targeting the folder in the MAMP application. Exporting to this folder copied all the RapidWeaver site files and resources, but not warehoused assets, such as images and videos. Then, using FTP, I added files that were not part of the RapidWeaver project, including the Sitelok files. Finally, using cPanel, I exported a copy of the database associated with Sitelok from the web server, and using phpMyadmin in MAMP, imported it into a similarly named new database in MAMP. I just needed to change the user name and password in the local copy of the Sitelok configuration file to the MAMP defaults.

And amazingly, for me at least, I now have a full working copy of the site viewable in a local environment. So I can modify pages and test them without risking disruption to the live site. An added advantage is that republishing to the local file is far quicker than publishing to the web, speeding up the workflow.

Parallels on SSD & Windows 7 to Windows 10

Windows 10 - Parallels

Introduction

Windows has in the past driven me to distraction and I can honestly say that my computing life improved immeasurably after I migrated to an iMac in 2008. But I kept Windows going for a while, first as a virtual machine in VMFusion, and then in a Bootcamp partition when I acquired a MacBook Pro in 2009. The Windows frustration continued and I shared my feelings back in 2017.

When I upgraded both my iMac and later my MacBook, Windows was jettisoned.

Jump forward to 2020 and against my better judgement Windows is back. The story of how this came about might be of interest

Samsung SSD

When I updated to MacOS Catalina there were some applications that I didn't want to lose, but weren't compatible with the new OS. I decided to buy Parallels and retain a virtual copy of Mojave. As my new iMac has only a 250GB SSD drive and the Mojave VM occupied around 36GB, it represented quite an overhead. All was well until recently when I did some quite heavy video editing in iMovie, resulting in my Mac freezing. I was caught out because my daughter shared an iCloud folder containing all the individual video clips, this being possible with the advent of Catalina 10.15.4 and iOS 13.4. What I didn't realise was that all the files had been downloaded to the Mac. So much for shared 'cloud' storage. This share, combined with the production of a number of completed videos in iMovie, left me unknowingly with minimal remaining disk space.

After tidying up the video files and moving all the shared clips to an external drive, I re-established safe headroom. But I decided it would be better to move the Mojave VM to an external disk. I experimented with a spare SATA hard drive but it was far too slow to allow a decent user experience in the VM. So I bought a Samsung portable 500GB SSD. This worked fine with the VM, there being little discernable difference from when it was on the Mac's SSD.

Read more

Undeletable file in Trash /Bin

A short while ago I was experiencing very slow downloads on my emails in macOS Mail. Following a tip in a forum I moved some system files to a new temporary location, these being automatically recreated by Mail when it was relaunched. The idea was to remove the cached settings. It didn't in fact help and I suspect that it was my email service provider (BT) that was actually the problem.

Once I was sure that Mail was working correctly I deleted the original system files that I had relocated. But when I came to empty the Trash one file remained, generating an error during the delete process. Thus began a long and unsuccessful attempt to get this file out of my Trash.

I found quite a bit of advice on the web, both from Apple itself and various technical web sites. I tried everything: key combinations, Safe Mode; Disk First Aid in Recovery Mode; Terminal commands and the clever idea of moving the file to iCloud and then deleting it on my iPhone after my iMac was powered down. But it just came back. I even moved it to the BT Cloud, which is outside the Apple system, and deleted it there, but it always returned.

Finally I found a web page that explained all. The file, in its orignal location, was:

~/Library/Containers/com.apple.mail/Data/DataVaults

I managed to delete the folders but DataVaults proved to be totally indestructible. The web page linked to another with an explanation of the additional controls that Apple has placed over access to files and folders in macOS Mojave, and of course in Catalina. My problems started when I was running Mojave and persisted after I recently updated to Catalina.

Here is an extract from the article:

DataVaults are folders to which neither the user nor third-party software has any access at all.

The only software which can see and work with their contents are certain Apple-signed products which have a specific entitlement to do so.


The moral, be careful when messing about with system files.


Updated iMac to MacOS Catalina

After much deliberation I today updated from Mojave to Catalina.

The main issue, of course, was the fact that with Catalina Apple discontinued support for 32 bit applications. I had for a while been removing such applications, updating them or finding alternatives. This cost a bit of money along the way. For example, my Adobe Elements 15 (Photoshop & Premier) wasn't guaranteed to be compatible and in the end I broke a long association with this software and went for Pixelmator Pro for photographs and Apple's free iMovie for videos.

The Adobe suite never felt completely at home on the Mac whereas Pixelmator is truly a Mac app as of course is iMovie. My limited use of Pixelmator has so far proved successful although, of course, I have needed to adapt to the different interface. I'm still to see how I get on with iMovie.

Some apps I had rarely used, so they went. The difficult ones were those that I needed but were unlikely ever to be upgraded to 64 bit by the developers. For example, our Withings weighing scales link to the internet and if you ever need to reconfigure the wifi connection there is a Pairing Wizard. It's very rudimentary and will almost certainly never appear as 64 bit since the latest scales don't need it. There's also my Game Golf transfer app, which may in time benefit from an upgrade to 64 bit. And I have the 'Le Petit Robert' French dictionary, which is now available in 64 bit form but at an unacceptable price. At the moment Audacity isn't Catalina compatible although I'm sure that a 64 bit version will eventually be released. And finally there was MacX Video Converter Pro, which again has a new version available but at a price.

Read more

MacOS Time Machine on encrypted external HDD

I've upgraded my ten-year-old MacBook Pro to a MacBook Air. The old one will go to my wife's niece as it still performs well, especially after I replaced the battery and installed an SSD to speed things up a bit. She had taken a shine to it so my upgrade makes two people happy. For my part, the difference in OS between my iMac (Mojave) and the MacBook (El Capitan) was starting to present issues, such as incompatibility between versions of Pages, Numbers etc.

Having somewhat laboriously cleaned the old MacBook of my data so that I didn't lose certain software, such as the old but still serviceable Office 2011, I ended up with a much cleaner computer that I believe will be perfect for her. It's amazing how many personal identifiers exist within the software but I'm sure that I've removed most of them as well, of course, as signing out of all the Apple services.

Note Encrypt backups check box

Next came the the job of backing up my new MacBook to the external HDD that I use for a Time Machine. I encrypted it when it was first formatted and when I tried to delete the old backup I was informed that I didn't have the necessary permissions. I therefore erased the disk and again reformatted as encrypted. Time Machine asked if I wanted to use the disk and at this point I made a mistake. It asked if I wanted the data encrypted. Because I had already encrypted the disk I didn't choose this option. When it then asked for the disk password I wasn't paying attention and entered it. Unfortunately this started a decryption process that after three hours hadn't hardly registered on the progress bar.

Read more

Le Robert Correcteur - time to look elsewhere

A few years ago I bought the Le Robert Correcteur. It is a spelling and grammar checker for French, something that is incredibly useful if one has the intention of writing in French. It's a grammatically complex language and even Le Robert doesn't spot all one's mistakes. But it at least weeds out most of them and will often flag a sentence that it believes to be badly constructed even though it can't pinpoint the precise reason.

It wasn't cheap and came with three licences. I used one on my iMac and one on my MacBook Pro. A while ago I rebuilt the MacBook with an SSD disk and restored from Time Machine. Most things worked but Le Correcteur was having none of it. The licence protection was obviously recognised that something had changed as a result of the upgrade. So I had to use my third and final licence. I've now upgraded to a 2018 MacBook Air. And guess what, I can't even get Le Correcteur to load let alone try to enter a licence key. All attempts to find help on deregistering the app on the old MacBook have failed.

I certainly wasn't going to fork out for another three licences so I decided to consider alternatives. I have used Bon Patron before, a web-based spelling and grammar checker that performs arguably as well as Le Correcteur. I tested a sample piece in both and in fact Bon Patron did slightly better in that case. Although both missed a fairly glaring conjugation error, which might have been because of the way I structured the sentence. Perhaps it wasn't French enough! The only downside to Bon Patron is that is web-based, so without a connection you can't use it. But with almost universal connectivity these days this is perhaps not a major issue.

Read more

Chasing unicorns (or transcription software!)

Occasionally one gets off on the wrong foot and no matter how obvious this becomes you doggedly persevere.

In this case I was investigating transcription software, my aim to be able to obtain text transcripts of French audio or video files to help prepare material for my U3A French groups. By transcription, I mean automatic text generation. After a bit of research I downloaded a trial copy of Ingscribe, which at $99 isn't cheap. I duly loaded an mp3 audio file and waited to see the results. There weren't any !

So for the next couple of hours or so I kept re-reading the instructions, but to no avail. I obtained the 14 day free licence in case the basic free edition was the problem but that made no difference. In desperation I then tried Express Scribe, but with much the same lack of results. I even tried to uninstall Soundflower in case this was creating a conflict, but found that not to be as easy as it sounds (excuse pun) despite running the uninstall script.

Then it dawned on me, perhaps the two applications weren't supposed to produce an automatic transcript but were simply aids to manual transcription. The option of a foot pedal control to stop and start the playback should have alerted me, but tunnel vision prevailed. These apps are obviously aimed at manually capturing the transcript and their power then lies in using that transcript to professionally enhance videos etc.

So a few hours wasted and a bit more knowledge gained, but I'm still no nearer finding an automatic transcribing app, which in this day and age I find astonishing. It appears that pay-by-content services have cornered the market but these can be expensive.

After Mojave I've given my site a dark theme

Among the new features that come with Mojave, the dark theme has perhaps been the most publicised. For years I avoided 'dark' layouts, preferring a clean white-space look. But fashions change.

The new theme compliments the original monochrome banner image and I must say that I'm quite pleased with the result. In particular, the photographs in the galleries seem to stand out more. I needed to modify some of the miscellaneous images that originally had white backgrounds. I also wanted to keep the little fisherman gif on the fishing diary page, it having been a feature from the earliest days of my site. Changing the background involved splitting the four separate images, editing them in Photoshop Elements, and then reassembling them as a new animated gif. All quite fiddly but the Picasion (http://picasion.com) site was a great help in achieving this.

I also had to rearrange this Blog and the Film Search page as the original layouts didn't work well with the new theme.


Upgraded to Mojave - almost painless

Having been nagged for months with notifications to upgrade to Mojave I finally took the plunge. It wasn't really a plunge, as I considered with release 10.14.3 most of the initial problems would have been ironed out. Also, I spent quite a lot of time preparing to migrate.

I reviewed all 32 bit apps on my iMac and cleared out some little-used stuff, while transferring some other apps that I use occasionally to my 2009 MacBook Pro running El Capitan. I checked all the remaining apps for updates. I cleaned out a lot of files using Disk Doctor Pro, finding in the process a cache of over 8GB associated with my Tom Tom Connect app. Finally I did a First Aid scan with Disk Utility.

The install went without a hitch. I selected dark mode but while it looked great on my 4k iMac screen, it wasn't very good on my now ageing Apple Cinema second screen. So I reverted to light mode. I had to give my Avira Anti-Virus access to the computer, the Avira app prompting this after the upgrade and guiding me through it. Some other apps needed permission to access files, which was simply a matter of agreeing when the pop-up message appeared.



Read more

The trials and tribulations of self-publishing

Kindle Direct Publishing - the paperback story

I have written a book. It took me a while, and over the past few weeks I have been negotiating Amazon's Kindle Direct Publishing system to get my book to market. Amazon seemed the best place to go, given its reach in the marketplace and the maturity of the publishing framework. There is copious advice on all stages of the process, which in the case of a printed book requires a properly configured Word or PDF file. You also need a cover and back cover, for which you can choose from templates or design your own. I did the latter, using an outline template to ensure correct positioning of all the elements. Fiddly but achievable in my Photoshop Elements application.


Read more

Show more posts

This website doesn't make extensive use of cookies but a small number are required for the correct functioning of the site and to collect anonymous analytical data.