How to connet Sap with PHP in Xampp localhost - php

I tried to setup SAPRFC in windows system xampp.
Copy the php-saprfc.dll file into php/ext folder..
add the extension=php_saprfc.dll line in php.ini file
then where can i find the librfc32.dll file in SAP
I installed SAP also..
How to setup PHP with SAP any Solution Please Tell..

download dll and php_saprfc file from this link
Visit http://liquidtelecom.dl.sourceforge.net/project/saprfcsapnwrfc/saprfc-1.4.1.zip

First you need to take sure that saprfc is installed successfully.
Check phpinfo if the extension is listed (or on the CLI: php -m)
Make sure that you have the correct *.dll for SAP! (check my 2nd link)
There is a newer version (SAP NW RFC) here, with a lot of informations
https://github.com/piersharding/php-sapnwrfc
I also added some windows builds here some time ago, with the documentation to install: https://github.com/piersharding/php-sapnwrfc/tree/master/builds

Related

Unable to load dynamic library 'php_grpc.dll'

My goal is to connect my laravel project to firestore firebase. I will be needing the grpc in order to continue it. However my problem is the .dll cant be found. I already uploaded the .dll file in ext folder.
I also included it in my php.ini file.
still getting the same error
I dont know if its the version og php and grpc is conflicting.
After applying the comments' suggestions:
You need to mention extensions without php_ and .dll prefix and suffix like below:
extension=fileinfo
extension=grpc
Restart Apache server if required. You can also check for php version on the command line using php --version. If it shows the version without any warnings/errors, it means the extensions are loaded correctly.
Also, as the error message in your screenshot suggests, you need to install the right thread safe package of GRPC relevant to your operating system architecture and PHP version from https://pecl.php.net/package/grpc
Since nice_dev pointed out it was a compatibilit issue. I downloaded the non thread x64 and used it. It worked. Been using the x84, maybe the reason why it's not working.

Cannot load imagick library

I have installed the imagick from here (ImageMagick-7.0.3-1-Q16-x64-dll) and the dll (TS 32 bit) from here. And also copiend the CORE_RL_* to the C:\xampp\apache\bin BUT still i get the following error when i run the laravel server.
ERROR: Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_imagick.dll' - The specified module could not be found.
in Unknown on line 0
Also, I placed dll file in C:\xampp\php\ext\php_imagick.dll.
Also, the imagick is shown in the phpinfo().
And when i use it using laravel i get the following error.
getting Imagick to work on Windows has always been a bit hit and miss as pointed out here is a good guide
http://stackoverflow.com/a/36378764/1090867
But it misses an important point
You do not need to put the binary into the PHP folder!
So here are the steps I follow myself every time I need to do this. This should work for apache, Nginx, or IIS.
Step 1
find out your php version and setting
You need to version, Architecture, Compiler and Thread Safety
if Thread Safety is disabled this is NTS is enabled it will TS
Step 2
Get and install a copy of ImageMagick and make sure it matches your Architecture, this also needs to be dll.exe rather than the static version.
Regarding Q8 and Q16 I'll leave that to you but both versions will work
Link
I recommend changing the install directory name to something generic like
C:\Imagemagick since I've had some problems in the past with the default directory name with PHP and windows.
Just install but make sure you tick add application path and I normally tick the legacy utils as well.
Once it's installed go to your environment variables and make sure it is actually in the path. There is no need to copy anything to your PHP folder
Just to make sure everything is working open the command line and type convert --version you should get a response
Step 3
This unfortunately is the hard part and can be a bit of trial and error. I've found the following provides the best php_imagick.dll that seems to work 9 times out of 10
http://www.peewit.fr/imagick/
Just pick the version that matches your install.
If this doesn't work then go to php.net and try each version until one works... (start at the latest)
http://windows.php.net/downloads/pecl/releases/imagick/
Once you have a php_imagick.dll put it into your php/ext/ folder
thne locate your php.ini file go to the bottom (or whereever your extensions are) and add extension=php_imagick.dll
Step 4
Restart PHP (or your computer) and it should be working if not try a different php_imagick.dll and repeat.
If the above doesn't work
Then try a slightly older version of Imagick I normally use version 6.8.6-8 Q16.
Please note I've only ever really done this on Windows 7 and Windows Server 2008, 2008 R2, 2012, and 2012 R2 all x64 with x86 PHP
If this still doesn't work then you probably need to copy over the CORE_RL files into your Imagick directory this normally causes more issues but if you are running out ideas then give it a go
I just ran into this issue. Only I'm using PHP on the command line (PHP CLI). The problem is the dependencies that the main php_imagick.dll file has. PHP will attempt to load the extension but since Windows can't find the CORE_RL_ DLLs, the extension will fail to load and the error/warning message about being unable to load the DLL will appear. It helps to know how Windows loads DLLs:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx
It's pretty convoluted but you can see that the reason the Apache /bin directory trick works with Apache is that httpd.exe is located in that directory. However, when using PHP CLI, the DLLs need to be located in the same directory as php.exe.
If you don't want duplicate DLLs floating around, add the directory containing php.exe to the system PATH and plop all the CORE_RL_ DLLs there. The PATH is the last thing searched, but it'll work fine. If you don't want spurious entries in your system PATH, then set the extra PATH information only during startup of Apache.
This is because the dependencies are missing. Those who are facing the same error Unable to load dynamic library 'php_imagick', Please follow the below steps
Go to https://pecl.php.net/package/imagick choose a stable version and click on the DLL link.
From the DLL list click the link which, is suitable for your PHP version.
After downloading the php_imagick zip file, extract it and copy the php_imagick.dll file to C:\xampp\php\ext folder.
Extract all DLL files from the php_imagick zip file (except php_imagick.dll) to the PHP root directory (where you have php.exe). Ex: For XAMPP user C:\xampp\php folder.
Add extension=php_imagick to your php.ini file.
Restart the Apache server.
Things to keep in mind before choosing from the DLL list.
Check the PHP version.
Check the architecture (x64/x86).
Check Thread Safety (enabled/disabled).
N.B: Above solution is for XAMPP users only.
I changed php_imagick in php.ini file to php_imagick.dll and it happened
I had the same problem. It turns out I have to install complete ImageMagic application, not just ImageMagic php extension.
And I also set MAGICK_HOME environment variable.

