<?xml version="1.0" encoding="utf-8" ?>
<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    
    <link href="https://gizmola.com/blog/archives/2026/04/archive/archives/2021/01/C8/feeds/atom10.xml" rel="self" title="GizmoLA.com" type="application/atom+xml" />
    <link href=""                        rel="alternate"    title="GizmoLA.com" type="text/html" />
    <link href="rss.php?version=2.0"     rel="alternate"    title="GizmoLA.com" type="application/rss+xml" />
    <link rel="stylesheet" href="" type="text/css" />
    <title type="html">GizmoLA.com</title>
    <subtitle type="html">Articles and information about Web development, history and programming</subtitle>
    <icon>templates/2k11/img/s9y_banner_small.png</icon>
    <id></id>
    <updated>2025-04-03T23:45:59Z</updated>
    <generator uri="http://www.s9y.org/" version="2.3.5">Serendipity 2.3.5 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="archives/135-Parallels-Desktop-and-Ubuntu-Cut-and-Paste-keys-and-issues.html" rel="alternate" title="Parallels Desktop and Ubuntu - Cut and Paste keys and issues" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2025-04-03T21:46:00Z</published>
        <updated>2025-04-03T23:45:59Z</updated>
        <wfw:comment>wfwcomment.php?cid=135</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=135</wfw:commentRss>
    
            <category scheme="categories/1-Tech" label="Tech" term="Tech" />
    
        <id>archives/135-guid.html</id>
        <title type="html">Parallels Desktop and Ubuntu - Cut and Paste keys and issues</title>
        <content type="html">
            <![CDATA[<!-- s9ymdb:268 --><img class="serendipity_image_left" width="110" height="61"  src="uploads/images/parallels.tn.png" title="Parallels Desktop Window Image" alt="Parallels Desktop Window Image">I spent way too much time trying to figure out how to configure Parallels Desktop, in order to be able to cut and paste between my mac and a virtualized Ubuntu guest.  Here is what I learned. <a class="block_level" href="archives/135-Parallels-Desktop-and-Ubuntu-Cut-and-Paste-keys-and-issues.html#extended">Continue reading "Parallels Desktop and Ubuntu - Cut and Paste keys and issues"</a>]]>
        </content>
        <dc:subject>linux</dc:subject>
<dc:subject>mac</dc:subject>
<dc:subject>osx</dc:subject>
<dc:subject>parallels desktop</dc:subject>
<dc:subject>ubuntu</dc:subject>
<dc:subject>virtualization</dc:subject>

    </entry>
    <entry>
        <link href="archives/134-Testing-new-ssh-keys.html" rel="alternate" title="Testing new ssh keys" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2024-07-31T21:31:00Z</published>
        <updated>2024-08-01T03:43:52Z</updated>
        <wfw:comment>wfwcomment.php?cid=134</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=134</wfw:commentRss>
    
            <category scheme="categories/10-Linux" label="Linux" term="Linux" />
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
            <category scheme="categories/7-Website" label="Website" term="Website" />
    
        <id>archives/134-guid.html</id>
        <title type="html">Testing new ssh keys</title>
        <content type="html">
            <![CDATA[<h3>You created a new ssh key, but are you actually testing it?</h3><br />
I routinely have to create new ssh keys for system users and also verify that they are working correctly.   One possible area of confusion is how ssh keys are found by the ssh client.<br />
<br />
While most of this information is not specific to osx, since I typically use a macbook running osx, I'll cover a couple of things somewhat specific to osx.<br />
<br />
SSH clients will typically default to searching for a private key that exists in the user's home directory in a subdirectory named ".ssh"<br />
<br />
So let's assume that you create an ssh key for a new user, utilizing ssh-keygen<br />
<br />
<div class="bash geshi" style="text-align: left"><br /><span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> ed25519 <span style="color: #660033;">-N</span> some-new-passphrase <span style="color: #660033;">-f</span> id_newuser <span style="color: #660033;">-C</span> <span style="color: #ff0000;">&quot;new user&quot;</span><br />&#160;</div><br />
<br />
<em>Should you omit the -N parameter above you will be prompted for a passphrase.</em>  In either case, you should use passphrases in almost all situations to protect your system from lost or stolen private keys!!!<br />
<br />
So if all goes well, you will now have a new public/private ssh key pair.<br />
<br />
On the remote system, you will typically add the public key (id_newuser.pub in this example) to the .ssh/authorized_keys file.<br />
<br />
While not the point of this article, you will also need to understand the permission requirements of the user's home .ssh directory and files.  Make sure the directory and files are private to the user, or ssh connections will fail. <br />
<br />
<h3>Time to test</h3> <a class="block_level" href="archives/134-Testing-new-ssh-keys.html#extended">Continue reading "Testing new ssh keys"</a>]]>
        </content>
        <dc:subject>osx</dc:subject>
