Control Web Panel

WebPanel => PHP => Topic started by: evehq on March 05, 2022, 07:18:12 PM

Title: Update issue
Post by: evehq on March 05, 2022, 07:18:12 PM
Hello, I want to update my php, this is because in wordpress it tells me that I have version 7.2

(https://i.imgur.com/amaizne.png)

In my vhost configuration file I have this address associated with php /usr/local/cwp/php71


but in my panel it says that I am running version 7.4 which is not true because wordpress is mentioning that I have an old one

(https://i.imgur.com/2nUrxc4.png)

How can I upgrade to 7.4?
Title: Re: Update issue
Post by: iraqiboy90 on March 05, 2022, 08:31:56 PM
Quote
In my vhost configuration file I have this address associated with php /usr/local/cwp/php71
You are looking at the wrong vhost file.

Quote
but in my panel it says that I am running version 7.4 which is not true because wordpress is mentioning that I have an old one
The version 7.4 you are mentioning in the picture cannot be used because you disabled it from being used by forcing PHP-FPM feature, which is set at 7.3 as a default version for all websites, unless the website is told to use something else (not the 7.4 in the picture).

Not sure how you got to forcing PHP-FPM without knowing what it means, and if you did just follow instructions blindly, then your wordpress would be running with 7.3, not 7.2.

There is something wrong somewhere in your configurations.

Step one
Option one:
Find out what your PHP version really is through the website:
- Open the file browser and navigate to the content of the wordpress website. In the main folder for your domain/wordpress site, create a file named info.php.
- Put this code it in
Code: [Select]
<?php
phpinfo
();
?>
- Save the file and open it normally with the browser. http://your_wordpress_domain.com/info.php
- Take a screenshot of what in there without scrolling it and post it here.
- Delete the info.php file, as it can be a security issue if left publicly accessible.

Option two
Find out what your PHP version really is through CWP:
- In CWP admin panel. Go to WebServer Settings - WebServer Conf Editor - Click on the Apache tab - Click on /usr/local/apache/conf.d/vhosts/ tab - Find the .conf file for your wordpress site - Click on edit - Scroll down to <IfModule proxy_fcgi_module>
- there should be a code there looking like this:
Code: [Select]
<IfModule proxy_fcgi_module>
<FilesMatch \.php$>
SetHandler "proxy:unix:/opt/alt/php-fpm74/usr/var/sockets/user.sock|fcgi://localhost"
</FilesMatch>
</IfModule>
- Take a screenshot of it and post it here.
- DON'T edit anything in there.

Step two

- In CWP admin panel - Go to WebServer Settings - WebServers Domain Conf - Select the user that has the wordpress site
- Does the button under Actions for your wordpress site say "Create Configuration" or "View/Edit Configuration"?
- Take a screenshot of the list and post it here anyways...
Title: Re: Update issue
Post by: evehq on March 05, 2022, 09:06:58 PM
1. im using that path for this issue that i had with "bad gateway" in this post https://forum.centos-webpanel.com/index.php?topic=11864.0 after change that how @rcschaff my site is working normally


2. PHP INFO

 (https://i.imgur.com/tOvYmC7.png)


3. Im using nginx no apache however is this

(https://i.imgur.com/DtxGR85.png)

(https://i.imgur.com/070UsP1.png)

4. Step two


(https://i.imgur.com/o8H37tQ.png)

Title: Re: Update issue
Post by: rcschaff on March 07, 2022, 01:59:24 AM
Check the box "Rebuild this domain", and hit save.  If it does not change the php-fpm version, then you have hardcoded the PHP version in the template file, and that would need to be undone.
Title: Re: Update issue
Post by: evehq on March 07, 2022, 03:41:33 AM
If I do that, that is, edit the file, which is what you suggested, I will have the bad gateway problem again because the djflakf.sock file is deleted
Title: Re: Update issue
Post by: rcschaff on March 07, 2022, 04:31:29 AM
That should be fine, because there should be a socket file in php-fpm73.  Ideally, you should not be using the cwpsrv php-fpm, but the client version in /opt/alt/php*
Title: Re: Update issue
Post by: evehq on March 07, 2022, 05:03:30 AM
That should be fine, because there should be a socket file in php-fpm73.  Ideally, you should not be using the cwpsrv php-fpm, but the client version in /opt/alt/php*

I understand that I should not use it, I followed your advice in previous posts and I stopped getting 502 using cwp's php, because in this route

/opt/alt/php-fpm73/usr/var/sockets

(https://i.imgur.com/qIEkvgT.png)

there is nothing, the files are deleted, as I explained in the first post, I can do a clean installation of the panel, I put the wordpress, I do the configuration that I have, but after a few hours of working the djflakf1.sock file is deleted and I do not understand why in fact others have reported the same

http://forum.centos-webpanel.com/php/php-fpm-socket-not-create/

Title: Re: Update issue
Post by: rcschaff on March 07, 2022, 05:17:45 AM
There are no socket files, because that version of php-fpm is not running.  Start it with

systemctl start php-fpm73.service
Title: Re: Update issue
Post by: evehq on March 07, 2022, 05:23:17 AM
(https://i.imgur.com/clcdJQf.png)
Title: Re: Update issue
Post by: rcschaff on March 07, 2022, 05:28:00 AM
the polkit error isn't of concern.  see if the sockets exist now.  If not, use systemctl status php-fpm73 to see any errors
Title: Re: Update issue
Post by: evehq on March 07, 2022, 05:31:25 AM
i don't understand this

(https://i.imgur.com/0z5ZevJ.png)
Title: Re: Update issue
Post by: rcschaff on March 07, 2022, 06:19:08 AM
Issue Resolved.  Binary had wrong permissions.
Title: Re: Update issue
Post by: evehq on March 07, 2022, 10:00:19 AM
With the great help of @rcschaff, the permissions of this php-fpm file were changed so that 7.3 of the panel could work without problem, but at 3 am today the file was modified in permissions again, which causes an error 502, what about this panel?

(https://i.imgur.com/YWfGZGs.png)

The permissions that were changed yesterday, automatically changed again by themselves, it seems like a joke in bad taste
Title: Re: Update issue
Post by: josemnunez on March 07, 2022, 11:23:10 AM
check that your pro license is valid
Title: Re: Update issue
Post by: evehq on March 07, 2022, 11:36:41 AM
I have not pro license, my panel is free, ¿why? ¿for use php, nginx or wordpress i need a license?
Title: Re: Update issue
Post by: josemnunez on March 07, 2022, 11:41:35 AM
if you want to use php fpm I recommend using a PRO license, to avoid all these problems!
Title: Re: Update issue
Post by: evehq on March 07, 2022, 11:59:39 AM
honestly im truly surprised, i don't understand why is necesary buy a license to use php-fpm, i know this panel is awesome but i want to know where is specified that,
Title: Re: Update issue
Post by: josemnunez on March 07, 2022, 12:01:48 PM
you can see this here

https://control-webpanel.com/cwppro
Title: Re: Update issue
Post by: evehq on March 07, 2022, 03:45:03 PM
you can see this here

https://control-webpanel.com/cwppro

i dont need selector just use php fpm
Title: Re: Update issue
Post by: iraqiboy90 on March 08, 2022, 01:22:46 AM
Convinced him to buy the license :)

I found out that he had for some reason httpd installed in /etc/httpd forcing the use of port 80 and conflicting with nginx. Took some time figuring this one out :p
Title: Re: Update issue
Post by: evehq on March 08, 2022, 01:29:31 AM
iraqiboy90 was helping for several hours to solve this problem, obviously I bought the license for a year, but I would not have been able to advance even two centimeters in placing my website correctly if it were not for the huge, gigantic and brilliant @ iraqiboy90, Thank you, I told you in private and I'll tell you here too, I thank you from here to heaven, you're great. Also thank @rcschaff for his tips and tricks, they are really great here, in other forums they insult you but you are really great, THANKS A BILLION

A tip for iraqiboy90, please create a youtube channel and make tutorials about this panel or general about linux, U ARE A GENIUS