What is the response for Woocommerce Cron Job?

Metalsniper63

Hello i have finally set up my crontab but the response that i'm getting is just the WebPage HTML, CSS and JS code, like it is just downloading the Page. 

I have set up my cron tab like this:

*/15 * * * * php7.1 /kunden/homepages/15/blablabla/htdocs/newpdv/index.php ecommerce cron http://myposinstalationURL



For obvious reasons i have changed the directory info and the POS Url, and what i'm getting in response is this:


<!DOCTYPE html>
<html>
<head>
    <title>Monkiko´s Store -- Desarrollado por PHP Point Of Sale</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <base href="http://localhost/" />
    <link rel="icon" href="http://localhost/favicon.ico" type="image/x-icon"/>

                                        <link rel="stylesheet" type="text/css" href="http://localhost/assets/css/all.css?1546375359" />

    <script src="http://localhost/assets/js/jquery.js?1546375359" type="text/javascript" language="javascript" charset="UTF-8"></script>
    <style type="text/css">
        body
        {
            padding: 5px;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function()
        {
            //If we have an empty username focus
            if ($("#username").val() == '')
            {
                $("#username").focus();                   
            }
            else
            {
                $("#password").focus();
            }

                                $(".checkForUpdate").click(function(event)
                                {
                                        event.preventDefault();
                                        $('#spin').removeClass('hidden');

                                        $.getJSON($(this).attr('href'), function(update_available) 
                                        {
                                                $('#spin').addClass('hidden');
                                                if(update_available)
                                                {
                                                        $(".checkForUpdate").parent().html("Hay una actualizaci\u00f3n disponible <a href=\"http:\/\/phppointofsale.com\/downloads.php\" target=\"_blank\">Descargar ahora<\/a>");
                                                }
                                                else
                                                {
                                                        $(".checkForUpdate").parent().html("La actualizaci\u00f3n no est\u00e1 disponible");
                                                }
                                        });

                                });
                });


    </script>

</head>
<body>  


    <div class="flip-container">
        <div class="flipper">
            <div class="front">
                <!-- front content -->
                <div class="holder">


                    <div class="heading login-logo">
                        <img src="http://localhost/index.php/app_files/view/1?timestamp=-62169958800" alt="" />                    </div> 
                    <form action="http://localhost/index.php/login?continue=" class="form login-form" id="loginform" autocomplete="off" method="post" accept-charset="utf-8">

                        <p>
                                                                        Bienvenido al sistema PHP Point of Sale. Para continuar, inicie sesión utilizando su ID de usuario y contraseña.                                                                </p>
                                                <input type="text" name="username" value="" id="username" class="form-control" placeholder="Usuario" size="20"  />

                        <input type="password" name="password" value="" id="password" class="form-control" placeholder="Contraseña" size="20"  />

                        <div class="bottom_info">
                            <a href="http://localhost/index.php/login/reset_password" class="pull-right flip-link to-recover">Olvidé mi contraseña?</a>

                                                            <span><a href="http://localhost/index.php/login/is_update_available" class="checkForUpdate pull-left">Buscar actualizaciones</a></span>&nbsp;
                                <span id="spin" class="hidden">
                                    <i class="ion ion-load-d ion-spin"></i>
                                </span>
                                                    </div>      
                        <div class="clearfix"></div>
                        <button type="submit" class="btn btn-primary btn-block">Iniciar sesión</button>
                    </form>  
                    <div class="version">
                        <p>
                            <span class="badge bg-success">16.3</span> Desarrollado el 29-01-2019 11:18 am EST                        </p>




                                            </div>                
                </div>
            </div>          
        </div>      
    </div>
</body>
</html>
 
 

Am i doing something wrong??

Comments

17 comments

  • Comment author
    Chris Muench

    Make sure you put full path to php executable. Also try running the command without the cron and see if we you get similar results. If you want to give me the exact command; send the info to support@phppointofsale.com

    0
  • Comment author
    Metalsniper63

    Hello Chris, i did as you said and deleted the CRON part from the crontab and the response was this:

     

    Status: 307 Temporary Redirect
    X-Powered-By: PHP/7.1.26
    Set-Cookie: phppos=bd598c91896d785dd76a1c31d29bc0a47d8a8820; expires=Tue, 26-Feb-2019 23:45:01 GMT; Max-Age=10800; path=/; HttpOnly
    Cache-Control: no-cache, no-store, must-revalidate
    Pragma: no-cache
    Expires: 0
    Location: https://
    Content-type: text/html; charset=UTF-8
    0
  • Comment author
    Chris Muench

    Did you put the full path to php something like /usr/bin/php? Also make sure your url has https:// (php pos url).

     

    If you open a private support ticket I would like to see your full command with url. I can also connect to your server and have a look too

    0
  • Comment author
    Metalsniper63

    Chris is there any way we could Chat?? this ticket system and the community are really not working for me, it takes too long for you to respond and when you do i'm not at the computer and it takes forever to get anywhere

    0
  • Comment author
    Metalsniper63

    Ok thank you Chris, it seems we finally are online at the same time.

    I will open a ticket to give you all the information.

    0
  • Comment author
    Metalsniper63

    I sent you a message trough Whatsapp

    0
  • Comment author
    Oliver Jimenez

    I have the same issue, Metalsniper63 are you solved it

    0
  • Comment author
    Chris Muench

    If you send a message to support@phppointofsale.com with your server info we can take a look

    0
  • Comment author
    Metalsniper63

    Olver Jimenez, in my case this was the issue:

     

    */15 * * * * php7.1 /kunden/homepages/15/blablabla/htdocs/newpdv/index.php ecommerce cron http://myposinstalationURL

     

     

    The correct form was to include -cli for PHP like this:

     

    */15 * * * * php7.1-cli /kunden/homepages/15/blablabla/htdocs/newpdv/index.php ecommerce cron http://myposinstalationURL
    0
  • Comment author
    Oliver Jimenez
    • Edited

    I add *-cli* but the response is the same html, css and js code. this is the structure

    */15 * * * * php -cli /home/wwwservidordemo/public_html/pos/index.php ecommerce cron https://pos.wwwservidordemo.com/


    I do too this structure and the result is same

    */15 * * * * /usr/bin/php -cli /home/wwwservidordemo/public_html/pos/index.php ecommerce cron https://titapapeleria.wwwservidordemo.com/

    if the -cli command I paste it either this way php-cli or /usr/bin/php-cli
    mark command error
    0
  • Comment author
    Chris Muench

    It would normally be php-cli NOT a space after php. But you would need to type which php-cli to find out where the full path is for php-cli

    0
  • Comment author
    Oliver Jimenez

    Good Morning Chris, what info do you need from my server

    0
  • Comment author
    Chris Muench

    Please email support@phppointofsale.com with your cpanel login

    0
  • Comment author
    Oliver Jimenez

    When I use PHP-CLI without space I get a command error

    0
  • Comment author
    Chris Muench

    Not all servers have php-cli. I would e-mail your host and ask them what is full path to php you should use for cron tasks

    0
  • Comment author
    Oliver Jimenez
    I already verified the php path with my provider and I am correct it must 
    be with /usr/bin/php
    and I already check the cron task and if it is executed correctly but
    still does not perform the update in the POS.
    0
  • Comment author
    Chris Muench

    */15 * * * * /usr/bin/php /home/wwwservidordemo/public_html/pos/index.php ecommerce cron https://pos.wwwservidordemo.com/

     

    You tried the above?

    0

Please sign in to leave a comment.