SNMP extension crashes my php 5.6.7 and 5.6.10 (windows 8) - php-extension

I was using php 5.4 fine with its php_snmp.dll enabled, but as soon as I upgraded to php 5.6.7, I cannot use php_snmp.dll anymore.
I just upgraded to php 5.6.10 hoping that snmp problem would be fixed but its not.
If I comment out that line in php.ini php does not crash and my apache 2.4 webserver starts and runs fine.
Does anyone have this issue with above mentioned php versions?

I actually just found a comment in here that helped me solve the issue.
Basically in c:\usr\snmp\persist\mib_indexes\ directory I found two files named 0 and 1. If you remove them SNMP extension works fine.

Related

DDEV/Laravel/PHPUnit: Problems with setup in PhpStorm

Using Laravel with DDEV/Docker on a Mac, I am stuck getting PhpStorm to run directly PHPUnit with coverage. I am following these instructions: https://ddev.readthedocs.io/en/stable/users/topics/phpstorm/
I started the setup with
curl -s "https://laravel.build/myproject?with=mysql,redis,memcached" | bash
Everything's is working fine, including debugging with Xdebug after I turned on Xdebug with
ddev xdebug on
PHPUnit works fine via console as well:
ddev exec phpunit
Composer version is 2.1.4.
Following the instructions named above, I am stuck at point 6.
What am I missing out? PHPUnit is located within the directory and it is composer-installed as well:
With composer version 2.2 the phpunit executable in vendor/bin is not a symlink anymore. It‘s a PHP file which includes the original executable with help of stream-wrapper, but including phpunit is not allowed: https://github.com/sebastianbergmann/phpunit/issues/4096#issuecomment-585900398
The bug is solved in composer:
https://github.com/composer/composer/issues/10387#issuecomment-1000246631
Use the following to get the latest dev version until this fix was official released:
composer self-update --snapshot
Further you can configure PhpStorm to use the original file instead:
vendor/phpunit/phpunit/phpunit
Thanks to all of you guys, I really appreciate your help.
Here is how I solved it:
I installed ddev-edge to avoid composer 2.1.x. I could not change it to 2.2 in config.yaml without failing ddev to restart when using stable version of ddev. It only worked on an active docker instance.
Then configurated ddev to use latest PHP-version 8.1 (for a new project from scratch, it makes sense anyway).
Then the error with PHPUnit changed to an error telling me that the PHP version is too old for the PHPUnit version. That was because PHPStorm automatically picked PHP 7.4 as default when connecting to Docker and checking the CLI remote interpreter.
So I changed the PHP executable from "php" to "php8.1"
See screenshots.
Now running PHPUnit from PHPStorm works fine, even with coverage.

Homestead refuses to use specific PHP version (7.1 instead of 8.0)

The Short Version
Laravel application on Homestead is using PHP 8.x as seen in phpinfo(), yet php -v is stating the server is using 7.1 (which is what I want). How is this possible? How do I tell the Laravel application to use 7.1 not 8.x?
The Long Version
I have an older Laravel application (5.8) that I need to upgrade to 8.0. I may be using Shift to do this but I have never done an upgrade manually so I thought I should do that at least once.
So I upgraded Homestead to current (12.x), and everything continued to run fine.
Then I tried to upgrade my PHP version from 7.1 to 8.0 using sudo update-alternatives --config php and chose PHP. Then I verified with php -v that it switched to that version. As expected, I began getting deprecation errors in browser. Knowing I would have to spend some time resolving those I switched back to 7.1... but the errors remained!
I restarted PHP, I restarted the server, I reloaded and reprovisioned the server, I destroyed and reprovisioned the server and absolutely nothing is resolving this issue. I even specified php: "7.1" in the Homestead.yaml file and re-provisioned to no avail.
At this point it seems that the upgrading of Homestead itself is somehow telling PHP to ignore the version I'm specifying it to use. So I know I could downgrade, I suppose, but that isn't really a solution but a band aid. And I'm not certain that will actually work either.
I've tried the Answers in this StackOverflows Change Laravel Homestead v7.0.1 with php 7.2 to php 7.1 including php71.
OS: Windows 10
Homestead: 12.x
This person has an identical problem and resolved it with Docker somehow but I don't understand how to translate that to Homestead.
There is PHP-CLI and PHP-web. PHP-CLI version is what is reported when using php -v but PHP-CLI is what NGinx is using, hence getting 8.0 when using phpinfo() in ~/public/index.php
To resolve the issue I manually updated /etc/nginx/sites-enabled/mysite and edited line below location where it says fastcgi_pass unix:/var/run/php/php8.0-fpm.sock; to say fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; and then I restarted PHP with sudo systemctl restart nginx.

phpmyadmin Error : PHP 7.1.3+ is required. Currently installed version is: 7.0.27

Using Moc OS
I was using XAMPP 7.0.27 and
Now updated to XAMPP 7.2.28
After Upgrading not able to open PhpMyAdmin Page using
http://localhost/phpmyadmin/
Getting Following Error on Page
PHP 7.1.3+ is required.
Currently installed version is: 7.0.27
What Should be done to open phpMyAdmin ?
It seems something didn't get upgraded properly or there's a conflict, because XAMPP 7.2.28 should come with PHP version 7.2.28.
Have you some other PHP installation, perhaps you at one time tried to install your own PHP outside of XAMPP? I suggest removing any other installations to as to avoid conflicts. Your MacOS probably comes with PHP, which could be the conflict.
You could start with the XAMPP control panel to verify which is installed, which PHP is being used by XAMPP, and checking that everything is working together. The installer should have put all the pieces in the right places, so if after all that it still isn't working, I suggest reinstalling XAMPP.

Why is my recent Envoyer deployment not showing?

I just deployed using Envoyer and there were no errors. However, I don't see the new version of the site in my browser.
I SFTP'd into the server, and sure enough the new files are there.
I SSH'd into the current directory and ran php artisan cache:clear but it didn't make a difference; I still see the old version of the site.
I've done tons of deployments and never encountered this before. How do I fix this?
Just adding here. I ran into the same issue after changing the PHP version on the site inside of Forge. My server now has multiple versions of PHP on it. I had to go to the site inside of Envoyer, then go to the server, then updated the PHP version to the new PHP version of the site. Now, FPM will reload the proper PHP version.
From the symptoms you've listed, it sounds like OPcache is enabled.
Restart PHP with the following command:
sudo service phpX.X-fpm reload
Where X.X is the version of PHP you're using.
I was running into this as well, and solved it with the following steps
Go to "Servers" tab in Envoyer
Click "Update Server" icon
Enable "Reload FPM After Deployments"

php artisan optimize got stucked

after installing composer and laravel, I create new project by using commandline laravel new blog, and then I stuck at here. Please tell me what should I do? thanks.
I had the same problem. Cost me two days to figure out.
Mine is because the APCu extension. Change apc.enable_cli to 0 then it worked.
I am using php 5.5.28 and windows 10, however in windows 7 is fine with the same configuration. So check your php.ini configuration.
I had same issue, but because of xdebug running on the command line. I disabled xdebug and it resolved the issue.

Resources