DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 2nd July 2023
dchmelik's Avatar
dchmelik dchmelik is offline
Real Name: David Chmelik
Port Guard
 
Join Date: Oct 2017
Location: USA
Posts: 38
Question OpenBSD 7.3 Apache 2/PHP simple-/classic-style?

I'm trying to setup Apache 2.4.56, PHP 8.2.7 on OpenBSD 7.3 but the Apache Foundation has made it harder & harder to run PHP. They suggest don't do it the simple/classic way because supposedly the extremely complicated new way is better, which when it started and they (on IRC) said do it, only ever linked me to a short marketing-style blurb explaining why it's better but not how to setup. When I finally found scant (but supposedly complete) setup instructions, even though I at least triple-checked I'd done everything right, PHP just didn't work at all, so I went back to the old way, which worked well until recently (on older OpenBSD in recent years) but now may not. The new way complicates things by them wanting you to run more configuration/modules including a proxy on some port merely to run PHP. I think the differences were mpm_prefork (old) versus mpm_event or mpm_worker (new).
        Can anyone explain how to still setup PHP the old/functioning way or has anyone ever figured out the new/over-complicated way and actually got it to work and could explain that better than the Apache Foundation did when this method started? I've installed php-apache 8.2.7 and uncommented/added lines in /etc/apache2/httpd2.conf I used to. If anyone can explain setup in a chroot (in which I won't need any modules other than PHP itself) that'd also be interesting.
        I don't even want to ask Apache Foundation themselves because there's a specific chatter that only linked the marketing-style blurb then blames people when they can't setup the new style from that, when that doesn't even document it, and follows them to other channels saying like they're bad for using the simple/classic way even though that worked fine at the time.
        If it's easier with Nginx, I'm open to that; I've found that newer network software sometimes has friendlier communities, such as Postfix (helpful) versus Sendmail (sometimes 'blame the user' before you even setup)... maybe similar with Nginx versus Apache? Just in future I may want to install MediaWiki and I'm not aware they have any complete instructions for rewriting URLs under Nginx rather than Apache...
__________________
David
homesite mirror (most uptime) / homesite (updated first)

Last edited by dchmelik; 2nd July 2023 at 04:18 AM.
Reply With Quote
  #2   (View Single Post)  
Old 2nd July 2023
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

I'm not an Apache user. The OpenBSD README for PHP describes two methods for integrating with Apache httpd:
Code:
For Apache, the most common option is with the mod_php Apache module
provided in the php-apache package. This is loaded directly as part of
the web server process. Configuration is fairly simple, but in this
case the operating system can't provide memory protection between
the two; therefore bugs in php can potentially do more damage.

Another option is to use FastCGI via php-fpm as in the above section;
you can use mod_proxy_fcgi to interface it with Apache...
Which of these methods isn't working for you?
Reply With Quote
  #3   (View Single Post)  
Old 4th July 2023
dchmelik's Avatar
dchmelik dchmelik is offline
Real Name: David Chmelik
Port Guard
 
Join Date: Oct 2017
Location: USA
Posts: 38
Smile

I just mentioned PHP (classic/module), not PHP-FPM which is the too complicated new method. When I checked my server for more details I could say, then restarted it, it actually started working this time. All I'll say for now is the configuration isn't fairly simple, but that most instructions/tutorials you'll find leave out a few necessary steps including lines of configuration. It'd take a lot to find all those now (if even necessary in this case) but if anyone has the same question I had, I could hopefully elaborate at that time. I don't think the configuration changed; I just had reinstalled the server, so probably just relearned the default. In some OS (don't know about OpenBSD but did anyway) you have to make a line to turn the PHP engine on.
__________________
David
homesite mirror (most uptime) / homesite (updated first)

Last edited by dchmelik; 18th July 2023 at 03:32 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMD Radeon RX Vega (various) GPU cards on classic *BSD? dchmelik General Hardware 10 10th May 2020 02:58 PM
Classic computer science or programming books in French thirdm Programming 6 27th May 2011 02:07 PM
Classic OpenBSD beastie wireframe? sigflup OpenBSD General 1 13th June 2010 02:12 PM
VBulletin style? indiocolifa Feedback and Suggestions 0 24th March 2009 05:52 PM
Classic Clips: Bill Gates Chews Out Microsoft Over XP TerryP Off-Topic 4 29th June 2008 08:01 PM


All times are GMT. The time now is 11:01 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick