Website specific PHP version and "Custom php.ini settings" not working

Discussion in 'Installation/Configuration' started by mas886, Jan 18, 2024.

  1. mas886

    mas886 New Member

    Sorry if the question is too obvious, but I googled quite a bit and couldn't find anything that solved my problem, I'm kind of a newbie using ISPConfig. So I installed ISPConfig a month ago to host some of my own websites and have a development enviroment, tho one of the things I realized almost from the beginning is that site specific "Custom php.ini settings" seem to not work, as it's always using default php version values.
    Yesterday, since I needed to rescue some data of an outdated website I wanted to try out the website specific PHP version option, but I seem to be having the same problem. phpinfo() is always showing "PHP Version 8.1.26" on the website, and any of the custom options I entered seem to be having any effect. I have a default installation of ISPConfig in Ubuntu 22.04, during the installation I selected an option that installed the different php versions for me, and at least at /etc/php/ I can see all the available PHP versions. Also using Nginx as web server.
    Everything else seem to be working fine.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Custom php.ini settings and changing php versions work perfectly out of the box. I guess you entered something in the nginx directives field of the website that prevents custom php.ini settings and php change from working. Have you entered something in in the nginx directives field of the website or does this site use a config snippet that you created and if yes, what is the exact config you entered as custom config?
     
    mas886 and ahrasis like this.
  3. mas886

    mas886 New Member

    Okay, it was indeed the nginx directive where I forced it to use an specific php socket, I feel pretty dumb now. Thanks
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There is a placeholder variable (mentioned below the input field) for the socket path, that you can use in your custom directive to enable custom PHP versions.

    Btw, with your old directive settings your cms likely wrote all files as wrong user (www-data), take care to change the whole content of the websites 'web' folder to the web[ID] user and client[ID] group of that website.
     
    mas886 likes this.
  5. mas886

    mas886 New Member

    Thank you, I will make sure to check that.
     

Share This Page