Jump to content

Why _GET not works on production server?


irina_b.

Recommended Posts

Hi, I have wrote module that correctly works on local server (PS v 1.6.1.9). But when I upload this module to the server with working-site (PS v 1.6.1.5), I get incorrect data from controller. In this module Ajax sent json to controller.

Controller-code:

 

$json = json_decode($_GET["Data"]);
 
$subject = "=?utf-8?B?" . base64_encode("Subject") . "?=";
$message = "Name: '".$json->name."'\nPhone: '".$json->phone."'.";
 
mail('[email protected]', $subject, $message, "Content-type: text/plain; charset=UTF-8\r\n");
 
echo json_encode('This is valid json.');
 
Local server sends correct data, but production server sends "Name ''\nPhone ''.". Can you help me?
 
And one question: after uploading my module to shop I can't enter into section "modules and services". Production server says: 
 [PrestaShop] Fatal error in module file :/var/www/a20160066/data/www/sandaly.com.ua/classes/helper/Helper.php:

Call to a member function createTemplate() on a non-object

Local server:

Fatal error: Call to a member function assign() on a non-object in D:\Web\OpenServer\domains\prestashop\classes\controller\Controller.php on line 624

[PrestaShop] Fatal error in module file :D:\Web\OpenServer\domains\prestashop\classes\controller\Controller.php:
Call to a member function assign() on a non-object

How to сorrect this mistake?

Edited by irina_b. (see edit history)
Link to comment
Share on other sites

In admin panel I connected the module to site. This module was without directory "view". Now I do not have access to section "modules and services" in admin panel. Production server says: 

 [PrestaShop] Fatal error in module file :/var/www/[any_data]/data/www/[my_site]/classes/helper/Helper.php:

Call to a member function createTemplate() on a non-object

Local server:

Fatal error: Call to a member function assign() on a non-object in D:\Web\OpenServer\domains\prestashop\classes\controller\Controller.php on line 624

[PrestaShop] Fatal error in module file \Web\OpenServer\domains\prestashop\classes\controller\Controller.php:
Call to a member function assign() on a non-object

 

This can be corrected by adding a folder 'view' with a template in the site architecture? If it possible, how?

Edited by irina_b. (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...