I'm programming a web application with Doctrine 2 on a CentOS 7 server, with Plesk and PHP 7.3.
I'm getting the error message that I have to configure a proxy directory when I run the web application. On my test system (local) it works without any issues.
What can I do to fix this problem?
Fatal error: Uncaught Doctrine\Common\Proxy\Exception\InvalidArgumentException: You must configure a proxy directory. See docs for details in /var/www/vhosts/.../vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php:23 Stack trace: #0 /var/www/vhosts/.../vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php(199): Doctrine\Common\Proxy\Exception\InvalidArgumentException::proxyDirectoryRequired() #1 /var/www/vhosts/.../vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php(77): Doctrine\Common\Proxy\ProxyGenerator->__construct(false, 'Proxies') #2 /var/www/vhosts/.../vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(167): Doctrine\ORM\Proxy\ProxyFactory->__construct(Object(Doctrine\ORM\EntityManager), false, 'Proxies', 1) #3 /var/www/vhosts/.../vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(8 in /var/www/vhosts/.../vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php on line 23
Related
Since upgrading to PHP 8.1, Symfony 6.1, Monolog 3.2, I have been seeing a PHP fatal error while constructing the Symfony DI container:
2022/12/12 04:10:02 [error] 31#31: *919 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Monolog\Logger::getLevelName(): Argument #1 ($level) must be of type Monolog\Level|int, Symfony\Bridge\Monolog\Handler\ConsoleHandler given, called in /app/vendor/monolog/monolog/src/Monolog/Logger.php on line 196 and defined in /app/vendor/monolog/monolog/src/Monolog/Logger.php:437
Stack trace:
#0 /app/vendor/monolog/monolog/src/Monolog/Logger.php(196): Monolog\Logger::getLevelName()
#1 /app/var/cache/prod/ContainerOqglp2q/App_KernelProdContainer.php(1441): Monolog\Logger->pushHandler()
#2 /app/var/cache/prod/ContainerOqglp2q/App_KernelProdContainer.php(1103): ContainerOqglp2q\App_KernelProdContainer->getMonolog_Logger_RequestService()
#3 /app/vendor/symfony/dependency-injection/Container.php(218): ContainerOqglp2q\App_KernelProdContainer->getHttpKernelService()
#4 /app/vendor/symfony/dependency-injection/Container.php(198): Symfony\Component\DependencyInjection\Container->make()
#5 /app/vendor/symfony/http-kernel/Kernel.php(195): Symfony\Compone" while reading response header from upstream, client: 172.27.0.16, server: _, request: "POST /job-engine-client/execute HTTP/1.0", upstream: "fastcgi://192.168.64.5:9000", host: "x"
I have not been able to reproduce the error manually, as it only happens in my staging environment, and very inconsistent.
It is currently only visible in HTTP requests triggered by a cronjob every 5 minutes. In the past 4 days, it only happened 2 times.
The application is deployed using docker compose, with a custom Ubuntu Dockerfile.
The application is deployed to multiple hosts, and shows the same random occurence of errors on each host.
When looking at the Monolog Logger.php file, it is really hard to understand how the stack trace that is logged can be ever triggered.
I'm suspecting some kind of PHP opcache or JIT issue, or perhaps an issue with the docker filesystem returning some other cached (older) versions of files.
Has anyone seen similar errors, or perhaps other suggestions how to debug & resolve this issue?
Using laravel v8.7*
Using apache server and used deployer to deploy the Laravel application on the server.
Having issues once deployed to a server.
I get the following error:
PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Support\Collection::getArrayableItems() in /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:31\n
Stack trace:\n
#0 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Collections/helpers.php(15): Illuminate\Support\Collection->__construct(Array)\n#1 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Support/Traits/ReflectsClosures.php(49): collect(Array)\n
#2 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/ReportableHandler.php(62): Illuminate\Foundation\Exceptions\ReportableHandler->firstClosureParameterTypes(Object(Closure))\n
#3 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(234): Illuminate\Foundation\Exceptions\ReportableHandler->handles(Object(Symfony\Component\ErrorHandler\Error\FatalError))\n
#4 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Foundati in /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Collections/Collection.php on line 31
Used the following instructions to deploy Note: using apache server over ngnix as apache is currently running other applications on the server.
Have you checked if the PHP version on the droplet is the same as the PHP version you have been using locally? This looks like an error that will occur if you change versions between PHP / Laravel.
I would like to repeat the Ratchet Push example. Downloaded Composer. In the project folder via the console (CLI) I entered: php composer.phar require cboden/ratchet, after which the vendor folder and a pair of files from Composer appeared. I installed ZeroMQ and tried two installation options:
Downloaded the necessary files from
https://pecl.php.net/package/zmq/1.1.3/windows. - libzmq.dll unpacked in C:\xampp\php,- php_zmq.php in C:\xampp\php\ext.Added the C:\xampp\php\ext to system variable PATH,+ restarted the computer, + restarted the web server.
Downloaded the necessary files from
https://pecl.php.net/package/zmq/1.1.3/windows.- libzmq.dll unpacked
in C:\xampp\php\windowsXamppPhp,- php_zmq.php in C:\xampp\php\windowsXamppPhp\ext.Added the C:\xampp\php\windowsXamppPhp\ext to system variable PATH,+ restarted the computer,+ restarted the web server.
I also tried to throw the file libzmq.dll into the same folder as php_zmq.php.
The installation was guided by:https://wiki.zeromq.org/bindings:php+
https://superuser.com/questions/585291/installing-...
After all, started the xampp server, then in the console entered: php push-server.php, but the console throws an error :
> PHP Fatal error: Uncaught Error: Class 'React\ZMQ\Context' not found
> in C:\xampp\htdocs\test\push-server.php:9 Stack trace:
> #0 {main} thrown in C:\xampp\htdocs\test\push-server.php on line 9
>
> Fatal error: Uncaught Error: Class 'React\ZMQ\Context' not found in
> C:\xampp\htdocs\test\push-server.php:9 Stack trace:
> #0 {main} thrown in C:\xampp\htdocs\test\push-server.php on line 9
P.S.: I believe that something is wrong with the installation of ZeroMQ since the file was not working.
ОС: windows 10
Server: XAMPP
PHP version: 7.4.2
I have a site that uses composer to build the QA environment and then deploys the QA environment to production. Production does not have composer installed, instead the vendor folder is synced between the two environments. On my last project I had to update the composer.lock file. When i deployed the project, i received the following error:
PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: GET https://www.myurl.com resulted in a 401 Unauthorized response:
Unauthorized.
in my_file_system/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 my_file_system/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 my_file_system/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 my_file_system/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 my_file_system/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 my_file_system/ in my_file_system/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113, referer:
The error is happening during an JQuery AJAX call. Any deployment that i do to a system that has composer seems to work correctly, it is only when the system does not have the ability to run composer commands that error is seen.
I have been unable to duplicate the issue in a testing environment up to this point and can test in production.
The issue ended up being an incorrect value in the .env file.
I am trying to deploy a yii2 website in rackspace cloud site for testing and I get this error and the site main page never shows up
[11-Jun-2014 14:10:07 America/Chicago] exception 'yii\base\ErrorException' with message 'PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/yaz.so' - /usr/lib64/php/modules/yaz.so: undefined symbol: pval_destructor' in Unknown:0
Stack trace:
0 [internal function]: yii\base\ErrorHandler->handleFatalError()
1 {main}
Yii2 web site works perfectly on my MAC localhost but not on the server. I verified that all requrirements are passed in the server(I could access requirements.php through url on server and it passed). The server has PHP 5.4.10.
Any thoughts?