Cron error on line 240 from Mage/Core/Helper/Abstract.php












3














I will start by saying that I have not overwritten any core files (except the one noted below), and have disabled my theme. I'm am currently running on stock Magento 1.9.1. My website is not live, and I am accessing it via a modified hosts file to redirect my computer.



One thing that does concern me is that the server I'm installed on is running PHP version 5.2.17 natively. So in order to install Magento 1.9.1 I used PHP variable manager from Cpanel to set each of the top folders (app, downloader, media, skin, var, etc) .httaccess file to PHP 5.5. Everything has been working fine until I went to run cron.



I have left the cron settings in the back of magento as default, and have set cron in cpanel to run every 5 minutes.



My first issue was that cron would not launch. After looking online I saw that a known bug required




$isShellDisabled = true;




to be entered on line 49 in cron.php.I did this and cron started running. However it does not complete, and gives this error message.




Parse error: syntax error, unexpected T_FUNCTION in /home/*******/public_html/app/code/core/Mage/Core/Helper/Abstract.php on line 240




After looking online I saw that some say this is caused by wrong PHP version; however I also saw how some said the lines of code causing the error could be rewritten in a different way. I tried the code rewrite; however I then began getting multiple errors in lib/Pelago/Emogrifier.php. The errors were because of this "/" throughout the code. See below examples of the type of code syntax that was causing the errors.




throw new InvalidArgumentException



throw new BadMethodCallException



$xpath = new DOMXPath($xmlDocument);




I also got several errors of the same style as the one from mage/core/helper/Abstract.php.



Once I saw how many errors I was getting in this file, I realized that rewriting code was not the answer, and something must be setup wrong.



The only thing I can think of is that cron isn't functioning without the website being live? Or I'm having issues with my version of PHP? However my products, menus, transactional emails, ups shipping estimates, everything else is working.



Any ideas to point me in the right direction would be greatly appreciated!










