broken command line while using tinker in laravel - php

what is the cause of the error?
following my error messages :
ErrorException with message 'streamselect(): unable to select [4]: Interrupted system call (maxfd=9)'
[root#localhost ]# E
Exit: Ctrl+D
PHP Notice: fwrite(): send of 1270 bytes failed with errno=32 Broken pipe in /laravel_path/vendor/psy/psysh/src/Psy/ExecutionLoop/ForkingLoop.php on line 83

Related

Unable to Launch Octane RoadRunner Server for PHP 8.0

Octane is installed with roadrunner while following the official guide, on the Ubuntu 18.04 server. Each step works as expected until the server is started:
php artisan octane:start --server=roadrunner --port=8181
Then, an error is received and the command exits. The complete stacktrace is attached:
INFO Server running…
Local: http://127.0.0.1:8181
Press Ctrl+C to stop the server
INFO [INFO] RoadRunner server started; version: 2.6.3, buildtime: 2021-12-03T11:37:00+0000
PHP Warning: require(/path/vendor/bin/bootstrap.php): Failed to open stream: No such file or directory in /path/vendor/bin/roadrunner-worker on line 18
PHP Fatal error: Uncaught Error: Failed opening required '/path/vendor/bin/bootstrap.php' (include_path='.:/usr/share/php') in /path/vendor/bin/roadrunner-worker:18
Stack trace:
#0 {main}
thrown in /path/vendor/bin/roadrunner-worker on line 18
INFO error occurred: WorkerAllocate:
INFO goridge_frame_receive: EOF, plugin: http.Plugin
ERROR 2021-12-07T12:01:53.048Z ERROR container/poller.go:16 vertex got an error {"id": "http.Plugin", "error": "WorkerAllocate:\n\tgoridge_frame_receive: EOF"}
ERROR github.com/spiral/endure/pkg/container.(*Endure).poll.func1
ERROR github.com/spiral/endure#v1.0.10/pkg/container/poller.go:16
ERROR handle_serve_command: WorkerAllocate:
ERROR goridge_frame_receive: EOF
Since roadrunner is based on go, I don't have much insights on how to navigate through the error. Please let me know if anyone has solved this issue before, thanks.
You should fix all warnings like this one: PHP Warning: require(/path/vendor/bin/bootstrap.php): Failed to open stream: No such file or directory in /path/vendor/bin/roadrunner-worker on line 18
These warnings appear in the stdout, but stdout is used as a process fd to communicate with the RR. That means if some data is sent to the stdout (like PHP warning) before RR initializes all processes (aka worker), RR will stop allocating the workers and exit with code 1.

PHP file not running in CRON/CLI

I have to run a php file every 5 seconds , and have two issues
1. The file works perfectly when opened in a browser, but running the 'php myfile.php' command fails and produces the following error
PHP Warning: include_once(../tutadmin/config/config.php): failed to open stream: No such file or directory in /var/www/html/cron/teacher_status_cron.php on line 3
PHP Warning: include_once(): Failed opening '../tutadmin/config/config.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/cron/teacher_status_cron.php on line 3
PHP Notice: Use of undefined constant TBL_USER - assumed 'TBL_USER' in /var/www/html/cron/teacher_status_cron.php on line 5
PHP Notice: Use of undefined constant TEACHER_USER_GROUP_ID - assumed 'TEACHER_USER_GROUP_ID' in /var/www/html/cron/teacher_status_cron.php on line 9
PHP Notice: Undefined variable: current_user_id in /var/www/html/cron/teacher_status_cron.php on line 14
PHP Notice: Undefined variable: current_date_time in /var/www/html/cron/teacher_status_cron.php on line 15
PHP Notice: Undefined variable: dbc in /var/www/html/cron/teacher_status_cron.php on line 20
PHP Fatal error: Uncaught Error: Call to a member function Query() on null in /var/www/html/cron/teacher_status_cron.php:20
Stack trace:
#0 {main}
thrown in /var/www/html/cron/teacher_status_cron.php on line 20
Crontab will not run the program every 5 seconds, only every minute at best.
Edit: the file does not work outside of cron in the CLI either, only on a web browser.. Cron is not the issue.
Because you have not right permissions on file, your cron can not open file, change permissions.

fwrite() error, operation not permitted

Basically, my code should work because it works when I run the website locally. Though, when I upload it to the dedicated server, it will show these errors:
Notice: fwrite(): send of 15 bytes failed with errno=1 Operation not permitted
in /home/advancegzw/www/folder/include/SampQueryAPI.php on line 72
Notice: fwrite(): send of 15 bytes failed with errno=1 Operation not
permitted in /home/advancegzw/www/folder/include/SampQueryAPI.php on
line 72
Notice: fwrite(): send of 15 bytes failed with errno=1 Operation not
permitted in /home/advancegzw/www/folder/include/SampQueryAPI.php on
line 72
Line 72 is fwrite() obviously:
fwrite($this->rSocket, $sPacket);
Is there a possibility that the hosting company blocked outgoing UDP? Or is there another cause?

Can't connect to standalone mongodb: No candidate servers found

I have debian dev server with stock mongodb; php 5.4 and pecl mongodb drivers v1.4.3.
I tried to create simple conntection using PHP Cli and got exception:
php -r "MongoLog::setLevel(MongoLog::ALL); MongoLog::setModule(MongoLog::ALL); new MongoClient('mongodb://127.0.0.1:27017', array());"
the output below:
PHP Notice: PARSE INFO: Parsing mongodb://127.0.0.1:27017 in Command line code on line 1
PHP Notice: PARSE INFO: - Found node: 127.0.0.1:27017 in Command line code on line 1
PHP Notice: PARSE INFO: - Connection type: STANDALONE in Command line code on line 1
PHP Notice: CON INFO: mongo_get_read_write_connection: finding a STANDALONE connection in Command line code on line 1
PHP Notice: CON INFO: connection_create: creating new connection for 127.0.0.1:27017 in Command line code on line 1
PHP Notice: CON INFO: stream_connect: Not establishing SSL for 127.0.0.1:27017 in Command line code on line 1
PHP Notice: CON INFO: get_server_flags: start in Command line code on line 1
PHP Notice: CON FINE: send_packet: read from header: 36 in Command line code on line 1
PHP Notice: CON FINE: send_packet: data_size: 73 in Command line code on line 1
PHP Notice: CON FINE: get_server_flags: can't find maxBsonObjectSize, defaulting to 4194304 in Command line code on line 1
PHP Notice: CON FINE: get_server_flags: can't find maxMessageSizeBytes, defaulting to 8388608 in Command line code on line 1
PHP Notice: CON INFO: get_server_flags: found server type: UNKNOWN? in Command line code on line 1
PHP Notice: CON INFO: is_ping: pinging 127.0.0.1:27017;-;.;29554 in Command line code on line 1
PHP Notice: CON FINE: send_packet: read from header: 36 in Command line code on line 1
PHP Notice: CON FINE: send_packet: data_size: 69 in Command line code on line 1
PHP Notice: CON INFO: is_ping: last pinged at 1376577544; time: 0ms in Command line code on line 1
PHP Notice: REPLSET FINE: finding candidate servers in Command line code on line 1
PHP Notice: REPLSET FINE: - all servers in Command line code on line 1
PHP Notice: REPLSET FINE: filter_connections: adding connections: in Command line code on line 1
PHP Notice: REPLSET FINE: filter_connections: done in Command line code on line 1
PHP Notice: REPLSET FINE: limiting by seeded/discovered servers in Command line code on line 1
PHP Notice: REPLSET FINE: limiting by seeded/discovered servers: done in Command line code on line 1
PHP Notice: REPLSET FINE: limiting by credentials in Command line code on line 1
PHP Notice: REPLSET FINE: limiting by credentials: done in Command line code on line 1
PHP Fatal error: Uncaught exception 'MongoConnectionException' with message 'No candidate servers found' in Command line code:1
Stack trace:
#0 Command line code(1): MongoClient->__construct('mongodb://127.0...', Array)
#1 {main}
thrown in Command line code on line 1
I have found workaround - is downgrade dirver version to 1.3.6; but it is not a solution.
Take a look at: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
I solved my problem after installing 10-gen version mongodb.
Had the same problem today, downgraded to the 1.3.6 version of mongo driver in pecl "worked" for me... System: Debian Squeeze
This does the job for you:
pecl uninstall mongo
pecl install mongo-1.3.6

Moodle crashes my server during the installation

I have Moodle 2.3.3+ and after I press "continue" in "extension check page" in the installation the server will stop and when i try to access any domain on the server this message will come up:
The connection was reset
and after 3-5 minutes the server will response again and the installation will continue to the "admin registration" and when i press "submit" the server will crash again without saving the admin information.
Server Specifications:
Dedicated Server
Intel® Core™ i7-920 Quadcore
RAM 24 GB DDR3 RAM
Apache/2.2.16 (Debian)
PHP/5.3.3-7
PHP Log:
PHP Notice: Undefined variable: CFG in /var/www/clients/client1/web4/web/index.php on line 32
PHP Notice: Trying to get property of non-object in /var/www/clients/client1/web4/web/index.php on line 32
PHP Warning: require_once(/course/lib.php): failed to open stream: No such file or directory in /var/www/clients/client1/web4/web/index.php on line 32
PHP Fatal error: require_once(): Failed opening required '/course/lib.php'(include_path='.:/usr/share/php:/usr/share/pear') in /var/www/clients/client1/web4/web/index.php on line 32
any ideas why is that happening?

Categories