Install SQLSRV extension for PHP on WAMP

I've seen many of these posts and have looked through them all, but I still cannot get the SQLSRV extension running. Can you help me out? I will post all the information I have below:
Windows 7 64-bit
WampServer 2.2 32-bit
PHP 5.4.3 32-bit
Apache 2.2.22 (can't tell if VC6 or VC9)
Microsoft SQL Server 2012 Native Client 64-bit
I downloaded SQLSRV30.exe. I extracted the dll files to C:\wamp\bin\php\php5.4.3\ext.
In my php.ini:
extension_dir = "c:/wamp/bin/php/php5.4.3/ext/"
extension=php_sqlsrv_54_ts.dll
extension=php_pdo_sqlsrv_54_ts.dll
I know that SQLSRV30.exe is built as 32-bit. This is why I have 32-bit versions of Wamp and PHP. I also know that nothing in Wamp is non-thread-safe.
If I view phpinfo() I should see a 'sqlsrv' section, but I currently do not.
What am I doing wrong?
If you are editing c:\wamp\bin\php\php.ini, do not edit that file just edit the one given by wamp server php.ini file, goto wamp server php, then php.ini then you get write ini file.
I had the same problem, this fixed it for me.
Also, make sure you right click WAMP shortcut and "Run as Administrator"
I ran into some trouble this morning, but I found out I had a x64 WampServer... Which was not gonna work correctly.
So, I reinstalled a x86 WampServer, and followed everything i could find on PHP.net (http://php.net/manual/en/sqlsrv.requirements.php). Because I saw this post while i was looking for my x64 solution, I thought I would come back and try to help you:
1) If you have PHP 5.4.# on Wamp, i bet it's TS,VC9
2) Locate the correct 'php.ini' : mine is NOT in the 'bin/php#' folder, but in the 'bin/apache#' folder (C:\wamp\bin\apache\apache2.2.22\bin\php.ini)
3) There are 2 SQLSRV driver versions, 2.0 and 3.0 , make sure you have 3.0!
From the looks of it, we have exactly the same Wamp version, so... I'm pretty sure you have to use the 'php_sqlsrv_54_ts.dll' and 'php_pdo_sqlsrv_54_ts.dll'.
Did you see your new dll in your php extensions list? If so, click on it and make sure there is a V by its name.
(left click on the hopefully green wamp symbol. php-->php extensions-->name of your dll)
I had a similar problem with php 5.5, SQLSRV31.exe, php_sqlsrv_55_nts.dll and php_sqlsrv_55_ts.dll. Miraculously it worked.

installing php_printer on wamp server

