Tech

OS X, iPhone, iPad, sometimes Windows, and information on other peripheral devices.

  • Tech

    Can’t install imagemagick for PHP with pecl?

    If you’re running WordPress on your own Mac OS X Server and have installed an updated version of PHP using Homebrew, you may have a directory mismatch that will prevent pecl from successfully installing imagemagick.

    You will need to manually create the directory where imagemagick.so will be installed.

    mkdir /usr/local/Cellar/php/7.4.7/pecl/yyyymmdd

    where yyyymmdd is the version of imagemagick… which unfortunately you may not know until you run the install script and let it tell you which directory is missing.

    $ brew install pkg-config imagemagick
    $ pecl install imagick

    You will get an Error message with the missing directory. Cut-and-paste into the mkdir argument. Once that directory is created, run pecl again.

    $ pecl install imagick
    [. . .]
    install ok: channel://pecl.php.net/imagick-3.4.4
    Extension imagick enabled in php.ini

    Check that imagick is installed:

    $ php -m | grep -i magic

    You’ll get

    imagick

    Now restart the web server

    sudo serveradmin stop web
    sudo serveradmin start web

    Now go look in your phpinfo.php (that you as a respectable admin have already created in a unlinked directory on your web server). A whole section for ImageMagick (imagick) should have been added. WordPress’s self-check should also show that it passed.

  • OS X Server Globe
    Tech

    [OS X Server 5.x] httpd.conf location

    The httpd.conf file controlled by the Server.app is stored at

    /Library/Server/Web/Config/apache2/httpd_server_app.conf

    If you happen to update PHP or other Apache modules through non-Apple methods (e.g. homebrew), then this is where you add your LoadModule and FilesMatch arguments.

    You MUST restart the web server through the Server.app for changes to load. apachectl graceful will not load the changes in httpd_server_app.conf.

    #This article is in response to “Update PHP on OS X Server 5.x”.

  • Lets Encrypt & Certbot
    Tech

    Certbot, HTTPS, and Timeout Error

    If you use Let’s Encrypt as your SSL certificate authority, it is paramount that you implement an automatic certificate renewal procedure.

    Very helpful tutorial from Mac Strategy – How To Setup Let’s Encrypt For OS X / macOS + Server 5.x

    When setting up or renewing your SSL certificates, you may encounter a problem with certbot giving you the following error:

    Timeout, https://www.example.com (http-01):
    urn:acme:error:connection :: The server could not connect to
    the client to verify the domain 

    This may be happening if you ONLY have the HTTPS version of your website configured OR if you use http::REDIRECT to redirect to HTTPS without letting the GET request connect to a HTTP version of your site.

    certbot, as default, can only validate your website via HTTP on port 80. The easiest solution would be to provide an HTTP version of your website. This may be less than ideal for many setups where port 80 is inundated with DDoS attacks – so it seems.

    In reality, if port 80 is served by the same software that serves port 443, having port 80 open does not increase the amount of risk. Rather, it is a reminder that one should not rely on the illusion that HTTPS alone will prevent a hack. Your website design should be more resilient in that it would protect against ALL web based attacks.

    A message from Let’s Encrypt regarding Port 80: Best Practice – Keep Port 80 Open

    So open up port 80, setup your webserver to answer to HTTP requenst, and renew your Let’s Encrypt SSL certificates using certbot. And go add some security features to your website while your at it.

    For WordPress sites like this, you can use the WP Force SSL plugin to reroute all HTTP request to HTTPS via script. That means, any non-Wordpress request like certbot’s will be processed via HTTP.

  • Tech

    Uninstall “Advanced Mac Cleaner”

    1. Stop Advanced Mac Cleaner from the Activity Monitor
    2. Delete Advanced Mac Cleaner from the Applications folder
    3. Delete Advanced Mac Cleaner from the User’s Login Items
    4. Delete the helper application from ~/Library/Application Support
      • amc
      • awc
      • Advanced Mac Cleaner
      • Mac Adware Cleaner (You will be asked to authenticate).
    5. Delete the Library files
      • Advanced Mac Cleaner
      • Mac Adware Cleaner
      • hlpramc
      • hlprawc
      • hlpramcn
      • hlpradc
      • pcvark
    6. Delete the Launch Agent files
      • adwarecleaner
      • hlpramc
      • hlprawc
    7. Then, return to the Library folder again (back arrow), and open the folder named Preferences. Locate all files containing the names Mac Adware Cleaner, adware, adwarecleaner or pcvark, and drag them to the Trash.
    8. Return to the Library folder again (back arrow), and open the folder named Logs. Locate all files containing the names Mac Adware Cleaner, hlpramc, hlprawc, and drag them to the Trash.
    9. Return to the Library folder again, and open the folder Saved Application State. Locate all folders containing the names pcvark or Mac Adware Cleaner, and drag them to the Trash.
    10. Open System Preferences > Users & Groups > select your User Account > Login Items. Select the item named Mac Adware Cleaner, and click the [-] (minus) button to delete the now nonexistent program from your Login Items.

    Or, you could try out AppCleaner from FreeMacSoft.

  • DirecTV
    Tech

    [iOS] Cannot login to DirecTV as TV Provider

    If you’re a DirecTV subscriber and trying to watch TV shows on iOS/iPad OS/TV OS, you may have encountered an error when trying to log into DirecTV. Individual channel apps may ask you if you want to Link your TV Provider to the app and if you select “Yes”, you will be presented with a login screen for DirecTV.

    Unfortunately, the API version of the login screen has some kind of error (probably an encryption mismatch) and will give you an error saying

    That User ID doesn't seem to work here. Please sign in with a different ID. Care Code 205.4

    You should FIRST check that you have the correct user ID and password by logging into your account page at DirecTV.com. If that works, then the problem is with the interface between your iOS device’s API and DirecTV’s auth server. You can circumvent the API by logging in via web…

    You have to select a TV Provider that is not DirecTV and NOT log in. I chose AT&T U-verse then backed out of the setting screen. This will leave your TV Provider setting blank. Then when an individual channel app asks for your TV Provider info, you can select DirecTV and you will be presented with a clunky web-base login page instead of the sleek API screen.

    Login.