I have site based on symfony framework but on develop enviroment i have random crashes with exception: (with bad characters)
Warning: class_implements(): Class
���� does not exist and could not be loaded
or
Warning: class_implements(): Class H�d
���� does not exist and could not be loaded
or
ContextErrorException in DebugClassLoader.php line 203: Warning: class_implements(): Class multipart/form-data does not exist and could not be loaded
(php is not using symfony forms and request is GET)
or
OutOfMemoryException in DebugClassLoader.php line 203: Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1141972672 bytes)
(Memory limit is set on 128MB but for request is needed approximately 6MB)
All this different exceptions was thrown on one url with same parameter (for the testing purpose) so they are throwing randomly through whole web.
This bugs aren't on production enviroment only develop.
Develop enviroment is on windows 7 machine with XAMPP/apache.
If i restrat apache and press F5 everything is ok and web working ok.
I was trying clear all caches but without success.
Any ideas?
EDIT:
After activate OPCache the problem persists...
My config from symfony debug bar:
If i run command php bin/symfony_requirements from CLI
> PHP is using the following php.ini file:
C:\xampp7.0.9\php\php.ini
> Checking Symfony requirements:
...........................WW.......
[OK]
Your system is ready to run Symfony projects
Optional recommendations to improve your setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* intl extension should be available
> Install and enable the intl extension (used for validators).
* a PHP accelerator should be installed
> Install and/or enable a PHP accelerator (highly recommended).
Note The command console could use a different php.ini file
~~~~ than the one used with your web server. To be on the
safe side, please check the requirements from your web
server using the web/config.php script.
I had the same problem with "Warning: class_implements(): Class ���� does not exist and could not be loaded"
I increased realpath_cache_size in php.ini and now apache works, no errors.
Related
While using AMPHP libraries for thread working tasks, I suddenly got the Warning and Error:
PHP Warning: include(/.../vendor/amphp/process/lib/ProcessException.php): failed to open stream: Too many open files in /.../vendor/composer/ClassLoader.php on line 445
PHP Fatal error: Uncaught Error: Class 'Amp\Failure' not found
This was previously working fine, and started to get the issue recently.
Using:
PHP 7.4.21 (cli)
macOS
"amphp/parallel-functions": "^1.0"
According to a thread on AMPHP GitHub issue page: https://github.com/amphp/parallel-functions/issues/22
On macOS, the ulimit is by default 1024.
In my case, upgrading that to ulimit -n 4096 as suggested, worked fine.
According to IBM docs: "ulimit sets or displays the resource limits on processes created by the user." More info.
When installing the package Ratchet, I end up getting an our of memory error.
This apparently becomes an issue when lots of packages are installed, however I only have a few libraries installed on my project (like jquery, bootstrap and jqueryui).
Also I do not understand the previous messages(VirtualFree(): Attempt to access invalid address. and others from this kind).
I am kinda new with composer and with basic knowledge of symfony, so I do not understand what can be the problem.
Here are my errors(this is from first try of installing, the project version is Symfony 3.4.14 (kernel: app, env: dev, debug: true)):
Using version ^0.4.1 for cboden/ratchet
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.
VirtualFree() failed: [0x000001e7] Attempt to access invalid address.
VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.
VirtualFree() failed: [0x000001e7] Attempt to access invalid address.
PHP Fatal error: Out of memory (allocated 975175680) (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
Fatal error: Out of memory (allocated 975175680) (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
This is becoming quite a common issue and isn't necessarily related to the Ratchet package. While it may not be the right solution, the way I have gotten around the problem is by simply removing the PHP memory limit.
You first need to find your php.ini file, its location differs depending on your setup, and then edit the following line:
memory_limit = 128M and change it to memory_limit = -1.
Any issues let me know.
Since PHP 5.5 OPcache is built-in.
I need to cross compile PHP with OPcache for an ARM-System.
PHP is running as Apache Handler without any CGI/FastCGI.
The configure-Script needs to be changed, so that flock_type = linux is set.
After activating OPcache in php.ini by setting
opcache.enable=1
zend_extension=/usr/local/apache2/modules/opcache.so
opcache.memory_consumption=1
After starting Apache the following error appears:
Fatal Error Unable to allocate shared memory segment of 8388608 bytes:
unknown: Numerical result out of range (34)
Whats wrong?
Best regards, Velocity
Fatal error: ini_set(): To prevent data corruption, you are not allowed to turn on the mongo.native_long setting on 32-bit platforms in Unknown on line 0
http://localhost/rockmongo/web/rockmongo/index.php
I have installed 32 bit php_mongo.dll and open extension in php.ini and set the environment variables for php.exe and placed the libsasl.dll in system32 folder.
I am currently using window 7 and appear this error.Can somebody pls solve the problem.Thanks!
I turned off the ini_set("mongo.native_long",1); as it said not working on 32 bit. and run perfectly instead of preg_replace(): is deprecated and need a little configuration ! :)
I have installed Codeception following the guide on their website. Everything went okay, so I created my first basic test.
<?php
$I = new WebGuy($scenario);
$I->wantTo('ensure that frontpage works');
$I->amOnPage('/');
$I->see('Homepage');
Trying to execute this and it gave Stack trace errors so I dumped them in result.txt page.
Codeception PHP Testing Framework v1.6.2
Powered by PHPUnit 3.7.19 by Sebastian Bergmann.
Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in phar://C:/wamp/www/dugun/codecept.phar/src/Codeception/Configuration.php on line 175
Notice: Use of undefined constant CURLOPT_CERTINFO - assumed 'CURLOPT_CERTINFO' in phar://C:/wamp/www/dugun/codecept.phar/src/Codeception/Configuration.php on line 175
Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in phar://C:/wamp/www/dugun/codecept.phar/src/Codeception/Module/PhpBrowser.php on line 78
Fatal error: Call to undefined function Guzzle\Http\Curl\curl_version() in phar://C:/wamp/www/dugun/codecept.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlVersion.php on line 47
Using WAMP on Windows 7. PHP ver 5.4.3. Apache ver 2.4.2. CURL is enabled in settings. Tried restarting several times, no luck.
Anyone knows how to solve this issue, what may be wrong?
Update
The problem was related to curl.dll. Downloading a fresh one from this topic (PHP cURL not working - WAMP on Windows 7 64 bit) solved the issue.
Based on the errors I'd guess that CURL is missing even though it's enabled, try running a phpinfo() to see if the extension is running.
From the PHP site:
"Note: Note to Win32 Users
In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH. You don't need libcurl.dll from the cURL site."
http://www.php.net/manual/en/curl.installation.php