RedHat for home lab PHP development

David Schwartz newsletters at thetoolwiz.com
Sat Dec 7 12:28:41 MST 2024


I just bought a little Dell box that I can use to host a server in my home to simplify my test & development (T&D) work. 

I’m using Delphi for programming, which is what I’m most familiar with, and there’s a tool I use that transpiles Delphi (Object Pascal) code into javascript so it runs in the web browser. It lets you build web apps in a platform and language historically used exclusively for desktop apps. It’s really cool to work with and see it run.

Of course, the back-end services can be written in anything, but I also have a library that lets me use Delphi to build back-end services if I want.

The problem here is that for T&D work, it would be a whole lot simpler if I could upload source files as scripts that run via an interpreter, rather than having to completely recompile, build, and deploy the back-end service every time I want to change anything.

Most services today are written as scripts that are interpreted rather than compiled into an executable, including javascript, python, and php. So why not Delphi?

I’m guessing that purists prefer to argue that “it’s not fast enough”. I bet they’re using plenty of back-end services that are written in some interpreted language and they have no idea, and wouldn’t suggest for a second that “they’re not fast enough”. In most cases, the connection speeds account for the majority of delays in round-trip requests for back-end services, not whether the service is implemented in an interpreted or compiled language. People seem to conveniently ignore that fact. “Well, when most of the world has 10GB real-time connections everywhere, we’ll be ready for ‘em!"

All of those layers you’re pointing at were all created to make some part of the solution run faster. 

Yet, the most expensive and time-consuming part, the programming, always seems to get the least amount of attention.

So instead of having a back-end interpreter for whatever language you’re using to simplify and speed-up your T&D work, you have to waste time learning new tools designed to make the detours around that missing pieces go faster. Better DevOps tools, faster compilers, better configuration management … 

I learned Unix and C at the same time, and my initial thought was that I had to write C code to build everything. I was quickly advised to get everything working using shell scripts first, and then take the ones running the most or slowest and rewrite them in C. That was pretty easy since the shell scripts were in csh, which could be rewritten in C pretty quickly. In fact, I learned to love the fact that most of the scripting languages in Unix were all rooted in C, and it made the overall learning curve much shorter. Everything in that ecosystem presented the same usage model. It was glorious! Even php was conceived within that world, and that’s why it looks so much like C! 

Then DOS came along, and then Windows, and O-M-G everything went to hell. 


I think what you’re saying is, why not just figure out how to make the overall PROGRAMMING PROCESS take less time WITHOUT all of this extra crap? Yeah wouldn’t THAT be GREAT!

A lot of this stuff was invented to get around corporate policies that lock the dev team into a rigid dev environment that was never designed to be optimal for anything. Microsoft controls so much of it today. 

Servers all come configured the same, desktops and client environments now come in a half-dozen distinct flavors that change slowly but there always seem to have a few “breaking changes" that upend everything else. 

It seems like we’re constantly fighting to get around sharp corners and stairs that were put in simply to squeeze something new into the space, while nobody bothered to give much thought to how well it might fit.

Thankfully, I’m retired from this rat-race now, although I still encounter it when working on my own projects just because it’s impossible to avoid. 

Does anybody know of a back-end API interface that has a Delphi / Object Pascal interpreter attached so I can simply upload a script file as text and run it without having to recompile the whole frigging thing?

-David Schwartz




