Ask questions about installing and configuring ProcessMaker 3
By awasie
#787737
ProcessMaker Version : 3.1.2-community
PHP Version : 5.6.27

In this article for connecting Microsoft SQL Server:
http://wiki.processmaker.com/3.0/Database_Connections

we have to download freetds dll, I cannot find dll for php 5.6.x

i use PHP 5.5.x but getting the following error in php error log.

05-Dec-2016 15:25:46 UTC] PHP Warning: PHP Startup: mssql: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match

how can i connect to MSSQL how can i connect to MSSQL or what is the solution? - please help
#787754
I am using prcoessmaker on windows 7 64-bit. I have some point need to be clear i am new in processmaker.

1 - how can i downgarde from php 5.6.x to 5.5.x. I install processmaker 3.1 community edition ( Bitnami installer )
2 - can i downlaod processmaker 3.0 community edition is it using php 5.5.x?
3 - we have choice other than freetds for processmaker?
#793166
Hi
I install bitnami installer for processmaker 3.2 and put dll file consists in
(182.76 KiB) Downloaded 1027 times
into php\ext and then modify php.ini as moodle documents says. Now in admin->PHP information section mssql part appeares and in Designer->Database Connections SqlServer appers and tests succesfully. But When I go to form designer and set a query to a DropDown in preview and in case this Message Appears "An internal error occurred #1497083694. Please contact your system administrator for more information." . The query that i put in sql field is valid and has run in Navicat succesfully.
I ran a custom php code : php.exe test.php file contains :
Code: Select all
$link = mssql_connect('127.0.0.1', 'userName', 'Password' ); //real passwords in this part put
if (!$link) { die('Something went wrong while connecting to MSSQL');} else {	die("succesfull!"); }
it responds 'Unable to connect to server'
It seems there is a problem with dll file.

Then as forums geeks says, I install processmaker 3.2 on wamp 2.5 (php 5.5) and put
(132.1 KiB) Downloaded 899 times
into php\ext and then modify php.ini as moodle documents says. Now in admin->PHP information, mssql section does NOT even exist and therefore sqlserver does not appeare in DataBase Connections !
Even I use some other Builts of freeTDS for php 5.5 such as
(115.63 KiB) Downloaded 759 times
and nts versions of all but nothing changed!
:oops:
Any Idea Folks?
Attachments
(182.79 KiB) Downloaded 1091 times
#793643
I solved the issue in this way (for processmaker 3.2 php 5.6 using bitnami installer)

1. Put files
(444.5 KiB) Downloaded 998 times
and
(159.5 KiB) Downloaded 924 times
and
(145.5 KiB) Downloaded 930 times
in {php installed directory}/php/ext

2. Add this three lines to end of your php.ini (placed in {php installed directory}/php/ )
Code: Select all
extension=php_dblib.dll
extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll
3. Extract file
(14.96 KiB) Downloaded 908 times
(use Extract Here in WinRar) to this location : {processmaker installed path}\apps\processmaker\htdocs\gulliver\thirdparty\creole\drivers (the folder named "mssqlsrv" must placed in mentioned folder )

4. Edit Creole.php (located in {processmaker installed path}\apps\processmaker\htdocs\gulliver\thirdparty\creole\ ) : line 88 :
Code: Select all
 'mssql' => 'creole.drivers.mssql.MSSQLConnection', 
to
Code: Select all
 'mssql' => 'creole.drivers.mssqlsrv.MSSQLSRVConnection', 
or simply replace Creole.php with file in zipped file
(6.15 KiB) Downloaded 774 times
Now it worked (at least for me!)
Actually with creole sqlsrv driver, we get rid of all mssql garbages that deprecated from php
#793660
Fantastic work newways3000. Thanks for taking the time to figure this out. I gave up trying to solve it.

Out of curiosity, where did you get the files? I am filing an internal bug report about this for the developers and I need to know where they can get the code.
#793680
You'r welcome !
We always owe to "open source" !
The dll files was at related wiki page of processmaker 3 for connect it to sql server.
Actually I found the driver in processmaker 2.5 . Appearently it removed from 3 because it had some bugs.
The bugs was in MSSQLSRVConnection.php , class MSSQLSRVConnection , method connect .
I changed line
Code: Select all
$serverName = $serverName . ',' . $serverPort;
to
Code: Select all
$serverName = $serverName . ', ' . $serverPort;
You can Believe it or not but sqlsrv_connect can not connect to database with ',' between $serverName and $serverPort ! It must be ', ' :roll:

Another Bug was at same connect method where you specify encoding of $connectionInfo
Code: Select all
if(array_key_exists('encoding', $dsninfo)){
			if($dsninfo['encoding'] == 'utf8'){
				$connectionInfo['CharacterSet'] = 'UTF-8';
			}
			$connectionInfo['CharacterSet'] = $dsninfo['encoding'];
		}