<dc:subject>ssh</dc:subject>
<dc:subject>ssh-keygen</dc:subject>

    </entry>
    <entry>
        <link href="archives/133-Symfony-Doctrine-Mapping-problems-with-MySQL-Bigint-columns,-and-how-to-fix-this.html" rel="alternate" title="Symfony &amp; Doctrine Mapping problems with MySQL Bigint columns, and how to fix this" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2023-02-10T21:24:00Z</published>
        <updated>2023-02-13T23:00:34Z</updated>
        <wfw:comment>wfwcomment.php?cid=133</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=133</wfw:commentRss>
    
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
    
        <id>archives/133-guid.html</id>
        <title type="html">Symfony &amp; Doctrine Mapping problems with MySQL Bigint columns, and how to fix this</title>
        <content type="html">
            <![CDATA[In the process of upgrading a Symfony project from version 2 to version 5, I came across an issue with a MySQL table that has a number of BIGINT columns.  There had been no issue previously, but after updating to the newer symfony (and doctrine components) mySQL bigint columns were empty/null in my doctrine entities.<br />
<br />
After some investigation I came upon <a href="https://www.doctrine-project.org/projects/doctrine-dbal/en/current/reference/types.html" title="Doctrine Manual on Types">this section of the Doctrine manual</a>:<br />
<br />
<blockquote>For compatibility reasons this type is not converted to an integer as PHP can only represent big integer values as real integers on systems with a 64-bit architecture and would fall back to approximated float values otherwise which could lead to false assumptions in applications.<br />
</blockquote><br />
<br />
To protect symfony apps running on 32 bit systems, Doctrine maps Bigint columns to the string type, and this broke the entity definition I was using, even though my application will only be deployed on 64 bit systems.  I think that for most people this is the norm. <br />
<br />
There are a few different ways to get around this issue, including type casting from string to integer/integer to string in your getters and setters, but if you have a lot of bigint columns across tables, that probably isn't a great solution.  In this article, I present the solution I implemented, which utilizes a Custom Doctrine type to override the built in Doctrine behavior.<br />
 <a class="block_level" href="archives/133-Symfony-Doctrine-Mapping-problems-with-MySQL-Bigint-columns,-and-how-to-fix-this.html#extended">Continue reading "Symfony &amp; Doctrine Mapping problems with MySQL Bigint columns, and how to fix this"</a>]]>
        </content>
        <dc:subject>32bit</dc:subject>
<dc:subject>64bit</dc:subject>
<dc:subject>bigint</dc:subject>
<dc:subject>doctrine</dc:subject>
<dc:subject>mysql</dc:subject>
<dc:subject>orm</dc:subject>
<dc:subject>symfony</dc:subject>

    </entry>
    <entry>
        <link href="archives/132-docker4lamp-A-LAMP-Docker-development-environment.html" rel="alternate" title="docker4lamp - A LAMP Docker development environment" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2021-11-17T01:02:00Z</published>
        <updated>2021-11-17T20:32:42Z</updated>
        <wfw:comment>wfwcomment.php?cid=132</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=132</wfw:commentRss>
    
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
    
        <id>archives/132-guid.html</id>
        <title type="html">docker4lamp - A LAMP Docker development environment</title>
        <content type="html">
            <![CDATA[I have made this project (<a href="https://github.com/gizmola/docker4lamp" title="docker4lamp">Docker For LAMP</a>) publically available on Github, under the MIT license.<br />
<br />
The target user group is php developers who want or need a simple, minimal (yet very current) LAMP development environment.  I want this to be friendly to new developers, and a useful alternative to localhost environments like xamp, mamp or wamp.  <br />
<br />
Ideally it offers the type of convenience and isolation of a vagrant lamp environment except with orchestrated containers. <a class="block_level" href="archives/132-docker4lamp-A-LAMP-Docker-development-environment.html#extended">Continue reading "docker4lamp - A LAMP Docker development environment"</a>]]>
        </content>
        <dc:subject>apache</dc:subject>
