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.

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.

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

High Sierra clean install - a bit of a problem!

I wanted to pass on an iMac to my daughter and decided to perform a clean install of High Sierra. The iMac was running Sierra so I first updated it to High Sierra. I was under the impression that a restore copy of this would at the same time be saved to the hard disk, from which I could reinstall after reformatting the main disc partition. But after I had erased the disk, when I tried to reinstall from the recovery option I received the message that the recovery server could not be contacted.

Some online research suggested that I needed to open Terminal and reset the date, which if incorrect can apparently result in a loss of synchronism with the Apple servers. Unfortunately in previously exploring one of the menu options I had seemingly exited Utilities. I did a Cmd-R restart, expecting to reboot into Utilities, but instead a small spinning globe symbol appeared in the centre of the screen with the option to select a WiFi connection and recover over the internet. This done, a download bar gradually progressed and in time I was presented with the install screen for Mavericks, the OS that was on the iMac when we got it.

At least I had the option to install something. Once Mavericks was up and running I once again updated to High Sierra, but the whole thing took a lot longer than I had expected. And I was a bit disappointed that despite following Apple's guidelines I had ended up with the server error. Installing High Sierra twice certainly was an unwelcome frustration.

High Sierra behaves itself but Chrome doesn't

After holding back for a while I finally updated my iMac to High Sierra this week. I had read about various problems affecting some applications and, of course, the more recent security scare that has been patched in 10.13.2. The update went without a hitch, although it took a while. I think the file had downloaded some time previously, as no sooner I had updated than I received another update message to install the latest version, which also took a while.

High Sierra

In launchpad a few applications were marked with the symbol indicating that they were no longer compatible. Final Cut Express was one such, but this wasn't an issue as I had long since abandoned it in favour of Adobe's Premier Elements. There was an associated application, LiveType, which was also shown as non-compatible, but was equally of no interest to me. Adobe Bridge also had to go, but again I never used it. I had already upgraded to Office Home and Student 2016, expecting problems with my 2011 edition. Luminar prompted for an update, but having installed it I then decided to go for their Holidays' offer and upgraded to the 2018 version.

All seemed well until I updated one of my managed websites using RapidWeaver. I had a minor rendering problem in Safari. This resolved itself after clearing all caches but there was a fair bit of head-scratching before I got to that point. Firefox behaved impeccably but in Google Chrome the navigation symbols were showing visual artifacts. No amount of cache clearing or resetting would clear the problem, and having visited some forums it became clear that there are indeed some issues with Chrome when used with High Sierra. Having effectively given up on this particular problem I downloaded the still 'early adopters' version of Chrome Canary. I don't use Chrome generally and really only wanted to see if the issue persisted in this 'bleeding edge' version. I'm pleased to say it didn't. So for the time being anybody viewing the website using the original Chrome with High Sierra will experience this problem, but my hope is that the number of people in this category will be small.

The only other issue I experienced was with Word. I keep all my data on a network drive and when I attempted to close a document after saving, I received an error relating to permission to access the temporary file that Word had created. These files should be removed when the document is closed, but this wasn't happening. Again, it took a while to find out what was going on, but I eventually found an explanation that suggested that this was a problem associated with network drives with Word on High Sierra. The fix was to uncheck 'Save Autorecovery info' in Word, which of course disables auto-recovery, but it seems to have cured the irritating error messages and the orphan folders that were being created.

There may of course be other issues awaiting me as I use applications that I've not yet launched but, as they say, so far, so good!


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.