2 Commits f2cbacf0db ... ef731ad3a8

Author SHA1 Message Date
  windhamdavid ef731ad3a8 oc post 5 months ago
  windhamdavid a26c99c084 ocd post 5 months ago
4 changed files with 95 additions and 3 deletions
  1. 10 3
      docs/computers/ovid.md
  2. 1 0
      docs/index.md
  3. 83 0
      posts/2024-07-18-posts.md
  4. 1 0
      src/pages/index.md

+ 10 - 3
docs/computers/ovid.md

@@ -8,9 +8,9 @@
 
 
 ### Log
 ### Log
 
 
-**24.07.14** - removed node@16
+**24.07.14** - added [PHP 8.3.9](#languages) and [summarized it](/posts/ocd-benefits)
 
 
-**24.07.10** - Had a MariaDB meltdown and wrote up a quick summary @ [/posts/mariadb-meltdown](/posts/mariadb-meltdown) as a reference. Switched back to MySQL 8.3
+**24.07.14** - removed node@16
 
 
 **24.07.10** - Had a MariaDB meltdown and wrote up a quick summary @ [/posts/mariadb-meltdown](/posts/mariadb-meltdown) as a reference. Switched back to MySQL 8.3
 **24.07.10** - Had a MariaDB meltdown and wrote up a quick summary @ [/posts/mariadb-meltdown](/posts/mariadb-meltdown) as a reference. Switched back to MySQL 8.3
 
 
@@ -309,9 +309,16 @@ Also see Brew Analytics - [https://formulae.brew.sh/analytics/install/365d/](htt
 
 
 Apple is removing languages from the OS via [Xcode 11 release notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes): "Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. In future versions of macOS, scripting language runtimes won't be available by default, and may require you to install an additional package." Instead of adding four or five versions of each language to support legacy codebase, I'm going to bring modify the old projects.  
 Apple is removing languages from the OS via [Xcode 11 release notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes): "Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for compatibility with legacy software. In future versions of macOS, scripting language runtimes won't be available by default, and may require you to install an additional package." Instead of adding four or five versions of each language to support legacy codebase, I'm going to bring modify the old projects.  
   
   
-**PHP** - 8.1.0 / 7.4.26  ( still have to support 7.4 )  
+**PHP** - 8.3.9 / 8.1.0 / 7.4.26  ( still have to support 7.4 )  
 
 
 ```bash
 ```bash
+david@ovid🏛 :/opt/homebrew/etc/httpd(master○) » php -v             
+PHP 8.3.9 (cli) (built: Jul  2 2024 14:10:14) (NTS)
+Copyright (c) The PHP Group
+Zend Engine v4.3.9, Copyright (c) Zend Technologies
+    with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
+    with Zend OPcache v8.3.9, Copyright (c), by Zend Technologies
+
 david@ovid:~ » php --ini           
 david@ovid:~ » php --ini           
 Configuration File (php.ini) Path: /opt/homebrew/etc/php/8.1
 Configuration File (php.ini) Path: /opt/homebrew/etc/php/8.1
 Loaded Configuration File:         /opt/homebrew/etc/php/8.1/php.ini
 Loaded Configuration File:         /opt/homebrew/etc/php/8.1/php.ini

+ 1 - 0
docs/index.md

@@ -15,6 +15,7 @@ I use this library of documents as a quick reference to find technical answers,
 
 
 ## Log
 ## Log
 
 
+- 24/07/17 - [computers/ovid](/docs/computers/ovid)
 - 24/01/30 - [localhost/Adobe](/docs/localhost/adobe)
 - 24/01/30 - [localhost/Adobe](/docs/localhost/adobe)
 - 23/12/10 - 🗑️ unused /+ new [docs](/docs/)
 - 23/12/10 - 🗑️ unused /+ new [docs](/docs/)
 - 23/11/26 - [v.Ruby @ ovid](/docs/computers/ovid)
 - 23/11/26 - [v.Ruby @ ovid](/docs/computers/ovid)

+ 83 - 0
posts/2024-07-18-posts.md

@@ -0,0 +1,83 @@
+---
+title: OC Benefits
+slug: oc-benefits
+description: Today I learned how some mild OCD tendencies tend to help with computers.
+<!--- authors:
+  - name: David Windham
+    title: Something Else
+    url: https://davidawindham.com
+    image_url: https://davidawindham.com/wp-content/themes/daw/img/opengraph_image.jpg -->
+tags: [ocd, php, ovid]
+image: https://davidawindham.com/wp-content/themes/daw/img/opengraph_image.jpg
+hide_table_of_contents: true
+---
+
+Today I learned how some mild OCD tendencies tend to help me with computers.
+
+<!--truncate-->
+
+In my last post @ [/posts/mariadb-meltdown](/posts/mariadb-meltdown), I upgraded MySQL to version 8.3 and because, for whatever reason... perhaps some mild OCD ( obsessive-compulsive disorder ), I also thought it'd be nice to match up my MySQL and PHP versions since it's rare to share the same numerical version for the latest stable releases. Yes, it may seem like somewhat absurd reasoning, but it makes sense in my brain 🧠.
+
+I'd been on v8.1 for a bit now and I generally like to make major version jumps to save the time and effort of constant upgrades. In the process I also went ahead and matched up my server types because I'd noticed a nagging error in my `logs` about the Apache mpm_event module not playing nice with the compiled PHP version. 
+
+```bash
+david@ovid🏛 :/opt/homebrew/etc/httpd(master○) » apachectl configtest
+[Thu Jul 18 06:27:21.715896 2024] [php7:crit] [pid 43726:tid 8420412416] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  Homebrew PHP does not support a thread-safe php binary. To use the PHP apache sapi please change your httpd config to use the prefork MPM
+AH00013: Pre-configuration failed
+```
+
+Yes, I don't really need the `mpm_event` or `http2` on my localhost, but again.. the OCD says make it match my servers exactly so the development environment is **exactly** the same. I run http2 on localhost anyway.
+
+```bash title="/opt/homebrew/etc/httpd/httpd.conf"
+Protocols h2 h2c http/1.1
+LoadModule mpm_event_module lib/httpd/modules/mod_mpm_event.so
+#LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so
+```
+
+If you're following along or came here from some search term, the solution is to compile a thread-safe version. 
+
+```bash
+brew tap shivammathur/php
+brew install shivammathur/php/php@8.3-zts
+```
+
+
+
+I just set my ports to match the version under port 9000.
+
+```bash title="/opt/homebrew/etc/php/8.3/php-fpm.d/www.conf"
+listen = 127.0.0.1:9083
+```
+
+And then I can just use that port 👇🏼 to specify the PHP version per project.
+
+```bash title="/opt/homebrew/etc/httpd/extra/httpd-vhosts.conf"
+<FilesMatch "\.php$">
+  SetHandler "proxy:fcgi://localhost:9083/"
+</FilesMatch>
+```
+
+And now they match 👏🏼.
+
+```bash 
+david@ovid🏛 :/opt/homebrew/etc/httpd(master○) » php -v
+# highlight-next-line           
+PHP 8.3.9 (cli) (built: Jul  2 2024 14:10:14) (NTS)
+david@ovid🏛 :/opt/homebrew/etc/httpd(master○) » pecl list
+Installed packages, channel pecl.php.net:
+=========================================
+Package Version State
+imagick 3.7.0   stable
+redis   5.3.4   stable
+xdebug  3.3.2   stable
+david@ovid🏛 :/opt/homebrew/etc/httpd(master○) » mysql --version
+# highlight-next-line
+mysql  Ver 8.3.0 for macos14.2 on arm64 (Homebrew)
+```
+
+
+Managing a bunch of computers and software isn't easy without being organized. I had someone ask me at lunch yesterday about my schedule... "if it was rigorous?". And although I hadn't ever put much thought into it... Indeed it is. Does my localhost match my servers? Do all of my dotfiles match between machines? Do all my editor themes match? Do my syntax highlighting themes match? Did I go so far as to create my own [development inspector to match](https://davidawindham.com/chrome-devtools-theme/)? Do all of my config files match? Does my editor match my live sites? 
+
+![](/img/ocd.png)
+
+**YES** to all of these. And although I'm fairly confident any professional assessment would leave off the `D` because it doesn't seem to be an impairment, a little `OC` kinda works for me.

+ 1 - 0
src/pages/index.md

@@ -6,6 +6,7 @@ description: A place to keep notes and documentation
 # Today I Learned
 # Today I Learned
 
 
 - **2024**
 - **2024**
+  - 24/07/18 - [OC Benefits](/posts/ocd-benefits)
   - 24/07/10 - [MariaDB Meltdown](/posts/mariadb-meltdown)
   - 24/07/10 - [MariaDB Meltdown](/posts/mariadb-meltdown)
   - 24/06/13 - [Weather & Work](/posts/weather-work)
   - 24/06/13 - [Weather & Work](/posts/weather-work)
   - 24/04/21 - [Woody Windham](/posts/woody-windham)
   - 24/04/21 - [Woody Windham](/posts/woody-windham)