I tried to run symfony console command, but I've got an error:
Notice: Undefined variable: output in /var/www/.../vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DialogHelper.php line 411
I have no idea, why it went wrong.
Can anyone help?
I've solved the problem: this error appears because exec() and shell_exec functions was disabled in php.ini file. To enable this functions you have to edit this string:
disable_functions =exec,passthru,shell_exec,system,proc_open
and delete exec, shell_exec:
disable_functions =passthru,system,proc_open
Related
I upgrade my project from SF 5.4 to SF 6 with php 8.1.2.
With my dev env I have no errors!
When I use the prod env when I cache clear I have the error:
In Route.php line 196:
Typed property Symfony\Component\Routing\Annotation\Route::$env must not be accessed before initialization
I try to remove the var/cache folder.
Do you have any ideas how to fix that one?
I found the same error in stack and I replace the handler_id with null value.
The error come from the SF router vendor. Route.php is not my own code.
I have had the same issue so I cleared cache typing this command symfony console cache:clear to make all work again.
You can also refer to this link if the need arises:
$env not initialized
Environment: Symfony 2.8.1 with XAMPP Version 5.5.24 on Windows 7.
If I trigger a fatal error in a controller, anything as simple as $array = ; in production environment, I'm getting a default php error:
Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\tgsupport-test\src\AppBundle\Controller\DefaultController.php on line 16
followed by symfony custom error page message. Obviously I'd want to avoid to show eorr info in production.
Moreover in prod.log I see a double critical error: under php.CRITICAL and request.CRITICAL. Is really useful to show the same error twice?
I'm using default configuration, indeed I just installed default framework without any custom setting and I triggered my error in AppBundle/DefaultController, so I was wondering if I'm missing anything.
I missed a php.ini configuration to avoid to display error messages in page.
When I run this command php app/console translation:update es GWDAdminBundle --force --prefix="__" at the terminal I get the following error message:
[Twig_Error_Syntax]
Unexpected token "name" of value "View" ("end of print statement" expected) at line 31
I don't which file is throwing this error, when I look at the log there is nothing remotely close to this, I suspect that it is one of my view files but how do I begin looking? Any ideas?
Many thanks to kix! I was able to debug all of my twig files with the following command:
php app/console twig:lint src/
I have php5.5, nginx installed on Ubuntu 13.10 of Ec2.
My error relate to json_encode function :
PHP Fatal error: Call to undefined function json_encode()
After reading PHP Fatal error: Call to undefined function json_decode(), i install php5-json. As result, it works well when i call json_encode from command line.
But it doesn't work if i call json_encode from nginx server. I tried to add extension=json.so to the files /etc/php5/cli/php.ini and /etc/php5/fpm/php.init. But it can't resolve the problem.
Could you help me ?
Thank you in advance
Just to begin :
You uncomment
extension=json.so in
/usr/local/php5/etc/extensions.ini ?
And did you restart php5-fpm ?
Else, could you give us your phpinfos() ? (section json)
I've been trying to create a local copy of this wordpress site - click4taps.co.uk. But even though everything seems to run pretty much fine on the server, on localhost I am getting these code errors, I would have maybe expected a database error if I had forgot something in the setup. I'm not super good at php but I can't see anything that out of place in the code the error specifies.
Here is the error message I receive when trying to launch the site in localhost:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'woocommerce_layered_nav_init' not found or invalid function name in C:\Program Files (x86)\Ampps\www\click4taps\wp-includes\plugin.php on line 406
Fatal error: Call to undefined function is_product() in C:\Program Files (x86)\Ampps\www\click4taps\wp-content\themes\bazar\theme\plugins\woocommerce-ajax-layered-nav\init.php on line 59
Any feedback on this would be very helpful thanks
Activate your woocommerce plugin