Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PayOne Modul in Incompatibility #8

Open
mklooss opened this issue Jan 21, 2015 · 5 comments
Open

PayOne Modul in Incompatibility #8

mklooss opened this issue Jan 21, 2015 · 5 comments

Comments

@mklooss
Copy link

mklooss commented Jan 21, 2015

Modul Version: 3.3.0
HHVM: 3.1 to 3.5

Issues:

  • HHVM could not handle references in foreach
  • include_path issues in file_get_contents
@helmut-hoffer-von-ankershoffen

Hi,

we are using HHVM 3.8 with Magento 1.9 which results in the following error report. Should this combination work?

Best Regards

a:5:{i:0;s:58:"Call to a member function toArray() on a non-object (NULL)";i:1;s:3735:"#0 /home/hauptstadtkoffer/public_html/app/code/community/Payone/Core/Model/Service/InitializeConfig.php(86): Payone_Core_Model_Service_InitializeConfig->initConfigPayment()
#1 /home/hauptstadtkoffer/public_html/app/code/community/Payone/Core/Helper/Config.php(44): Payone_Core_Model_Service_InitializeConfig->execute()
#2 /home/hauptstadtkoffer/public_html/app/code/community/Payone/Core/Helper/Config.php(81): Payone_Core_Helper_Config->getConfigStore()
#3 /home/hauptstadtkoffer/public_html/app/code/community/Payone/Core/Helper/Config.php(126): Payone_Core_Helper_Config->getConfigPayment()
#4 /home/hauptstadtkoffer/public_html/app/code/community/Payone/Core/Model/Payment/Method/Abstract.php(106): Payone_Core_Helper_Config->getConfigPaymentByQuote()
#5 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Payment/Helper/Data.php(73): Payone_Core_Model_Payment_Method_Abstract->isAvailable()
#6 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Payment/Block/Form/Container.php(113): Mage_Payment_Helper_Data->getStoreMethods()
#7 /home/hauptstadtkoffer/public_html/app/code/community/Payone/Core/Block/Checkout/Onepage/Payment/Methods.php(56): Mage_Payment_Block_Form_Container->getMethods()
#8 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Payment/Block/Form/Container.php(46): Payone_Core_Block_Checkout_Onepage_Payment_Methods->getMethods()
#9 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Payment_Block_Form_Container->_prepareLayout()
#10 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout()
#11 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock()
#12 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock()
#13 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock()
#14 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks()
#15 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks()
#16 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks()
#17 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#18 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#19 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Checkout/controllers/OnepageController.php(212): Mage_Core_Controller_Varien_Action->loadLayout()
#20 /home/hauptstadtkoffer/public_html/app/code/community/IWD/Opc/controllers/Checkout/OnepageController.php(38): Mage_Checkout_OnepageController->indexAction()
#21 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): IWD_Opc_Checkout_OnepageController->indexAction()
#22 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch()
#23 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match()
#24 /home/hauptstadtkoffer/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#25 /home/hauptstadtkoffer/public_html/app/Mage.php(684): Mage_Core_Model_App->run()
#26 /home/hauptstadtkoffer/public_html/index.php(88): Mage::run()
#27 {main}";s:3:"url";s:21:"/de/checkout/onepage/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:2:"de";}

@mklooss
Copy link
Author

mklooss commented Jul 8, 2015

we are using in the checkout process only PHP but for the rest of the store hhvm,
so you do not have any issue with the payment providers...

which HTTP Daemon you are using?

@helmut-hoffer-von-ankershoffen

@mklooss:

  1. as webserver we use:

httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Aug 7 2014 14:28:12

  1. how do you restrict hhvm to be only used for certain locations / url-patterns?

we currently connect hhvm to apache via

ProxyPassMatch ^/(..php(/(?!admin).)?)$ fcgi://127.0.0.1:9000/home/DELETED/public_html/

@mklooss
Copy link
Author

mklooss commented Jul 22, 2015

@heimuthva

we are using nginx, so our rules be like:

  location ~ (index.php/)?checkout/* {
    include /etc/nginx/php/customer;

    try_files /index.php =404;
  }
  location ~ (index.php/)?paypal/ipn/* {
    include /etc/nginx/php/customer;

    try_files /index.php =404;
  }

  location ~ (index.php/)?contacts/* {
    include /etc/nginx/php/customer;

    try_files /index.php =404;
  }

  location ~ (index.php/)?sales/* {
    include /etc/nginx/php/customer;

    try_files /index.php =404;
  }

  location ~ (index.php/)?payone_core/transactionStatus* {
    include /etc/nginx/php/customer;

    try_files /index.php =404;
  }

@helmut-hoffer-von-ankershoffen

@mklooss: thx for the input.

As Proxypassmatch of Apache is rather unflexible, i solved the problem of using hhvm for most of the Magento frontend but not for Checkout Pages, Admin-Backend etc. as follows (for whom it might interest):

  1. Create Magento front-controller for HHVM

In Magento Document-Root:

ln -s index.php hhvm.php

  1. Rewrite to hhvm-frontcontroller based on some conditions (e.g. exclude all paths containing admin, checkout and ipn)

edit .htaccess as follows

[...|
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.(admin|checkout|ipn).$
RewriteRule . /hhvm.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
[...]

  1. Proxy to HHVM only for hhvm-front-controller

in Apache httpd.conf

ProxyPassMatch ^/(hhvm.php(/.*)?)$ fcgi://127.0.0.1:9000/{your document root}

Regards

P.S.: cp. http://hauptstadtkoffer.de for an example of the achievable speedup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants