Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter whitemw

    (@whitemw)

    Good news problem solved. I went to PHP 7.2.22. After trying to update Mysql to default to utf8 that did not change anything so I punted. I was trying to stay in the Centos 7 distributions but they were just too old to keep my WordPress up-to-date. I already had Mysql 8.0 and thinking back that happened because Lentos 7 defaults to Marian DB. Heck I retired from Oracle and also worked for Sun must use Mysql for that reason, my neurosis. So being new to Centos didn’t’t really know how to control software versions so I got 8.0. In this exercise I learned all that which is really critical going forward. Still wondering why php 5.4 worked and 5.6 didn’t, the engineer in what’s that info but I ran out of time and had to make it work. I found an interesting web site about making php 5 work with Mysql 8.0:

    https://severalnines.com/database-blog/how-run-php-5-applications-mysql-80-centos-7

    I do want to thank everyone that commented on this post, each every one of you had usable and explorable information to pass on.

    This really all occurred because I am a software engineer and not a sysprog. While I am well aware of software version interaction I didn’t pay attention here because this process is new to me and I am just hacking along with everyone else on this project.

    But my WordPress version has been updated!

    Thread Starter whitemw

    (@whitemw)

    Forgot to mention still trying to understand why 5.4 handles receiving an unknown charset from mysql and 5.6 apparently does not. I might make utf8 the mysql default if required. I had already forgotten about the sha2 issues until a previous post jogged my memory.

    Obviously, I failed to ensure package level compatibility which is bitting me in the butt here.

    Thread Starter whitemw

    (@whitemw)

    FYI I have the following in place to fix the SHA2 issue:

    default_authentication_plugin=mysql_native_password

    Thread Starter whitemw

    (@whitemw)

    Will certainly be looking at PHP and Mysql compatibility versions. Some good input to look at here. Am a retired StorageTek disk and tape drive firmware engineer, ended up retiring from Oracle after a couple of acquisitions.

    However, the one thing that is bothering me is why does php 5.4 work? I think I’d like to explore the charset issues on my home linux server a bit. utf8mb4 is the charset specified in the wp-config.php file. Need more understanding here.

    Thread Starter whitemw

    (@whitemw)

    Ok, tried the remi 5.6 which didn’t help. Then I went to answer the first commenters post The WP version I am on is 5.0.1 and the Theme I’m using is Twenty Thirteen. I was not able to get the version in the admin panel because it would only display the version to upgrade to: 5.2.3 so I looked at version.php which told me the version of php and mysql I need. So I looked up the mysql version I need and it is mysql 5.6 and I have 8.0.16 so that’s not it.

    After all is said and done I went back to php 5.4 and everything is working again.

    Don’t think it is the rpm, still something I need to do that I don’t know about??

    Will keep looking.

    Thread Starter whitemw

    (@whitemw)

    SOLVED
    I’ve completed my testing and have the answers I was looking for. I started this post because I was unable to upgrade my WordPress site automatically. Everything I found mentioned updating Plugins and Themes and not specifically Upgrades. Having a Centos 7 site with SELinux I knew SELinux could be blocking update permissions. I am mentioning SELinux because it is the problem not because I looking for SELinux solutions. As mentioned earlier I changed the context for the wp-content directory to rw and that worked for Plugins and Themes but not Upgrades. After examining the code it turns out that the sites root directory is the one tested for authorization. That means that the rw context must be applied to the entire WP directory structure to pass the test. For some that may be ok, I will choose to manually upgrade my site. The php-fpm is a solution to isolate updates from the apache user and is an interesting isolation mechanism that I was unaware of, thanks for bringing it up.

    To restate, if running SELinux you will have to set a context of httpd_sys_rw_content_t to your complete WP site to perform upgrades from the web. You can get away with setting this context to wp-content if you only want update/add Themes and Plugins from the web interface. In addition, you will need the correct file permissions and ownership also.

    Steven thank you for you good comments, you were very helpful and professional.

    Thread Starter whitemw

    (@whitemw)

    Ok agree with the SELinux theory. I have not set SELinux to permissive, and don’t want to. I already set the wp-content directory to a rw context and am able to update plugins and themes. So since I can’t update to 5.0 I’m thinking at least wp-admin directory needs its context changed to httpd_sys_rw_content_t. Have not had a chance to do research on directories updated. I have checked the SELinux logs but nothing, which does not surprise me because I think WP is just checking for authorization which might not create a log entry. At this point I really want to know what is blocking me and make sure I make the correct change. Going to review the code and instrument it to get the exact location it can’t write to. Took a quick look at the link you supplied regarding php-fmp. Seems like your saying it allows me to separate update permissions for WP from apache.

    Will post my results after I come to a conclusion. I might have some more questions later.

    Thread Starter whitemw

    (@whitemw)

    Ok da this php-fpm went over my head completely, thinking rpm typo. I have run WordPress on my local server and never needed this package. Will have to research. So I don’t have php-fpm installed and have not seen any install instructions calling for it. Can you elaborate as to why it is needed and do you have experience with it fixing my issue.

    Thread Starter whitemw

    (@whitemw)

    Ok checked ownership in update-core.php which is the file in control during failure. Both functions report apache as the owner now. Changed the owner back to apache:apache. No change of course. Hoping to figure this out without having to instrument a bunch of code.

    Thread Starter whitemw

    (@whitemw)

    Was apache:apache

    Thread Starter whitemw

    (@whitemw)

    ownership is now root:apache

    Thread Starter whitemw

    (@whitemw)

    After more looking I changed my php program to:

    <?php echo exec(‘whoami’);
    print “<br>”;
    print get_current_user ();
    ?>

    The result was:
    apache
    root

    So I changed the owner to root. No change still wants connection info.

    Thread Starter whitemw

    (@whitemw)

    Ok I checked the user by coding a php file: <?php echo exec(‘whoami’); ?>
    and ‘apache’ was the answer. So still looking.

    Thread Starter whitemw

    (@whitemw)

    Looks like I’m back on my way, closing this post.

    Thread Starter whitemw

    (@whitemw)

    Thanks for the update, have been working with those links and they are really good. Of course part of the process of development is sharing issues and many times that process triggers a light to come on and one did. I realized that viewing my theme through live view adds live view markup so I used live view to make sure the page would display and then activated my theme and then view the source and was very happy to see my html. It does contain some red lines, I assume attention is needed so progress has been made.

    Again thanks for your post.

Viewing 15 replies - 1 through 15 (of 15 total)