<dc:subject>docker</dc:subject>
<dc:subject>docker for lamp</dc:subject>
<dc:subject>lamp</dc:subject>
<dc:subject>mysql</dc:subject>
<dc:subject>php</dc:subject>
<dc:subject>xdebug</dc:subject>

    </entry>
    <entry>
        <link href="archives/131-Symfony-5.2-and-Apache-2.4.html" rel="alternate" title="Symfony 5.2 and Apache 2.4" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2021-01-02T02:14:00Z</published>
        <updated>2021-08-01T04:19:12Z</updated>
        <wfw:comment>wfwcomment.php?cid=131</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=131</wfw:commentRss>
    
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
    
        <id>archives/131-guid.html</id>
        <title type="html">Symfony 5.2 and Apache 2.4</title>
        <content type="html">
            <![CDATA[Certainly the most convenient way to develop a Symfony 5.x app is to use the symfony server.  Eventually however, you may have to deploy the application.  For a number of years nginx with php-fpm was the preference for many sysadmins seeking to wring the maximum performance out of a webserver that also has to run php scripts, but there are now simple ways of configuring apache to use php-fpm while achieving comparable performance to nginx.<br />
<br />
For example a vhost setting like this one is possible:<br />
<br />
<div class="apache geshi" style="text-align: left"><br />&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;<br />&#160; &#160; <span style="color: #00007f;">SetEnv</span> ENVIRONMENT <span style="color: #7f007f;">&quot;dev&quot;</span><br />&#160; &#160; &lt;<span style="color: #000000; font-weight:bold;">FilesMatch</span> \.php$&gt;<br />&#160; &#160; &#160; &#160; <span style="color: #00007f;">SetHandler</span> proxy:fcgi://php:<span style="color: #ff0000;">9000</span><br />&#160; &#160; &#160; &#160; <span style="color: #adadad; font-style: italic;"># for Unix sockets, Apache 2.4.10 or higher</span><br />&#160; &#160; &lt;/<span style="color: #000000; font-weight:bold;">FilesMatch</span>&gt;<br />&#160; &#160; <span style="color: #adadad; font-style: italic;"># Proxy .php requests to port 9000 of the php-fpm container</span><br />&#160; &#160; <span style="color: #00007f;">DocumentRoot</span> /usr/local/apache2/cms/public<br />&#160; &#160; <span style="color: #00007f;">ServerName</span> cms.mydev.local<br />&#160; &#160; <span style="color: #00007f;">ServerAdmin</span> admin@mydev.local<br /><br />&#160; &#160; &lt;<span style="color: #000000; font-weight:bold;">Directory</span> /usr/local/apache2/cms/public&gt;<br />&#160; &#160; &#160; &#160; <span style="color: #00007f;">DirectoryIndex</span> index.php index.html<br />&#160; &#160; &#160; &#160; <span style="color: #00007f;">Options</span> <span style="color: #0000ff;">Indexes</span> <span style="color: #0000ff;">FollowSymLinks</span><br />&#160; &#160; &#160; &#160; <span style="color: #00007f;">AllowOverride</span> <span style="color: #0000ff;">All</span><br />&#160; &#160; &#160; &#160; <span style="color: #00007f;">Require</span> <span style="color: #0000ff;">all</span> granted<br />&#160; &#160; &lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;<br />&#160; &#160; <br />&#160; &#160; <span style="color: #adadad; font-style: italic;"># Send apache logs to stdout and stderr</span><br />&#160; &#160; <span style="color: #00007f;">CustomLog</span> /proc/self/fd/<span style="color: #ff0000;">1</span> common<br />&#160; &#160; <span style="color: #00007f;">ErrorLog</span> /proc/self/fd/<span style="color: #ff0000;">2</span><br />&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;<br />&#160;</div><br />
<br />
 <a class="block_level" href="archives/131-Symfony-5.2-and-Apache-2.4.html#extended">Continue reading "Symfony 5.2 and Apache 2.4"</a>]]>
        </content>
        <dc:subject>apache</dc:subject>
