ioncube_loader Issue: undefined symbol: zend_execute_ex - apache

I have been struggling with the above problem for days. I need the ioncube_loader for my Shopware (version 5.3.2 with PHP version 7.1.8). The server on which Shopware runs has PHP version 5.6.40!
Inside the shop I am told that I am using the ionCube Loader but when I log in to the server via SSH the error occurs.
The following outputs are available for the following commands in the console:
PHP Version
[root#vh1 ~]# php -v
Failed loading /usr/lib64/php/modules/ioncube_loader_lin_7.1.so: /usr/lib64/php/modules/ioncube_loader_lin_7.1.so: undefined symbol: zend_execute_ex
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
extension_dir
[root#vh1 ~]# php -i | grep extension_dir
Failed loading /usr/lib64/php/modules/ioncube_loader_lin_7.1.so: /usr/lib64/php/modules/ioncube_loader_lin_7.1.so: undefined symbol: zend_execute_ex
extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules
PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
sqlite3.extension_dir => no value => no value
set include
; Enable ioncube extension module
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_7.1.so
Can someone tell me what I did wrong? I can not find anything about the bug about Google.
undefined symbol: zend_execute_ex
Why zend_execute_ex? Where does it come from? Can the error occur due to the permissions?
[root#vh1 ~]# ll /usr/lib64/php/modules/
total 8940
-rwxr-xr-x 1 root root 1500368 16. Jul 11:11 ioncube_loader_lin_5.6.so
-rwxr-xr-x 1 root root 1366576 11. Jun 15:33 ioncube_loader_lin_7.1.so
EDIT:
As soon as I open the plugin manager in the backend of Shopware I get the following error:
The file /path/to/shop/engine/Shopware/Plugins/Community/Frontend/CoeVoucherUrl
/Bootstrap.php was encoded by the ionCube Encoder
for PHP 5.6 and cannot run under PHP 7.1 or later.
Please ask the of the script to provide a version
encoded with the ionCube Encoder for PHP 7.1.
File:Unknown

The ioncube-version you are using is for php 7.1 and not for php 5.6. When using PHP 5.6 you need the ioncube_loader_lin_5.6.so. It's provided with the current loader-packages as well. You need to make sure the loader version is compatible with your php-version. The error message already states, that you are using the encoder for php 7.1.
On most servers php versions are different between CLI and Web, so you need to make sure the CLI is using the same version as the webserver and the ioncube version is compatible with it. Sometimes there are possibilities to call different php versions via cli by adding the version number (like php7.1 ...).
On to of that, you can't use any plugin from the shopware store that is encrypted with php 7.1+, since the encryption of the store only supports 5.6 and 7.0. If you want to use php 7.1, you need to make sure there are no encrypted plugins in your system. In this case the plugin manager will work again.
https://docs.shopware.com/en/shopware-5-en/update-guides/update-guide-shopware-55#but-i-still-have-encrypted-plugins

Related

Problems with php-gd in php8.1

I have php8.1 running on FreeBSD 12.
Install php81-gd and having a trouble to start php due to the following error:
Any guess how to fix it, please?
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/local/lib/php/20210902/gd.so (/usr/local/lib/php/20210902/gd.so: Undefined symbol "gdImageCreateFromAvif"), /usr/local/lib/php/20210902/gd.so.so (Cannot open "/usr/local/lib/php/20210902/gd.so.so")) in Unknown on line 0```
You probably need to upgrade the libgd package as well with pkg upgrade libgd; for whatever reason the package manager doesn’t seem to do it automatically when you install the php81-gd package.

how to install Imagic in WAMP server?

I am getting error php_imagick.dll is not working. %1 is not a valid W32 application.
I am using WAMP Server Apaches 2.4.4.6 and PHP 7.4.9. my OS is windows 10 64bit. i think i download php_imagick-3.6.0rc2-7.3-nts-vc15-x64.zip file.
I have installed all DDL file in PHP7.4.9/ext/ and apply all process for install Imagic but still i am getting error
i have add extension in php.ini file.
enter image description here
Warning: PHP Startup: Unable to load dynamic library 'php_imagick' (tried: d:/wamp/bin/php/php7.4.9/ext/php_imagick (%1 is not a valid Win32 application.), d:/wamp/bin/php/php7.4.9/ext/php_php_imagick.dll (The specified module could not be found.)) in Unknown on line 0
i tried to find required file and package form
https://windows.php.net/downloads/pecl/releases/imagick/3.6.0rc2/ also checked
https://www.apachelounge.com/viewtopic.php?t=6359
but nothing helpful for me. that Module is not loading..
please help me....
check that the dll is not blocked:
try downloading the imagick threadsafe for here, version made for your PHP version
also install it from here on top of it all

Parsoid: Unexpected Token error and failing to initialize

mwApis:
- # This is the only required parameter,
# the URL of you MediaWiki API endpoint.
uri: 'http://spgenerations.com/wiki/api.php'
On my linux box, I can curl this URL and receive the api data.
Regardless of using the apt-get installation or developer installation (ngm install) both instances give me this error:
{"name":"parsoid","hostname":"play.projecttidal.com.KVM","pid":12636,"level":30,"levelPath":"info/service-runner","msg":"master(12636) initializing 2 workers","time":"2019-03-12T03:55:47.504Z","v":0}
{"name":"parsoid","hostname":"play.projecttidal.com.KVM","pid":12645,"level":60,"moduleName":"lib/index.js","levelPath":"fatal/service-runner/worker","msg":"Unexpected token ...","time":"2019-03-12T03:55:47.917Z","v":0}
{"name":"parsoid","hostname":"play.projecttidal.com.KVM","pid":12636,"level":40,"message":"first worker died during startup, continue startup","worker_pid":12645,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2019-03-12T03:55:48.925Z","v":0}
For context, the hostname here is incorrect and the domain has been removed.
This is my parsoid config:
// Parsoid configuration
$wgVirtualRestConfig['modules']['parsoid'] = array(
'url' => 'server.spgenerations.com',
'forwardCookies' => true
);
I have tried everything under the hidden voodoo sun to get this thing to work and I'm beyond frustrated. 4 hours spent tinkering with URL links to no avail, so please, if you know anything relating to this error, lend a hand.
Check what Node.JS version you are running with:
nodejs --version
If it is 4.x: That's too old for Parsoid. I had the same situation (Debian 9, still such an old Node.JS version in the repositories..). After upgrading to 10.x it ran fine for me.
I used the following guide (see Install using a PPA) to update to a newer Node.JS release: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-debian-9

bWAPP- SQL injection Hack displays a white screen?

I've been following this video(https://www.youtube.com/watch?v=XDCZ8FC856s) to install bWAPP on Parrot OS and everything works fine except SQL Injection. I've checked the database and its active. As you can see:
And when I select SQL Injection(GET/Search) it just displays a blank white screen.
I've checked for answers in a couple of places but haven't found a robust answer. Any help would be awesome thanks.
Browser: Firefox Quantum 60.0.1(64-bit)
OS: Parrot( I also tried the same on Kali)
PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()
It looks like your code uses the mysql extension, and that extension is not present.
In other words, the error has nothing to do with SQL injection. The code for this app can't run given the PHP installation you have installed.
Run the command php --version, you'll see something like this:
$ php --version
PHP 7.1.16 (cli) (built: Mar 31 2018 02:59:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
You probably you have PHP 7.0 or later, in which the mysql extension is no longer available. If that's the version of PHP you have, then you will have to change the code of your application, so that it uses either mysqli or PDO.
See these answers from 2016:
PHP : Undefined function mysql_connect()
Fatal error: Uncaught Error: Call to undefined function mysql_connect()
Editing code from the outdates mysql extension to the mysqli extension is pretty easy.
https://www.phpclasses.org/blog/package/9199/post/3-Smoothly-Migrate-your-PHP-Code-using-the-Old-MySQL-extension-to-MySQLi.html
https://dzone.com/articles/convert-mysql-to-mysqli
There are many videos on YouTube about updating mysql code to mysqli. I haven't watched any of them so I can't recommend any specific video.
The other possibility is that you have PHP 5.6, but the installation is incomplete. You may be able to install an optional package to add the mysql extension to a PHP 5 installation. See this answer:
Fatal error: Call to undefined function mysql_connect()

Unable to load dynamic library php_sqlsrv_7_nts.dll is not a valid Win32 application

Thought I'd see if there were any sql server drivers for php 7. Another question on Stack Overflow pointed me to these drivers here
So I install php_sqlsrv_7_nts.dll into my ext folder and add the following line to my php.ini:
extension=php_sqlsrv_7_nts.dll
I get this warning on every php script I run:
Warning: PHP Startup: Unable to load dynamic library 'C:\php7\ext\php_sqlsrv_7_nts.dll' - %1 is not a valid Win32 application
I realise this is just a pre-release version and there are many things to iron out still, but I was hoping to at least do some basic things.
What am I doing wrong, or do I need to wait a bit more for a better release.
Some info that might be useful:
PHP Version => 7.0.5
System => Windows NT GB275L-I-T-5654 6.3 build 9600 (Windows 8.1 Professional Edition) i586
Build Date => Mar 30 2016 09:57:56
Compiler => MSVC14 (Visual C++ 2015)
Architecture => x86
Configure Command => cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--with-pdo-oci=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"
Finally got this solved. Needed to install some more things before it would work, namely:
Microsoft Visual C++ 2015 Redistributable (x86) which you can get from here
The ODBC drivers which you can get from here
It works for me.
1.Download the extension windows 7.0
https://github.com/Microsoft/msphpsql/releases
2.And then according to the system requirement paste it in ext folder.
Note: Paste only the thread safe version (php_pdo_sqlsrv_7_ts.dll , php_sqlsrv_7_ts.dll)
3.And edit the php.ini file add this extension to your php.ini file and restart and check
The extension file from Github MSPHPSQL releases did not work for me and gave me the same predicament with the OP. I went to this Microsoft article which gave me the driver (extension) for MSSQL Server, go ahead and install it on a directory you can easily find, in my case I saved it in my c:\mssql-driver then inside get the extension (DLL) file that fits your OS and PHP version, in my case since I am using PHP 7.2.x and x64 Windows I picked the following file and put it in my PHP extension directory c:\xampp\php\ext:
php_pdo_sqlsrv_72_ts_x64.dll
php_sqlsrv_72_ts_x64.dll
and in my php.ini located in c:\xampp\php\php.ini defined it under the Dynamic Extensions section:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
...
extension=curl
extension=php_pdo_sqlsrv_72_ts_x64.dll
extension=php_sqlsrv_72_ts_x64.dll
...
delete the "php_" on "php_sqlsrv_7_nts". just write "sqlsrv_7_nts"