Magento 1 Request parameters get null array in controller

1.1k views Asked by At

Magento 1 Issue

I have an issue in getting request parameters values from URL. Same code in the local server and the live server. But in the local server have worked fine. but the issue in live server request parameters can't get it gets the null array of request parameters values from URL.

In Local Url :

http://local_url/tesmapi/customer/[email protected]&pwd=test

Output :

Array
(
    [uid] => [email protected]
    [pwd] => test
)

In Live Server Url :

http://live_url/tesmapi/customer/[email protected]&pwd=test

Output :

Array
(
)

Below code in customerController.php

public function loginAction() {

    $params = Mage::app()->getRequest()->getParams();

    echo "<pre>";
    print_r($params);
    echo "</pre>";

}

FYI: I have also tried below code but getting null value from URL in live server.

$uid = Mage::app ()->getRequest ()->getParam ( 'uid' );
$pwd = Mage::app ()->getRequest ()->getParam ( 'uid' );

and I have also tried to print $_GET but not working on the live server.

Can anyone please help me what I'm missing here on the live server.

0

There are 0 answers