<dc:subject>php</dc:subject>
<dc:subject>php-fpm</dc:subject>
<dc:subject>symfony</dc:subject>
<dc:subject>symfony5</dc:subject>
<dc:subject>web development</dc:subject>
<dc:subject>web tech</dc:subject>

    </entry>
    <entry>
        <link href="archives/130-Symfony-5-The-Fast-Track-book-and-installing-a-local-PHP-version-that-works!.html" rel="alternate" title="Symfony 5: The Fast Track book and installing a local PHP version that works!" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2020-01-21T05:47:00Z</published>
        <updated>2020-01-28T22:00:18Z</updated>
        <wfw:comment>wfwcomment.php?cid=130</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=130</wfw:commentRss>
    
    
        <id>archives/130-guid.html</id>
        <title type="html">Symfony 5: The Fast Track book and installing a local PHP version that works!</title>
        <content type="html">
            <![CDATA[<!-- s9ymdb:264 --><img class="serendipity_image_left" width="73" height="110"  src="uploads/images/symfon5-book-cover.tn.jpg"  alt="">Having backed Fabien Potencier's "<a href="https://www.backerkit.com/projects/fabpot/symfony-5-the-fast-track">Symfony 5: The Fast Track" book on Kickstarter,</a> I received the book a few weeks ago, and had a chance over the weekend to start reading it.<br />
<br />
As a Macbook/OSX user, his recommended environment includes a current locally installed version of PHP with a number of php extension libraries.  You also need installation of the php standard composer tool, as well as docker.  As I have a Macbook running OSX Mojave, I had to take a number of steps to be able to get started following the book and getting a working installation of the guestbook project using the book's recipe.  Here's what I did:<br />
<br />
                                                                              <br />
                                                                                                                         <a class="block_level" href="archives/130-Symfony-5-The-Fast-Track-book-and-installing-a-local-PHP-version-that-works!.html#extended">Continue reading "Symfony 5: The Fast Track book and installing a local PHP version that works!"</a>]]>
        </content>
        <dc:subject>fabien potencier</dc:subject>
<dc:subject>guestbook</dc:subject>
<dc:subject>php</dc:subject>
<dc:subject>symfony</dc:subject>
<dc:subject>symfony 5: the fast track</dc:subject>
<dc:subject>symfony5</dc:subject>

    </entry>
    <entry>
        <link href="archives/126-Composer-install-of-Private-Bitbucket-VCS-aka-Invalid-OAuth-consumer-provided.html" rel="alternate" title="Composer install of Private Bitbucket VCS &quot;aka&quot; 'Invalid OAuth consumer provided'" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2018-04-05T20:07:00Z</published>
        <updated>2021-10-31T02:26:23Z</updated>
        <wfw:comment>wfwcomment.php?cid=126</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=126</wfw:commentRss>
    
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
    
        <id>archives/126-guid.html</id>
        <title type="html">Composer install of Private Bitbucket VCS &quot;aka&quot; 'Invalid OAuth consumer provided'</title>
        <content type="html">
            <![CDATA[So you have a private Bitbucket Repo and you want to utilize it in your project <strong>composer.json</strong>.  You may find that when you run the composer install you get an error pulling your private Bitbucket repo with messages about Oauth failure that may include "<em>Invalid OAuth consumer provided</em>"<br />
<br />
 <a class="block_level" href="archives/126-Composer-install-of-Private-Bitbucket-VCS-aka-Invalid-OAuth-consumer-provided.html#extended">Continue reading "Composer install of Private Bitbucket VCS &quot;aka&quot; 'Invalid OAuth consumer provided'"</a>]]>
        </content>
        <dc:subject>bitbucket</dc:subject>
