I just started with the symfony framework I installed the environment without problem but when I run the symfony server for the first time with: symfony server: start I get an error like this
[Web server] [07-Apr -2021 06:27:42 Europe / Berlin] 2021-04-07T06: 27: 42 + 02: 00 [critical] Error not caught: syntax error, "|" unexpected, expected variable (T_VARIABLE)
and this |ERROR | SERVER GET (500) / ip="127.0.0.1"
here are the errors obtained need help please
I do not know what to do
Thank you!
I guess it is the PHP version as well, because the Stack Trace shows a syntax error for the union types syntax (https://php.watch/versions/8.0/union-types) featured in the newest version 8 of PHP.
Related
Enabled app insights on php project, it is working on host machine. However, during running the same code on local box getting following error: [seems some IIS config issue or update not sure]
Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 0: The cURL request was retried 3 times and did not succeed. The most likely reason for the failure is that cURL was unable to rewind the body of the request and subsequent retries resulted in the same error. Turn on the debug option to see what went wrong. See https://bugs.php.net/bug.php?id=47204 for more information. (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in ....\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 186
and
Warning: curl_setopt_array(): Unable to create temporary file. in ....\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 56
Trace:
trace while running an application from IIS
check the plugins and look through the debug.log file in wp-content and most likely it is a plugin that is causing this issue. I found that Mailjet causes this issue when unconfigured. Simply activate the plugins found in the error log and this will help solve it. The Microsoft version of cURL in PHP will throw the error and the Linux variant will not.
i'm using endroid Qrcode bundle for creation of Qrcode object. I have an critical error because the QRCode object (https://github.com/endroid/QrCode/blob/master/src/QrCode.php) in this bundle use this constant. If i modify the source of the QRCode all works fine, but obviusly that is not a good solution. Why i have this bug on symfony? How can I fix it?
This my error
Parse Error: syntax error, unexpected '.', expecting ',' or ';'
500 Internal Server Error - FatalErrorException
And this is the bundle: https://github.com/endroid/QrCode
The reason would be the PHP version of your current server: if you do have a version of PHP below 5.6, concatenation in a constant is not allowed by PHP. It is allowed only as of PHP 5.6.0
Note:
Constant expression support was added in PHP 5.6.0.
source: http://php.net/manual/en/language.oop5.constants.php#example-185
Related answer from SO that got me there: https://stackoverflow.com/a/36693544/2123530
I'm trying to work with SOLR on our Drupal 7 server, but I keep getting an error and I don't know what it means:
Exception: HTTP 400; orgapachelucenequeryParserParseException_Cannot_parse__AND_sm_field_product_type_TO__AND__OR_sm_field_product_type1_Encountered_____at_line_1_column_1_Was_expecting_one_of_____NOT______________________________QUOTED______TERM______PREFIXTERM______WILDTERM__________________NUMBER______TERM____________: orgapachelucenequeryParserParseException_Cannot_parse__AND_sm_field_product_type_TO__AND__OR_sm_field_product_type1_Encountered_____at_line_1_column_1_Was_expecting_one_of_____NOT______________________________QUOTED______TERM______PREFIXTERM______WILDTERM__________________NUMBER______TERM____________ in DrupalApacheSolrService->checkResponse() (line 455 of /vagrant/docroot/sites/all/modules/contrib/apachesolr/Drupal_Apache_Solr_Service.php).
The website encountered an unexpected error. Please try again later.
Does anyone know what the error means and how I would go about resolving it?
I have a weird not so helpful error in New Relic. These errors are not showing in Laravel logs OR in raw php logs. For example :
Error message
E_PARSE: syntax error, unexpected '\Foundatio', expecting \\ (T_NS_SEPARATOR) or ';' or '{'
Sample stack trace
in require called at /home/xxx/public_html/bootstrap/autoload.php (32)
in require called at /home/xxx/public_html/public/index.php (36)
or
Error message
E_PARSE: syntax error, unexpected '\Support {', expecting \\ (T_NS_SEPARATOR) or ';' or '{'
Sample stack trace
in require called at /home/xxx/public_html/bootstrap/autoload.php (32)
in require called at /home/xxx/public_html/public/index.php (36)
or
Error message
E_PARSE: syntax error, unexpected '\Compon', expecting \\ (T_NS_SEPARATOR) or ';' or '{'
Stack trace
in require called at /home/xxx/public_html/bootstrap/autoload.php (32)
in require called at /home/xxx/public_html/public/index.php (36)
These errors seem to happen everytime I run a composer install on the server. The times of my commit/deployment seem to match the time of the errors in New Relic.
Any idea what this can be, and why I don't get them in the logs but they show up in New Relic ?
Thanks a lot for your help
The errors don't show in Laravel logs because Laravel is not even run. Parse errors are detected when a file is loaded and the file does not get executed.
Thanks to #jerdrzej I realized I was being a bit reckless.
If anyone has this issue, solution is to use a proper way to deploy your code (the user only gets to see the new code if everything went well with the deployment -- NO DOWNTIME).
I use dploy.io and with their last update (they changed the name to DeployBot) they can do that :
http://deploybot.com/
Or there is Envoyer from the Laravel team :
https://envoyer.io/
There are probably other way to avoid the downtime, but this will work for me.
I'm developing a PHP application which generating reports to PDF
Right now I'm facing some troubles
I'm working from my own computer with XAMPP Server and the code ran well
But when I copied the codes to my office's WAMP5 Version 1.6.5 Server I got errors
Fatal error: Call to undefined function array_fill_keys() in D:\wwwroot\tcpdf\include\tcpdf_fonts.php on line 1848
I went to that troubled line and removed it, but another Fatal error: Call to undefined function occured
Is there something wrong with my WAMP5 configuration?
Thanks
Your version of php is to old... as Royal Bg suspected.
Either upgrade to 1.6.6 for php 5.2. But if there is no reason to use such an old version switch to something less than 7 years old :)
see:
http://sourceforge.net/p/wampserver/news/?source=navbar