As you see $dsninfo['encoding'] 's value will put in 'CharacterSet' key of $connectionInfo (no matter what $dsninfo['encoding'] is !)
If it is 'utf8' $connectionInfo['CharacterSet'] must be 'UTF-8' not else. If not sqlsrv_connect will fail to connect.
So I changed that to
Code: Select all
if(array_key_exists('encoding', $dsninfo)){
			if($dsninfo['encoding'] == 'utf8'){
				$connectionInfo['CharacterSet'] = 'UTF-8';
			}
			else
			{
				$connectionInfo['CharacterSet'] = $dsninfo['encoding'];
			}
		}
Finally you must force creole extension to use SQL Server driver for managing sql connections not mssql .
Locate file creole in creole folder that exist in parent folder of drivers. Creole.php , class creole where you specify the $driverMap .


If this helped you I appreciate if you vote up my answer at stackoverflow :wink: :wink:
#793783
hi newways3000,

i did what you told here. It didnt work for me. did you do anything except them?

or someone tried this method?

i did with manual installation but bitnami installer is better. can you check it please?
newways3000 wrote:I solved the issue in this way (for processmaker 3.2 php 5.6 using bitnami installer)

1. Put files
php_dblib.dll
and
php_sqlsrv_56_ts.dll
and
php_pdo_sqlsrv_56_ts.dll
in {php installed directory}/php/ext

2. Add this three lines to end of your php.ini (placed in {php installed directory}/php/ )
Code: Select all
extension=php_dblib.dll
extension=php_sqlsrv_56_ts.dll
extension=php_pdo_sqlsrv_56_ts.dll
3. Extract file
creoleSqlServerDriver.rar
(use Extract Here in WinRar) to this location : {processmaker installed path}\apps\processmaker\htdocs\gulliver\thirdparty\creole\drivers (the folder named "mssqlsrv" must placed in mentioned folder )

4. Edit Creole.php (located in {processmaker installed path}\apps\processmaker\htdocs\gulliver\thirdparty\creole\ ) : line 88 :
Code: Select all
 'mssql' => 'creole.drivers.mssql.MSSQLConnection', 
to
Code: Select all
 'mssql' => 'creole.drivers.mssqlsrv.MSSQLSRVConnection', 
or simply replace Creole.php with file in zipped file
Creole.rar
Now it worked (at least for me!)
Actually with creole sqlsrv driver, we get rid of all mssql garbages that deprecated from php
#793877
bilalk wrote:hi newways3000,

i did what you told here. It didnt work for me. did you do anything except them?

or someone tried this method?

i did with manual installation but bitnami installer is better. can you check it please?
Hi

Can you tell what exactly you do and what exactly you get from machine? Explain with machin responses , browser outputs , screenshots or else.