<dc:subject>composer</dc:subject>
<dc:subject>git</dc:subject>
<dc:subject>php</dc:subject>
<dc:subject>web development</dc:subject>
<dc:subject>web tech</dc:subject>

    </entry>
    <entry>
        <link href="archives/125-Configure-the-Atom-live-server-to-use-Chrome.html" rel="alternate" title="Configure the Atom live server to use Chrome" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2017-09-15T02:29:00Z</published>
        <updated>2019-02-28T07:43:23Z</updated>
        <wfw:comment>wfwcomment.php?cid=125</wfw:comment>
    
        <slash:comments>9</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=125</wfw:commentRss>
    
    
        <id>archives/125-guid.html</id>
        <title type="html">Configure the Atom live server to use Chrome</title>
        <content type="html">
            <![CDATA[<!-- s9ymdb:260 --><img class="serendipity_image_left" width="160" height="160"  src="uploads/images/atom.png"  alt="">The free open source <a href="https://atom.io/" title="Atom text editor">Atom text editor</a> from Github is one of several development tools that have gotten a lot of traction in recent years amongst web technology developers looking for an alternative to the big IDE's like Visual Studio, Eclipse or the JetBrains editors.  <br />
<br />
Atom is aimed at the same niche often filled by Sublime Text, Vim and Notepad++, namely to provide a small self contained code editor able to work on multiple files at a time, and with available plugins that provide programming features like color syntax highlighting, smart indentation and robust search and replace.<br />
<br />
<br />
<br />
  <br />
<br />
  <a class="block_level" href="archives/125-Configure-the-Atom-live-server-to-use-Chrome.html#extended">Continue reading "Configure the Atom live server to use Chrome"</a>]]>
        </content>
        
    </entry>
    <entry>
        <link href="archives/123-Pull-an-EC2-console-log-using-the-AWS-CLI-api-and-jq.html" rel="alternate" title="Pull an EC2 console log using the AWS CLI api and jq" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2017-08-14T21:16:00Z</published>
        <updated>2019-05-02T15:26:15Z</updated>
        <wfw:comment>wfwcomment.php?cid=123</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=123</wfw:commentRss>
    
    
        <id>archives/123-guid.html</id>
        <title type="html">Pull an EC2 console log using the AWS CLI api and jq</title>
        <content type="html">
            <![CDATA[AWS provides a REST Api to everything they offer, and returns the results in Json format.  If you have a server in a private network in a VPC, you might want to get the logs to see what happened at boot time, and the aws cli gives you a simple way of doing that:<br />
<br />
<div class="bb-code-title">CODE:</div><div class="bb-code">aws&#160;ec2&#160;get-console-output&#160;--instance-id&#160;{i-xxxxxxxx}</div>
<br />
<br />
<br />
  <a class="block_level" href="archives/123-Pull-an-EC2-console-log-using-the-AWS-CLI-api-and-jq.html#extended">Continue reading "Pull an EC2 console log using the AWS CLI api and jq"</a>]]>
        </content>
        
    </entry>
    <entry>
        <link href="archives/122-Howto-serve-a-markdown-document.html" rel="alternate" title="Howto serve a markdown document" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2017-08-02T06:08:00Z</published>
        <updated>2018-03-21T18:59:41Z</updated>
        <wfw:comment>wfwcomment.php?cid=122</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=122</wfw:commentRss>
    
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
    
        <id>archives/122-guid.html</id>
        <title type="html">Howto serve a markdown document</title>
        <content type="html">
            <![CDATA[<a href="http://allmark.io/">Allmark</a> is a simple self contained Markdown html renderer and server from developer Andreas Koch, that is written in Go.  <br />
<br />
You could certainly install Allmark locally, but there are numerous editors or standalone operating system specific markdown parsers you could use.<br />
<br />
But what if you have some markdown documentation on a server, and need a quick and easy way to access that documentation?  You can always just look at the raw markdown using vim, but what fun is that?  <br />
<br />
Allmark is a full markdown server, but installing a server just to read a couple of markdown documents is something very few people would want to do.  If however, your server has docker installed, you can be reading your documentation in all its rendered glory in a matter of a few seconds.  Here is how:  <br />
<br />
 <a class="block_level" href="archives/122-Howto-serve-a-markdown-document.html#extended">Continue reading "Howto serve a markdown document"</a>]]>
        </content>
        <dc:subject>allmark</dc:subject>
<dc:subject>docker</dc:subject>
<dc:subject>markdown</dc:subject>

    </entry>
    <entry>
        <link href="archives/121-Vagrant-Share-and-Ngrok.html" rel="alternate" title="Vagrant Share and Ngrok" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2017-07-17T06:44:00Z</published>
        <updated>2017-07-17T09:52:35Z</updated>
        <wfw:comment>wfwcomment.php?cid=121</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=121</wfw:commentRss>
    
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
    
        <id>archives/121-guid.html</id>
        <title type="html">Vagrant Share and Ngrok</title>
        <content type="html">
            <![CDATA[As more and more people utilize virtualization for development the need to easily and securely share your work in progress with team members or clients can be a great boost to productivity.  Such a tool is <em>also not bad when your kid wants to let his friend access that local minecraft server you are running on your workstation for him</em>, not that I would know anything about that.  There are several utilities that are available, and now a plug and play option that is available if you use vagrant.<br />
<br />
In recent versions of Vagrant, Hashcorp has added a plugin called Vagrant-share.  You can see if its installed by running  <br />
<br />
<div class="bb-code-title">CODE:</div><div class="bb-code">vagrant&#160;plugin&#160;list</div>
<br />
And you should see something like this:<br />
<br />
<div class="bb-code-title">CODE:</div><div class="bb-code">vagrant-share&#160;&#40;1.1.9,&#160;system&#41;</div>
<br />
 <a class="block_level" href="archives/121-Vagrant-Share-and-Ngrok.html#extended">Continue reading "Vagrant Share and Ngrok"</a>]]>
        </content>
        <dc:subject>ngrok</dc:subject>
