Is there some difference in running SC under IIS instead of Apache.
I have some trouble with inserting data in a mySQL database.
Regards Bert
That should not be caused by IIS or apache. Managing data is all done in PHP. So it could be that there’s an issue with different php version, but to be honest, I never have had issues with MySQL.
Thanks. That’s one that gives me trust and the idea to look somewhere else.First I thought it was something with IIS (I am working with apache)
The problem is that I build an application with an insert in a table in a mySQL 5.7.19 and a collation of latin1_swedish_ci I use apache 2.4.27 and PHP 5.6.31
I think this standard when installing mySQL (original it was a swedish firm).
I use apache 2.4.27 and PHP 5.6.31
The data comes out of MSSQL table with a connection in my application. So I have 2 connections:
One for the MS-SQL and one for the mySQL (where the other tables situated and where the application is build on)
The script is:
sc_select(rs,“SELECT klant_nummer, klant_naam, bezoekadres_plaats FROM Deb_Uitw_Nextens”,“klanten_synergy”); // this is the connection with MS-SQL table
sc_exec_sql(“DELETE FROM klanten”,“dfs_documenten_adgro”); // this is the connection with my mySQL table
sc_exec_sql(“ALTER table klanten auto_increment = 1”,“dfs_documenten_adgro”);
while(!$rs->EOF){
$var_klant_nummer = $rs->fields[0];
$var_klant_nummer = str_replace("’","’’",$var_klant_nummer);
$var_klant_naam = $rs->fields[1];
$var_klant_naam = str_replace("’","’’",$var_klant_naam);
$var_bezoekadres_plaats = $rs->fields[2];
$var_bezoekadres_plaats = str_replace("’","’’",$var_bezoekadres_plaats);
sc_exec_sql(“insert into klanten (klant_nummer,klant_naam,bezoekadres_plaats) values (’$var_klant_nummer’,’$var_klant_naam’,’$var_bezoekadres_plaats’)”,“dfs_documenten_adgro”);
$rs->movenext();
}
In my environment (I installed MS-SQL and made an exact copy of the data table, names etc…) it is running fine and in the enviroment of the customer there commes an error.
Something to do with collation?
So I need some help…
Regards Bert
Which version of Scriptcase are you running? If it’s v9.x then it’s advisable to be on PHP v7.0.28. Maybe it’s not totally related but I experienced strange behavior when running SC v9 on PHP 5.6.
Of course next would be to echo the insert statement to debug what the results are in your customer’s environment.
Hi ashballan. I run under V9 latest version and changed to PHP v 7.023. On my site I see no difference, but I have to check with the customer. enviroment.
I have the feeling it has something to do with the collation between the MS-SQL database and the mySQL database . I checked the string out of the customer database.
Nothing special.
What are the official supported versions of PHP for Version 9? I can’t find anything in the documentation for something so basic as this.
Afaik 7.1.something
For deployment from https://www.scriptcase.net/docs/es_es/v9/manual/12-deploy/02-typical/
Pre-Requirements:
- Web Server (ex: Apache, IIS).
- PHP version 5.6 or later.
- Access to the project database that is going to be used in the production environment.
Ok thanks. In the mean time I run several projects under IIS, no problem.
A little unrelated, but ScriptCase is designed and supported around Apache (v IIS), and the devs appear to develop in Windows (they don’t seem to understand linux as well as they do Windows, and I don’t think they test Linux at all unless an angry mob of Linux users forms outside their offices).
So, you’re likely to get the best results running Apache on Windows, configured exactly the way the ScriptCase installer sets up its own sandbox versions of PHP and Apache.
Running Apache and PHP (and MySQL) on Windows can create other issues, but it’s clear that this is how NetMake does it.
I’ve been m/l successfully running 84 ScriptCase applications on Amazon Linux under Apache 2, PHP 5.6 (prior to SC9) and PHP 7.1 (after SC9), and MySQL 5.5 for over 4 years now. The total OFFLINE time is currently 3 minutes, 15 seconds and that’s all due to either the PHP upgrade or security patches that required a reboot. I upgraded PHP thinking it might resolve an issue with deployment, but it didn’t.
My testing environment is Ngnx, PHP 7.1, and MySQL 5.7 on the same Ubuntu server where SC is installed. That tells me ScriptCase apps are reasonably portable.
As scriptcase generates php I think that php at itself is very portable. A lot of Scriptcase devs will work on windows but I think that most of them deploy on linux. If you use a regular hoster then the Apache/MySQL/PHP stack is mostly based on a linux system. I never had any issues running SC devs on a variety of systems, except for one obscure hoster in Australia.