Ive been googling around on how to install the php_printer.dll for wamp server, nothing came up. Perhaps, anyone know how to install that ext? Basically, im trying to use php printer function and i need that extension as i heard. i tried http://www.issociate.de/board/goto/751941/Call_to_undefined_function_printer_open().html to install on wamp server, but still give me error in the webpage? i added the extension: php_printer.dll in php.ini
testing code:
<?php
$filename = "test page";
///////
ob_start();
include $filename;
$contents = ob_get_contents();
ob_end_clean();
///////
$handle = printer_open("HP80AA62");
printer_set_option($handle, PRINTER_MODE, "raw");
printer_write($handle,$contents);
printer_close($handle);
?>
Although I don't have much experience with installing/enabling extensions myself, this has worked for me in the past:
Ensure that php_printer.dll is listed under the "ext" directory inside of your PHP installation. If it isn't there, you will need to download that extension and save it under the "ext" directory.
Add the extension inside of php.ini.
Reboot your server and try again.
Hope that helps,
spryno724
Not
extension: php_printer.dll
You should use
extension=php_printer.dll
Also, be noticed that there are plenty of versions of php_printer.dll and most of them don't work on Windows platform.
Try to get fresh one: pecl-5.2.6-Win32.zip.
Also, consider this line form PHP: Printer manual
Windows users must enable
php_printer.dll inside of php.ini in
order to use these functions. A DLL
for this PECL extension is currently
unavailable.
I've just tried to enable it on Wamp (Windows XP) and it doesn't work.
After enabling the php_printer.dll in your ini, I'd first make sure you did it in the good INI file (by looking at "Loaded Configuration File" in phpinfo()).
Then if proper INI is loaded, but the module still isn't working, I'd go to command prompt and try running php manually, like php -v
That will probably give you an error with some more data on the issue - that error wouldn't be visible anywhere through your browser, that is - when you run a page in browser.
In the end - the error that you'll get reported will most probably be that you are trying to load the module which is compiled as 'thread safe' while your version of PHP was compiled as non-thread safe. Or it will be the other way around.
To overcome that, you'll need to download the proper version of PECL. I think that the link mentioned earlier by Wh1T3h4Ck5 is the thread-safe one.
You can try this link:http://museum.php.net/php5/pecl-5.2.6-nts-Win32.zip or maybe here, it's a bunch of win32 binaries:
http://snaps.php.net/win32/
After you download that, take the printer dll from it, copy to your c:\php\ext (or whatever you use), reset the web server and it should work. If it does well, then the php -v shouldn't give errors any more. You can also use the php -m at that point, to list all the modules loaded, or just check the phpinfo() again.
That was the scenario I had and that's how I solved it.
see the path for "Loaded Configuration File" in your php info page. then add extension=php_printer.dll on that php.ini file. mine, it was "D:\wamp\bin\apache\apache2.4.4\bin\php.ini" at "Loaded Configuration File" on php info page.
after you added, it may give a warning like, php startup: unable to load dynamic library 'path/to/php_printer.dll' - the specified module cannot be found on wamp
I got solved this by changing versions of Apache, PHP and MySQL too. correct versions are:
PHP 5.2.6
MySQL 5.0.45
Apache 2.2.9
Hope this helps.
If you can use xampp 1.6.8 version it will fix these issues. it has php 5.2.6 and also php_printer.dll file has saved in ext folder in php folder. so you will only have to un-comment the line extension=php_printer.dll in php.ini file which noticed in the path under "Loaded Configuration File" section on php info page. you can find that version of xampp from www.oldapps.com

PHP won't parse MySQL statements

I just installed Apache 2.2.15/PHP 5.3.2/MySQL 5.1.44 on Windows Vista. Apache is working fine, PHP is functional, and MySQL works on the CLI. However, when I try to access MySQL via PHP, I get an error (Fatal error: Call to undefined function mysql_connect()). extension=php_mysql.dll and extension=php_mbstring.dll are uncommented in the php.ini file, and PHP is in the system path. There is no libmysql.dll in either the top level PHP directory or the ext directory. There's a libmySQL.dll file in the MySQL bin directory (which is also in the system path); I tried renaming it, but that doesn't do anything
Also, in case anyone wants to know, I originally installed PHP using the MSI installer, but it was missing some DLLs, so I installed from the zip file.
I think I've exhausted all my options. Any help on this problem would be very appreciated.
Thanks in advance.
IIRC the msi installer sets some registry values that influence the php configuration, see http://docs.php.net/configuration.changes#configuration.changes.windows. That might change the location of the php.ini that is used. You might want to delete those registry keys. Anyway, you did edit the file that is shown in the output of phpinfo()?
Which build of php do you use? The one you can download from http://windows.php.net/download/? Then you probably have the new mysqlnd transport driver built into the php core dll and don't need libmysql.dll. The mysqlnd driver should show up in the output of phpinfo(). Does it?
It sounds like you do not have the MySQL mod for PHP properly installed or configured. I recommend using AMP on Linux, so sorry for not having any specific instructions for Windows.

Categories