Take this tips into consideration:
    [*]Do EXACT Steps mentioned in [url=http://wiki.processmaker.com/3.0/Database_Connections]Processmaker guide[/url]
    [*]If you do that , you will be able to create a connection to database in Database Connections successfully. If not so you must figure that out first.
    [*] The actual problem is in processmaker driver for minipulating data. If you connect to database succesfully but cant -for example- fill a dropdown with sql server datasources then you must use presented driver in my answer.
#793962
newways3000 wrote:
bilalk wrote:hi newways3000,

i did what you told here. It didnt work for me. did you do anything except them?

or someone tried this method?

i did with manual installation but bitnami installer is better. can you check it please?
Hi

Can you tell what exactly you do and what exactly you get from machine? Explain with machin responses , browser outputs , screenshots or else.

Take this tips into consideration:
    [*]Do EXACT Steps mentioned in [url=http://wiki.processmaker.com/3.0/Database_Connections]Processmaker guide[/url]
    [*]If you do that , you will be able to create a connection to database in Database Connections successfully. If not so you must figure that out first.
    [*] The actual problem is in processmaker driver for minipulating data. If you connect to database succesfully but cant -for example- fill a dropdown with sql server datasources then you must use presented driver in my answer.
hi newways3000,

i did exactly same as wiki its not working there is no MSSQL database connection. After that i did your method, it didnt work. machine reponses like i didnt do anything.
Attachments
aaa2.png
aaa2.png (125.76 KiB) Viewed 47742 times
aaa.png
aaa.png (11.91 KiB) Viewed 47742 times
#794462
Hi Bilal Kymaz

I tried that and it worked nice.
But in case you coudn't run that, plus being sure you did all above stuff, try this
Consider your php folder is at "D:/Bitnami/processmaker-3.2-0/php/"
change php.ini line 732 from
Code: Select all
extension_dir = "D:/Bitnami/processmaker-3.2-0/php/ext"
to
Code: Select all
extension_dir = "D:\Bitnami\processmaker-3.2-0\php\ext"
It means you must replace all "/" with "\"


and then restart all services

I appreciate inform me if that resolved issue 8)
Last edited by newways3000 on Sun Aug 20, 2017 5:55 am, edited 1 time in total.
#798795
Hi newways3000,
I face the same problem. I did a manual PM 3.2 install on Win Server 2012 R2, see the MsSQL at DB connection, pass the test and see the disappointing message the exact steps you mention: 'An internal error occurred #1511262315. Please contact your system administrator for more information.'
I also checked that my slashes ar backslash at php.ini, extension_dir. And still getting the same.
I noticed that Apache error log notes below two lines. Do you have any idea?
Code: Select all
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_sqlsrv_56_ts.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_sqlsrv_56_ts.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
newways3000 wrote:
bilalk wrote:hi newways3000,

i did what you told here. It didnt work for me. did you do anything except them?

or someone tried this method?

i did with manual installation but bitnami installer is better. can you check it please?
Hi

Can you tell what exactly you do and what exactly you get from machine? Explain with machin responses , browser outputs , screenshots or else.

Take this tips into consideration:
    [*]Do EXACT Steps mentioned in [url=http://wiki.processmaker.com/3.0/Database_Connections]Processmaker guide[/url]
    [*]If you do that , you will be able to create a connection to database in Database Connections successfully. If not so you must figure that out first.
    [*] The actual problem is in processmaker driver for minipulating data. If you connect to database succesfully but cant -for example- fill a dropdown with sql server datasources then you must use presented driver in my answer.
#798800
erpnedir wrote:Hi newways3000,
I face the same problem. I did a manual PM 3.2 install on Win Server 2012 R2, see the MsSQL at DB connection, pass the test and see the disappointing message the exact steps you mention: 'An internal error occurred #1511262315. Please contact your system administrator for more information.'
I also checked that my slashes ar backslash at php.ini, extension_dir. And still getting the same.
I noticed that Apache error log notes below two lines. Do you have any idea?
Code: Select all
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_sqlsrv_56_ts.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_sqlsrv_56_ts.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
Faith, The problem might be that you need to use all 32 bit applications. See:
https://stackoverflow.com/questions/225 ... pplication
#798818
Dear Amos, thank you for the quick reply.
I did a fresh setup with everything 32bit, get rid of the error message at Apache logs, but still not succeed.
It is disappointing not to achieve something I have done many times for previous versions.
I will keep posting as I progress.
#798859
Dear Amos,
I am following newways3000s method. When I write a trigger to get the results from db, below is the error message:
No driver has been registered to handle connection type
Any idea how can I register Creole driver?
#798863
Dear Amos,
I split the manual installation process into two parts. Before installing ProcessMaker, I could connect to remote Ms SQL Server and get data with a php script. This means the problem is at ProcessMaker part.
I guess that version 3.2.2 is about to release. Can you please notify the QA team to add a Ms SQL Server remote connection test scenario to their tests.
Thanks.
#803961
Hi Amos,
I am experienced in this forum. I surely know that I must never underestimate the advice from Amos! :wink:
Yes of course I tried php 5.5 32 bit after your advice. I used both Windows Server 2012 R2 and Centos 7.2.
I tried all by 32 bit versions and all by 64 bit versions (Mysql, Apache 24, PHP 5.5).
I tried generic dll s that is listed on wiki and specific dlls for PHP versions from Microsoft.
I tried lot on the method newways3000 described.
As I stated in my previous post, I can get data with PHP natively. There is something going wrong on PM part, which also newways mentioned. The thing is, his method did not work on my installations. There must be something missing.
Do you have any idea about 3.2.2 release date? I will try with that version also.
#809021
At last I found what is missing!
If you want to connect to a remote Ms SQL Server, you need to install SQL Native Connection on your PM Server. Here is the link for Microsofts download page: https://www.microsoft.com/en-us/downloa ... x?id=29065
Do NOT hurry to click the DOWNLOAD button. Click on Install Instructions. Go down the page an find SQL Native Client appropriate for your SQL server version.
Download sqlncli.msi 32 bit or 64 bit, according to your OS.
For 64 bit http://go.microsoft.com/fwlink/?LinkID= ... lcid=0x409
For 32 bit http://go.microsoft.com/fwlink/?LinkID= ... lcid=0x409

I used Bitnami installer for ProcessMaker 3.2 for 32 bit (not the 64 bit)
Windows Server 2012 R2 Datacenter 64 bit OS
I did the exact directives as newways3000 described in this thead above.

On an alternative setup with Manual Installation (Not Bitnami), I solved the connectivity problem by installing msodbcsql:
https://www.microsoft.com/en-us/downloa ... x?id=36434

Hope this helps.

PS: Amos it would be nice if you mention SQL Native Client in wiki at Database Connection section for Windows.
#822727
've got an old project that still runs 5.3.9 and has supported connection to SQL Server. I would like to develop some new features and for that I Imran Khan news
Nawaz Sharif news would appreciate start using the latest version of PHP. But for what I've read there is no support to SQL Server. Any guide that allows me to connect PHP to SQL server in version 5.6?
Last edited by YolandaYan on Wed Feb 06, 2019 6:58 am, edited 1 time in total.
#822769
YolandaYan wrote:I've got an old project that still runs 5.3.9 and has supported connection to SQL Server. I would like to develop some new features and for that I would appreciate start using the latest version of PHP. But for what I've read there is no support to SQL Server. Any guide that allows me to connect PHP to SQL server in version 5.6?
ProcessMaker now supports SQL Server using PHP 5.6. See the documentation:
https://wiki.processmaker.com/3.3/Datab ... ions/MSSQL

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]