<dc:subject>vagrant</dc:subject>
<dc:subject>vagrant share</dc:subject>

    </entry>
    <entry>
        <link href="archives/114-Putting-Apache-on-a-diet-how-to-get-a-lean-configuration,-Part-1.html" rel="alternate" title="Putting Apache on a diet - how to get a lean configuration, Part 1" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2017-07-16T04:04:00Z</published>
        <updated>2022-01-15T06:27:19Z</updated>
        <wfw:comment>wfwcomment.php?cid=114</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=114</wfw:commentRss>
    
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
    
        <id>archives/114-guid.html</id>
        <title type="html">Putting Apache on a diet - how to get a lean configuration, Part 1</title>
        <content type="html">
            <![CDATA[In this article I'm going to go over some of the details of how Apache works, and uses memory.  As you will see, the apache processes that serve requests will grow to include the amount of memory they need for a particular request, and they will still be using that memory, even when they are serving something simple like a .css file or an image.<br />
<br />
For this reason, the first limitation you are likely to encounter running Apache is a limitation on memory.  I will explore this topic and show you how you can do the same.<br />
<br />
The first thing need to determine about Apache is what mode it is running in.  If your plan is to use Apache with php via mod_apache, then the prevailing wisdom for many years has been that there may be library extensions in PHP that are not thread safe.  For this reason, people have tended to avoid running Apache as a threaded server, for fear that scripts may randomly die producing the dreaded 500 Internal server error pages we all know and love.  <br />
<br />
This fear may be overstated depending on the nature of your php code, but the defaults for apache packages I've seen, seem almost always to be using the prefork worker.<br />
<br />
<strong>Prefork vs Worker? </strong><br />
<br />
So the first question you might be asking yourself is, which mode is my current apache server running in?  There is a simple safe way to determine this -- run the httpd(apache) program with a specific command line switch.  There are programs like which and whereis that might help you locate it, if you don't know where it is.<br />
<br />
<div class="bash geshi" style="text-align: left"><br /><span style="color: #c20cb9; font-weight: bold;">whereis</span> httpd<br />&#160;</div><br />
<br />

<div class="bb-code-title">CODE:</div><div class="bb-code">httpd&#58;&#160;/usr/sbin/httpd.worker&#160;/usr/sbin/httpd&#160;/usr/sbin/httpd.event&#160;/etc/httpd&#160;/usr/share/man/man8/httpd.8.gz</div>

<br />
So let's run the /usr/sbin/httpd with the -h for help and see what happens:<br />
<br />
<br />
<br />
<br />
 <a class="block_level" href="archives/114-Putting-Apache-on-a-diet-how-to-get-a-lean-configuration,-Part-1.html#extended">Continue reading "Putting Apache on a diet - how to get a lean configuration, Part 1"</a>]]>
        </content>
        <dc:subject>apache</dc:subject>
