Symfony error, 'App' is unexpected in Laravel 5.5 - symfony

I am using Laravel5.3:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Parse error: syntax error, unexpected 'App' (T_STRING), expecting ']'*
I have tried using:
php -S localhost:8000 -t public/*
But I couldn't interpret the response. Here is the response below:
Fatal error: Uncaught ReflectionException: Class view does not exist in C:\Users\S Hassan\Documents\projects\laravel\laravel5.5\zera\vendor\laravel\framework\src\Illuminate\Container\Container.php:752 Stack trace: #0 C:\Users\S Hassan\Documents\projects\laravel\laravel5.5\zera\vendor\laravel\framework\src\Illuminate\Container\Container.php(752): ReflectionClass->__construct('view') #1 C:\Users\S Hassan\Documents\projects\laravel\laravel5.5\zera\vendor\laravel\framework\src\Illuminate\Container\Container.php(631): Illuminate\Container\Container->build('view') #2 C:\Users\S Hassan\Documents\projects\laravel\laravel5.5\zera\vendor\laravel\framework\src\Illuminate\Container\Container.php(586): Illuminate\Container\Container->resolve('view', Array) #3 C:\Users\S Hassan\Documents\projects\laravel\laravel5.5\zera\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(721): Illuminate\Container\Container->make('view', Array) #4 C:\Users\S Hassan\Documents\projects\laravel\laravel5.5\zera\vendor\laravel\framework\src\I in C:\Users\S Hassan\Documents\projects\laravel\laravel5.5\zera\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 752
Even a tip in solving the issue will do a lot for me because I am still new with Laravel.

I have found the solution. After using Image intervention, there was a comma I omitted in config\app.php while adding a new item to the providers' array.
Thanks

Related

how can fix the "Fatal Error " while logging in the website

i just did a backup, and when i tried to log in the website (/wp-admin) this error appears:
Warning: require(/htdocs/wp-includes/version.php): Failed to open stream: No such file or directory in /htdocs/wp-settings.php on line 33
Fatal error: Uncaught Error: Failed opening required '/htdocs/wp-includes/version.php' (include_path='.:/usr/share/php') in /htdocs/wp-settings.php:33 Stack trace: #0 /htdocs/wp-config.php(86): require_once() #1 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #2 /htdocs/wp-admin/admin.php(34): require_once('/htdocs/wp-load...') #3 /htdocs/wp-admin/index.php(10): require_once('/htdocs/wp-admi...') #4 {main} thrown in /htdocs/wp-settings.php on line 33
for more info this is my website: https://sg-plombier.be/
i don't know what to do now.
Please check if the file exists on the location, if exists then check the file and folder permission.
The file exist o the location, and for the update, I just upload the file (version.php) to the latest version of WordPress. And then these errors appears now:
Fatal error: Uncaught Error: Call to undefined function wp_cache_get() in /htdocs/wp-includes/option.php:165 Stack trace: #0 /htdocs/wp-includes/l10n.php(63): get_option('WPLANG') #1 /htdocs/wp-includes/l10n.php(139): get_locale() #2 /htdocs/wp-includes/l10n.php(766): determine_locale() #3 /htdocs/wp-includes/load.php(1395): load_textdomain('default', '/htdocs/wp-cont...') #4 /htdocs/wp-includes/class-wpdb.php(1815): wp_load_translations_early() #5 /htdocs/wp-includes/class-wpdb.php(734): wpdb->db_connect() #6 /htdocs/wp-includes/load.php(562): wpdb->__construct('sgplo1953451', 'hmeqvf7gos', 'sgplo1953451', '91.216.107.183') #7 /htdocs/wp-settings.php(124): require_wp_db() #8 /htdocs/wp-config.php(86): require_once('/htdocs/wp-sett...') #9 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #10 /htdocs/wp-admin/admin.php(34): require_once('/htdocs/wp-load...') #11 /htdocs/wp-admin/index.php(10): require_once('/htdocs/wp-admi...') #12 {main} thrown in /htdocs/wp-includes/option.php on line 165
Fatal error: Uncaught Error: Call to a member function set() on null in /htdocs/wp-includes/l10n.php:784 Stack trace: #0 /htdocs/wp-includes/l10n.php(872): load_textdomain('default', '/htdocs/wp-cont...', 'fr_FR') #1 /htdocs/wp-includes/class-wp-fatal-error-handler.php(47): load_default_textdomain() #2 [internal function]: WP_Fatal_Error_Handler->handle() #3 {main} thrown in /htdocs/wp-includes/l10n.php on line 784
I ran into same error, after I disabled and uninstall w3 Total Cache Plugin, I dont know how somehow this plugin interact with the DB upon installation, I solved this by installing the plugin manually to my cpanel or you can use an ftp to your plugin directory...then booom! the admin loads fine.

WordPress Colibri Plugin Stuck at 50% upload/the backup phase

I was trying to import a theme using Colibri Importer on version 6.0, but it kept getting stuck at 50%. When looking in the network tab, I saw that I was getting a 500 error back from the server, with a body of
<p>There has been a critical error on this website.</p><p>Learn more about troubleshooting WordPress.</p>
How do I fix this error? See below :D
I looked into the server-side logs (I'm using a DigitalOcean WordPress droplet on Apache) in /var/log/apache2/error.log and found further details on what was going wrong. In those logs, near the bottom was the following:
[Fri Jun 10 00:38:59.943725 2022] [php:error] [pid 195718] [client 73.188.75.186:58428] PHP Fatal error:
Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php:181
Stack trace:
#0 (181): trim()
#1 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php(275): Colibri\\Sync\\Endpoints\\Importer->getColibriUploadPath()
#2 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php(332): Colibri\\Sync\\Endpoints\\Importer->rename()
#3 [internal function]: Colibri\\Sync\\Endpoints\\Importer->execute_backup_content()
#4 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php(52): call_user_func()
#5 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Core/Endpoint.php(76): Colibri\\Sync\\Endpoints\\Importer->runStep()
#6 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/ColibriSync.php(186): Colibri\\Sync\\Core\\Endpoint->verifyAndExecute()
#7 /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/ColibriSync.php(151): Colibri\\Sync\\ColibriSync->import()
#8 /var/www/html/wp-includes/class-wp-hook.php(307): Colibri\\Sync\\ColibriSync->execute()
#9 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#10 /var/www/html/wp-includes/plugin.php(476): WP_Hook->do_action()
#11 /var/www/html/wp-admin/admin-ajax.php(187): do_action()
#12 {main}\n thrown in /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php on line 181, referer: https://blog.tripbee.com/wp-admin/tools.php?page=colibri_sync_tools
I went to the mentioned file /var/www/html/wp-content/plugins/colibri-sync/src/Colibri/Sync/Endpoints/Importer.php on my server, and looked at the function getColibriUploadPath on line 181, where the issue was stemming from. It appeared that the trim function was expecting a string, but instead was being given an array. To fix it, I replaced
$rel = trim($rel);
with
if (is_array($rel)) {
$rel = trim(implode($rel));
}
elseif (is_string($rel)) {
$rel = trim($rel);
}
and saved the file. Without restarting the server or anything else, I reattempted the import and it succeeded! Hopefully this helps anyone who just updated to WP 6.0 and are struggling to get the Colibri Importer working on that version :)

unable to login wordpress localhost xaamp

I am getting an error whenever i try to open http://localhost/wordpress/wp-admin/
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\wordpress\wp-includes\wp-db.php:1668 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-includes\wp-db.php(632): wpdb->db_connect() #1 C:\xampp\htdocs\wordpress\wp-includes\load.php(425): wpdb->__construct('root', '', 'practice_debut', 'localhost') #2 C:\xampp\htdocs\wordpress\wp-settings.php(116): require_wp_db() #3 C:\xampp\htdocs\wordpress\wp-config.php(90): require_once('C:\xampp\htdocs...') #4 C:\xampp\htdocs\wordpress\wp-load.php(37): require_once('C:\xampp\htdocs...') #5 C:\xampp\htdocs\wordpress\wp-blog-header.php(13): require_once('C:\xampp\htdocs...') #6 C:\xampp\htdocs\wordpress\index.php(17): require('C:\xampp\htdocs...') #7 {main} thrown in C:\xampp\htdocs\wordpress\wp-includes\wp-db.php on line 1668
Fatal error: Uncaught Error: Call to undefined function wp_kses_normalize_entities() in C:\xampp\htdocs\wordpress\wp-includes\formatting.php:4316 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-includes\class-wp-fatal-error-handler.php(190): esc_url('https://wordpre...') #1 C:\xampp\htdocs\wordpress\wp-includes\class-wp-fatal-error-handler.php(147): WP_Fatal_Error_Handler->display_default_error_template(Array, false) #2 C:\xampp\htdocs\wordpress\wp-includes\class-wp-fatal-error-handler.php(52): WP_Fatal_Error_Handler->display_error_template(Array, false) #3 [internal function]: WP_Fatal_Error_Handler->handle() #4 {main} thrown in C:\xampp\htdocs\wordpress\wp-includes\formatting.php on line 4316
when i tried for solutions i came across this one "untick mysqli and tick nd_mysqli"
but i don't know how to do this in localhost xamamp. I am new to wordpress and localhost.
Also when i tried to open http://localhost/phpmyadmin/
i get this error
phpMyAdmin - Error
The mysqli extension is missing. Please check your PHP configuration. See [a#doc/html/faq.html#faqmysql#documentation]our documentation for more information.
Try to use Wampserver64 application. Maybe your problem solved.

Symfony: how to debug unexpected '\' (T_NS_SEPARATOR)

I am getting the following error message in Symfony:
Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting identifier (T_STRING)
when I execute DoctrineMigrations for example this one line shows up?
how can I debug this?
this is the full trace:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting identifier (T_STRING) in /Library/WebServer/Documents/hrd_3/var/cache/dev/appDevDebugProjectContainer.php:7087
Stack trace:
#0 /Library/WebServer/Documents/hrd_3/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(117): Symfony\Component\HttpKernel\Kernel->initializeContainer()
#1 /Library/WebServer/Documents/hrd_3/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()
#2 /Library/WebServer/Documents/hrd_3/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(117): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /Library/WebServer/Documents/hrd_3/bin/console(29): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
in /Library/WebServer/Documents/hrd_3/var/cache/dev/appDevDebugProjectContainer.php on line 7087
Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting identifier (T_STRING) in /Library/WebServer/Documents/hrd_3/var/cache/dev/appDevDebugProjectContainer.php:7087
Stack trace:
#0 /Library/WebServer/Documents/hrd_3/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(117): Symfony\Component\HttpKernel\Kernel->initializeContainer()
#1 /Library/WebServer/Documents/hrd_3/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()
#2 /Library/WebServer/Documents/hrd_3/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php(117): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /Library/WebServer/Documents/hrd_3/bin/console(29): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
in /Library/WebServer/Documents/hrd_3/var/cache/dev/appDevDebugProjectContainer.php on line 7087
update:
in the debug container on 7087:
class VichUploaderBundleHandlerDownloadHandler_00000000110518fa000000015e248fd4966f7bb604f68fe14d5ab23e4a657cd2 extends \\Vich\UploaderBundle\Handler\DownloadHandler implements \\ProxyManager\Proxy\VirtualProxyInterface
{
if i disable this module, then another class will have this problem... like randomly.
I've found that the issue is caused by new zendframework v3.0.3 - see https://github.com/symfony/symfony/issues/9815
So for the quick fix at the moment just add
"zendframework/zend-code": "3.0.2"
into your composer file
Same bug is in symfony/framework-bundle version 2.8.13, file DependencyInjection/FrameworkExtension.php,
line 374:
$container->setParameter('router.cache_class_prefix', $container->getParameter('kernel.container_class'));
Version 2.8.12 is OK:
$container->setParameter('router.cache_class_prefix', $container->getParameter('kernel.name').ucfirst($container->getParameter('kernel.environment')));
Tested on PHP 5.6.26 ...

Fatal error: Uncaught exception 'ReflectionException' with message 'Class Cl\CommonBundle\Entity\integer does not exist

I have developed application in symfony2.3, it's working perfect in development environment but while I move to production it throws error. I tried but it can't resolve.
Following all error comes form different page :
This error comes while I tried to access my home page.
Fatal error: Uncaught exception 'ReflectionException' with message 'Class Cl\CommonBundle\Entity\integer does not exist' in /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php:795 Stack trace: #0 /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php(795): ReflectionParameter->getClass() #1 [internal function]: Doctrine\Common\Proxy\ProxyGenerator->generateMethods(Object(Doctrine\ORM\Mapping\ClassMetadata)) #2 /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php(276): call_user_func(Array, Object(Doctrine\ORM\Mapping\ClassMetadata)) #3 /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php(155): Doctrine\Common\Proxy\ProxyGenerator->generateProxyClass(Object(Doctrine\ORM\Mapping\ClassMetadata), '/opt/lampp/htdo...') #4 /opt/lampp/htdocs/Cl/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php(71 in /opt/lampp/htdocs/Cl/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/UnexpectedValueException.php on line 51
When I clear cache of production environment in command line, it throws following exception :
[Doctrine\Common\Proxy\Exception\UnexpectedValueException]
The type hint of parameter "user" in method "setUser" in class "Cl\CommonBundle\Entity\GroupEventComment" is invalid.
[ReflectionException]
Class Collegelife\CommonBundle\Entity\integer does not exist
Once this has been solved then it throws to other class, so I can't understand that what's happen.
When I tried to login into page :
it shows me error like :
Fatal error: require(): Failed opening required '/opt/lampp/htdocs/collegelife/app/cache/prod/doctrine/orm/Proxies/__CG__CollegelifeCommonBundleEntityUniversity.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/collegelife/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 207
I had the same question and resolved it.
Because My Entity's setting.
You can't type hint on a scalar type (integer/string/boolean etc) in PHP. e.g.
public function setSortOrder(\integer $sortOrder)
Should be:
public function setSortOrder($sortOrder)

Resources