Magento 1.9 cannot make customer login, undefined offset + undefined variable - magento

I have a really strange problem. Yesterday I was working with magento just fine and today when I opened the pc and tried login on my account after cleaning cache & session it gives me this error on customer login:
Error occurred. Please try again later on the frontend.
I dig into the system.log and I have this:
ERR (3): Notice: Undefined offset: 158 in {...}/phpseclib/Math/BigInteger.php on line 3426 and 3317
ERR (3): Notice: Undefined variable: cmsPageIdentifier in {...}/default/template/page/html/header.phtml on line 29
and this is the code in question
Line 7-10:
if(Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms')
{
$cmsPageIdentifier = Mage::getSingleton('cms/page')->getIdentifier();
}
Line 29:
<?php elseif ($cmsPageIdentifier && $cmsPageIdentifier == "conferma-invio") : ?>
In sso.log I have this
DEBUG (7): HTTP status: 503 when trying to get user authentication
DEBUG (7): Field Status was empty in webapi response
Thank you.

I manually fixed the BigInteger and I remained only with the sso.log.
Dug into it and I found that there was another module error blocking customer login. Setting that module to false in app/etc/modules/Module_Name.xml fixed it.

Related

Laravel sporadic EncryptException "Could not encrypt the data." in EncryptCookies

We have a CentOS LAMP server with PHP5.6.37, openSSL 1.0.2, Laravel 5.4.
Sporadically we receive the following error:
exception 'Illuminate\Contracts\Encryption\EncryptException' with message 'Could not encrypt the data.' in ./Illuminate/Encryption/Encrypter.php:95
Stack trace:
#0 ./Illuminate/Cookie/Middleware/EncryptCookies.php(131): Illuminate\Encryption\Encrypter->encrypt('KoKVTECWZF4A8x7...')
#1 ./Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Cookie\Middleware\EncryptCookies->encrypt(Object(Illuminate\Http\Response))
The problematic code is:
$json = json_encode(compact('iv', 'value', 'mac'));
if (!is_string($json)) {
throw new EncryptException('Could not encrypt the data.');
}
These exceptions happen sporadically, all in the early morning hours (3AM-8AM) , sometimes there are no errors for couple of weeks, then they happen every consecutive day.
ATM we cannot switch to PHP7.
EDIT 1:
I have logged the values, where the program crashes during the night. If I rerun the code, I get normal response without an Exception.
$value = 'a51446732955fcf3bb467fc135741ae7956dc247d562b16157de231b8d792400';
$mac = 'Xdo0mGNCeX4p2AHj4cgbmounu3F2bql05uSmve7DDmUWpmMJ1ysmsSrGPg+57N52FxqszqDU5PBTGMihan7ZZQ==';
echo json_encode(compact('iv', 'value', 'mac'));
1{"iv":"yHUQHrhaXq7T+VikdvXuqQ==","value":"a51446732955fcf3bb467fc135741ae7956dc247d562b16157de231b8d792400","mac":"Xdo0mGNCeX4p2AHj4cgbmounu3F2bql05uSmve7DDmUWpmMJ1ysmsSrGPg+57N52FxqszqDU5PBTGMihan7ZZQ=="}```

Need some guidance regarding Elasticsearch php

I need some help in understanding the following things,
I am using composer for elasticsearch php integration. I have created a html page to post form data into elasticsearch. I am trying to access the html page from another pc by changing the localhost ip to the system ip where i have hosted the html page. But i'm getting error.
Fatal error: Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool.php:50 Stack trace: #0 C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Transport.php(77): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() #1 C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Transport.php(94): Elasticsearch\Transport->getConnection() #2 C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Connections\Connection.php(269): Elasticsearch\Transport->performRequest('POST', '/sib_api/_doc', Array, '{"requestid":"#...', Array) #3 C:\xampp\htdocs\Client_portal\vendor\react\promise\src\FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections{closure}(Array) #4 C:\xampp\htdocs\Client_portal\vendor\guzzlehttp\ringphp\sr in C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool.php on line 50
To resolve the above issue i tried to call the autoload.php file using the complete path (i.e) http://localhost:8080/client_portal/vendor/autoload.php
But now I am getting another error
Fatal error: Uncaught Error: Class 'Elasticsearch\ClientBuilder' not found in C:\xampp\htdocs\Client_portal\Elastic_api.php:19 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Client_portal\Elastic_api.php on line 19
Could someone help me to resolve this issue... and also guide me how to access my html page from another system without any isssues.
<?php
session_start();
$Engagement = $_SESSION["Engagement"];
$Application = $_SESSION["Application"];
$Priority = $_SESSION["Priority"];
$Requestid = $_SESSION["Requestid"];
$_SESSION["URL"] = $_POST['url'];
$_SESSION["REQ"] = $_POST['request'];
$_SESSION["RES"] = $_POST['response'];
$_SESSION["yn"] = $_POST['YN'];
$_SESSION["START"] = $_POST['start'];
$_SESSION["END"] = $_POST['end'];
if (isset($_POST['Submit2']))
{
require 'http://localhost:8080/client_portal/vendor/autoload.php';
$client = Elasticsearch\ClientBuilder::create()->build();
// the above line is where i'm getting the error...

codeigniter logging function not generate message

page show this error in codeigniter project but log file not generate error
its me first experience with logging function
so i do not know how to generate error
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: bottomstatus
Filename: views/template.php
Line Number: 65
Backtrace:
File: D:\xampp\htdocs\timehubzone\application\views\template.php
Line: 65
Function: _error_handler
codeigniter error status
$config['log_threshold'] = 1;
$config['log_path'] = '';
$config['log_file_extension'] = '';
In order to get notices logged too - you've to increase your threshold value
Instead of
$config['log_threshold'] = 1;
you simply have to change that to
$config['log_threshold'] = 2;
Be aware, this isn't useful for production environments - because your log file will get to big. You will find more information at the Codeigniter Documentation and at this SO post answered by Narf: CodeIgniter 3 - configuring log_threshold

Magento Import - Fatal error: Call to a member function prepareAttributesForSave() on a non-object in Product.php

When attempting to import a csv product file into magento it keeps staying at "please wait". After using firebug I found I was getting this error:
Fatal error: Call to a member function prepareAttributesForSave() on a non-object in /magento/app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php on line 1259
Here's line 1259 in product.php:
$rowData = $this->_productTypeModels[$productType]->prepareAttributesForSave($rowData);
$product = Mage::getModel('importexport/import_proxy_product', $rowData);
I am a complete newbie to PHP and am not sure how to fix this. I tried searching google, but didn't find anything related to this specific function.

" URL not found 404 error" after the 3rd page during Magento installation

I have been trying to install Magento 1.6 latest version and sample data magento sample-data- 1.1.2 but all in vain.I cannot get past the 3rd page,where database,username,URL etc information is added.When I click the continue button,I get 404 error “URL not found“ .After google search I found out that some guys reported similar problems that lead to some php files accessing the Mysql server.Those files seemed to have a syntax error of some kind.My problem is of similar nature but leads to a diffrent php file having an 'an access voilation'error.The url points to the report directory inside magento/var.
This is my report file in Public_html/magento/var/report
a:5:{i:0;s:223:"Error in file: "/home/archy/public_html/magento/app/code/core/Mage/Directory/sql/directory_setup/mysql4-upgrade-0.8.2-0.8.3.php" - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'AX' for key 'PRIMARY'";i:1;s:1022:"#0 /home/archy/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
I don’t understand how to solve the problem.Has anyone experienced similar problems.
New Addition..
I am really struggling with Magento!! I tried to install magento on my desktop(local server) after a failed attempt on my laptop(above).But I get I "Object not found error 404" after clicking the continue button in the configuration section of my installation.I have double checked my permissions on media, var,app directories.They are all 777.Sample date was installed before starting installation.The only option that I commented out in .htaccess was the the ExpireDefault which was causing "Internal Server Error"before being removed.
Here is the stack trace:
Mage_Core_Exception: Can't retrieve entity config: sales/quote_shipping_rate in /home/sam/public_html/magento/app/Mage.php on line 563
Call Stack:
0.0296 644264 1. {main}() /home/sam/public_html/magento/index.php:0
0.1808 1129872 2. Mage::run() /home/sam/public_html/magento/index.php:80
0.3326 2771544 3. Mage_Core_Model_App->run() /home/sam/public_html/magento/app/Mage.php:640
1.0335 4165088 4. Mage_Core_Model_App->_initModules() /home/sam/public_html/magento/app/code/core/Mage/Core/Model/App.php:338
5.2513 4490984 5. Mage_Core_Model_Resource_Setup::applyAllUpdates() /home/sam/public_html/magento/app/code/core/Mage/Core/Model/App.php:412
7.1161 9860936 6. Mage_Core_Model_Resource_Setup->applyUpdates() /home/sam/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php:235
7.1163 9861520 7. Mage_Core_Model_Resource_Setup->_upgradeResourceDb() /home/sam/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php:320
7.1163 9861600 8. Mage_Core_Model_Resource_Setup->_modifyResourceDb() /home/sam/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php:437
7.1792 9917352 9. include('/home/sam/public_html/magento/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.16-0.9.17.php') /home/sam/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php:624
7.1810 9918112 10. Mage_Sales_Model_Resource_Setup->addAttribute() /home/sam/public_html/magento/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.16-0.9.17.php:32
7.1810 9918112 11. Mage_Sales_Model_Resource_Setup->_flatTableExist() /home/sam/public_html/magento/app/code/core/Mage/Sales/Model/Resource/Setup.php:101
12.4649 9964680 12. Mage_Core_Model_Resource_Setup->getTable() /home/sam/public_html/magento/app/code/core/Mage/Sales/Model/Resource/Setup.php:87
12.4649 9964680 13. Mage_Core_Model_Resource->getTableName() /home/sam/public_html/magento/app/code/core/Mage/Core/Model/Resource/Setup.php:184
12.5666 10576032 14. Mage::throwException() /home/sam/public_html/magento/app/code/core/Mage/Core/Model/Resource.php:272
)
I couldn't find out what could have caused the problem.Help needed.
Thank you.
Check with the below script if your server or local meets the requirement to install magento
function extension_check($extensions) {
$fail = '';
if(version_compare(phpversion(), '5.2.0', '<')) {
$fail .= '<li>PHP 5.2.0 (or greater)</li>';
}
if(!ini_get('safe_mode')) {
if(preg_match('/[0-9].[0-9]+.[0-9]+/', shell_exec('mysql -V'), $version)) {
if(version_compare($version[0], '4.1.20', '<')) {
$fail .= '<li>MySQL 4.1.20 (or greater)</li>';
}
}
}
foreach($extensions as $extension) {
if(!extension_loaded($extension)) {
$fail .= '<li>'.$extension.'</li>';
}
}
if($fail) {
echo '<p>Your server does not meet the requirements for Magento.';
echo 'The following requirements failed:</p>';
echo '<ul>'.$fail.'</ul>';
} else {
echo '<p>Congratulations! Your server meets the requirements for Magento.</p>';
}
}
?>
STEP 2 : CHeck Max Execution time
Step 3: Install the Magento again with the version 1.6.0.0 as there were some problem at the first release or try with latest version 1.6.2.0
Let me know if it works or not

Resources