> On Dec 7, 2024, at 7:14 AM, Keith Smith via PLUG-discuss <plug-discuss at lists.phxlinux.org> wrote:
> 
> I know little about Docker.  Thank you for the advice.
> 
> I'm trying to keep things Simple Stupid.  When I complete my project I will reveal why.  In a prior email I stated I think things have become way too complicated. I am on a journey to reverse some of that.
> 
> My target audience for my blog and YouTube channel are beginners that are in part why I want to avoid things like Docker.  I think Docker is an advanced skill.
> 
> As it is to become an entry level PHP developer one needs to develop some familiarity with HTML, CSS, JavaScript, AJAX, PHP, and MySQL.  Oh and do not forget object PHP. And add an editor like Visual Studio Code. Add to that a development environment that consists of Linux, Apache, MySQL, and PHP.  It seems a lot of folks like those LAMP emulators that are installed on Windows and MAC. I do not.
> 
> With all my experience I find all the newer developments to be a little much.
> 
> Given my failed experience with PHP-FPM I think I will put that into the advanced bucket. My friend who owns a hosting company tells me PHP-FPM is a must. I think there is a simpler way.
> 
> I think there is a lot to learn here - not just tech but but the whole echo system.
> 
> This has become a learning curve!!
> 
> Thanks!!
> Keith
> 
> 
> 
> 
> 
> 
> On 2024-12-06 19:34, Snyder, Alexander J wrote:
>> I mean, not to add a layer of complexity for you, but I think
>> embracing docker and containers would vastly simplify what you're
>> doing (or trying to do) ... I was incredibly intimidated by docker,
>> until I forced myself to do it, and then like most tech things, I
>> found it to be quite simple.
>> I'm certainly not an expert, but I'm proficient enough for my homelab.
>> I think it would make things easier for you.
>> ---
>> Thanks,
>> Alexander
>> Sent from my Google Pixel 7 Pro
>> On Fri, Dec 6, 2024, 16:43 <techlists at phpcoderusa.com> wrote:
>>> Hi,
>>> Was not able to get a PHP script to create a text file.  Worked on
>>> it
>>> way too long.
>>> I discovered I do not need PHP-FPM.
>>> I can take the user created during the Linux install that is sudo
>>> and
>>> add it to the www-data group, set ownership and permissions
>>> accordingly
>>> and everything works.  PHP can create/modify/save/delete a text
>>> file.
>>> Only thing I have to do is set permissions and ownership for any PHP
>>> script created by VSC.
>>> Looks like an easier solution.
>>> For now I am done with PHP-FPM.
>>> Keith
>>> On 2024-12-05 10:53, Snyder, Alexander J wrote:
>>>> Okay, seriously though, it's easy. Go setup a RedHat account. Then
>>> go
>>>> to developer.redhat.com <http://developer.redhat.com/> [1] [1] and do that flow. I don't
>>> immediately
>>>> remember what that requires, but it's fairly straightforward and
>>> free.
>>>> I only have to revisit that flow once per year, and I have trouble
>>>> remembering what I did last week.
>>>> You can then navigate their site and download the RHEL iso and
>>> create
>>>> a VM from it. During the setup you can register your VM, or you
>>> can do
>>>> it later from the CLI.
>>>> Let me know if you have any issues.
>>>> ---
>>>> Thanks,
>>>> Alexander
>>>> Sent from my Google Pixel 7 Pro
>>>> On Thu, Dec 5, 2024, 10:43 Snyder, Alexander J
>>>> <alexander at snyderfamily.co> wrote:
>>>>> Yeah. Use RHEL Proper. It's the tits.
>>>>> ---
>>>>> Thanks,
>>>>> Alexander
>>>>> Sent from my Google Pixel 7 Pro
>>>>> On Thu, Dec 5, 2024, 10:39 Keith Smith via PLUG-discuss
>>>>> <plug-discuss at lists.phxlinux.org> wrote:
>>>>>> Hi,
>>>>>> As mentioned before I used to use CentOS as a development and
>>>>>> testing
>>>>>> web server.
>>>>>> As I recall it was simple to configure a virtual host.
>>>>>> 1) create the docroot off the home directory like this
>>>>>> /home/<user-name>/public_html/
>>>>>> 2) Create an Apache Virtual host configuration file.  I recall
>>>>>> having
>>>>>> one "large" Apache configuration file that contained all of my
>>>>>> virtual
>>>>>> hosts.
>>>>>> I'm a PHP developer not a system administrator.  All these
>>> Ubuntu
>>>>>> PHP-FPM configuration issues are causing me to re-consider
>>> Ubuntu
>>>>>> as a
>>>>>> server... YIKES!!
>>>>>> I want to keep things simple so I can get onto my PHP coding
>>>>>> projects.
>>>>>> Any Thoughts?
>>>>>> Thanks!!
>>>>>> Keith
>>>>>> ---------------------------------------------------
>>>>>> PLUG-discuss mailing list: PLUG-discuss at lists.phxlinux.org
>>>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>> Links:
>>>> ------
>>>> [1] http://developer.redhat.com <http://developer.redhat.com/>
>> Links:
>> ------
>> [1] http://developer.redhat.com <http://developer.redhat.com/>
> ---------------------------------------------------
> PLUG-discuss mailing list: PLUG-discuss at lists.phxlinux.org <mailto:PLUG-discuss at lists.phxlinux.org>
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss <https://lists.phxlinux.org/mailman/listinfo/plug-discuss>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20241207/581f25ff/attachment.htm>


More information about the PLUG-discuss mailing list