Category : symfony

I follow one project to make practice my laravel skill. I found one thing is this project make admin route in RouteCollectionBuilderTest file that located in symfony/routing/Tests folder. this Tests folder is not present in original laravel folder structure. what logic make this Tests folder ,is this API testing? by this $routes->add(‘/admin’, ‘AppBundle:Admin:dashboard’, ‘admin_dashboard’); admin ..

Read more

Error C:xampphtdocsftsfts>php artisan serve PHP Fatal error: During inheritance of IteratorAggregate: Uncaught ErrorException: Return type of SymfonyComponentHttpFoundationParameterBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:xampphtdocsftsftsvendorsymfonyhttp-foundationParameterBag.php:205 Stack trace: #0 C:xampphtdocsftsftsvendorsymfonyhttp-foundationParameterBag.php(21): IlluminateFoundationBootstrapHandleExceptions->handleError(8192, ‘Return type of …’, ‘C:xampphtdocs…’, 205) #1 C:xampphtdocsftsftsvendorcomposerClassLoader.php(444): include(‘C:xampphtdocs…’) #2 C:xampphtdocsftsftsvendorcomposerClassLoader.php(322): ComposerAutoloadincludeFile(‘C:xampphtdocs…’) ..

Read more

I’m trying to start a process with Symfony in my Laravel app on my shared hosting server that will call an Artisan command with parameters like so: $process = new Process([‘/usr/local/bin/php’, base_path(‘artisan’), ‘queue:work –stop-when-empty’]); $process->setTimeout(null); $process->start(); This does not work as I get: ERROR: Command "queue:work –stop-when-empty" is not defined. Did you mean one of ..

Read more

I’m trying to run a code of R in Laravel App, Here are my code : ReportController.php <?php namespace AppHttpControllers; use SymfonyComponentProcessExceptionProcessFailedException; use SymfonyComponentProcessProcess; use IlluminateHttpRequest; class ReportController extends Controller { public function stockCard() { $process = new Process([‘Rscript r/test.r’]); $process->run(); // executes after the command finishes if (!$process->isSuccessful()) { throw new ProcessFailedException($process); } return ..

Read more

I have web application that runs a job to convert videos into HLS using the aminyazdanpanah/php-ffmpeg-video-streaming package. However, after about 2 minutes, the job fails and throws the error: SymfonyComponentProcessExceptionProcessTimedOutException: The process ‘/usr/bin/ffmpeg -y -i…’ exceeded the timeout of 300 seconds. in /var/www/vendor/symfony/process/Process.php:1206 The Laravel job has it’s time out set to 7200s. My supervisor ..

Read more

I have this code: $process = Process::fromShellCommandline(‘bash ./receive.sh url=’ . env(‘SGW_URL’) . ‘ cert=certs/privateKey.p12?’ . env(‘SGW_CERT_PASS’), ‘/var/www/sgwClientFiles/’); $process->run(); $process->getCommandLine(); if (!$process->isSuccessful()) { throw new ProcessFailedException($process); } $process->stop(15); return $process; and it doesn’t stop after 15sec. Instead, I get ‘exceeded the timeout of 60 seconds’ error. The thing is, that a command which I try to ..

Read more

I’m trying to display a plot that is generated with plotly in python, inside my laravel application. When I execute python3.8 ../storage/app/public/rcs/line-chart.py command in my terminal from the public directory of my laravel project, the plot is displayed. However, when I send a request to my laravel application to execute the same command using symfony ..

Read more

We have a symfony project deployed and working ok but now we want to enable https. We created and enabled another virtualhost like this: <VirtualHost *:443> ServerName project.domain.net DocumentRoot /home/user/dev/project/web <Directory /home/user/dev/project/web> AllowOverride All Require all granted </Directory> # uncomment the following lines if you install assets as symlinks # or run into problems when ..

Read more

I would like to send message from Laravel app to Symfony app via AWS SQS : Laravel app: Only responsible publish message. I use Job, following docs: https://laravel.com/docs/8.x/queues#dispatching-jobs Symfony app: Only responsible consume message. I use Messenger, following docs: https://symfony.com/doc/current/messenger.html They don’t seem to recognize each other. Is there any documents tell about this? Source: ..

Read more