<dc:subject>pmap</dc:subject>
<dc:subject>prefork</dc:subject>
<dc:subject>webserver</dc:subject>

    </entry>
    <entry>
        <link href="archives/119-PHP-Mysql-support-mysql-or-mysqlnd.html" rel="alternate" title="PHP Mysql support:  mysql or mysqlnd?" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2017-07-01T08:05:47Z</published>
        <updated>2017-07-16T23:44:30Z</updated>
        <wfw:comment>wfwcomment.php?cid=119</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=119</wfw:commentRss>
    
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
    
        <id>archives/119-guid.html</id>
        <title type="html">PHP Mysql support:  mysql or mysqlnd?</title>
        <content type="html">
            <![CDATA[So you are installing a modern version of php using one of the alternative repositories, and suddenly you are confronted with a confusing choice.  You want support for mysql (mysqli or PDO-mysql)  in your php program.  But which one to choose?  <br />
<br />
First off, <a href="http://php.net/pdo" title="PDO">you should probably be using PDO</a>.  It's just a cleaner database interface when compared to mysqli, and also tends to be the supported option if you're using an ORM like Doctrine2.  <br />
<br />
But you probably have found that installing the PDO package doesn't get you support for MySQL.  <br />
<br />
So what are these 2 packages?  Well let's see what yum under Centos shows us, once we've setup webtatic as a repo:<br />
<br />
<div class="bash geshi" style="text-align: left"><br />&#160;<span style="color: #000000; font-weight: bold;">*</span> webtatic: us-east.repo.webtatic.com<br />============================================== <br />php56w-mysql.x86_64 : A module <span style="color: #000000; font-weight: bold;">for</span> PHP applications that use MySQL databases<br />php56w-mysqlnd.x86_64 : A module <span style="color: #000000; font-weight: bold;">for</span> PHP applications that use MySQL databases<br />&#160;</div><br />
<br />
In short, the mysql extension aka the mysql library is to quote Oracle/mysql  <blockquote>... a general-purpose client library</blockquote> named libmysql.<br />
<br />
This was the original php approach to supporting mysql.  MySQL provided a client api library, and using that c library, a php extension was created that depends upon libmysql implementing the famous mysql_ functions that allowed php to talk to mysql.  <br />
<br />
The mysqlnd package (where nd stands for "native driver")  is the fruit of a project to make mysql work optimally in the php language.  Again to quote the mysql site:<br />
<br />
<blockquote>The mysqlnd library is highly optimized for and tightly integrated into PHP. The MySQL Client Library cannot offer the same optimizations because it is a general-purpose client library.<br />
<br />
The mysqlnd library is using PHP internal C infrastructure for seamless integration into PHP. In addition, it is using PHP memory management, PHP Streams (I/O abstraction) and PHP string handling routines. The use of PHP memory management by mysqlnd allows, for example, memory savings by using read-only variables (copy on write) and makes mysqlnd apply to PHP memory limits.</blockquote><br />
<br />
On top of these benefits are <a href="https://dev.mysql.com/downloads/connector/php-mysqlnd/" title="MySQLND enhancements">a number of interesting enhancements and support for plugins</a> that might be of specific interest to you as a developer or sysadmin.  <br />
<br />
In general nothing should break in your code as the api should work the same under mysqlnd as it did with the old mysql library.<br />
<br />
<strong>Conclusion</strong><br />
<h4>In summary, you want to use <em>mysqlnd</em> now and in the future.</h4><br />
<hr /> ]]>
        </content>
        <dc:subject>centos</dc:subject>
