So I'm writing a chat with a php socket server.
CODE:
http://pastebin.com/v5XKkfyy
If i try to debug by
print_r($read);
just before line 75 i get this output
Array
(
[2] => Resource id #6
[0] => Resource id #4
)
PHP Warning: socket_select(): 6 is not a valid Socket resource in /var/www/chat/server.php on line 75
Warning: socket_select(): 6 is not a valid Socket resource in /var/www/chat/server.php on line 75
PHP Warning: socket_select(): 6 is not a valid Socket resource in /var/www/chat/server.php on line 75
Warning: socket_select(): 6 is not a valid Socket resource in /var/www/chat/server.php on line 75
Array
(
[0] => Resource id #4
)
This is happening just as i call line 424.
Someone on freenode #php said i mite be passing an integer instead of a socket resource. I find that hard to belive.
Hope one of you can help me.
We found the answer on freenode.
To fix this i had to comment out line 427:
socket_close($client[$i]['sock']);
Thanks everybody!
Related
I have an error notice in the visual constructor of my web page (jupiter)
That error says:
Warning: Illegal string offset 'pro_widgets' in /home/customer/www/gedysa.com/public_html/wp-content/plugins/elementor/includes/api.php on line 164
Warning: Illegal string offset 'pro_widgets' in /home/customer/www/gedysa.com/public_html/wp-content/plugins/elementor/includes/api.php on line 167
I have gone where apparently the problem is, in the php archive of jupiter plugin and it look like this:
164 $data['pro_widgets'] = [];
165 }
166
167 return $data['pro_widgets'];
but I dont know what to do.
Could somebody help me??
This project worked for sometime and i haven't done any changes to it. One day, i was just curious and decided to check on it but now it doesn't work anymore.
Notice: Undefined index: type in
/Applications/XAMPP/xamppfiles/htdocs/icilending/web/actions.php on
line 5
Warning: call_user_func() expects parameter 1 to be a valid callback,
second array member is not a valid method in
/Applications/XAMPP/xamppfiles/htdocs/icilending/web/actions.php on
line 5
Code:
require_once("../src/inc/init.php");
call_user_func([new Controller, $_POST['type']]);
I have some code that looks exactly like this:
$result = $client->getObject(array(
'Bucket' => $bucket,
'Key' => 'data.txt',
'SaveAs' => '/tmp/data.txt'
));
its one of the examples listed here: http://docs.aws.amazon.com/aws-sdk-php-2/latest/class-Aws.S3.S3Client.html#_getObject
unfortunately I get this fatal error:
PHP Warning: Missing argument 2 for AmazonS3::get_object() in /var/www/CronJobs/aws-sdk- for-php/services/s3.class.php on line 1489
PHP Notice: Undefined variable: filename in /var/www/CronJobs/aws-sdk-for-php/services/s3.class.php on line 1495
PHP Warning: preg_match() expects parameter 2 to be string, array given in /var/www/CronJobs/aws-sdk-for-php/services/s3.class.php on line 1042
PHP Warning: preg_match() expects parameter 2 to be string, array given in /var/www/CronJobs/aws-sdk-for-php/services/s3.class.php on line 1043
PHP Notice: Array to string conversion in /var/www/CronJobs/aws-sdk-for-php/services/s3.class.php on line 548
PHP Fatal error: Uncaught exception 'S3_Exception' with message 'S3 does not support "Array" as a valid bucket name. Review "Bucket Restrictions and Limitations" in the S3 Developer Guide for more information.' in /var/www/CronJobs/aws-sdk-for-php/services/s3.class.php:548
Stack trace:
0 /var/www/CronJobs/aws-sdk-for-php/services/s3.class.php(1530): AmazonS3->authenticate(Array, Array)
1 [internal function]: AmazonS3->get_object(Array)
2 /var/www/CronJobs/aws-sdk-for-php/sdk.class.php(436): call_user_func_array(Array, Array)
3 /var/www/CronJobs/leefomatic/index.php(70): CFRuntime->__call('getObject', Array)
4 /var/www/CronJobs/leefomatic/index.php(70): AmazonS3->getObject(Array)
5 {main}
thrown in /var/www/CronJobs/aws-sdk-for-php/services/s3.class.php on line 548
in my script I am currently listObject, copy_object and delete_option just fine. Any thoughts as to why a fatal error comes up on a getObject?
Thanks.
It looks like you are using the SDK 2.x documentation with SDK 1.x code. The filenames (e.g., s3.class.php, sdk.class.php) output in the error block you have shown definitely indicate that you are using SDK 1.x code. You either need to install the newer and better supported SDK 2.x (here are some instructions), or use the SDK 1.x docs.
I got this error log few days ago
PHP Warning: Invalid argument supplied for foreach() in /home/karatm/public_html/wp-content/plugins/gantry/bugfixes.php on line 52<br>
PHP Warning: Invalid argument supplied for foreach() in /home/karatm/public_html/wp-content/plugins/gantry/bugfixes.php on line 52<br>
PHP Warning: Invalid argument supplied for foreach() in /home/karatm/public_html/wp-content/plugins/gantry/bugfixes.php on line 102<br>
This is line 52 from bugfixes.php:
foreach($sidebar_contents as $sidebar_contents_id => &$sidebar_widget_instance)
This is line 102 from bugfixes.php:
foreach ($override_sidebar as $position => &$sbw_instances)
What this error mean, how can i fix this ?
(if someone can help me, i can send him the full .php file)
Thanks
foreach ($override_sidebar as $position => &$sbw_instances)
try to remove &
try this
foreach ($override_sidebar as $position => $sbw_instances)
I'm running Magento 1.6.2.0.
I noticed in system.log every time an order is placed these 3 lines:
2012-12-19T15:37:00+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Core_Controller_Varien_Action::__construct() must be an instance of Zend_Controller_Request_Abstract, array given, called in /chroot/home/saucench/saucencheese.com/html/app/code/core/Mage/Core/Model/Config.php on line 1351 and defined in /chroot/home/saucench/saucencheese.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php on line 138
2012-12-19T15:37:00+00:00 ERR (3): Recoverable Error: Argument 2 passed to Mage_Core_Controller_Varien_Action::__construct() must be an instance of Zend_Controller_Response_Abstract, none given, called in /chroot/home/saucench/saucencheese.com/html/app/code/core/Mage/Core/Model/Config.php on line 1351 and defined in /chroot/home/saucench/saucencheese.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php on line 138
2012-12-19T15:37:00+00:00 ERR (3): Notice: Undefined variable: response in /chroot/home/saucench/saucencheese.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php on line 141
So apparently the variable "response" isn't defined. Would anyone be able to help me locate the source that's causing this error? It can't be in the Config.php or Action.php since I've never modified those.
Thank you.
It's on this file
/chroot/home/saucench/saucencheese.com/.../Core/Controller/Varien/Action.php
on line 141
See what is happening there and make sure the $variables are defined.