WAMP x64 ext path error - mysqli

I'm running WAMP 3.0.6 x64 for Windows 10. PHP v 7 is working fine, but from time to time I need to switch back to PHP v 5.6 to test some legacy projects. When I change version via the WAMP icon mysqli stops working. The module is enabled and exists, but the php error log reveals that the wrong ext path is being used:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp64/bin/php/php7.0.10/ext/php_mysqli.dll' - The specified module could not be found.
So WAMP is using the PHP v7 ext directory. I thought this might be related to Winodws ENV variables so I set the following for PATH:
C:\wamp64\bin\php\php5.6.25
Also my wampmanager.conf file has he following set:
phpVersion = "5.6.25"
phpIniDir = "."
phpConfFile = "php.ini"
phpExeDir = "."
I've run out of ideas - anyone able to help?

Related

Netbeans 13 installing native library error

I'm trying to install netbeans and the following error appears:
Cannot load native library which is strictly necessary to work correctly. Exception: org.netbeans.installer.utils.exceptions.NativeException: Cannot load native library from path: native/jnilib/windows/windows-x64.dll
I've already added the JAVA_HOME variable and it's showing the path in the prompt:

I can't add pgsql PDO Driver in MAMP on Mac Big Sur

I have installed MAMP and PostgreSQL with PGAdmin4, but I'm having some problems.
I'm getting a psql "command not found error" in my terminal. I have added export PATH=/Library/PostgreSQL/10/bin:$PATH into ~/.bash_profile, but whenever I reopen the terminal, I get the same error again.
Whenever I try to execute composer or php artisan in my Laravel project I get the below errors, but I'm still able to migrate database:
Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/local/lib/php/pecl/20180731/pdo_pgsql (dlopen(/usr/local/lib/php/pecl/20180731/pdo_pgsql, 9): image not found)
Warning: PHP Startup: Unable to load dynamic library 'pgsql' (tried: /usr/local/lib/php/pecl/20180731/pgsql (dlopen(/usr/local/lib/php/pecl/20180731/pgsql, 9): image not found)
Getting a "driver not found" error whenever trying to browse the project and in PDO Drivers list in phpinfo(), mysql and sqlite available, but pgsql is not available.
MAMP
PostgreSQL 10
PHP: 7.3.21
OS: MAC Big Sur
I had the same issue and when I looked in my php.ini file, I saw that my extensions folder was pointed to the wrong location:
extension_dir = "/Applications/MAMP/bin/php/php7.4.2/lib/php/extensions"
But I don't have a matching directory for php7.4.2 - I use php7.4.9, and confirmed the extension exists in that folder. To fix it for me, I just had to change the above line in my php.ini file to:
extension_dir = "/Applications/MAMP/bin/php/php7.4.9/lib/php/extensions"
And then all was good for me.

Trying to install SDL Perl on Windows 10, problems with "make" (and "dmake" and "gmake")

I am using Windows 10 and Strawberry Perl. I found this nice tutorial on building a 3D engine in Perl. Which requires SDL. For a couple of days I've been trying to install it, but it doesn't work. First I tried via CPAN, no success. No I am trying manually, but I am getting error messages when using "make". If I type "perl -V:make" it says I should use "dmake". If I do so, there's a dmake warning, telling me to use gmake instead. If I do that, there's the following message:
"to undefined at C:/Perl64/site/lib/ExtUtils/Install.pm line 1199. gmake: *** [Makefile:942: pm_to_blib] Error 2"
Any suggestions how to fix this? Or is there an easy (easier) way to install SDL?
It seems like the Perl SDL module uses SDL version 1.2.14, whereas the documentation says
The best course of action is to move to SDL 2.0 or later as quickly as
possible
So, I would recommend looking at the Python bindings PySDL2 instead. The following worked for me on Windows 10:
Downloaded Python 3.8 from here:
https://www.python.org/ftp/python/3.8.2/python-3.8.2-amd64.exe
Then added the following to the User enviroment variables for "Path" (NOTE: at the beginning, not at the end):
%USERPROFILE%\AppData\Local\Programs\Python\Python38
%USERPROFILE%\AppData\Local\Programs\Python\Python38\Scripts
Then, from the command prompt install pysdl2:
>pip install pysdl2
Collecting pysdl2
Downloading https://files.pythonhosted.org/packages/60/ba/ddb48261848874eeb3d54963edbf3c74fff86499746aeb23151f123953bb/PySDL2-0.9.7-py3-none-any.whl (541kB)
|████████████████████████████████| 542kB 2.2MB/s
Installing collected packages: pysdl2
Successfully installed pysdl2-0.9.7
>pip install pysdl2-dll
Collecting pysdl2-dll
Downloading https://files.pythonhosted.org/packages/01/37/f9aa5472fb85ce94507c69110916133ad29b650d2bf277de2cce37d7ad7d/pysdl2_dll-2.0.12-py2.py3-none-win_amd64.whl (2.5MB)
|████████████████████████████████| 2.5MB 3.2MB/s
Installing collected packages: pysdl2-dll
Successfully installed pysdl2-dll-2.0.12
Then, add a new User environment variable PYTHONPATH with value:
%USERPROFILE%\AppData\Local\Programs\Python\Python38\Lib\site-packages
Close the command prompt, and reopen a new one to update the environment variables. Then I created a test Python script:
import sys
import sdl2.ext
resource_dir=r'C:\Users\hakon\AppData\Local\Programs\Python\Python38\Lib\site-packages\sdl2\examples'
RESOURCES = sdl2.ext.Resources(resource_dir, "resources")
sdl2.ext.init()
window = sdl2.ext.Window("Hello World!", size=(640, 480))
window.show()
factory = sdl2.ext.SpriteFactory(sdl2.ext.SOFTWARE)
sprite = factory.from_image(RESOURCES.get_path("hello.bmp"))
spriterenderer = factory.create_sprite_render_system(window)
spriterenderer.render(sprite)
processor = sdl2.ext.TestEventProcessor()
processor.run(window)
sdl2.ext.quit()
and finally run it from the command prompt:
> python test.py

selenium.common.exceptions.WebDriverException: Message: Can not connect to the 'chromedriver' error when using Python3 on Windows OS

I'm using a Windows 7 OS and trying to run a selenium webdriver test using python from my Eclipse+ PyDev IDE. I have downloaded the Google Chrome driver and added it to my path. I've also added the chromedriver.exe to C:\Python34\Scripts. I have tried the following:
from selenium import webdriver
driver = webdriver.Chrome()
I get the error message
selenium.common.exceptions.WebDriverException: Message: Can not connect to the 'chromedriver'
when I try to run my script. I've also tried the following:
driver = webdriver.Chrome(executable_path="C:\folder\chromedriver.exe")
I get a message saying file cannot be found. If I try the following from the terminal:
driver = webdriver.Chrome()
The browser is launched so it works from the terminal. The issue is running my script from Eclipse.
I work with this on Ubuntu but i came across the same kind of error, the problem was that i didn't have a sym-link to the chrome driver file,
In Ubuntu it is
sudo ln -s ~/selgrid/chromedriver /usr/local/bin/chromedriver
This might help
http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
Good Luck!

rj not installing for eclipse/R Statet

I realize there are several posts on this, so apologies if I'm breaching etiquette. In my case, I've tried several of them, and I just can't seem to get the rj issue (of having it installed properly) resolved.
I tried the CMD INSTALL recommendation and literally copied the tar file to my R executable directory
R CMD INSTALL --no-test-load rj_*.tar.gz
I used a DOS cmd window to run it, and it failed using the * notation, so I substituted the exact rj tar file name by navigating to the path...
C:\Program Files\R\R-2.12.1\bin\x64\rj_0.5.0-5.tar.gz
and running
R CMD INSTALL --no-test-load rj_0.5.0-5.tar.gz
This seemed to work as R shows all Java packages installed (inc. Rjava)
> ("rj" %in% installed.packages()[,"Package"])
[1] TRUE
> ("rJava" %in% installed.packages()[,"Package"])
[1] TRUE
>
Yet, in the eclipse environment, I'm still getting rj missing error.
Any thoughts on what to try next? I really want to get the debug capability to work here and pulling my hair out over this.
Oh, and also even though it shows installed in R. If I try to launch inside R, I get:
> library(rj)
Error : .onLoad failed in loadNamespace() for 'rj', details:
call: .jcall("de/walware/rj/server/RJ", "Lde/walware/rj/server/RJ;",
error: RcallMethod: cannot determine object class
Error: package/namespace load failed for 'rj'
Using Eclipse SDK Version: 3.8.0
StatET 3.01.02
rj_0.5.0-5