share|improve this question



























    3














    I will start by saying that I have not overwritten any core files (except the one noted below), and have disabled my theme. I'm am currently running on stock Magento 1.9.1. My website is not live, and I am accessing it via a modified hosts file to redirect my computer.



    One thing that does concern me is that the server I'm installed on is running PHP version 5.2.17 natively. So in order to install Magento 1.9.1 I used PHP variable manager from Cpanel to set each of the top folders (app, downloader, media, skin, var, etc) .httaccess file to PHP 5.5. Everything has been working fine until I went to run cron.



    I have left the cron settings in the back of magento as default, and have set cron in cpanel to run every 5 minutes.



    My first issue was that cron would not launch. After looking online I saw that a known bug required




    $isShellDisabled = true;




    to be entered on line 49 in cron.php.I did this and cron started running. However it does not complete, and gives this error message.




    Parse error: syntax error, unexpected T_FUNCTION in /home/*******/public_html/app/code/core/Mage/Core/Helper/Abstract.php on line 240




    After looking online I saw that some say this is caused by wrong PHP version; however I also saw how some said the lines of code causing the error could be rewritten in a different way. I tried the code rewrite; however I then began getting multiple errors in lib/Pelago/Emogrifier.php. The errors were because of this "/" throughout the code. See below examples of the type of code syntax that was causing the errors.




    throw new InvalidArgumentException



    throw new BadMethodCallException



    $xpath = new DOMXPath($xmlDocument);




    I also got several errors of the same style as the one from mage/core/helper/Abstract.php.



    Once I saw how many errors I was getting in this file, I realized that rewriting code was not the answer, and something must be setup wrong.



    The only thing I can think of is that cron isn't functioning without the website being live? Or I'm having issues with my version of PHP? However my products, menus, transactional emails, ups shipping estimates, everything else is working.



    Any ideas to point me in the right direction would be greatly appreciated!










    share|improve this question

























      3












      3








      3


      2





      I will start by saying that I have not overwritten any core files (except the one noted below), and have disabled my theme. I'm am currently running on stock Magento 1.9.1. My website is not live, and I am accessing it via a modified hosts file to redirect my computer.



      One thing that does concern me is that the server I'm installed on is running PHP version 5.2.17 natively. So in order to install Magento 1.9.1 I used PHP variable manager from Cpanel to set each of the top folders (app, downloader, media, skin, var, etc) .httaccess file to PHP 5.5. Everything has been working fine until I went to run cron.



      I have left the cron settings in the back of magento as default, and have set cron in cpanel to run every 5 minutes.



      My first issue was that cron would not launch. After looking online I saw that a known bug required




      $isShellDisabled = true;




      to be entered on line 49 in cron.php.I did this and cron started running. However it does not complete, and gives this error message.




      Parse error: syntax error, unexpected T_FUNCTION in /home/*******/public_html/app/code/core/Mage/Core/Helper/Abstract.php on line 240




      After looking online I saw that some say this is caused by wrong PHP version; however I also saw how some said the lines of code causing the error could be rewritten in a different way. I tried the code rewrite; however I then began getting multiple errors in lib/Pelago/Emogrifier.php. The errors were because of this "/" throughout the code. See below examples of the type of code syntax that was causing the errors.




      throw new InvalidArgumentException



      throw new BadMethodCallException



      $xpath = new DOMXPath($xmlDocument);




      I also got several errors of the same style as the one from mage/core/helper/Abstract.php.



      Once I saw how many errors I was getting in this file, I realized that rewriting code was not the answer, and something must be setup wrong.



      The only thing I can think of is that cron isn't functioning without the website being live? Or I'm having issues with my version of PHP? However my products, menus, transactional emails, ups shipping estimates, everything else is working.



      Any ideas to point me in the right direction would be greatly appreciated!










      share|improve this question













      I will start by saying that I have not overwritten any core files (except the one noted below), and have disabled my theme. I'm am currently running on stock Magento 1.9.1. My website is not live, and I am accessing it via a modified hosts file to redirect my computer.



      One thing that does concern me is that the server I'm installed on is running PHP version 5.2.17 natively. So in order to install Magento 1.9.1 I used PHP variable manager from Cpanel to set each of the top folders (app, downloader, media, skin, var, etc) .httaccess file to PHP 5.5. Everything has been working fine until I went to run cron.



      I have left the cron settings in the back of magento as default, and have set cron in cpanel to run every 5 minutes.



      My first issue was that cron would not launch. After looking online I saw that a known bug required




      $isShellDisabled = true;




      to be entered on line 49 in cron.php.I did this and cron started running. However it does not complete, and gives this error message.




      Parse error: syntax error, unexpected T_FUNCTION in /home/*******/public_html/app/code/core/Mage/Core/Helper/Abstract.php on line 240




      After looking online I saw that some say this is caused by wrong PHP version; however I also saw how some said the lines of code causing the error could be rewritten in a different way. I tried the code rewrite; however I then began getting multiple errors in lib/Pelago/Emogrifier.php. The errors were because of this "/" throughout the code. See below examples of the type of code syntax that was causing the errors.




      throw new InvalidArgumentException



      throw new BadMethodCallException



      $xpath = new DOMXPath($xmlDocument);




      I also got several errors of the same style as the one from mage/core/helper/Abstract.php.



      Once I saw how many errors I was getting in this file, I realized that rewriting code was not the answer, and something must be setup wrong.



      The only thing I can think of is that cron isn't functioning without the website being live? Or I'm having issues with my version of PHP? However my products, menus, transactional emails, ups shipping estimates, everything else is working.



      Any ideas to point me in the right direction would be greatly appreciated!







      php ce-1.9.1.0 cron






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 23 '15 at 7:31









      SeanMSeanM

      1338




      1338






















          1 Answer
          1






          active

          oldest

          votes


















          4














          Solved: It was the PHP version of Cron Jobs.



          The PHP version was set correctly for the site which is why it was working; however Cron Jobs was running at server native PHP 5.2 which is why I was getting the errors only when running Cron.



          Changed Cron command:



          php /home/mydomainname/public_html/cron.php
          to
          php55 /home/mydomainname/public_html/cron.php





          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "479"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f61628%2fcron-error-on-line-240-from-mage-core-helper-abstract-php%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            Solved: It was the PHP version of Cron Jobs.



            The PHP version was set correctly for the site which is why it was working; however Cron Jobs was running at server native PHP 5.2 which is why I was getting the errors only when running Cron.



            Changed Cron command:



            php /home/mydomainname/public_html/cron.php
            to
            php55 /home/mydomainname/public_html/cron.php





            share|improve this answer


























              4














              Solved: It was the PHP version of Cron Jobs.



              The PHP version was set correctly for the site which is why it was working; however Cron Jobs was running at server native PHP 5.2 which is why I was getting the errors only when running Cron.



              Changed Cron command:



              php /home/mydomainname/public_html/cron.php
              to
              php55 /home/mydomainname/public_html/cron.php





              share|improve this answer
























                4












                4








                4






                Solved: It was the PHP version of Cron Jobs.



                The PHP version was set correctly for the site which is why it was working; however Cron Jobs was running at server native PHP 5.2 which is why I was getting the errors only when running Cron.



                Changed Cron command:



                php /home/mydomainname/public_html/cron.php
                to
                php55 /home/mydomainname/public_html/cron.php





                share|improve this answer












                Solved: It was the PHP version of Cron Jobs.



                The PHP version was set correctly for the site which is why it was working; however Cron Jobs was running at server native PHP 5.2 which is why I was getting the errors only when running Cron.



                Changed Cron command:



                php /home/mydomainname/public_html/cron.php
                to
                php55 /home/mydomainname/public_html/cron.php






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 24 '15 at 7:58









                SeanMSeanM

                1338




                1338






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f61628%2fcron-error-on-line-240-from-mage-core-helper-abstract-php%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    1300-talet

                    1300-talet

                    Display a custom attribute below product name in the front-end Magento 1.9.3.8