On local server its working perfectly but on server it generates below error. #CS-Cart
TypeError
Message
Tygh\Storefront\RelationsManager::__construct(): Argument #3 ($schema) must be of type array, bool given, called in /home/u434437461/domains/innbzz.online/public_html/app/Tygh/Providers/StorefrontProvider.php on line 136
Error at
app/Tygh/Storefront/RelationsManager.php, line: 47
Backtrace
File:app/Tygh/Providers/StorefrontProvider.php
Line:136
Function:__construct
File:app/lib/vendor/pimple/pimple/src/Pimple/Container.php
Line:118
Function:Tygh\Providers\{closure}
File:app/Tygh/Application.php
Line:135
Function:offsetGet
File:app/Tygh/Providers/StorefrontProvider.php
Line:92
Function:offsetGet
File:app/lib/vendor/pimple/pimple/src/Pimple/Container.php
Line:118
Function:Tygh\Providers\{closure}
File:app/Tygh/Application.php
Line:135
Function:offsetGet
File:app/Tygh/Providers/StorefrontProvider.php
Line:72
Function:offsetGet
File:app/lib/vendor/pimple/pimple/src/Pimple/Container.php
Line:118
Function:Tygh\Providers\{closure}
File:app/Tygh/Application.php
Line:135
Function:offsetGet
File:app/Tygh/Providers/StorefrontProvider.php
Line:158
Function:offsetGet
File:app/lib/vendor/pimple/pimple/src/Pimple/Container.php
Line:118
Function:Tygh\Providers\{closure}
File:app/Tygh/Application.php
Line:135
Function:offsetGet
File:app/functions/fn.init.php
Line:634
Function:offsetGet
File:app/functions/fn.init.php
Line:1200
Function:fn_init_layout
File:init.php
Line:179
Function:fn_init
File:index.php
Line:24
Function:require
Database connected. Execution is working but in flow of execution, I am getting this error.
Related
So basically I have been looking for a solution for like two days straight and nothing seems to be helping.
I am using Roundcube mail client with IMAP, postfixadmin and dovecot and whenever I try to upload attachments, I get an internal server error.
Here is something I managed to catch in logs:
[11-Nov-2021 01:41:27 UTC] PHP Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, null given in /var/www/roundcube/program/lib/Roundcube/rcube_imap_generic.php:430
Stack trace:
#0 /var/www/roundcube/program/lib/Roundcube/rcube_imap_generic.php(430): fclose()
#1 /var/www/roundcube/program/lib/Roundcube/rcube_imap_generic.php(1149): rcube_imap_generic->closeSocket()
#2 /var/www/roundcube/program/lib/Roundcube/rcube_imap.php(215): rcube_imap_generic->closeConnection()
#3 /var/www/roundcube/program/lib/Roundcube/rcube.php(1038): rcube_imap->close()
#4 /var/www/roundcube/program/include/rcmail.php(921): rcube->shutdown()
#5 [internal function]: rcmail->shutdown()
#6 {main}
thrown in /var/www/roundcube/program/lib/Roundcube/rcube_imap_generic.php on line 430
There are a lot of settings all around the server so if you think that you need some of them for debugging, just ask and I'll happily put them here
EDIT: I made a quick video with all the things going on. You can see that upload "failed" with internal server error message, but after refreshing the page, attachment is there and it's being sent with email, and after receiving that email, I can't see attachment preview in email, but when I click on it I can see it and download it.
After a few long days, I finally managed to figure this out on my own, and it's really simple. So what's happening is that rounducbe is trying to close file that doesn't exist.
So, to all of you who are facing with the same problem, to fix this you have to edit file "path/to/roundcube/program/lib/Roundcube/rcube_imap_generic.php" on line 430
Change this:
protected function closeSocket()
{
#fclose($this->fp);
$this->fp = null;
}
Into this:
protected function closeSocket()
{
if($this->fp){
#fclose($this->fp);
}
$this->fp = null;
}
Hi I have problem with importing csv files into my magento 1.9 store. After pressing start this happens
I've checked apache error.log and this is error:
PHP Fatal error: Uncaught DivisionByZeroError: Modulo by zero in
C:\xampp\htdocs\magmi-git\magmi\engines\magmi_productimportengine.php:1134\nStack
trace:\n#0
C:\xampp\htdocs\magmi-git\magmi\engines\magmi_productimportengine.php(944):
Magmi_ProductImportEngine->processDataSourceLine(Array, 0,
1593608380.9801, 1593608380.9801, 0, 0)\n#1 C:\xampp\htdocs\magmi-git\magmi\inc\magmi_engine.php(454):
Magmi_ProductImportEngine->engineRun(Array)\n#2
C:\xampp\htdocs\magmi-git\magmi\web\magmi_run.php(36):
Magmi_Engine->run(Array)\n#3 {main}\n thrown in
C:\xampp\htdocs\magmi-git\magmi\engines\magmi_productimportengine.php
on line 1134, referer:
http://127.0.0.1/magmi-git/magmi/web/magmi.php?ts=1593608379
Next I looked up into line 1134 of magmi_productimportengine.php and this is the line which causes problems i think:
if ($this->_current_row % $rstep == 0) {
$this->reportStats($this->_current_row, $tstart, $tdiff, $lastdbtime, $lastrec);
}
So simply I have deleted it as well as extracting the line inside if to be executed always. It got rid of being stuck on Initialized attrribute_set_infos but here is another problem, which i can't resolve by myself.
So here I am asking for your help! Maybe one of you can help me?
Some SFTP credential works fine for below open source, but some credential throwing below error. what is the root cause for the below error, i saw some threads they posted some workouts, but those solutions does not worked for me.
Why i am getting below error, what will be the solution.
open source: phpseclib
Error: Bellow Error
Warning: unpack() [function.unpack]: Type C: not enough input, need 1, have 0 in \Net\SSH2.php on line 1469
Warning: extract() expects parameter 1 to be array, boolean given in \Net\SSH2.php on line 1469
https://github.com/phpseclib/phpseclib/blob/master/phpseclib/Net/SSH2.php#L1538
What is on your line 1469? The version you linked to has this on line 1469:
while ($this->decrypt_block_size > strlen($iv)) {
Your link is to line 1538, which is this:
break;
If you could post the three lines before and after, too, that'd be great.
Thanks!
I know this is an older question and it's been down-rated, but I am actually having the same error. It happens intermittently, so it's hard to troubleshoot. My errors are referencing line 2127 of \Net\SSH2.php. Here is that line, plus a few surrounding lines:
2121 $response = $this->_get_binary_packet();
2122 if ($response === false) {
2123 user_error('Connection closed by server');
2124 return false;
2125 }
2127 extract(unpack('Ctype', $this->_string_shift($response, 1)));
2129 switch ($type) {
2130 case NET_SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ: // in theory, the password can be changed
2131 if (defined('NET_SSH2_LOGGING')) {
This is the syntax that I'm using to copy a file from an external server to my own after logging in:
$sftp->get('/remote/file/path/file.csv', 'myfile.csv');
Here's the link to the page: https://files.maf.org/mp/forms/ChangePL.php
Actually, that page isn't accessed directly normally, but inside an iframe via https://www.maf.org/change
I will say that I've never produced the error when going to the direct link; only accessing it from the parent page via the iframe. Why would that be the case?
I get a notice from my php-script:
Undefined offset: 32 in C:\xampp\htdocs\WWW\myfilexyz.php on line 74
I want to detect where the error occurs as the procedure which produces the error is called many times.
I added the following line of code:
error_log("you made a mistake", 3, "errorfile.log");
Looking into errorfile.log, the message appears 3 times, but the procedure is called more than 100 times. How can I find the 3 lines where the error is produced?
I would like to see sometime like:
"you made a mistake, called from line 234 from start.php"
The easiest is to use a proper error handler which provides a stacktrace for each error. You can install xdebug, which outputs a lot more details about an error when activated. While you're at it, look into using xdebug to hook up a debugger (read xdebug's documentation).
Alternatively write your own error handler which uses debug_backtrace to give you a decent stacktrace.
$err = error_get_last();
error_log($err['message'] . ' in ' . $err['file'] . ' on line' . $err['line'], 3, "errorfile.log");
Deployed a quick cloud server just to host a MongoDB to tinker with it out of curiosity. It's installed and works. Made a test DB/Table like this:
db.items.insert({ name: 'eggs', quantity: 10, price: 1.50 })
db.items.insert({ name: 'bacon', quantity: 3, price: 3.50 })
db.items.insert({ name: 'tomatoes', quantity: 30, price: 0.50 })
When I run db.items.find({}) all the items appear and all is well.
Now in PHP when I connect to that database from a different server I do this:
// open connection to MongoDB server
$conn = new Mongo('mongodb://theAdmin:Gold1234#165.225.130.252:27017');
// access database
$db = $conn->test;
// access collection
$collection = $db->items;
// execute query
// retrieve all documents
$cursor = $collection->find();
// iterate through the result set
// print each document
echo $cursor->count() . ' document(s) found. <br/>';
foreach ($cursor as $obj) {
echo 'Name: ' . $obj['name'] . '<br/>';
echo 'Quantity: ' . $obj['quantity'] . '<br/>';
echo 'Price: ' . $obj['price'] . '<br/>';
echo '<br/>';
}
and I get this error:
Fatal error: Uncaught exception 'MongoConnectionException' with
message 'Failed to connect to: 165.225.130.252:27017: Transport
endpoint is not connected' in /home/moosex/public_html/info.php:4
Stack trace: #0 /home/moosex/public_html/info.php(4):
Mongo->__construct('mongodb://[theA...') #1 {main} thrown in
/home/moosex/public_html/info.php on line 4
I've looked up and tried several different ways to connect and still can't get it. How am I supposed to connect remotely?
BTW, that is the actual username password and address to that server(there's nothing on there except for eggs bacon and tomatoes), if you can connect to it, god bless you lol.
To be able to debug "random weirdness" like this, it is very useful to turn on the internal driver logging.
The driver does whole lot of things behind the scenes, and can spit out all sort of important debug information.
Add the following at the top of your script:
<?php
MongoLog::setLevel(MongoLog::ALL);
MongoLog::setModule(MongoLog::ALL);
?>
By default the logger will spew out "php error messages" (E_NOTICE/E_WARNING), if you have error_log enabled, make sure to check that file for the results.
For your (slightly modified) connection string, I get the following results
Notice: PARSE INFO: Parsing mongodb://theAdmin:Gold1234#localhost:27027 in Command line code on line 1
Notice: PARSE INFO: - Found user 'theAdmin' and a password in Command line code on line 1
Notice: PARSE INFO: - Found node: localhost:27027 in Command line code on line 1
Notice: PARSE INFO: - Connection type: STANDALONE in Command line code on line 1
Notice: PARSE INFO: - No database name found for an authenticated connection. Using 'admin' as default database in Command line code on line 1
Notice: CON INFO: mongo_get_read_write_connection: finding a STANDALONE connection in Command line code on line 1
Notice: CON INFO: connection_create: creating new connection for localhost:27027 in Command line code on line 1
Notice: CON WARN: connection_create: error while creating connection for localhost:27027: Invalid argument in Command line code on line 1
Notice: CON WARN: Couldn't connect to 'localhost:27027': Invalid argument in Command line code on line 1
I suspect a firewall issue at either end.. Can you connect to the server using the mongo shell?