<dc:subject>linux</dc:subject>
<dc:subject>mysql</dc:subject>
<dc:subject>mysqlnd</dc:subject>
<dc:subject>php</dc:subject>
<dc:subject>yum</dc:subject>

    </entry>
    <entry>
        <link href="archives/118-More-git-prompt-Does-it-work-on-a-Mac.html" rel="alternate" title="More git prompt - Does it work on a Mac?" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2016-06-16T20:41:09Z</published>
        <updated>2016-06-17T00:24:16Z</updated>
        <wfw:comment>wfwcomment.php?cid=118</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=118</wfw:commentRss>
    
            <category scheme="categories/10-Linux" label="Linux" term="Linux" />
    
        <id>archives/118-guid.html</id>
        <title type="html">More git prompt - Does it work on a Mac?</title>
        <content type="html">
            <![CDATA[So a few years ago I <a href="http://www.gizmola.com/blog/archives/113-Showing-your-git-branch-in-your-shell-prompt.html" title="Custom Git aware shell prompt">wrote this article</a> about setting a custom shell prompt that is "Git aware" and shows you your current branch.<br />
<br />
The question came up as to whether or not this works on a Mac under OS/X.  <br />
<br />
<em>I have always advocated avoiding things like WAMP or MAMP because I don't like a bunch of services running on my workstation.  I prefer using virtualization to run a *nix distro matching whatever target deployment server I'm going to run under.  VMWare, Virtualbox etc. along with the popularity of Vagrant and Docker have tremendous advantages over something like MAMP in my experience.  You start the environment when you need it, and stop it when you don't, and there's no problem having 5 different VM's with different stacks and php versions.</em><br />
<br />
For this reason, I have never been all that concerned with setting a git aware shell prompt up on my macbook. But as it's a *nix-like operating system, it has the basics you need to make the shell prompt code work, albeit with 2 required tweaks.<br />
<br />
First you have to edit the /etc/profile script so that it will look for and read scripts in an /etc/profile.d directory.  sudo vi, nano or whatever you want to edit the /etc/profile script and add this at the bottom:<br />
<br />
<div class="bash geshi" style="text-align: left"><br /><span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>profile.d<span style="color: #000000; font-weight: bold;">/*</span>.sh ; <span style="color: #000000; font-weight: bold;">do</span><br />&#160; &#160; &#160; &#160; <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-r</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$sh</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> . <span style="color: #ff0000;">&quot;<span style="color: #007800;">$sh</span>&quot;</span><br /><span style="color: #000000; font-weight: bold;">done</span><br /><span style="color: #7a0874; font-weight: bold;">unset</span> <span style="color: #c20cb9; font-weight: bold;">sh</span><br />&#160;</div><br />
<br />
This is simple bourne shell code to read in scripts in the /etc/profile.d directory when you login to a shell.  It is a system-wide script, so when you change this, you change it for all users on the system.<br />
<br />
Now you just have to create the /etc/profile.d directory.<br />
<br />
<div class="bash geshi" style="text-align: left"><br /><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>profile.d<br />&#160;</div><br />
<br />
Once this is done, you can use the same simple method <a href="http://www.gizmola.com/blog/archives/113-Showing-your-git-branch-in-your-shell-prompt.html" title="Showing your git branch in your shell prompt">described in the original article</a>.<br />
<br />
<br />
<br />
 ]]>
        </content>
        <dc:subject>git</dc:subject>
<dc:subject>mac</dc:subject>
<dc:subject>osx</dc:subject>

    </entry>
    <entry>
        <link href="archives/117-Fixing-PHP-short-open-tags.html" rel="alternate" title="Fixing PHP short open tags" />
        <author>
            <name>David Rolston</name>
                    </author>
    
        <published>2015-03-22T16:47:37Z</published>
        <updated>2015-03-22T18:31:53Z</updated>
        <wfw:comment>wfwcomment.php?cid=117</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>rss.php?version=atom1.0&amp;type=comments&amp;cid=117</wfw:commentRss>
    
            <category scheme="categories/8-Web-Tech" label="Web Tech" term="Web Tech" />
    
        <id>archives/117-guid.html</id>
        <title type="html">Fixing PHP short open tags</title>
        <content type="html">
            <![CDATA[<!-- s9ymdb:258 --><img class="serendipity_image_left" width="245" height="379"  src="uploads/images/findreplace.jpg" title="Find and replace in Eclipse PDT" alt="Find and replace in Eclipse PDT" />A PHP block is started with the tag <strong>&lt;?php</strong>.  However, there is also an alternative known as a "<em>short open tag"</em>  which is to only use <strong>&lt;?</strong><br />
<br />
The problem with using short open tags is that they conflict with xml parsers and for that reason, support for short open tags has to be enabled.  By default, it's disabled and enabling deprecated features may be impossible if hosts don't allow it. <br />
<br />
Every so often you may come upon a code base that was written using short open tags. <br />
<br />
Often people are first confronted with this problem when they have a legacy code base, and either move it to a new server or upgrade php only to find that the site is spewing errors and no longer functional.  In a worse case scenario portions of your php code will be plainly visible to end users due to the fact that the php parser is no longer parsing those blocks and simply returning them as html text.<br />
<br />
There are a number of different approaches you can take to solve this problem.  First you can <a href="http://php.net/manual/en/language.basic-syntax.phptags.php">turn on the support for short open tags</a>, but as I mentioned previously, this is not recommended.  <br />
<br />
 <a class="block_level" href="archives/117-Fixing-PHP-short-open-tags.html#extended">Continue reading "Fixing PHP short open tags"</a>]]>
        </content>
        <dc:subject>eclipse</dc:subject>
<dc:subject>php</dc:subject>
<dc:subject>regex</dc:subject>
<dc:subject>short open tag</dc:subject>
<dc:subject>short open tags</dc:subject>

    </entry>

</feed>