Giter Site home page Giter Site logo

Comments (23)

kelunik avatar kelunik commented on May 26, 2024

Which PHP SAPI is this running on? What does var_dump(PHP_SAPI); report?

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

Hi there, As I am a newbie on this I am not having much luck finding these details.
I am sorry as your script worked beautifully installing the certs.
Is there a way of determining or"Which PHP SAPI is this running on? What does var_dump(PHP_SAPI);"
I cant seem to get anything to tell me from the cli.?

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

You can just create a new test.php with the following contents and run it as cron and look at the output.

<?php

var_dump(PHP_SAPI);

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

hi there
i created the file and then ran it in my browser and got
string(9) "litespeed"
is this of use?
thanks again

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

If you access it from a browser it's probably another PHP SAPI. You really need to run it just like you ran the original script that failed.

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

ok
When i create the cron from cpanel I am using this:

To renew certificate, customer can set up cron job as under every month :

php acme-client/bin/acme issue --domains domain.com:www.domain.com --path /home/username/public_html:/home/username/public_html --server letsencrypt

i created the test.php and then ran this as a cron:

/usr/local/bin/php /home/petehillman/public_html/test.php

i set it for everyminute but its not sending anything through or i am not seeing output?
thanks

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

Maybe you only get the error output? Then try fputs(fopen("php://stderr"), PHP_SAPI);

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

Hi there
I a dont understand this you mean as replace the test.php with this code?
thanks

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

Ok heres the cron email i just got:

Status: 500 Internal Server Error
X-Powered-By: PHP/5.6.30
Content-type: text/html; charset=UTF-8

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

I guess your cron just calls the webserver and runs it. Is your acme-client installation accessible via the web browser?

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

I cant access that location via the webbrowser.
it looks like the cron for some reason using cpanel wont run this from the correct
location. Is there a way to run this from the cli and create an auto renew?
thanks

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

I don't know. Could you ask your hosting provider regarding that?

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

I have been on hold with them for almost a day. the issue i have is to just get it to renew on auto and there cron wont do it. what about manual renew is that simple?
thanks

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

You can also simply run acme-client issue every month, but your hosting provider really should run the cron with php-cli instead of any other PHP SAPI.

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

This is great help I am very thankful spent a ,ot of head scratching as its a crapy server and they are as helpful as a dead cat. I will try it and get back to you. thanks for your help

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

You could just add the following code at the beginning of bin/acme for now: https://stackoverflow.com/a/28898174/2373138

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

Hi there
brilliant
so when i added them i get this error via email:

Please run this script on the command line!
X-Powered-By: PHP/5.6.30
Content-type: text/html; charset=UTF-8

Does thsi mean anything?

thanks

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

You can either remove the check or add your PHP_SAPI for now.

acme-client/bin/acme

Lines 78 to 81 in f4cabf7

if (!in_array(PHP_SAPI, ["cli", "phpdbg"], true)) {
$climate->error("Please run this script on the command line!");
exit(1);
}

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

Hello and thanks
Can you say more about this: "add your PHP_SAPI for now."
I appreciate your help
thanks again

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

The thing you previously got from fputs(fopen("php://stderr"), PHP_SAPI);, but just remove the check.

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

Hi there I ran the issue at the command line and received this error:

selfVerify failed, please check http://www.petehillman.com/.well-known/acme-challenge/EoI-fBRTnai3OBQtw5_3j5LfHV__gN0_XdI4uMlxanM.
exception 'Kelunik\Acme\AcmeException' with message 'Issuance failed, not all challenges could be solved.' in /home/petehillman/acme-client/src/Commands/Issue.php:106

are you familiar with this?

thanks

from acme-client.

bomakalu avatar bomakalu commented on May 26, 2024

I see from another thread "I had the same problem, it drove me nuts for a whole day. Turned out I had set up .htaccess to allow access only from my IP. Don't know if this is issue in your case, but it's one thing you might check. I don't know what IP is acme-client using, but looking at logs I see that now it was 66.133.109.36."

I can see I will continue to get this error. Do you know of a way to allow the acme-client access via the htaccess file.
thanks mate its a head scratcher

from acme-client.

kelunik avatar kelunik commented on May 26, 2024

You need to allow public access, not only for acme-client, as the CA (Let's Encrypt) needs access, too.

from acme-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.