Forum Replies Created

Viewing 15 replies - 1 through 15 (of 40 total)
  • Thread Starter Bill Vallance

    (@bvallance)

    So, would this be the correct “translation” of cURL code to WordPress wp_remote_post() code:

    $response = wp_remote_post(
    https://api-m.sandbox.paypal.com/v1/oauth2/token’,
    $args = array(
    ‘headers’ => array(
    ‘Content-Type: application/x-www-form-urlencoded’,
    ‘Authorization: Basic ‘ . base64_encode( CLIENT_ID:CLIENT_SECRET )
    )
    ‘body’=> array(
    ‘grant_type=client_credentials’
    )
    );

    Thanks For Your Help!

    Thread Starter Bill Vallance

    (@bvallance)

    @threadi, thanks for the reply and the explanation about the wp_remote_post headers syntax. That helps a lot. I was aware of the links you provided me, but I don’t know how to write the keyword/value code statements for the $args() array. How would I write the statements for the -u (user name and password) and the -d (HTTP post data)?

    Thread Starter Bill Vallance

    (@bvallance)

    I found the problem. The issue was Norton 360 (the antivirus program). I disabled Auto-Protect, which in my past experience with Norton 360 disabled all protection. But not now. Disabling Auto-Protect still leaves some settings active. What causes the issue I reported above was the Norton 360 outbound email scanning setting. As soon as I disabled it WP Mail SMTP worked perfectly!

    I encountered this exact same problem. The issue was Norton 360 (the antivirus program). I disabled Auto-Protect, which in my past experience with Norton 360 disabled all protection. But not now. Disabling Auto-Protect still leaves some settings active. What causes the issue reported above with WP Mail SMTP was the Norton 360 outbound email scanning setting. As soon as I disabled it WP Mail SMTP worked perfectly!

    Thread Starter Bill Vallance

    (@bvallance)

    Thanks for your response. After a long call with my hosting company I think the issue is with my development environment Apache web server certificate. Here’s my DEV environment:

    • WAMPSERVER (Apache web server, MariaDB, & PHP) on a laptop in my office
    • I develop my WordPress websites in my DEV environment. I then upload them to my hosting server as staging websites for client review
    • The WP Mail SMTP plugin was working in my DEV environment until 11-8-2024.
    • I have updated the WP Mail SMTP plugin to the latest version – no change, still getting the SMTP connection error in my original post

    I have WP Mail SMTP configured to send mail through my hosting provider’s server using TLS on port 587. I’m under the impression that the certificate validation problem is with my hosting computer. Am I correct about that, OR is the certificate validation problem with my DEV environment Apache server? I am using a self-signed CA Certificate in my Apache server that includes the domain name of my dev environment. Is the self-signed certificate on my Apache server my problem?

    Thread Starter Bill Vallance

    (@bvallance)

    Thanks, Andrew, for the explanation. I tried pasting the XML into the text editor. It works the first time it is saved. BUT, if you edit the XML at a later time, the editor opens in visual mode and strips the HTML tags. I tried the WordPress admin setting to disable launch of the editor in visual mode, but it didn’t work. I didn’t think about using an HTML Block – good suggestion. I’ll give it a try the next time I encounter XML , which I will.

    Thread Starter Bill Vallance

    (@bvallance)

    Thanks for the response @gappiah. I have a few questions about your suggestion:

    1. Does the use of localhost differ from using a dummy domain name?

    2. Would adding the port number to the WordPress Site Address work? I realize I would have to type the port number each time I wanted to reach the development website.

    I REALLY appreciate your help with this problem!

    Thread Starter Bill Vallance

    (@bvallance)

    Thanks, Steve, for the reply. The link to the pending WP 6.0 re: WebP was quite an interesting read.

    I have already used Site Tools to determine that the localhost website’s ImageMagick supports WebP and that the staged, hosted website’s ImageMagick does NOT support WebP. What I want to know is if uploading WebP images to a website where ImageMagick DOESN’T support WebP causes the generated WebP image sizes to be smaller than the uploaded WebP image (as expected). Essentially I’m asking if ImageMagick that DOESN’T support WebP simply creates thumbnails from the uploaded WebP image without attempting compression.

    Thread Starter Bill Vallance

    (@bvallance)

    Thanks, Bjorn, for the response. I’ll keep troubleshooting on my end. BTW – This is a GREAT plugin. Please keep up the good work!

    Thread Starter Bill Vallance

    (@bvallance)

    I downloaded the curl cacert.pem file and added the directives curl.cainfo = "C:\WAMP64\curl_certs\cacert.pem" and openssl.cafile = "C:\WAMP64\curl_certs\cacert.pem" to both the Apache php.ini and the PHP php.ini files as instructed in the first solution in this post. I restarted WampServer (which restarts Apache and PHP) and the Live Test still failed.

    Any ideas?

    Thread Starter Bill Vallance

    (@bvallance)

    Bjorn, it looks like the fix for the cURL error is using a particular CA certificate that prevents this error from occurring when the HTTPS request is made. Here’s the Stack Overflow post that discusses this.

    Thread Starter Bill Vallance

    (@bvallance)

    The test failed with a cURL error that the SSL certificate couldn’t be obtained. Here’s the exact message:

    Lets check that browsers supporting webp gets the WEBP when the JPEG is requested
    Making a HTTP request for the test image (pretending to be a client that supports webp, by setting the "Accept" header to "image/webp")
    Request URL: https://localhost/IST01/wp-content/uploads/webp-express-test-images/gE36d5.JPEG
    The remote request errored
    cURL error 60: SSL certificate problem: unable to get local issuer certificate
    The test cannot be completed, as the HTTP request FAILED. This does not neccesarily mean that the redirections aren't working, but it means you will have to check it manually. Check out the FAQ on how to do this. You might also want to check out why a simple HTTP request could not be issued. WebP Express uses such requests for detecting system capabilities, which are used when generating .htaccess files. These tests are not essential, but it would be best to have them working. I can inform that the WordPress function wp_remote_get was used for the HTTP request and the URL was: https://localhost/IST01/wp-content/uploads/webp-express-test-images/gE36d5.JPEG
    Deleting test images

    I’m using a self-signed SSL certificate on my website and haven’t had any problems in the localhost environment.

    Thread Starter Bill Vallance

    (@bvallance)

    Excellent! Thanks, Bjorn, for responding so fast to these issues. I look forward to the changes.

    Thread Starter Bill Vallance

    (@bvallance)

    I’ve continued to try to troubleshoot the issues I’m having with WebP Express. Here’s what’s transpired:

    1. I put garbage in the .htaccess file located in the uploads folder. The website didn’t render any images
    2. I put the .htaccess file that was generated by WebP Express back into the uploads folder and the site images rendered correctly. I used Chrome’s Developer Tools to see if .webp images were served, and they were. So, I know that the code in the .htaccess file that was generated by WebP Express does successfully redirect .jpg and .png images to their .webp equivalents.
    3. When I run the redirection Live Test it fails.
    4. When I run the test for the imagick converter it fails with a message about invalid path

    It appears that image redirection is working properly but the tests are failing. I have WordPress installed in a subdirectory beneath the www folder in WampServer (the equivalent of public_html on a public server). So, my WampServer development environment is setup so that each of my clients’ website in located in a separate follder located beneath the www folder.

    Hope This Helps,

    Thread Starter Bill Vallance

    (@bvallance)

    One additional piece of information I forgot to place in my last post – redirection to existing .webp files is working, even though the redirection test itself fails. I have confirmed this using Chrome’s Developer Tools per your documentation. Both .png and .jpg files are being redirected to their respective .webp files.

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