Ad Widget

Collapse

How can i spesify a php version for zabbix to use?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Chronic_Reflexes
    Junior Member
    • Jan 2022
    • 2

    #1

    How can i spesify a php version for zabbix to use?

    I am trying to install zabbix, Though i need php 8 for other things in the server.

    I was wondering if i can specify/force it to use php 7

    i have both versions installed, but looking it up leads me nowhere
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    GIYF.... "multiple php versions in <insert your http server name here>". apache or nginx... theres plenty of examples. This is not exactly a Zabbix question..

    Comment

    • Chronic_Reflexes
      Junior Member
      • Jan 2022
      • 2

      #3
      cyber Ive spent days troubleshooting this, and googling for myself. I personally don't ask for help until i am legitimately stuck

      every example i have come across has told me to change what sock it uses, but zabbix uses its own sock, not a native php one .-.

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        I don't understand why you mentioned a Zabbix socket. Any sockets that the Zabbix server uses have nothing at all to do with whether (or not) a PHP worker pool uses a socket for communicating with it.

        So articles like https://stackoverflow.com/questions/...-live-together don't help with getting it working?

        Do you understand what's needed from a conceptual standpoint?

        You've indicated you have "both versions installed". Does that mean that you have packages with different names for say php8-fpm and php7-fpm? You are using the FPM in both cases, correct (not the mod_php)?

        If you have two separate versions of the FPM installed, have you enabled two separate FPM services, one for the 8.x pool(s) and one for the 7.x pool(s)?

        Have you configured each pool (whether it's an 8.x pool or a 7.x pool) of PHP-FPM workers so that each pool has its own "thing" that it's listening to? Either a network port or a UNIX domain socket path, but each pool must have its own.

        With each PHP pool (whether it's an 8.x pool or a 7.x pool) having its own port or socket, the remaining step is to have your web server (httpd, nginx, or whatever) proxy requests for certain URL "paths" to the pool you want to have handle those requests. That can sometimes be easier if you split things up using web virtual hosts (vhosts), so that all PHP requests for a particular vhost (e.g. zabbix.yourdomain.whatever) get proxied to the same pool, but it is possible to have one vhost do all the proxying to multiple different backend PHP worker pools; it's just a little more complicated if there are a lot of URL "paths" to consider.

        Does that help?

        If not, can you elaborate on how far you've gotten, and what you think the next step should be, that you're getting stuck on?

        Comment

        Working...