Scriptcase
Error connecting MySQL 8 database
In this tutorial, we will see how to connect to a MySQL database that prohibits access when you have PHP 7 with MySQL 8. First, you must follow the manual Creating a new MySQL User. 1- Once the creation of the new user has been done, you must go to the path to edit the MySQL configuration file. Windows: C:\ProgramData\MySQL\MySQL Server[VERSION_HERE]\ my.ini, OBS: The ProgramData folder is a hidden folder, in order to see it you must access the option Folder > Show hidden files and folders. Linux: /etc/mysql/my.cnf 2- Then edit the file and where it says default-authentication-plugin = caching_sha2_password. Change to default-autenticação-plugin = mysql_native_password If you don't find the line above, add this snippet: [mysqld] default_authentication_plugin= mysql_native_password Finally, restart the MySQL service in order to enable the new settings.
How to connect to MySQL 8.0
The MySQL 8 uses a different authentication from your predecessors, that until the moment it's not accepted by PHP 7, that generates the error "The server requested authentication method unknown to the client" at connecting to Scriptcase. First, you need to create a new user, because as the current MySQL user by default uses the caching2_sha2_password authentication type the connection will not be made using it. We will create the new user using the old authentication to make the connection possible. After this configuration, you will need to change the default MySQL authentication type. To make this change you need to follow the error tutorial connecting to the MySQL8 database. Creating an user using some database management tools. If you are using some of this tools below, we will show how create a new user to your MySQL through them. 1. NAVICAT 2. SQLYOG 3. WORKBENCH 4. TERMINAL/CMD NAVICAT 1. Open the Navicat, and next, connect to a desired database server. 2. Open the connection with any database in this server. 3. Open the SQL commands execution window, in "Query>New Query". 4. Execute this 3 SQL commands below, in order. Command to create the new user with the old authentication: CREATE USER newuser@"%" IDENTIFIED WITH mysql_native_password BY'password'; Command to grant permissions to the new user: GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'%'; FLUSH PRIVILEGES; SQLYOG 1- To connect to a database server by SQLyog, type the commands in the "Query" tab and execute them. Command to create the new user with the old authentication: CREATE USER newuser@"%" IDENTIFIED WITH mysql_native_password BY'password'; Command to grant permissions to the new user: GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'%'; FLUSH PRIVILEGES; WORKBENCH 1- Open one connection with a database server or create a new connection. 2- Type the commands in the "Query" tab and execute them. Command to create the new user with the old authentication: CREATE USER newuser@"%" IDENTIFIED WITH mysql_native_password BY'password'; Command to grant permissions to the new user: GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'%'; FLUSH PRIVILEGES; CMD/TERMINAL 1. Access MySQL through Terminal. Linux: Just open the terminal and use the MySQL command passing the parameters to make the connection. -h = Server Ip (If on the same machine not required) -P = Server Port (If on the same machine not required if default) -u = User (Required) -p = Password (Required) Windows: If you are not using the application to directly open the MySQL terminal, you will need to navigate to the MySQL folder. cd "c:\Program Files\MySQL\MySQL Server{Your version}\bin" So, access MySQL 2. Next, create a new MySQL user with the older MySQL authentication. The command mysql_native_password is the one that should be used. Command to create the new user with the old authentication: CREATE USER newuser@"%" IDENTIFIED WITH mysql_native_password BY 'password'; Command to grant permissions to the new user: GRANT ALL PRIVILEGES ON *.* TO 'newuser'@'%'; FLUSH PRIVILEGES; 3. In the Scriptcase, in creating the connection to MySQL, use the new user to create the connection. For New MySQL Installations For new installations, we are able to select the type of authentication. In this case, we must select Use Legacy Authentication Method (Retain MySQL 5.x Compatibility) Installing the MySQL with this option selected the connection to Scriptcase can be created without any problem.
Updating Scriptcase's PHP
Currently, the installation of Scriptcase 9.x comes with version 7.0.14 of PHP, unfortunately, this version has a compatibility problem with the new version of authentication of MySQL 8.0, so it is necessary to perform the PHP update so the connection between Scriptcase and MySQL 8 can be performed. In this tutorial we will see how to update the PHP in the following systems: - Windows - Linux Updating your PHP in the Windows Follow the steps below to update PHP from your Windows environment. Before start the updating process it's necessary to verify the PHP architecture, so to find it we need to access the url: http://127.0.0.1:8090/scriptcase/info.php. Download the PHP according to your architecture. - Download PHP After download: 1 - Stop the apache service; 2 - End phpcgi processes that are running; 3 - Rename the php folder in /NetMake/v9/components to php_old; 4 - Extract the zip in /NetMake/v9/components; 5 - Copy the php.ini from php_old to php; 6 - Start apache; Alert After updating the PHP is necessary to create a new user in MySQL, please follow the tutorial to create a new user . Updating your PHP in the Linux Follow the steps below to update PHP from your Linux environment. Before start the updating process it's necessary to verify the PHP architecture, so to find it we need to access the url: http://127.0.0.1:8090/scriptcase/info.php. Download the PHP according to your architecture. - Download PHP After download: 1 - Stop the apache service; 2 - Extract the zip in /opt/NetMake/v9/components 3 - Copy the folder Apache that is inside the folder lin_php_x , paste it to /opt/NetMake/v9/components and replace the old. 4 - Start apache; Alert After updating the PHP is necessary to create a new user in MySQL, please follow the tutorial to create a new user .
Configuring the timezone in PHP
Configuring the timezone in PHP When using a PHP environment, we sometimes encounter the following error: “ERROR: 2 = date (): it is not safe to rely on the system’s timezone settings.” This error occurs when PHP is unable to automatically determine the system’s timezone, usually due to the lack of an explicit date.timezone setting in the php.ini file. To fix this, follow the steps below: **1.**Find the php.ini file: The php.ini configuration file may be located within the PHP directory of Scriptcase. In standard installations, you can find it in the following location: • Windows: C:\Program Files\NetMake\v9\components\php\php.ini • Linux/Unix: The file may be in a path like Scriptcase/v9-php81/components/php/php.ini (depending on the PHP version used). **2.**Edit the php.ini file: Open the php.ini file in a text editor. **3.**Configure the timezone: In the php.ini file, search for the line that defines the timezone. If the line is commented out (starting with a semicolon), remove the semicolon and set the correct timezone for your region. The line will look like this: date.timezone = “America/Recife” Replace “America/Recife” with the correct timezone for your location. To access the complete list, here.
Execution of reCaptcha Displays Error - MacOS
If the error below is displayed when submitting the form / control with reCaptcha, perform the following steps: Warning: file_get_contents (): SSL operation failed with code 1. OpenSSL Error messages: error: 14090086: SSL routines: ssl3_get_server_certificate: certificate verify failed in Download the link file: http://curl.haxx.se/ca/cacert.pem The file cacert.pem will be downloaded, rename this file to curl-ca-bundle.crt Put the file in: / Applications / Scriptcase / v9 / components / php / etc / Edit the php.ini file, located in / Applications / Scriptcase / v9 / components / php / Add the following content to the end of the file: openssl.cafile = "/ Applications / Scriptcase / v9 / components / php / etc / curl-ca-bundle.crt" After this, restart the apache service and run the form / control application again. sudo / Applications / Scriptcase / v9 / components / apache / bin / apachectl restart
GoJS Library is no longer available
GoJS library is no longer available for native use in Scriptcase. We have purchased a GoJS O&M license for Scriptcase 9 and, by our understanding, we could distribute GoJS to any number of end users, however we were recently contacted by Northwoods Software Corporation questioning our understanding, since most of our customers use Scriptcase to develop systems. For that reason we had to remove GoJS API for development or distribution use on Scriptcase. You can use GoJS as an external library inside Scriptcase, however you will have to get a license for that. Northwoods is offering a Special License Discount Program with the following generous terms: ○ 50% discount off Northwoods Listed Price Terms and Conditions: ○ Applies only to single-developer, single-application, OEM or Internal Use, licenses. ○ Does not apply to source code. ○ Requires a proof of purchase of Scriptcase . ○ Not available to existing Northwoods customers. ○ Northwoods reserves the right to modify these terms and conditions without notice. ○ Offer expires on December 31, 2018. NOTE: Click here to see new examples created by our development team to replace the applications made with GoJS components.
Manual Update - Linux
Before performing any procedures, we recommend backing up your projects. To back up Scriptcase: Go to Settings > Administration, and in the side menu, access Services > Backup. A .ZIP file will be generated with all your projects — save this file in a secure directory. Alternatively, you can compress and save the entire Scriptcase folder in a safe location. Below, we will see how to manually update Scriptcase: 1. Download Scriptcase in tar.gz format from our official website. 2. Now, we need to extract the downloaded .tar.gz file and copy its contents to the current Scriptcase directory. To do this, access the Linux terminal and run the following commands in order: 1. sudo su 2. tar -zxvf****scriptcase-10.0.000-pt_br.tgz 3. cp -R scriptcase-10.0.000-pt_br/* /opt/NetMake/v10/wwwroot/scriptcase 4. chmod 777 -R scriptcase/ Note: Permission 777 only must be considered if you have a local installation. opt/NetMake/v10/wwwroot/scriptcase is the default path to the automatic installation. If you installed scriptcase in a different path, use this path. 3. To confirm the update, after transferring the files, access your Scriptcase and go to Help > Check for updates.
Adding new columns in the table for Calendar
If your calendar application is already created, we must add the fields below in the table so that the new functionalities work correctly: | | | | --- | --- | | category | int | | id_api | varchar(255) | | id_event_google | varchar(255) | | recur_info | varchar(255) | | event_color | varchar(255) | | creator | varchar(255) | | reminder | varchar(255) | You can change the table structure with the ALTER TABLE function. Example in MySQL: ALTER TABLE table_calendar ADD COLUMN category int, ADD COLUMN id_api varchar(255), ADD COLUMN id_event_google varchar(255), ADD COLUMN recur_info varchar(255), ADD COLUMN event_color varchar(255), ADD COLUMN creator varchar(255), ADD COLUMN reminder varchar(255) AFTER period; Next, we must access the Calendar application and update the application fields through the item Application > Synchronize Table. Now we should only configure the fields added according to the configuration below: Field event_color Field category: Field id_api: Id_event_google field: Field recur_info: Now we should relate the fields of the table to the fields of the application: After that, the application will be ready to work properly with Google Calendar integration.
Manual update of Scriptcase on Windows
The manual update of Scriptcase is performed using the compressed .zip, file available in the Scriptcase download area. This procedure replaces only the base Scriptcase files, which are responsible for the structure of the tool. The existing projects in the environment are not changed, removed, or overwritten during the update. Before starting the procedure, we recommend creating a backup of the projects and the current installation as a security measure. 1. Creating the backup The backup can be created through Scriptcase itself by accessing: Settings > Administration > Services > Backup Wait for the backup to finish before downloading the file through the tool interface. It is also possible to perform a manual backup by copying the current installation folder to another safe location. 2. Downloading the update file Access the website download tab and download the latest version of Scriptcase in ZIP format for Windows. The downloaded file will be used to replace the base files of the current installation. 3. Extracting the compressed file After completing the download, extract the contents of the .zip file to a temporary folder. Example: C:\Users\User\Downloads\scriptcase\scriptcase-10.0.000 Inside the extracted folder (scriptcase-10.0.000), you will find the files of the new Scriptcase version. 4. Copying the files from the new version Select all files and folders from the new Scriptcase version. Copy this content. 5 - Pasting the files into the current installation Paste the copied files into the current Scriptcase folder. Destination example: C:\Program Files\NetMake\v9-php82\wwwroot\scriptcase When Windows asks for confirmation to replace the existing files, confirm the replacement. 6. Waiting for the copy process to finish and accessing Scriptcase Wait until all files are copied and replaced. After the file replacement is complete, access Scriptcase normally through the browser. Use the same address used before the update. Example: http://127.0.0.1:8093/scriptcase
Manual Update - Mac OS
Before performing any procedures, we recommend backing up your projects. To back up Scriptcase: Go to Settings > Administration, and in the side menu, access Services > Backup. A .ZIP file will be generated with all your projects — save this file in a secure directory. Alternatively, compress and save the entire Scriptcase folder in a safe directory. Below, we will see how to manually update Scriptcase: 1. Download Scriptcase in .ZIP format from our official website. 2. Now, we need to extract the downloaded .zip file and copy its contents to the current Scriptcase directory. To do this, access the Linux terminal and run the following commands in order: 1. sudo su 2. unzip scriptcase-10.0.000.zip 3. cp -R scriptcase-10.0.000/* /opt/NetMake/v9-php81/wwwroot/scriptcase** 4. chmod 777 -R scriptcase/** For those who performed step 2 using the MacOS graphical interface, click "Merge". ⚠️ Note: Never click "Replace", as this action will delete your entire Scriptcase and your projects. 3. To confirm the update, after transferring the files, access your Scriptcase and go to Help > Check for updates.
PHP functions necessary for ScriptCase
In PHP , there are some essential functions for the operation of Scriptcase . On some servers , these functions are disabled , this makes the Scriptcase not work properly. If you're using a shared hosting server, you'll need to contact the host administrator to ask if he can made the necessary changes for Scriptcase functionalities. We recommend that you use a Dedicated Host. Following is the list of functions that can not be blocked , if you want to install Scriptcase on the server: - dir - readdir - opendir - eval - exec - set_time_limit - ini_alter - ini_set - ini_restore - php_uname - popen - proc_close - proc_get_status - proc_open - shell_exec - system - copy - move_uploaded_file For those wishing to place announcements via FTP , there are some functions used by Scriptcase to perform this type of publication. Following is the list of functions that can not is disabled in PHP, for those who want to perform publication via FTP : - ftp_connect - ftp_exec - ftp_get - ftp_login - ftp_nb_fput - ftp_put - ftp_raw - ftp_rawlist Note : The functions listed , not impede the functioning of Scriptcase only prevents the realization of a publication via FTP.
Setting password recovery in Scriptcase
To configure the password recovery, it's necessary to do some steps so that works correctly. To the recovery happens, will be necessary that you have and configure a SMTP server. After login, you'll access the menu **Options > Settings > System Settings.**Will be necessary to configure: - SMTP Server - SMTP Port - SMTP User and Password - SMTP Email All configured, you'll need to check if your users have an email linked to them. All done, when you do the recovery process, the steps will be send to your email and this process will works as expected.
Installing Scriptcase with PHP 7.0 on Windows
This article explains PHP 7.0 and Apache 2.4 installation to ScriptCase use. Supported Operating Systems: - Windows Server - 2008 SP2 - 2008 R2 SP1 - 2012 - 2012 SP2 - 2016 - Windows - 7 SP1 - Vista SP2 - 8 - 8.1 - 10 Necessary Files: - PHP 7.0: Click Here - Apache 2.4: Click Here - mod_Fcgi: Click Here - SourceGuardian Loader: Click Here NOTE: You should download PHP 7.0 NTS ( x86 or x64 ), Apache 2.4 ( x86 or x64 ) and mod_fcgi ( x86 or x64 ). - After downloading, extract the PHP and Apache files in your C: directory of your Operating System. - Rename the PHP folder to php and the Apache folder to Apache24. - Extract the modfcgi file, and copy the file mod_fcgid.so to the folder C:\Apache24\modules Apache and PHP Directory Setting up Apache Edit the file httpd.conf located in C:\Apache24\conf\ - Add the content below after the last line #LoadModule LoadModule fcgid_module modules/mod_fcgid.so FcgidInitialEnv PHPRC "c:/php" AddHandler fcgid-script .php FcgidWrapper "c:/php/php-cgi.exe" .php Setting up httpd php fcgi - Still in the httpd.conf search for #ServerName www.example.com:80 and change to #ServerName localhost:80 - Change the content of the directive according to the example below: DirectoryIndex index.html index.php index.phtml - Add the text: Options ExecCGI on the directive Directory “c/:Apache24/htdocs” Settung up httpd fcgi - Search for IfModule mime_module and add the content below: ` AllowOverride None Options None Require all granted ` Setting up httpd PHP directory Apache Installation - Access the command prompt with the Administrator privileges and run the command below: - c:\Apache24\bin\httpd.exe -k install Installing Apache 2.4 IMPORTANT: If an error occurs, it might inform that the file msvcr110.dll is missing, so you can download the file by clicking here. Extract and place the file within the directory: C:\Windows\System and C:\Windows\System32. Rerun the command in the prompt. Setting up PHP - Access the PHP folder in C:\and rename the php.ini-development file to php.ini - Edit the php.ini file, search for extension_dir and assign this value “C:\php\ext” PHP extension - Activate this extensions listed below (You just need to remove the (;) from the start of each line) extension=php_bz2.dll extension=php_curl.dll extension=php_gd2.dll extension=php_imap.dll extension=php_interbase.dll extension=php_ldap.dll extension=php_mbstring.dll extension=php_exif.dll extension=php_mysql.dll extension=php_mysqli.dll extension=php_oci8.dll extension=php_pdo_firebird.dll extension=php_pdo_mssql.dll extension=php_pdo_mysql.dll extension=php_pdo_oci.dll extension=php_pdo_odbc.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_pspell.dll extension=php_shmop.dll extension=php_sqlite.dll extension=php_sqlite3.dll extension=php_xmlrpc.dll extension=php_xsl.dll extension=php_zip.dll Important note: By default some PHP functions are disabled, but they are important to ScriptCase. Access the php.ini file and change the item disable_functions according to the example below: disable_functions= ““ Setup the TimeZone according to your region. You need to use the value available at the PHP documentation Click Here to view TimeZone do PHP - Save all these modifications. - Restart the Apache service using the command (Use this command in a cmd with the Administrator privileges.): - c:\Apache24\bin\httpd.exe -k restart Enabling SourceGuardian Loader - Extract the file downloaded. - Copy the ixed.7.0.win file to the folder c:\php\ext. - Edit the php.ini file, at the end place the content below: - [SourceGuardian] zend_extension=C:\php\ext\ixed.7.0.win - Restart the Apache service using this command (Use this command in a cmd with the Administrator privileges.): c:\Apache24\bin\httpd.exe -k restart Scriptcase Manual Installation - Download ScriptCase with the extension zip at www.scriptcase.net and extract it on the root of your web server. - After extracting, rename the folder to scriptcase. - Access Scriptcase from your browser using the URL below: - http://127.0.0.1/scriptcase - By default, the selected language is English. Installation's initial pageBy default the selected language is English. - Verifying the necessary extensions for ScriptCase to work and the modules for the database connections. Verifying the necessary extensions for ScriptCase to work and the modules for the database connections.Verifying the necessary extensions for ScriptCase to work and the modules for the database connections. Typical Installation - On this option, ScriptCase will be installed with the default settings. On this option, ScriptCase will be installed with the default settings.On this option, ScriptCase will be installed with the default settings. - Login Screen. Login ScreenLogin Screen. Custom Installation - On this option, the user will choose the settings for the installation. On this option, the user will choose the settings for the installationOn this option, the user will choose the settings for the installation. - Verify the system’s directory permissions. Verify the system's directory permissionsVVerify the system’s directory permissions. - We can choose the database that ScriptCase will use to store the data in. We can choose the database that ScriptCase will use to store the data inWe can choose the database that ScriptCase will use to store the data in. - Displaying the ScriptCase’s tables creation. Displaying the ScriptCase's tables creationDisplaying the ScriptCase’s tables creation. - Setting up the user to access ScriptCase. Setting up the user to access ScriptCaseSetting up the user to access ScriptCase. - Finishing the custom installation Finishing the custom installationFinishing the custom installation - Login Screen. Login ScreenLogin Screen.
Installing PHP 7.0 - Mac
This article describes the PHP 7.0 and Apache 2.4 installation to ScriptCase use. Supported Operating Systems: - Mac - El Captain - Sierra Necessary Files: - SourceGuardian Loader: Click Here Setting up PHP - Access the terminal (shell) and execute the command below to use the superuser (root): - sudo su - Execute the command below to install PHP: - curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0 - Directory Installation - /usr/local/php7.0 Setting up Apache - Edit the file httpd.conf: - nano /etc/apache2/httpd.conf - Add the content below to the bottom of the module: - LoadModule php7_module /usr/local/php7.0/libphp7.so Setting up PHP module - Edit the file paths: - sudo nano /etc/paths - Add the content below to the top of the file: - /usr/local/php7.0/bin Setting up PHP path - In /Library/WebServer/Documents/ create a file called info.php with the content below: - php phpinfo(); ? - Access it through the browser: - http://localhost/info.php Enabling SourceGuardian Loader - Copy the file ixed.7.0.dar that was downloaded according to your architecture to the folder /usr/local/zend/lib/php_extensions - cp ixed.7.0.dar /usr/local/zend/lib/php_extensions - Configure the file’s permission: - chmod 777 -R /usr/local/zend/lib/php_extensions/ixed.7.0.dar - Edit the php.ini file in /usr/local/zend/etc/ and add the content below to the file’s bottom: - [SourceGuardian] zend_extension=/usr/local/zend/lib/php_extensions/ixed.7.0.dar - Restart the Apache service using the command below: - sudo /usr/sbin/apachectl stop - sudo /usr/sbin/apachectl start Scriptcase Manual Installation - Download ScriptCase with the extension zip at www.scriptcase.net and extract it on the root of your web server. - After extracting, rename the folder to scriptcase. - Access Scriptcase from your browser using the URL below: - http://127.0.0.1/scriptcase - By default, the selected language is English. Installation's initial pageBy default the selected language is English. - Verifying the necessary extensions for ScriptCase to work and the modules for the database connections. Verifying the necessary extensions for ScriptCase to work and the modules for the database connections.Verifying the necessary extensions for ScriptCase to work and the modules for the database connections. Typical Installation - On this option, ScriptCase will be installed with the default settings. On this option, ScriptCase will be installed with the default settings.On this option, ScriptCase will be installed with the default settings. - Login Screen. Login ScreenLogin Screen. Custom Installation - On this option, the user will choose the settings for the installation. On this option, the user will choose the settings for the installationOn this option, the user will choose the settings for the installation. - Verify the system’s directory permissions. Verify the system's directory permissionsVVerify the system’s directory permissions. - We can choose the database that ScriptCase will use to store the data in. We can choose the database that ScriptCase will use to store the data inWe can choose the database that ScriptCase will use to store the data in. - Displaying the ScriptCase’s tables creation. Displaying the ScriptCase's tables creationDisplaying the ScriptCase’s tables creation. - Setting up the user to access ScriptCase. Setting up the user to access ScriptCaseSetting up the user to access ScriptCase. - Finishing the custom installation Finishing the custom installationFinishing the custom installation - Login Screen. Login ScreenLogin Screen.
Resetting the Production Environment Password
** Important - By doing this procedure, all your configurations of the production environment will be lost.** In this article, we will see how to reconfigure the password of the production environment, because there is not an option for “Forgot my Password”. The only way to access, the production environment is in this case resetting the environment. This way, all the configurations and connections will be lost To do this procedure, follow the steps below: 1**-** You have to access this directory: ../_lib/conf - By doing a typical deployment, the default directory is: root server/deployment folder/_lib **2 -**In the directory previously shown, there is two files: - You should rename or delete the file prod.config.php 3 - After deleting the file, just access the production environment and inform the default password.
Installing PHP 7.0 - Linux
This article describes PHP 7.0 and Apache 2.4 installation to ScriptCase use. Supported Operating Systems: Ubuntu Debian CentOS\RHEL OpenSuse Necessary Files: SourceGuardian Loader (ixed.7.0.lin): Click Here Setting Up PHP - Ubuntu Because of recent changes, Ubuntu replaced the version 7.0 from PHP by the 7.2 version in the default repository. 1 - Access the terminal (shell) and execute the command below to use the superuser (root): - sudo su 2 - Add the repository so that you can realize the download of the PHP packages in the correct version: - add-apt-repository ppa:ondrej/php - apt-get update 3 - Execute the command below to install the PHP and accept the dependencies installation: - apt-get install php7.0 php7.0-dev php7.0-cli 4 - Verify the PHP version by executing the command below: - php -v 5 - There is below some extensions required for the good functioning of Scriptcase: - apt-get install php7.0-gd php7.0-bcmath php7.0-cgi php7.0-common php7.0-fpm php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-xml php7.0-zip Important: By default some PHP functions are disabled, but they are important for ScriptCase. Access the php.ini file (/etc/php/7.0/apache2/php.ini) and change this item disable_functions according to the example below: Setting up the disable_functions of PHP 6 - Setup the TimeZone according to your region. You need to use the value available at the PHP documentation Click Here to view. Activating The Database’s Extensions: | | | | --- | --- | | Extension | Driver enabled in Scriptcase | | apt-get install php7.0-pgsql | PostgreSQL PDO, PostgreSQL 6.3 or bellow, PostgreSQL 6.4 or above, PostgreSQL 7 ou above | | apt-get install php7.0-mysql | MySQLi, MySQL PDO | | apt-get install php7.0-sqlite | SQLite PDO | | apt-get install php7.0-interbase | Firebird, Interbase 6, Interbase 6.5, Firebird PDO | | apt-get install php7.0-odbc | DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, Oracle ODBC, Progress, DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC | | apt-get install php7.0-sybase | DBLIB, Sybase PDO DBLIB | If you want to enable the oci8 extension to connect with Oracle Database, follow the steps described in our documentation. Setting Up PHP - Debian Because of recent changes, Ubuntu replaced the version 7.0 from PHP by the 7.2 version in the default repository. 1 - Access the terminal (shell) and run the command below to use the superuser (root): 1. su 2 - Add the repository so that you can download the PHP 7.0 packages and then upgrade the packages: - wget -q https://packages.sury.org/php/apt.gpg - apt-key add apt.gpg - echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list - apt-get update 3 - Run the command below to install PHP and accept the installation of dependencies: - apt-get install php7.0 php7.0-cli 4 - Check the PHP version by running the command below: - php -v 5 - Below are some extensions required for the proper functioning of Scriptcase: - apt-get install php7.0-gd php7.0-bcmath php7.0-cgi php7.0-common php7.0-fpm php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-xml php7.0-zip 6 - Configure the TimeZoneaccording to your region. You should use the value available in the PHP documentation. Click here to view. Activation of Database Extensions: | | | | --- | --- | | Extension | Driver enabled in Scriptcase | | apt-get install php7.0-pgsql | PostgreSQL PDO, PostgreSQL 6.3 or below, PostgreSQL 6.4 or above , PostgreSQL 7 ou above | | apt-get install php7.0-mysql | MySQLi, MySQL PDO | | apt-get install php7.0-sqlite | SQLite PDO | | apt-get install php7.0-interbase | Firebird, Interbase 6, Interbase 6.5, Firebird PDO | | apt-get install php7.0-odbc | DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, Oracle ODBC, Progress, DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC | | apt-get install php7.0-sybase | DBLIB, Sybase PDO DBLIB | If you want to enable the oci8 extension to connect with Oracle Database, follow the steps described in our documentation. Setting Up PHP - CentOS 7 Note: By changes to the latest version of CentOS, PHP 7.0 will not be installed by default. You will need to follow the steps described below: 1 - Access the terminal (shell) and run the command below to use the root user: - sudo su 2 - Add the repositories you need to download php 7.0 packages and then upgrade the packages: - yum -y install epel-release.noarch yum-utils - yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm - yum-config-manager —enable remi-php70 - yum update 3 - Run the command below to install PHP and accept the installation of dependencies: - yum -y install php 4 - Check the PHP version by running the command below: php -v 5 - Below are some extensions required for the proper functioning of Scriptcase: yum install php70-php-gd.x86_64 php70-php-bcmath.x86_64 php70-php-common.x86_64 php70-php-ldap.x86_64 php70-php-mbstring.x86_64 php70-php-mcrypt.x86_64 php70-php-xml.x86_64 php70-php-pdo.x86_64 php70-php-pear.x86_64 6 - Configure the TimeZoneaccording to your region. You should use the value available in the PHP documentation. Click here to view. Activation of Database Extensions: | | | | --- | --- | | Extension | Driver enabled in Scriptcase | | yum install php70-php-pgsql.x86_64 | PostgreSQL PDO, PostgreSQL 6.3 or below, PostgreSQL 6.4 or above, PostgreSQL 7 or above | | yum install php70-php-mysql.x86_64 | MySQLi, MySQL PDO | | yum install php-sqlite3 | SQLite PDO | | yum install php70-php-interbase.x86_64 | Firebird, Interbase 6, Interbase 6.5, Firebird PDO | | yum install php70-php-odbc.x86_64 | DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, Oracle ODBC, Progress, DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC | | yum install php70-php-pdo-dblib.x86_64 | DBLIB, Sybase PDO DBLIB | If you want to enable the oci8 extension to connect with Oracle Database, follow the steps described in our documentation. Enabling SourceGuardian Loader 1 - Realize the download of the extension ixed.7.0.lin for the 64 bits architecture from the SourceGuardian’s website through this link. 2 - Copy the file ixed.7.0.lin that was downloaded in according with your distribution and architecture and paste in the PHP’s extensions directory. - cp ixed.7.0.lin /usr/lib/php/20151012 3 - Edit the PHP configuration file(php.ini) and add the directive to enable the SourceGuardian extension in your PHP. For example: extension=ixed.7.0.lin. - nano /etc/php/7.0/apache2/php.ini SourceGuardian extension 4 - In the end, restart your apache service to apply the changes made: - service apache2 restart. Scriptcase Manual Installation - Download ScriptCase with the extension zip at www.scriptcase.net and extract it on the root of your web server. - After extracting, rename the folder to scriptcase. - Access Scriptcase from your browser using the URL below: - http://127.0.0.1/scriptcase - By default, the selected language is English. Installation's initial page - Verifying the necessary extensions for ScriptCase to work and the modules for the database connections. Verifying the necessary extensions for ScriptCase to work and the modules for the database connections. Typical Installation - On this option, ScriptCase will be installed with the default settings. On this option, ScriptCase will be installed with the default settings. - Login Screen. Login Screen Custom Installation - On this option, the user will choose the settings for the installation. On this option, the user will choose the settings for the installation - Verify the system’s directory permissions. Verify the system's directory permissions - We can choose the database that ScriptCase will use to store the data in. We can choose the database that ScriptCase will use to store the data in - Displaying the ScriptCase’s tables creation. Displaying the ScriptCase's tables creation - Setting up the user to access ScriptCase. Setting up the user to access ScriptCase - Finishing the custom installation Finishing the custom installation - Login Screen. Login Screen
Solving Source Guardian version problem
In this tutorial, we will show how to solve the problem with Source Guardian version in Scriptcase installations. Select your correspondent operating system to follow the right steps below: 1. Linux 2. Windows 3. MacOS By cryptography incompatibility issues and for the correct functioning of Scriptcase, like the license register, it is necessary to use a Source Guardian lesser version that 11.3.2 version. will be necessary to download the attached file according to your operating system. Download the correct file to avoid issues. Linux To realize this file change on Linux, it is necessary to know the extensions directory from PHP. By default in a manual installation on Debian\Ubuntu, the directory path is: /usr/lib/php/20151012 This path can vary according to the installation type that you have done. To verify the right path to this directory, you can access your info.php and search for the directive extension_dir , like in the image below: After identifying the directory path, replace the original file by the download file in the extensions directory. sudo unzip ixed.7.0_linux.zip sudo cp -f /home/$USER/Downloads/ixed.7.0.lin /usr/lib/php/20151012/ixed.7.0.lin With this done, now it is necessary to restart the apache service from your server. This action can be done with this command line below: sudo service apache2 restart After that, verify in the info.php if your Source Guardian version has changed to 11.3 version. Windows To realize this file change on Windows, it is necessary to know the extensions directory from PHP. By default in a manual installation on Windows, the directory path is: C:\php\ext\ This path can vary according to the installation type that you have done. To verify the right path to this directory, you can access your info.php and search for the directive extension_dir , like in the image below: - After identifying the directory path, extract the attached file: - Then, replace the file in your extensions directory: - With this done, now it is necessary to restart the apache service from your server. This action can be done through the Task Manager or the Services application. The apache service name depends on the configuration type made in your server. After that, verify in the info.php if your Source Guardian version has changed to 11.3 version. MacOS To realize this file change on MacOS, it is necessary to know the extensions directory from PHP. By default in a manual installation on Mac, the directory path is: /Applications/Scriptcase/v9/components/php/ext This path can vary according to the installation type that you have done. To verify the right path to this directory, you can access your info.php and search for the directive extension_dir , like in the image below: After identifying the directory path, replace the original file by the download file in the extensions directory. sudo unzip ixed.7.0_mac.zip sudo cp -f ~/Downloads/ixed.7.0.dar /Applications/Scriptcase/v9/components/php/ext/ixed.7.0.dar With this done, now it is necessary to restart the apache service from your server. This action can be done with this command line below: sudo /Applications/Scriptcase/v9/components/apache/bin/apachectl/restart After that, verify in the info.php if your Source Guardian version has changed to 11.3 version.
PDF generation displays message: 'Not Found'
Follow the step by step to correct the error "Not Found" when executing the PDF generation. First step: Navigate to the tmp folder in your publication folder. E.g: /publication folder/_lib/tmp Open the .log file that was generated with the name of your PDF. Save your content. E.g: Second Step: Here you will execute the commands according to your operating system. LINUX: | | | --- | | Open your server's terminal and type: Linux x86 cd /deployment_folder/_lib/prod/third/wkhtmltopdf/linux-i386 Linux x64 cd /deployment_folder/_lib/prod/third/wkhtmltopdf/linux-amd64 Choose according to your version of Linux. | WINDOWS: | | | --- | | Open your server's terminal and type: cd /pasta_publicacao/_lib/prod/third/wkhtmltopdf/win | On windows there may be a lack of redistributable c ++ libraries 2013 and 2015 x86 and x64 installed on the server. After the installation of the libraries located above, the generation should work. MACOSX: | | | --- | | Open your server's terminal and type: cd /pasta_publicacao/_lib/prod/third/wkhtmltopdf/OSX | Third Step: Now, inside the folder we arrived at the second step, Ex: "/deployment_folder/_lib/prod/third/wkhtmltopdf/folder_OS", Run the command that was saved in step one. E.g: Fourth Step: An error will be displayed, which says that it is the lack of a library in your operating system. Perform the installation of the missing library and try to perform the PDF generation again. If the message "Segmentation fault" is displayed during the fourth step, follow the procedures below: This problem occurs because the binary file of the wkhtmltopdf library "wkhtmltopdf-amd64" has been corrupted. To solve, just rename this file with the command: "mv wkhtmltopdf-amd64 wkhtmltopdf-amd64_bkp" And put in the _lib / prod / third / wkhtmltopdf / folder_OS / directory the binary file that corresponds to the version of your publication. If you use Scriptcase version 9 or higher, the binary file can be downloaded through the link below: Binary file: https://wkhtmltopdf.org/downloads.html
Request license for new installation
Note: Before performing any action on your Scriptcase, we recommend you to do a backup of your projects. In some cases, it is necessary to register the Scriptcase again, as in formatting or change of the server, for example. In these cases, it will be necessary to generate a new serial to register the tool. Thinking about the convenience of the client, we make available on our site the option to generate a new license. Follow the steps below to generate a new serial: 1 - First, log in to the user's environment on our site. Click here to access the login screen. On our website, the login button is in the upper right corner of your screen. If you forgot your username or password click here. 2 - After logging in, a menu will appear containing some options, click on the SERIALS tab. 3 - In the serial list, you can check the status of your serial. Canceled: Serial that has been canceled, this will be the status of your current serial after generating a new one. In use: Serial that is currently being used. Open: Serial that has not yet been used by any tool. Find the serial you are currently using in Scriptcase. Click the Request serial for new Installation link. 4 - In the next screen, it is necessary to accept the terms of use and to inform the reason of the serial change. 5 - Next your new serial will be displayed, and the previous serial will be canceled. 6 - With the new serial in hand, we must register the Scriptcase. When logging in to the tool, go to the top menu: Help> License Registration. 7 - Enter the same user and password used to login to the site at the beginning of this tutorial and inform the new serial that was generated and click on register. After registration we will return to the Scriptcase login screen, now registered with the serial name.
Examples for diagrams
This tutorial shows how you can import and use the new examples for diagrams released with Scriptpcase V9.2.16. The applications were created using the components: Jsmind, JKanban e Orgchart. **- Sample 1:**Mind Map diagram Click here to execute the mind map application - Sample 2: OrgChart Diagram Click here to execute the OrgChart diagram To use the examples you need simply import the projects "samples" within your Scriptcase. See below the steps to import the project: - Create a new project: - Select the project "Samples" Then select where you want to save the tables created by the project. You can save the tables within the default directory of Scriptcase (SQLite) or using your own database according to the supported database. All sample projects of Scriptcase have previously created tables with dummy data for testing. We will select the default connection (SQLite), so the tables will be stored within Scripcase's directory. After importing click "generate code" to finally create all sample applications. Once imported the project is available for you to view or copy the applications for use in your projects. You will find the new libraries to create the mind maps and the Orgchart inside the folder: "Diagrams" - Sample 3: Pipeline The third example was done with the Jkanban component for creating a dynamic Pipeline within a CRM template system. Click here to execute CRM template To access the example simply import the project "CRM" within your Scriptcase following the same steps above to import the "Samples"
Request a new license
Some situations require the reinstallation of Scriptcase, in these cases, the user must generate a new serial on our website to register the tool. Follow the steps below to generate a new serial: 1. Log in to the website The entire process to generate a new serial is carried out on the website, please, have the license owner’s user and password at hand. Click here to access the website’s login screen On our website, the login button is located in the upper right corner of the screen. 1.1 Login and Password On this page, enter the License Owner Login and Password. 2. Serials Tab 2.1 After logging in, click on the Serials tab 2.2 Serials List All serials linked to the account will be listed. Only serials with Status In Use can be used to request a new serial. The Status is: 1. In use: The serial is linked to some Scriptcase. Search for serials with this status to generate a new serial. 2. Canceled: The serial is no longer available for use. This will be the status of the serial used to generate the new serial. 3. Open: The serial is available to be registered in some Scriptcase. This will be the status in the newly generated Serial. Look for a serial with the status In Use and click the Request for New Installation link**.** In the image, it is possible to notice that only the serial with a 5SC end is available to be used in the generation of a new serial. 3. Terms of responsibility In this stage, it will be displayed the serial is canceled for the generation of the new serial in its place. To proceed, select the reason that led to the request for the new serial and accept the terms of responsibility, checking the I read and accept box. Then the Request button will be available, and you can go on with the process. Click Request button and you're new serial will be generated. Kind reminder that in this process the serial used initially will be canceled for use, and the new serial generated in its place will be used to register the Scriptcase. 4. New Serial In this step you will receive your new serial. With the new serial in hand, proceed to the Scriptcase registration. See How to Register my Scriptcase As seen in step 2, this new serial will be listed along with the others in the Serials tab.
How to perform a publication
A publication is the act of making external applications made to your project in the Scriptcase, so that they may be accessed by in the environment approval. Basically, the procedure is the last stage of development, where the user Scriptcase find all the assist to implement the project in a web server, this which in turn must be duly configured to ensure smooth operation of applications. Scriptcase has two different forms for performing of this process, both of are detailed below: NotesNOTE: We recommend that the PHP version for the Production environment should be the same as the Development environment, due to compatibilities of the PHP functions between their different versions. Typical publication It's the kind of publication that automatically configures the production environment, with all the common libraries used by applications. If you ever need to customize the directories of the publication, for example up the image directory and the temp directory, this type of publication is not recommended, seeing that this type these directories are configured with a default Scriptcase, preventing the customization of the same, to accomplish a publication that gives freedom to choose of the directories recommend that you use mode of publication "Advanced". To know how to proceed in a TypicalP**ublicationclick here. Advanced Publication It's the kind of publication that gives the user possibility to choose directories project default in the ScriptCase, such as: Images Directory, Document Directory, Directory Production (Common Libraries) and so on. This type of publication is recommended in cases in which it is necessary to use specific directories of your web server, the default directories to be of the publication. To know how to proceed in a Advanced Publication.
Dividing fields into blocks
In a block we can separate in a previously organized way the fields that belong to the Form. In this style of organization, we can create several blocks and give the Form a more flexible and pleasant layout for the end user. For you to create a block just click on Blocksas shown in the image below. After clicking on Blocks, the screen below will be displayed. As a default, there is already a block that was created along with the Form. This block is called initially with the same name as the created application, but we can modify it by changing the name of the block. To create new Blocks we must click on the Create New Block button, as shown in the selection in the figure below. After clicking Create New Block you will be asked to choose a name for the New Block. To customize the layout of the Form, we can edit some properties of the Block. After making all the necessary edits, we click on the save button to apply the Block configuration that we just created. After clicking save, two blocks will be displayed instead of just one (Figure Below). Now we click on the Fields Positioning item, to choose which fields will be part of each block. In this screen you can see that the Blocks are more to the left, and the fields that belong to the Block are below it and a little more to the right. In this case we have releaseId, companyid, deptid, accountid and valuerelease being part of the first Block and the remaining fields being part of the second **Block.**See how the Form was after the creation of new_block. As you can see, the Blocks can give the Form a more pleasant View in addition to helping the end user to better understand the application.
Creating new themes for Scriptcase
In this article, we will show how to create and edit new themes for your applications. Scriptcase afford a complete tool for creating themes, can change the layout of buttons, all the CSS application, and the application's menu bar menu. With a simple interface and practice, it also enables the visualization of changes made in real time, facilitating the development of these themes. The editing and creating themes is available only within the projects and can create restricted to the project, the user or public can be utilized on any project of their Scriptcase themes. Note: It is not possible to perform the export of topics for another installation of Scriptcase thus the new theme can only be used in Scriptcase it was created. To create or make changes in existing themes go, Layout > Applications themes, after sign in or create a project. Displays a list of all existing themes in your project and a preview of the project's default theme. These subjects were included in creating it. At this stage there are two possibilities, creating a new theme (by clicking create new theme) or edit an existing theme in Scriptcase (clicking save as). When you click create new theme will be directed to the screen below: After making the desired changes, you must enter a name for the theme, select the mode, public (available in any project created), user (available only to the user who created the topic ) and click save. Then we will be redirected to an identical screen to the previous step, displaying the theme created, check the picture below: After the creation of the subject, we must select it in the project on existing applications. In his Scriptcase access, the Application > Express edit menu. After selecting which applications are updated, we should select the scheme in this way will exchange the themes of all applications. Then we select the theme and apply the changes created.
Creating custom menus
Scriptcase has the option to customize the application menu, changing its layout for better viewing. First, we must access the Layout> CSS Menu option After that we can see all the themes for the menu After clicking "New", we will have access to display settings. Can choose the level of access and the name: There are three options to customize: Main menu - submenu - Menu Line Accomplish after our customization, we must access the menu items: Browse by topics and choose what you create.
Macro sc_block_display
In this example, we will see how to use the sc_block_display macro in an Ajax event using a Radio button on a Form, this macro is intended to hide or show a block. The steps in this example: 1. Configuring Radio type field 2. Configuring and creating blocks 3. Using Macro in Ajax Event The macro has the following scope: | | | | | | | --- | --- | --- | --- | --- | | Calendar application | chart application | Grid application | Form application | Control Form | | onAfterInsert onAfterUpdate onScriptInit onLoad onRefresh onValidate onValidateFailure onValidateSuccess | onScriptInit | onScriptInit onRecord | onAfterDeleteAll onAfterInsert onAfterInsertAll onAfterUpdate onAfterUpdateAll onScriptInit onLoad onNavigate onLoadRecord onRefresh onValidate onValidateFailure onValidateSuccess | onClick onScriptInit onLoadAll onRefresh | Configuring Radio type field 1.We will be using a Radio type button as a flag to enable the block or disable it, that way we will be creating a Manual lookup to put two options available (Full and Simple) 1.1Creating a radio button with the name "Filling" Remember to disable the checkBox to create a new block to position this field Configuring Manual Lookup of the Radio Field 1.2With the field already created, choose the Manual Lookup option with the following labels (Full and Simple) with the following values respectively ("f" and "s"), as shown below: After configuring each option, click on the "Include" button In the onLoad event of your form, place the following code: 1. {filling} = "s"; 2. sc_block_display('block2','off'); Configuring and adding blocks 2. We will be at this stage creating our block to be used in the macro. 2.1 In your form click on Layout-> Blocks Create a block called "block2" as follows: Organize your separate fields for each block in the Field Positioning option, with the following image: Using the macro in Ajax event 3.Create an "onClick" ajax event and use the following code: 1. if({filling} == 'f') { 2. sc_block_display('block2', 'on'); 3. } else { 4. sc_block_display('block2', 'off'); 5. } 3.1Save and run the application. When clicking on the option "Full", the entire block will be shown, and when clicking on the option "Simple" the block will be collapsed
Creating and Using a library in Scriptcase
We'll take a step-by-step look at how to create and make use of a library in Scriptcase. 1. To create an library go to: Tools > Internal Libraries 2. In this first window you should select what level you want to create/upload your library. 3. You can upload a file with your script or create a new one. Click in New. 4. Type the name for the new library, an description and put your code. In this example we will check if some field is empty. 5. Now you have to enable the library to be used in your app. Do it in: FORM-->PROGRAMMING-->LIBRARIES 6. In the event ONVALIDATE of the form we will call the function create in our library. 7. Run the application and see the output of the function.
How to perform a deployment on Scriptcase - Advanced
This tutorial shows how to do a typical deployment in the Scritpcase. The scriptcase contains two models of application deployment: Typical and Advanced. If you are unsure of how to deploy to a hosting server, watch this video tutorial about deployment here. Prerequisites: 1. Web server (eg: Apache, IIS) 2. PHP version 5.4 or higher. 3. Access to the database that will use the project after it is deployed; Starting the advanced deployment process: This type of deployment is intended for users who want to use the default settings of the production environment (Common Libraries), this configuration is made automatically by Scriptcase. The process is described below: Step 1: Access your project and choose the option "Project -> Deploy", available in the top menu. After click in Deploy, you have the option to deploy all project applications or choose which will be deployed. In this tutorial we will use the option "All". Note: Case you choose the option "Select Applications", a screen with all project applications will be displayed so you can choose only those that will be deployed. Step 2: In the next screen, choose which type of publicacion you want to use, for this examples we will choose the "Advanced". Step 3: Let's create a deployment template so the settings can be saved and reused whenever wanted. Step 4: Set the directory structure of the production environment according to the structure of common libraries defined on the production server. Two separate configuration examples are shown. If you wish, after finishing the deployment process, in addition to the project link, the link to the production environment (Common Libraries) is available, check the option "Deploy with the common files(CSS, buttons, images, messages)" Example: **Note:**It is necessary to create a directory on your production server, to house the entire deployment production environment (Common Libraries), remembering that in the documents directory you must inform the absolute path to the folder. In this example we are using the directory named "producao". Directory Settings Directory of the Production: Set of libraries and services used by applications published. Set here the path relative to the prod directory, eg: /production/prod or /prod Directory of the Images (used in the upload process): Folder where the images are saved when some application uses a field of type "image (file name)". Enter this option and the relative path to the img directory, eg: /production/file/img Directory Temporary: Folder will be created where the temporary files created during the execution of applications. Files in this directory are removed periodically based setting specifies, by default is 120 minutes. Use this field the path relative to the tmp directory, eg: /production/tmp or /temp_files/tmp Directory of the Documents (used in the upload process): Folder where you saved the documents, when some application uses a field of type "Document (file name)". Absolute path (full path) to the doc directory, eg: C:/Apache/htdocs/production/file/doc or C:/Apache/htdocs/my_documents/doc Note: The Character "/" means that tthe root of the Web server is used for relative paths. Step 5: Set the name of the connection with the database, which will be used in the project after it is published. Step 6: Choose the mode of deployment to be used. ScriptCase offers three options: 1 - Generate the ZIP with the applications (recommended): At the end of the process will be provided a link to download the deployment package. Note: This option is recommended as it is the least dependent on other services to be performed. Deployment on a server directory: Deploy the applications in the directory informed. This option should only be used if the deployment is made in the same server where the ScriptCase is installed, otherwise the option will not be valid. If Scriptcase can't find a folder named "teste", an alert screen will be displayed asking for this folder to be created. **Deploy on FTP server:**Automatically deploy the applications on a remote FTP server. Note: To use this option it is necessary to have a server that has FTP access and a user with write permissions in the same folder. FTP server: Server which will be used to deploy the project. Insert here the domain of your FTP server. User: FTP user of the production server, remembering that this user must have write permission in the server folder, otherwise it will not work. Password: Password of the FTP user. Directory in the FTP: Directory of the chosen server for deploy the project. Step 7: At the end of the process, a report of the deployment applications will be displayed along with download links, both for the project and for the common libraries, which are the necessary routines for running the applications in a production environment, which is why it is mandatory that they be taken together to the deployment package. Note: With the advanced deployment, is necessary to download the "Production Environment", which corresponds to all the files responsible for public libraries. If you do not wish to download the Production Environment (Common Libraries) generated by the link after deployment, you can choose to download it here. If you want to deploy the same project again, no need to download the common libraries. This information is not only valid when ordinary libraries have been updated to a new release of ScriptCase. Starting the process of creation of the Production Environment: **Step 1:**The next step is to extract the zip files generated by ScriptCase. The structure will look like the image below: Within the root folder (wwwroot) was created a folder named "teste" and within this folder, the applications zip file was extracted. Creating the connection In the next step, we will create the connection. Step 1: Access the 'production environment' in the browser at the following address 127.0.0.1:8092/producao/prod. You will see a screen like the image below. For the first login the default password is scriptcase. On the next screen you will have to set a new password to enter the "production environment". Step 2: On the next screen you will have to define a new password to enter the "production environment". Step 3: Upon entering the production environment, you will see your connections, click on them and continue the configuration process. Step 4: In this step we choose the database, the database we use in the application. Step 5: We will inform the Database Server, in ours as the database is on the same machine as the applications, we can call it through ' localhost ', if the database is on another server it can be called through the machine name or IP number, we will inform also the Login and Password to access the database (if any). Note: For the example, the MySQL database was used. Step 6: The last step will be accessing the application in the browser.
How to perform a deployment in Scriptcase - Typical
Check out the step-by-step of a typical publication of your projects. Environment prerequisites Web server configured and compatible with PHP versions approved for Scriptcase applications such as: Apache, IIS or nginx Extension of the database used in the project connection enables connection creation. PHP approved for use in the tool's applications. Applications are compatible with environments with PHP version 7.0 or higher. Check the complete list Projects developed in Scriptcase installations with PHP 7.0 or PHP 7.3 are approved for the following PHP versions - PHP 7.0 - PHP 7.1 - PHP 7.2 - PHP 7.3 - PHP 7.4 Projects developed in Scriptcase installations with PHP 8.1 are approved for the following PHP versions - PHP 7.0 - PHP 7.1 - PHP 7.2 - PHP 7.3 - PHP 7.4 - PHP 8.0 - PHP 8.1 Starting deployment 1. Access the "Project -> Deploy" menu, available on the top menu. It is possible to start the deployment outside the project, through the drop-down menu: 2. Select the project applications that will be deployed. If you choose to select applications, a screen will be displayed showing all of the project's applications, allowing you to define which applications will be deployed. 3. Select the type of deployment to be carried out, in this article we continue with the Typical option. In case you need more information about advanced deploy, check out our documentation about advanced deploy, or go to How to perform advanced deploy. 4. Next, the files that will be sent to your server must be defined. If this is your first publication, check the options: Publish with production environment and Publish with common files. When selecting the Publish with production environment option, two new options will be displayed 1. Publish with FusionChart maps - This option defines if the files referring to the FusionChats Maps library (maps.js) will be sent in the deployment. It must be checked if your project uses any map resource. 2. Operating Systems - This option is mandatory and defines the sending of wkhtmltopdf and phantomjs files based on your operating system, thus reducing the size of the generated file. Select the operating system where your project will be deployed. See more details about the available options in Typical deploy documentation. After selecting the options, click on "Next" **5.**In the final stage of deployment, it is necessary to define the format in which the deployment will be carried out. Choose the desired format for your deployment and click on "Next". Generating the ZIP with the applications (recommended): At the end of the process will be provided a link to download the deployment package. Note: This option is recommended as it is the least dependent on other services to be performed. Deployment on a server directory: Deploy the applications in the directory informed. This option should only be used if the deployment is made in the same server where the ScriptCase is installed, otherwise the option will not be valid. If Scriptcase can't find a folder named "teste", an alert screen will be displayed asking for this folder to be created. Deploy on FTP server:Automaticallydeploy the applications on a remote FTP server. Note: To use this option it is necessary to have a server that has FTP access and a user with write permissions in the same folder. Select the option you would like to deploy and click on "Next". For this example we will use the option "Deploy on a server directory". 6. At the end of the process, a report of the deployment applications will be displayed along with download links, both for the project and for the common libraries, which are the necessary routines for running the applications in a production environment, which is why it is mandatory that they be taken together to the deployment package. It is important to wait for the deployment process to end and download the file through the interface, to ensure that all applications and libraries were correctly generated and included in the file. Creating the connection In the next step, we will create the connection. Step 1: Access your app through the browser at the following address eg: 127.0.0.8092/folder/app_name. You will see a screen like the image below informing that no connection was found. Please click on "Create connection" button to be redirected to the production environment. **Step 2:**The first time you enter the production environment, the password is "scriptcase". On the next screen you will have to set a new password to enter the "production environment". Step 3: On the next screen you will have to define a new password to enter the "production environment". Step 4: Upon entering the production environment, you will see your connections, click on them and continue the configuration process. Step 5: In this step we choose the DBMS, the database we use in the application. Step 6: We will inform the Database Server, in ours as the database is on the same machine as the applications, we can call it through ' localhost ', if the database is on another server it can be called through the machine name or IP number, we will inform also the Login and Password to access the database (if any). Note: For the example, the MySQL database was used. Step 7: The last step will be to access the application through the browser.
Deletes my application, can I recover it?
If you delete an application, and needs it again, Scriptcase offers the ability to restore applications, can be performed as follows: Step 1: Go to the Application Menu. Step 2: Select the desired application. Step 3: Name the application. Press "Next" to restore your application.
Using the Database Builder
The DataBase Builder is a Scriptcase 'DBMS' (Database Manager System), this tool allows you to create tables, modify the structure of your tables, generate ER diagrams (Entity x Relationships), perform the export of the tables among other things. Currently DataBase Builder connects only with databases: Oracle, SqlServer (Other than ODBC), Mysql, Postgres, SQLite In this example, we will show you how to create and export a table using the Database Builder, follow the steps below: 1. To access this tool, we must first be inside a project with the connections previously created. 2. Next, we must access the Database menu> DataBase Builder 3. Next, we must select which connection we want to access, if there is more than one in our project. 4. Next, we will be redirected to the screen below: In this image, we can see all the options available for data and table manipulation. The DataBase Builder provides some similar functions to traditional 'DBMSs', allows us, among other things, to create triggers, change user permissions, export tables in different formats, modify table structures. 5. Next, we will create the new table, above the list of existing tables click on New table **6.**At the side, the screen for creating the table will be displayed. In this step, we must inform the name of the table, and the default type for the table. After creating the table, we will now export it. 7. Above the option to create tables, click Export 8. In the export screen, it is possible to inform the type of output, the format of the generated file. After making the settings, click export.
Field with Validation Image
In this example we’ll show how make a validation with the “Image validation” active. 1 - Create a Control Application. 2 - Create a couple of fields - Note that one of the fields is an E-mail type, and will be used to validate 3 - Setup the field for image validation. - Every time if the Format is correct it’ll validate - If not in the right format it’ll not validate
Hotkeys on Scriptcase
Scriptcase offers the ability to create shortcuts for the application functionalities. The configuration of each shortcut is simple and the same for all browsers. However the way of use is different, each browser is different, and this is independent from Scriptcase. This feature Scriptcase, lets you use a letter or number to set as shortcut key, since the command is created by the browser. Follow the steps to perform the configuration of your shortcuts: 1. In the configuration of the application, access the side menu Toolbar, It will display the following screen: To configure the hotkeys, simply enter a letter or number in Shortcut key field, since the commands are predefined for each browser 2. Informing the hotkeys. 3. To use the shortcut created, it is necessary to know the shortcut command used by each browser, it does not depend of Scriptcase.
Using Languages in Scriptcase
In Scriptcase you have the option to standardize the language information quickly and uncomplicated. Using the feature you can change LANGUAGES entire textual structure of the project, since this native messages Scriptcase own name to fields and table. Below we give such item can be implemented easily. On the toolbar select the "Application language". On the screen that opens you will have the option to edit any information relating to the project. To facilitate your navigation items are separated into "Scriptcase Messages" and "Project Messages", this way is much easier to edit them. Selecting the "Messages Scriptcase" just click on the type of message you want to edit, and thus open the options available for editing. In the example below we have selected the option "Log". To finish editing just click the button "Update Messages". The choice of languages has an initial default configuration that can be used and thus you do not need to manually configure each message, just select the language of design patterns that all messages will be loaded. Learn more about the benefits of this and other features that Scriptcase, now download the free version of our tool and get started today to enjoy these and other benefits that Scriptcase offers.
Report on the Application List Scriptcase
A major differential Scriptcase are your management reports that help a lot in analyzing project performance in terms of productivity. Today we will talk a bit about other report that has a function very similar, the Report Application List. With it you can see all the applications created in the project and thus analyze important information about deliveries. To access the Report List Applications go to the menu "Project", choose "Reports" and then "Application List". In this configuration screen you can select the report two columns will be part of the report, namely: - Name: Name given to the application; - Description: Description of the operation of the application; - Creator User: User who created the application; - Date / Time of Creation: Day and time when the application was created; - Date / Time Update: Day and time of the last update of the application; - Date / Time Generation: Day and time of the last generation of source code; - Generation Status: Shows whether the application was correctly generated or not; Another important option of the report is the possibility to order the selected columns, moreover, the information can still be grouped by type or folder. Once selected the columns, sorting and collator the report is displayed. This is another feature that will help you have more control over your development project, know the status of the applications that are being developed is essential, especially on larger projects.
Project Search
The Application Search option is ideal for large projects, which contain many applications. With this search tool it is possible to search among the applications created in Scriptcase from a word. 1. To access the application search, go to the menu Project > Project Search. 2. Next, a screen will appear with several search filters. 3. After performing the search, it is possible to analyze the result in the grid below the filters, where the search results can be found.
Generating Diagnosis in Development
Generating Diagnosis from the Scriptcase interface First, you need to login to Scriptcase, and go to the Top Menu and click on Help -> Diagnosis. It will load a page containing your server's environment information, to save it click on the link at the top of the page "Log file successfully create, Click here, save the file and send to NetMake!" It will load an HTML page containing the information from ScriptCase, PHP, WEB Server and more... To send this log to NetMake it is necessary to save the file and to send by email. Generating Diagnosis directly from URL You can access the diagnosis using the URL as well, but you don't need to use ScriptCase for this. Type in the address bar the path to your ScriptCase / diagnosis.php (http:// + Server + Port + Scriptcase Folder + 'diagnosis.php').
Melhorando performance do banco de dados com MySQL Tuner
Você pode baixar todo o repositório usando ‘git clone’ seguido pela URL clonagem acima. O método mais simples e mais curto é: wget http://mysqltuner.pl/ -O mysqltuner.pl wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt perl mysqltuner.pl Claro, você pode adicionar o bit de execução (chmod + x mysqltuner.pl) para que você possa executá-lo sem chamar o perl diretamente. Exemplos de utilização Exemplo 1: Utilização mínima localmente perl mysqltuner.pl Exemplo 2: Utilização mínima remotamente perl mysqltuner.pl --host targetDNS_IP --user admin_user --password admin_password Exemplo 3: Ativar informações de saída máxima em torno de MySQL / MariaDB sem depuração perl mysqltuner.pl --buffers --dbstat --idxstat Exemplo 4: Escreve o resultado em um arquivo com a informação mostrada perl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt Exemplo 5: Escreve o resultado em um arquivo sem saída informações perl mysqltuner.pl --silent --outputfile /tmp/result_mysqltuner.txt Exemplo 6: Utilizando modelo de customização do arquivo de relatório baseado na sintaxe do Text:Templateperl mysqltuner.pl --silent --reportfile /tmp/result_mysqltuner.txt --template=/tmp/mymodel.tmpl Exemplo 7: Ativar informações de depuração perl mysqltuner.pl --debug
CEP Type Field
This feature is only available for Brazilian scriptcase installations
Import and Export applications on Scriptcase
When working with projects WEB one of the most important items is the backup, an effective policy that can avoid many problems. No project is free of problems or errors, and so it is important to have a backup always available if you need to retrieve some information. Scriptcase can backup applications quickly and practically, check below. To create a file with all your project applications, go to menu "Application" and select "Export applications". Then select whether to export all or select some specific applications. If you select the option "All", a window showing the details of the export will open and just down the option to download the file with all applications. Once created the file, if you want to retrieve the applications, just go the "Application" menu and select "Import applications". On this screen you can send the file. Previously created zip and thus recover all the files created. With this feature that makes it much easier when it comes to backup routines, you can create quick and effective control.
Tips for HelpCase
To be able to create a documentation, go to Tools → HelpCase → Create new HelpCase. 1-) In the Name section of the HelpCase: If you enter more than one word you must do it without spaces, you can use the hyphens. Example: Project Valid Project_Sale Valid Sale Project Invalid ProjectSale Valid **Note: If you use spaces in the name of the HelpCase, an error will occur on all pages, since the browser cannot handle the space in the address bar.**In case you want to put a title, you can do it in the Description section, which does not have restrictions. To create a new folder and HTML files, the same rules in step 1-) In this way, if we want to add an image: It would be as follows, once the HelpCase was generated:
Registering your License on Scriptcase
To register a Scritpcase license, you must have: - Your license with status "Open" - Your Username used to access the website (Username linked to the license) - Your Password used to access the website ( Regarding the Username that will be used) If you don't remember your password, click on "Did you forget your user/password?" and follow the steps to reset your password. Obtaining my Scriptcase License If you do not know which license is available for registration, log in to our website with an account used to purchase the tool. Follow the steps below to find your license number. After login, click on the Serials tab to view your licenses available for registration. Your list of serials will be displayed, locate your serial with Open status. Registering my Scriptcase License After obtaining the necessary information to register the license, log in to your Scriptcase. After login, click Help > License Registration. There are two ways to register your Scriptcase license: - Online Registration - Offline Registration (Request) Online Registration In this option, you inform the user, the password (Used to login to the website), and the license number, then click on "Register". After clicking Register, the following message will be displayed: Offline Registration (Request) Open the Scriptcase and access the "Help > License Registration" section: After accessing the "Help > License Registration" section, there will be an option on the left side called "Offline Request", click on it. After clicking on "Offline Request", the screen below will appear, you can inform the user, password and license number and click on "Request". Click on "scriptcase_v9.req" to download the .req file: With the file "scriptcase_v9.req" downloaded, go to the Scriptcase website and log in with your username and password in My Scriptcase. Access the link https://www.scriptcase.com.br/licenserequest/ to see the screen below. Insert your license number and click on "Select file" to upload the scriptcase_v9.req file. After that click on "Continue". On the next screen, download the file "scriptcase_v9.lic". After downloading the "scriptcase_v9.lic" file, you must access the Offline Registration option in Scriptcase. Now, enter your username, password, license number and select the file scriptcase_v9.lic file downloaded previously. After that click on "Register" After registering the license, the screen below will be displayed: Your Scriptcase is now registered!
Using sc_ajax_refresh()
-Create a grid -At the Ajax Event -New Ajax Event: -Select the Event onClick and the desired field, and create: -Add the following macro: sc_ajax_refresh (); -When clicking on the record in that field, the page would be reloading Corresponding documentation: https://www.scriptcase.net/docs/es_es/v9/manual/14-macros/01-general-view/#sc_ajax_refresh
Place menu background image
To place a background image inside the menu you can do the following: 1. Create an application of the Menu type 2. Then create an application of type Blank 3. Within the onExecute event the image must be added with the following code 4. Then we return to the menu application in: Settings> Navigation 5. Select the Blank application as the Default application in the menu
How to create a button link
Button Link: Used to link the application with any other type of project application. In this type of link a button is used as a link between applications. How to do a button link - Make a link button in your application. - Set the button as a link button. - Click in the "link" blue button. - Choose the target application. - Set the parameters. Parameter Types: Field: Used to pass the value of an application field as a parameter. Fixed value: Used to pass a fixed value as a parameter. Global variable: Used to pass the value of a global variable, used as a parameter. No value: by choosing this option no value will be passed as a parameter. - Set the properties of the link and save. - It's still possible alter the settings defined and delete a link created. Properties: Opens the already defined link properties, which changes link behavior, positioning, link opening mode. Link: Changes a target application and its parameters. Delete: Deletes the link created.
Converting Projects to Scriptcase 9
Scriptcase allows you to port your projects through project chat easily. Thus, projects developed on any older version of the tool can benefit from all the new features available in version 9. Check out what's new in version 9.4 on our landing page. If you have any questions about the Scriptcase 9 installation process, check out this installation tutorial or contact our technical support. Scriptcase versions on the same machine. IMPORTANT To convert projects, both versions of Scriptcase must be in the same machine. If your Scriptcase 9 is not installed on the same machine as your previous Scriptcase, we must create a copy of the entire old Scriptcase folder, and place it in parallel with the Scriptcase 9 folder. See the example below. - The old version folder of the tool is named scriptcase8 - The new installation folder as scriptcase, which is, in this case, Scriptcase 9 Now, we will start the process of converting projects. Project Converter. IMPORTANT The conversion process is safe and risk free for your projects, however, we recommend a backup before making any actions in your Scriptcase 9 such as converting your projects. In this step, you already have a properly installed Scriptcase 9 and the folder of your old Scriptcase on the same machine as your Scriptcase 9 installation. Now, we will proceed with the tutorial. Accessing the converter 1. Access Scriptcase 9 through your browser of choice. In Scriptcase, go to the Tools> Converters menu and select the version to be converted. IMPORTANT In Scriptcase 9 it's possible to convert projects created from Scriptcase 6 and onwards. If you have an earlier version, you will need to convert your projects to Scriptcase 6 and later to Scriptcase 9. Start a chat with our Sales Department or with our Technical Support we will be happy to assist you with your project conversion questions. Old Scriptcase Directory 2. In this step, we must enter the full directory to the Scriptcase folder, as in the example below. When using the automatic installer with its default configuration, Scriptcase should be located in the following directories according to your operating system. - Windows 64 bits >> C:\Program Files\NetMake\v9[wwwroot](http://wwwroot/) - Windows 32 Bits >> C:\Program Files (x86)\NetMake\v9[wwwroot](http://wwwroot/) - Linux 32 ou 64 Bits: /otp/NetMake/wwwroot - MacOS >> /Applications/Scriptcase/v9 IMPORTANT The error *** error access SC_TBPRJ V8 = no such table: sc_tbprj will be displayed if the old Scriptcase base is not found, in that case, please contact our technical support Project list 3. In this step, existing projects in the previous version will be listed. Select the projects that will be converted and those that will not. Conflicting Projects If there are any v8 projects in conflict with v9 projects, they will be listed separately, as shown in the image below. - Convert - The project will not be converted, keeping the project version in v9. - Not Convert - The project is converted, and the entire v9 project will be overwritten. - Conversion Log At the end of the project's conversion, the log screen will be displayed, with all actions performed in the database. To finish it, click exit. IMPORTANT When finalizing the conversion process, it's important to generate the source code of the projects and run their applications. We are not responsible for any problems of an external nature, such as problems with third-party libraries or code used in applications.
How to create an edit link
Edit Link: Used to edit grid records through a Form. In the generated grid a link will be displayed on each row for editing the record. By clicking on the link, the form of the selected record can be displayed in various ways (in an iframe, in a modal, in the same window or in a new window). How to do an application link: - Open your application and go to the “Application Links” on the side menu. - Click the "click here" link or "create new link" to create a new link. How to do an edit link from a grid: - Choose the edit link and click next. - Choose the target application and click next. - Set the parameters and click confirm. Parameter Types: Field: Used to pass the value of an application field as a parameter. Fixed value: Used to pass a fixed value as a parameter. Global variable: Used to pass the value of a global variable, used as a parameter. No value: by choosing this option no value will be passed as a parameter. Set the link properties and save. After this step by step the register will show a pencil icon on the left side, so the user can edit the data. - It's still possible alter the settings defined and delete a link created. Properties: Opens the already defined link properties, which changes link behavior, positioning, link opening mode. Link: Changes a target application and its parameters. Delete: Deletes the link created.
How to create a capture link
Capture Link: Used for the grid filter form, it imports data from another grid into the filter form field. Selecting the capture link type will display a list of fields in the filter form so that you select the field that will receive the data through the link. How to do an application link: - Open your application and go to the “Application Links” on the side menu. - Click the "click here" link or "create new link" to create a new link. How to do a capture link from a grid, filter or form: - Choose the capture link, set the field of the link an click next. - Choose the target application and click next. - Set the parameters. If you do not want to set parameters just click confirm. To define parameters in an application link the target application must have the parameters, such as a where clause defined in the sql menu. Parameter Types: Field: Used to pass the value of an application field as a parameter. Fixed value: Used to pass a fixed value as a parameter. Global variable: Used to pass the value of a global variable, used as a parameter. No value: by choosing this option no value will be passed as a parameter. - Set the field to be returned. - Set the properties of the link, if you want to display in a modal you need to put the size. After this step by step the filter of the grid will show a magnifying glass icon in the field where the link was made, so the user can select the register. - It's still possible alter the settings defined and delete a link created. Properties: Opens the already defined link properties, which changes link behavior, positioning, link opening mode. Link: Changes a target application and its parameters. Delete: Deletes the link created.
How to create a field link
Field Link: Used to create a navigation link in a grid column for any existing project application. When you select this type of link, all grid fields will be displayed in a select so that you can select the one to place the link on. The application when accessed by the link can be displayed in different ways (in an iframe in a modal, in the same window or in a new window) to do so just by setting in the link properties. How to do an application link: - Open your application and go to the “Application Links” on the side menu. - Click the "click here" link or "create new link" to create a new link. How to do a field link from a grid: - Choose the field link, set the field of link, and click next. - Choose the target application and click next. - Set the parameters and click confirm. Parameter Types: Field: Used to pass the value of an application field as a parameter. Fixed value: Used to pass a fixed value as a parameter. Global variable: Used to pass the value of a global variable, used as a parameter. No value: by choosing this option no value will be passed as a parameter. - Set the properties. - Em modo de operação você define como a aplicação de destino será exibida. After these steps, the field will be linked to the target application. - It's still possible alter the settings defined and delete a link created. Properties: Opens the already defined link properties, which changes link behavior, positioning, link opening mode. Link: Changes a target application and its parameters. Delete: Deletes the link created.
Using two search applications to access a form
In this example we are going to create 2 applications of the "Search" type, and 1 application of the "Form" type. In the Search type applications, we will use the "customers" and "orders" tables, however, we will select only a few fields from each table and make adjustments to some of them. To use the tables mentioned above, just create a new project and use the ready project "Samples" in the ScriptCase. 1. We created the first application of the type Search using the table "customers", and we will select only the field "customerid" to be used in the application. 2. Next, we will go to the option "Fields", because we will change the type of the field "customerid" to 'Select' and activate the option "Use Select2". 3. Still on the field's configuration page, let's scroll down a little further to "Lookup Method" to write an SQL code, where we select the 'customerid' and 'companyname' fields from the 'customers' table and sort the records in the 'companyname' field. 4. As the idea is to access the Form by going through 2 applications of the type "Search" beforehand, we will need to redirect the application "search_customers" to "search_orders", through the onValidate event, passing the following parameters below in the sc_redir() macro 5. That done, we will create the second application of the type "Search", where we will use the 'orders' table and make the necessary adjustments. In this case, two fields were selected: 'orderid' and 'employeeid'. 6. With the second application of the type "Search" created, we will adjust the fields to be of the type 'Select', however, different from the previous application, we will not activate the option "Use Select2". 7. In the onScriptInit event, we will define the field 'customerid' as being read-only, using the macro sc_field_readonly (), and then immediately assign the variable $customer, the global variable [customer_id] and then assign it to the field {customerid} the $customer variable. 8. Still in the configuration of the fields, we will write an SQL code where we will pass as a parameter inside the field 'customerid' which is also present in the table 'orders', the variable' customer_id, which was created in the onScriptInit event in the previous step. Below, we can see the code in the Lookup Method of each field: 9. That done, we will now create the Form using the 'orders' table. The detail for creating this Form is that we will configure the fields {customerid} and {employeeid} to be of type 'Select', in addition to also enabling the option "Use Select2". 10. After all these adjustments have been made, we will go to the "search_orders" application, and in the "Application Links" option, we will link the application with the "form_orders" that we have just created. - In the side menu of the application, we select the option "Application Links": - As no link was created, we click on "Click Here" to create a new one: - We leave the option "Application Link" checked - We selected the application "form_orders": - According to the settings we defined earlier, everything will already be set up correctly, just confirm to complete the connection: - We click on Save, and the link will be created: 11. We run the "search_customers" application for it will be redirected to "search_orders", which will later be redirected to "form_orders", as we defined in the previous step. - We define the search parameter, and then "Customerid": - We define the filter for the fields {orderid} and {employeeid}: - Soon the Form will be executed with the records according to the filters previously defined:
Oracle Connection - Scriptcase 9 - Linux 64 Bits
This procedure will only work if you have a Scriptcase manual installation in your server. - Installing PHP 7.0 - Installing the Scriptcase Manually To connect with Oracle in a Linux System, we must follow these steps below: Step 1 - Installing these packages: | | | | --- | --- | | UBUNTU/DEBIAN | CENTOS/RHEL | | - sudo apt-get update - sudo apt-get install libaio1 - sudo apt-get install libncurses5 - sudo apt-get install alien - sudo apt-get install gcc-multilib g++-multilib - sudo apt-get install libpam0g - sudo apt-get install unixodbc-dev unixodbc | - sudo yum update - sudo yum install libaio-devel - sudo yum install libaio - sudo yum install glibc - sudo yum install compat-libstdc++-33 - sudo yum install glibc-devel - sudo yum install libstdc++ - sudo yum install pam - sudo yum install ncurses-devel - sudo yum install unixODBC | Step 2 - Install the Instant Client: Download the Instant Client version compatible with the archicteture x64: - Client basic Linux ( x64 ) - Client devel Linux ( x64 ) | | | | --- | --- | | UBUNTU/DEBIAN | CENTOS/RHEL | | - sudo alien oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm - sudo alien oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm - sudo dpkg -i oracle-instantclient12.1-basic_12.1.0.2.0-2_amd64.deb - sudo dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb | - sudo yum install oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm - sudo yum install oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm | Step 3 - Copy the extension to the PHP extensions directory: Download and extract the attached file(oci8.zip) and move this file in the PHP extensions directory. Accessing the info.php file, search for the line extension_dir. This line will inform the exact path to the PHP extensions. Step 4 - Edit the php.ini file: Now that the extension was pasted at the directory, you will need to add at the bottom of the php.ini file this line below: extension=oci8.so Step 5 - Declare the environment variable responsible to identify the Oracle library: Now it is necessary to declare the variable LD_LIBRARY_PATH in the responsible file for your system environment variables. Check the path according to your System: | | | | --- | --- | | UBUNTU/DEBIAN | CENTOS/RHEL | | - sudo nano /etc/apache2/envvars | - sudo nano /etc/sysconfig/httpd | The path to the library will depend on your installation. However, by default the path might be the same as this example: Following the same example from php.ini, you will need to add just this variable at the bottom of the file with this syntax: export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib/ If you are using CentOS/RHEL, you don't need to use the 'export' before the variable. After doing all these procedures, you will need to restart your apache service. | | | | --- | --- | | UBUNTU/DEBIAN | CENTOS/RHEL | | - sudo service apache2 restart | - sudo systemctl restart httpd |
How to switch between themes dynamically through the Menu app
In Scriptcase, it's possible to dynamically switch between themes by activating a Menu option, to enable that option, simply follow the steps below: Note The chosen project must have more than one theme selected, otherwise it will not be possible to switch between themes. You can verify if your project has one or more themes by selecting the project you wish to change themes and going to Projects > Properties > Themes. Enabling functionality. 1 - First, we need to access the Menu application and navigate to Settings: 2 - Next, we need to enable the Select Theme option, as shown in the image below: 3 - That done, now it's possible to change the themes through the menu, the image below shows how this option appears in it:
PHPSpreadSheet library with Scriptcase
1- We download the external library PHPSpreadSheet without composer https://php-download.com/downloads/phpoffice/phpspreadsheet/1.8.2.0/phpoffice_phpspreadsheet_1.8.2.0_require.zip 2- Then we proceed to load the external library in the scriptcase: https://www.youtube.com/watch?v=nPiAVJZBbq8 we can be guided by this video if we still do not know how to use the external libraries in scriptcase 3- In our case the library that we are going to use is called PHP 4- If we enter it we can see our loaded folders 5- Then we proceed to use our library in a blank application 6- In the case of calls from the classes to be used from the library, the scriptcase uses as follows - If the class is in \ PhpOffice \ PhpSpreadsheet \ src \ Spreadsheet.php then to use in the scriptcase you must perform \ PhpOffice \ PhpSpreadsheet \ Spreadsheet (); Sample code to use the SpreadSheet includesc_url_library("prj","PHP","vendor/autoload.php"); $documento= new \PhpOffice\PhpSpreadsheet\Spreadsheet(); $documento ->getProperties() ->setCreator("Prueba") ->setLastModifiedBy('JuanAquino') // última vez modificado por ->setTitle('Miprimer documento creado con PhpSpreadSheet') ->setSubject('Elasunto') ->setDescription('Estedocumento fue generado para prueba') ->setKeywords('etiquetas opalabras clave separadas por espacios') ->setCategory('Lacategoría'); $nombreDelDocumento= "Mi primer archivo.xlsx"; header('Content-Type:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); header('Content-Disposition:attachment;filename="' . $nombreDelDocumento . '"'); header('Cache-Control:max-age=0'); #Como ya hay una hoja por defecto, la obtenemos, no la creamos $hojaDeProductos= $documento->getActiveSheet(); $hojaDeProductos->setTitle("Productos"); #Escribir encabezado de los productos //$encabezado=["id","nombre","apellido","edad","nacionalidad","profesion","sexo","nacimiento"]; $encabezado=["id","nombre","apellido","edad","sexo","fechaNacimiento0","nacionalidad"]; #El último argumento es por defecto A1 pero lo pongo para que seexplique mejor $hojaDeProductos->fromArray($encabezado,null, "A1"); //$consulta= "SELECT id, nombre, apellido, edad, nacionalidad, profesion,sexo, nacimiento FROM dbo.tabla2"; $consulta= "SELECT id, nombre, apellido, edad, sexo, fechaNacimiento0,nacionalidad FROM dbo.prueba"; sc_select(ds,$consulta); //var_dump({ds}); #Comenzamos en la 2 porque la 1 es del encabezado $numeroDeFila= 2; $producto= {ds}; foreach($productoas $key => $valor) { $id= $valor['id']; $nombre = $valor['nombre']; $apellido = $valor['apellido']; $edad = $valor['edad']; $nacionalidad= $valor['nacionalidad']; $profesion= $valor['profesion']; $sexo = $valor['sexo']; $fechaNacimiento = $valor['nacimiento']; #Escribirlos en el documento $hojaDeProductos->setCellValueByColumnAndRow(1,$numeroDeFila, $id); $hojaDeProductos->setCellValueByColumnAndRow(2,$numeroDeFila, $nombre); $hojaDeProductos->setCellValueByColumnAndRow(3,$numeroDeFila, $apellido); $hojaDeProductos->setCellValueByColumnAndRow(4,$numeroDeFila, $edad); $hojaDeProductos->setCellValueByColumnAndRow(5,$numeroDeFila, $nacionalidad); $hojaDeProductos->setCellValueByColumnAndRow(6,$numeroDeFila, $profesion); $hojaDeProductos->setCellValueByColumnAndRow(7,$numeroDeFila, $sexo); $hojaDeProductos->setCellValueByColumnAndRow(8,$numeroDeFila, $fechaNacimiento); $numeroDeFila++; } $writer= PhpOffice\PhpSpreadsheet\IOFactory::createWriter($documento,'Xlsx'); $writer->save('php://output'); exit;
How to create an application link
Application Link: This is used to link the application with any other type of project application. This type of link is associated with insert and update events. How to do an application link: - Open your application and go to the “Application Links” on the side menu. - Click the "click here" link or "create new link" to create a new link. How to do an application link from a form, filter, or control. - Choose the application link and click next. - Choose the destination application and click next. - Set the parameters. If you do not want to set parameters just click confirm. To define parameters in an application link the target application must have the parameters, such as a where clause. Parameter Types: Field: Used to pass the value of an application field as a parameter. Fixed value: Used to pass a fixed value as a parameter. Global variable: Used to pass the value of a global variable, used as a parameter. No value: by choosing this option no value will be passed as a parameter. Set the redirect after insert and redirect after update properties (yes, no and close application) and save. If any of these events occur, the application will be redirected to the destination application according to the property set. - It's still possible alter the settings defined and delete a link created. Properties: Opens the already defined link properties, which changes link behavior, positioning, link opening mode. Link: Changes a target application and its parameters. Delete: Deletes the link created.
Add a record to another table from a condition
1- We create a form where we will perform the validation. 2- In the OnValidate event of our form we introduce the code with this scheme if (condition == condition) { insert the data to the other table; } else { echo "no records added"; } 3- this will proceed to add the record in our other table of our database
Notifications in Scriptcase
1- We proceed to download the external push notification library https://codeload.github.com/Nickersoft/push.js/zip/master 2- We load the external library in our scriptcase, we can follow this tutorial if necessary: https://www.youtube.com/watch?v=nPiAVJZBbq8 3- Once the external library is created, we must activate it 4- The route of our bookstore 5- Finally we make the call to the library in a blank application, along with the creation of notification message
Using a TAB application with several applications and with a single parameter
This example will show how you can pass parameters from a Grid to another TAB application so that it can be used to execute SQL queries in different applications contained in the TAB. 1. Two applications of the Grid type must be created, both must be filtered by their own id 2. The two tables are called Employees and Employees State and start with the same id 3. Then within the TAB application, two tabs are created, and in each one there are the two applications in each tab 4. Then in the edition of each linked application you must pass a parameter, then from there you must create a global variable that you will pass as a parameter for both applications:
Hide new grid button at runtime
To hide the grid buttons we will use the sc_btn_display() macro, this macro shows and hides the buttons in the toolbar at run time. 1- We use this macro in the OnScriptInit event of our grid, referring to our new button as “new”: 2- We run the application and then verify that the new button is hidden - Before: - After:
Example animation inside scriptcase
This is an example of how to place animation on the form sheet, 1 - We go to the page of https://github.com/animate-css/animate.css to download the .zip of the animations. 2 - Downloading the .zip we proceed to load the downloaded file as an external library of the scriptcase. - You can follow this manual: https://www.scriptcase.net/docs/en_us/v9/manual/07-tools/05-external-libraries/ 3 - Once the external library has been loaded, we go to the OnApplicationInit event of our form. - Here we proceed to call our external library. - To apply our animation to our form, we need the form ID, we proceed to execute the form and then we click on inspect element, where we must find the form class, in this case it is called scFormPage 4 - We take this class name scFormPage and add to our code of external libraries. An example would be the following code in the OnApplicationInit event: ?> bounceIn.css');?>"> // Donde se realiza la llamada a la librería.scFormPage { //aqui se utiliza el nombre del formulario obtenido anteriormente animation-name:bounceIn; //Se coloca el nombre de la animación animation-duration:4s;}@keyframesbounceIn { from,20%, 40%, 60%, 80%, to{ animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1); } 0%{ opacity:0; transform:scale3d(0.3, 0.3, 0.3); } 20%{ transform:scale3d(1.1, 1.1, 1.1); } 40%{ transform:scale3d(0.9, 0.9, 0.9); } 60%{ opacity:1; transform:scale3d(1.03, 1.03, 1.03); } 80%{ transform:scale3d(0.97, 0.97, 0.97); } to{ opacity:1; transform:scale3d(1, 1, 1); }}.bounceIn{ animation-duration:0.75s; animation-name:bounceIn;} PHP</span 5 - We proceed to execute the form, where we will visualize the animation.
Change the charset to view the records.
When an error appears in the charset of the special characters as in the image below: This happens when the database charset and the script case charset are not the same but we can no longer edit it in the database. We use the following code in the OnRecord event of the grid. {field} = mb_convert_encoding ({field}, 'utf-8'); For example: and will result in:
Summary by Developers in Scriptcase
In order to optimize project management, Scriptcase provides a summary report, where it is possible to view the production of each developer involved in the project we are accessing. 1. First, to have access to this report, we must access one of our projects. 2. Next, we will go to the Project> Reports> Developers summary. On the screen that will open you can view important information about the work that is being developed. In column developer you can identify the resource to be analyzed and in subsequent columns can analyze the amount of applications that have been created. From this screen it is possible to analyze the volume of items implemented like: - Grid - Chart - Form - Control - Tabs - Procedure - Menu - Menu Tree - Search - Dashboard - Blank At the end of the report still have the column "Total" and "Command Line" in the "Total" column has the total volume of applications created and in the "Command Line" the total amount of lines developed. In the last line of that report note that there is a totalizer which will display the total volume applications and command lines implemented.
Multithreading in Scriptcase
Aiming to increase the performance when generating the source code of the project’s applications in Scriptcase, it was implemented the possibility to use more than one processor core (more than one thread) simultaneously, ie, instead of generating the source code of only one application at a time we can set how many processors core will be used. Multithreading is a very popular programming model that allows the execution of multiple line of execution within a single context, multiple actions to be performed sharing resources and process independently. The “Line of Command” programming model provides the developer a simultaneous execution. However, it is way more interesting when it is used in a simple process allowing a parallel execution on multi-processor systems. Model Many-To-One The many-to-one model maps many user level threads to processor cores. The threads management is done in user requariment, but the whole process will be blocked. Moreover, since only one thread can access the processor at a time, multiple threads are unable to run in parallel multiprocessor. Model One-To-One The one-to-one model maps each user thread for a single core processor, generates more competition than the many-to-one model. It allows another thread to run while a thread performs a blocking system call. It also allows multiple threads to execute in parallel on multiprocessors. The only disadvantage of this model is that creating a user thread requires creating the corresponding processing thread. Model Many-To-Many The many-to-many model multiplexes many user-level threads to a smaller or equal to the processor cores. The number of processor threads can either be specific to a particular application as for a particular machine. Developers can create as many user threads as necessary, and the corresponding processor threads can run in parallel on a multiprocessor. Furthermore, when a thread performs a blocking system call, the processor can schedule another thread for execution. The threads configuration on Scriptcase can be found in Options > Settings. The “Quantity of compilations in parallel” by default is set to 5 and may vary from 1 to 100. The other option is there if we will “Display the compile-time of the applications individually” or collectively for all applications. Below is a screenshot of the new functionality in operation.
Scriptcase customization
Scriptcase provides some resources for customizing the tool. These features are available in the settings menu, currently there are two customization options: My Scriptcase - In this option you can configure the general settings of the tool with the default language, disable the use of security in applications, and enable auto save. Image 2. My toolbar -This option allows the developer to customize the availability and order of the items on the toolbar, so that each developer can have the items on the toolbar the items they deem most important. Image 3. 1. Settings menu: Image 1 - Options for configuring the tool. 2. General tool settings screen. Image 2 - Standard configuration options. 3. Toolbar configuration screen Image 3 - Toolbar customization options.
Creating Custom Buttons
The Scriptcase allows the user customize buttons created or to be created. Therefore, making the experience of creating themes even more exciting. Giving also the option to customize the original themes of Scriptcase. Follow the tutorial below and find out how easy it is to create new buttons for your theme. 1 - To access the button editing module, you have to go to the superior toolbar: Layout > CSS Buttons - It will open a page that’ll be displayed default schemes of Scriptcase. 2 - To start creating your new scheme click on New 3 - After clicking New it’ll be displayed the page of button editing - On the tab Button Styles you’ll be able to create a CSS for your button schemes After you set the setting you desire click next, then place a name to the CSS then save. - Using the buttons schemes - After creating the buttons schemes, it’s necessary to include them to your project. To do that, follow the procedure below. 4 - Access menu: Tools > Layout > Themes. And add your theme. - 5 - To access the editing area click on “Save as” 6 - Chose a theme name and mode for this new theme. 7 - Click on Edit. 8 - Click on Page and change the button CSS to the one you created.
Express Edit
One of the features available in ScriptCase is the express edit. This option allows you to make some changes in several applications at the same time, significantly reducing the time to make these changes. In the express edition it is possible to define values such as: Use of Ajax, Header, Use security, Location (Languages), Connection, Scheme, Templates. 1- For this resource you must access the Tools menu> Express edit. 2- Then, a window will open for choosing the applications that will receive the changes. 2.1 If you selected the option to select applications, a list will be displayed containing all applications of the current project, as seen in the image below. You can choose how to view the list, by type (application) or folder (created in the project) 3 - After selecting the applications to be changed, it is necessary to select which change should be made. It is possible to make more than one change at the same time. 4- After selecting the features to be changed, we will be redirected to the screen below. In this example, I selected all possible editing options. 5- Agora será exibida um lista contendo as aplicações que receberam as alterações. Após clicar em concluir seremos redirecionados para a página principal do projeto.
Default values in Scriptcase
In Scriptcase, default values help to standardize project information, so it is much faster to create some items since there is no need to worry about features that will be standardized thanks to this important feature in our tool. Below you can see what Scriptcase offers as default values and how you can use them. In the "Project" menu, access the "Default Values" option. On the first screen, it is possible to edit the first informations, such as the name of the your project Logo, the number of records that will be displayed in the queries to set the pager and other information related to the consultation screens. The options are very intuitive, once set the entire project will use them as standard. In the next tab, it is possible to edit information of Grid type applications, items such as alignment, items related to the Schema and even the buttons that will be available can be set using this tab. When you finish editing, just click the “Update Data” button. In the next tab, items related to Forms can be edited. Information such as table width, Tabulation, Focus on fields with errors and Validators can be configured here. In the control tab, it is possible to configure the defaults related to the error messages in the project, this way it is simpler for the user to understand a possible error message regardless of which page it is. In Filters it's possible to configure all the behavior of the filter component that exists in the project. Several fields have the option of editing and again the intuitiveness of the screen ends up being an important differential when it comes to standardizing the information of your project. In the Calendars option, it's possible to edit the buttons that will or will not appear on the component. In the Tab, Menu and Dashboard fields you can adjust Alignments and templates quickly and simply. In the HTML Editor tab you have the option to edit the HTML Editor field used in the system, Location, button alignment, status bars and the buttons that will be displayed on the component can be edited here. In the last tab (Library) it is possible to use a separate library in Scriptcase, they will provide methods that will possibly assist you in extra activities in the tool
Using friendly URL
The friendly URL was included from Scriptcase 7, in order to make the URL, of the applications generated by Scriptcase, cleaner and easier to associate them with applications. For example, using friendly URLs the link to a Scriptcase application would end like this: ../app/test/client If we were not using this resource, the URL of this application would end like this: ../app/test/form_client_1/form_client_1.php Displaying unnecessary information for the user. To create a friendly URL it is interesting: - Do not use accents, symbols and special characters like ç; - Use hyphen (-) to separate words; - Use lowercase letters; - Use keywords in the URL; - Use short URL's, as short as possible. We will now see how to configure the friendly URL in Scriptcase. 1**.** After entering the project, go to Project > Properties. 2. Then we will be redirected to the project settings screen, check yes in the option to use index page. Note: When creating a project, this option is enabled by default. 3. Then, we must access each application and inform which URL will be used in the Friendly URL field. 4. It is possible to view the applications that contain friendly URL's on your project's home screen.
Data dictionary
The data dictionary is an important tool for the creation of multilingual systems, using this resource it is possible to create a data repository for use in the applications generated in the project or in new applications. The data dictionary is associated with one or more tables, when creating an application, using one of these tables, at the location of the field label a lang will be displayed, created by Scriptcase automatically, which makes it possible to change the language of the applications at run time. In pre-existing applications in the project it is possible to synchronize them. We will see in this example below, how to use this feature. 1. To access the data dictionary, access the main menu Tools > Data dictionary 2. Next, we will be redirected to the initial screen for creating the data dictionary, where we must inform the name and connection that we will use. 3. Next, a screen will be displayed containing the List of all tablesthat the previously selected connection has access to. In this step we must select the tables in which we will create the data repository. In this example I will only use the cities table. 4. Then we will be redirected to the screen below. In this step, we must choose whether we want Scriptcase to create indexes on the field labels, so that we can create a project with multiple languages, which can be changed dynamically. 5. In this step we can view the tables synchronized with the data dictionary. Edit- The Edit button at the top of the screen makes changes to the data dictionary properties. Database tables**-** Clicking on the database tables option will display a list of unsynchronized tables and you will 'return' to step 3 Synchronize dictionary- The Synchronize dictionary option is also when selecting one or more tables. In this option you 'return' to step 4 and can update dictionary information if you have made changes to the tables. Remember to clear the cache before performing this synchronization. Synchronize applications- The Synchronize applications option is enabled when selecting one or more tables. In this option, it is possible to create indexes on existing applications. Visualize the next step. Edit (Scriptcase Fields)- In Edit, next to the version, it is possible to make some changes in the Scriptcase fields, these changes will be used for all applications created using the selected table. check this option in the image below: 6. The Synchronize applications option is enabled when selecting one or more tables. In this option, it is possible to create indexes in the applications already existing in the project, using the selected tables. After selecting the tables and clicking on proceed, the screen below will be displayed: This screen contains all the existing applications that use the selected tables, and beside the properties that will be updated. After completing the process, the following screen will be displayed: You can check the log, using the Display log button, of the changes made or finalize the data dictionary by clicking Close. Option Display log: 7. To edit the langs that were created, go to Locales > Application language. 8. A folder will be created in Project messages, with the name of the table. By clicking on this folder it is possible to view the langs created and the name of the fields in the project languages, previously selected. Note: When creating a lang manually, in the dictionary select the tables, click Synchronize applications, so that the lang is automatically included in all applications in the selected table.
Open PDF in the Browser
1. Create an application of the type PDF 2. In the configuration section we select the following option:
Installing Firebird 3.0 service and database administrator in Linux
1- First we must add the repositories for linux by entering the following command in the terminal: sudo add-apt-repository ppa: mapopa / firebird3.0 2- Proceed to update and inspect if the package was installed for use, insert the following commands: sudo apt-get update and apt-cache search firebird3.0 3- We proceed to install the server with the following command: sudo apt-get install firebird3.0-server - if we want to configure the firebird password again, insert the following command: sudo dpkg-reconfigure firebird3.0-server 5- Once the installation process of the Firebird service is finished, we proceed to install the database administrator. Enter the following command in the console: apt-get install flamerobin 6- Once the administrator is installed, we enter the program We click on "Register existing database" where we select the path where our file is located.FDB Then we have a window to register our existing database - Display name: name of the database - Database path: path of the file.fdb - User name: SYSDBA - Password: by default it is masterkey / password added when configuring
Access Import
Access Import: To begin the process, choose the menu, Database > Import ACCESS After this you will see a screen like the image below: Click "Select files" Once the file is chosen, it will be loaded By clicking next, the file tables are listed: Moving forward, we can choose which database will be imported tables: When converting, you will see a confirmation screen:
Error sending mail: stream_socket_client()
When you want to send an email and show this error: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed stream_socket_client(): Failed to enable crypto stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 [http://smtp.gmail.com:465] (Unknown error) This problem occurs because the verification of the SSL certificate is unsuccessful, therefore, to solve this problem, you must follow these steps: -Download the file carcert.pem and copy it to this example path: C:/Program Files/NetMake\v9\components\php\extras -Login to php.ini -In the section [openssl] the parameter must be modified by: openssl.cafile= "C:\Program Files\NetMake\v9\components\php\extras\cacert.pem" -And then you must restart the apache: https://scriptcase-support.kayako.com/en-us/article/1321-restart-apache
Filtering data within a grid
To filter certain information within a Grid, the WHERE clause can be used. - An application of the Grid type must be created 1. Then within the query that is going to be done, the filter is placed in a field and a global variable will be used to receive the information and filter it according to the client's id. 2. Finally you must run the application and place an existing id to filter it into the Grid 3. And you can see that it filters by client
Limit number of records to be displayed in the Grid
To limit the number of records to be displayed, we will use the Limit function within the query where they bring the data of a certain table. For example in this way: Then only 5 records are shown:
Use of the log in Scriptcase
We proceed to create a security module to use the log. 1 - Follow this tutorial to create a security module: https://www.scriptcase.net/docs/en_us/v9/manual/10-modules/02-security-module/ 2 - Proceed with the log in the top menu option Module > Log > Create/Edit Module. 3 - It will show us the following window 4- We save the changes - We can edit the connection where the log table will be created, or the events that will be registered, etc. - We can verify here that a log table is created We can also see other types of events such as insert a form.
Restoration of Scriptcase from the devel folder
If we do not have a Scriptcase backup file, we can restore our data from the devel folder. The corresponding path to that folder is ../NetMake/v9/wwwroot/scriptcase/devel 1- We copy our files from the folder of our old installation and copy it in the new installation 2- We also replace our database sqlite, nm_scriptcase.db inside the folder ../NetMake/v9/wwwroot/scriptcase/devel/conf/scriptcase 3- Proceed to restart the apache Windows: we enter services, search the apacheScriptcase9 list and restart: Linux: we enter the terminal, insert the following command: 1. systemctl restart apachesc9.service 4- We enter our Scriptcase and register our license, at Options -> Online Registration: 5- We enter the settings / users menu, select the administrator user and edit the user 6- We enable all the available projects to be able to visualize it in the scriptcase.
Verification of libraries installed in Linux production environment
In this tutorial we will verify the libraries installed in our production environment, in case the generation of PDF does not work 1- We go to the folder of our project deployed ../prod/third/wkhtmltopdf/linux-amd64 2- We open the terminal inside that address. 3- Enter the following command ldd wkhtmltopdf-amd64 where we will get the list of all the installed libraries.
Changing Phrases in the Scriptcase Menus
To change the login warning message, go to Locales > Application language. On the side menu, go to the Others folder. Where to display it. Where the sgte tag is searched (it's by the end of the page, just scroll down and you'll find it), Here, edit the text of that tag, When trying to connect with the admin user and it's already connected, the sgte message will appear.
EXCEL Import
EXCEL Import: To begin the process, choose the Database > Import EXCEL menu, After this you will see a screen like the image below: Click "Select files" Once the file is chosen, it will be loaded, By clicking next, the file tables are listed: Moving forward, we can choose which database will be imported tables: When converting, you will see a confirmation screen:
CSV Import
CSV Import: To begin the process to choose the Database menu > Import CSV After this you will see a screen like the image below: Click "Select files" Once the file is chosen, it will be loaded By clicking next, the file tables are listed: Moving forward, we can choose which database will be imported tables: When converting, you will see a confirmation screen:
Filter on Form Aplication
This application filters data that will be displayed on editing forms. This type of application necessarily works linked to a form. The table used to create this application must be the same as the one used to create the form. In this article we will show you how to configure a filter application. After creating the filter application, using the same table as the form, follow the steps below: 1. First, we must select the fields that will be present in the filter. In the application settings, in the side menu access Filter> Field positioning. 2. Next, we must create an application-type connection, with the form that will have the filter. To create this link, in the application settings in the side menu go to Links> New Link 3. Next, a list of available applications for creating the filter will be displayed. 4. Now, a screen will be displayed with the fields of the filter to make the association with the fields of the form. 5. Finally, a screen for the connection settings will be displayed. With some settings like Link operation mode, which sets the way the filter will be displayed.
Enable mbstring extension in CentOS
"The PHP server must have the mbstring extension enabled. Contact technical support" To enable the following extension, the following must be done on the command line. apt-get install php-mbstring php-gettext sudo apt-get install php7.0-mbstring sudo apt-get install php7.0-curl
Install multiple versions on the ScriptCase server
When you need to perform tests with previous versions or if you want to perform some procedure, two versions can be installed inside the ScriptCase server. The first step is to download the .zip file from one of the previous versions (you can request support) Once the file is obtained, it must be decompressed within the wwwroot folder that corresponds to the server. Then access in the usual way but placing the name of the decompressed folder, for example: 127.0.0.1:8090/scriptcase_9.0.043.
Fatal error: Allowed memory size
When such errors occur, it is because the memory_size feature within the server's php.ini must be increased twice or as much as necessary. 1. Find the php.ini file with these sample paths: - Linux: /opt/NetMake/v9/components/apache/conf - Windows: C:\Program Files\NetMake\v9\components\php 2. Then edit the php.ini with administrative permissions and search for "memory_limit": 3. Place a double value to the one you have by default, for example: from 512 to 1024. 4. Save the changes and restart the apache: https://scriptcase-support.kayako.com/es/article/1321-reiniciar-apache
Restore Backup
To restore the backup within the SC, the following must be done: 1. Inside Options > Settings: 2. Then in Settings > Restore: 3. Then in **“****Restore ZIP”: **
Updating the environment from your Scriptcase 9 to PHP 7.3
Starting from 9.4.016 release, ScriptCase will be able to work also with PHP 7.3. Important note: The PHP migration is not required. You can stil use older versions. ScriptCase will be maintened for PHP 7.0, receving several updates. Before you transfer your projects (definitively) to an environment with PHP 7.3, we recommend you to run tests to ensure the correct functioning of them in the new environment. In order to facilitate this test, we will leave for a limited time the import/restore of projects enabled in the trial version of Scriptcase. That way you can import them without having to register a license for this first time. Check out the steps: Testing my projects within PHP 7.3 environment #Step 1: Backup of your projects In your current installation, go to Options > Settings > Services > Backup and make a complete backup of your projects. Step 2: Download and install the version with the new PHP 7.3 environment. Download Scriptcase from the link below: https://www.scriptcase.net/download/ After that, install the file you just downloaded. Important: You can perform the installation in the same location as your 7.0 environment. Because the port and service name of Apache are different, there will be no conflicts. Step 3: Restore Project Backup With the new Scriptcase installed, restore the backup you made in # Step 1 by going to the menu: Options > Settings> Services > Restore. At the end of the restore process, if your projects are not being displayed, go to Settings> Administration again. In the side menu, go to Security> Users, a list of users will be displayed Edit the desired user, selecting the projects he will have access to. After # Step 3, you can already perform the tests on your projects. Feel free to explore all the features and take the opportunity to publish them and check how it works also in the production environment. Deployed projects: Projects deployed with ScriptCase PHP 7.3 will be compatible with production environment following versions: PHP 5.6, 7.0,7.1,7.2 and 7.3 Remembering that the trial version of Scriptcase is valid for only 20 days. If you need more time to test your projects, contact the sales team via email sales@scriptcase.com.br. Registering my Scriptcase in PHP 7.3 after testing If you have any questions, please contact our technical support for free. To do so, click on the link: https://www.scriptcase.net/support_trial/ Once your projects have been tested in the PHP 7.3 environment, you will need to register you license serial key within the newest Scriptcase installation. To do so, you must log in to the site and "request for new installation" to get a new serial key and replace the once you are using. Check how to do this process by clicking here. If you are using a version earlier than Scriptcase 9 (V8, V7, V6...), you will need to do the conversion process for your projects. For this, check out this tutorialto learn the steps.
Restarting Scriptcase's apache
When internal changes are made or alterations are made within the SC, it is essential to restart the apache, so for each operating system is done as follows: - Windows: In the option Start> Services> Right click: Restart Apachesc9 - Linux: Write the following: | | | --- | | sudo su systemctl restart apachesc9.service | - Mac: Write the following: | | | --- | | *sudo /*Applications/Scriptcase/v9/components/apache/bin/apachectl restart |
Backup
When performing a manual update in Scriptcase or making any changes that affect the tool, it is recommended that the user save certain files through a Backup. Info A Backup is necessary to avoid the loss of Projects and Settings. There are two ways to perform a Backup: Method 1: Through Scriptcase Settings Method 2: By copying the file "nm_scriptcase.db" and necessary folders. Warning The app folder is not a valid backup of your projects. 1 - Through Scriptcase Settings To perform a backup using Scriptcase settings, access your development environment: 1.1 – First, go to the "Settings" tab by navigating to Options > Settings: 1.2 – Then, click the "Backup" option, give it a name, and click "Process", as shown in the image below: 1.3 – After processing the file, a "Download" button will appear. Click it to download your Backup file 1.4 – Finally, after clicking the button, a .ZIP file will be generated containing the Backup files 2 - By copying the file "nm_scriptcase.db" and directories from the devel/conf folder To perform the backup this way, you’ll need to use the system file manager or terminal: Notes The examples below are based on Ubuntu Linux, where the main Scriptcase folder is located at: /var/www/html/scriptcase/ 2.1 - Using the File Manager 2.1.1 – Open your file manager and navigate to the directory where your main Scriptcase folder is located. 2.1.2 – Access the folder devel/conf and save a copy of the following directories: 1. usr 2. upd 3. sys 4. grp 5. icons 6. font 7. lang 2.1.3 – Now, inside the folder devel/conf/scriptcase, save a copy of the file named nm_scriptcase.db. 2.2 - Using the Terminal 2.2.1 – First, open the terminal using the keyboard shortcut Ctrl+Alt+T. 2.2.2 – In the terminal, run the following commands: rsync*-av /absolutePath/scriptcase/devel/conf/scriptcase/nm_scriptcase.db /destinyPath/* use example: rsync*-av /var/www/html/scriptcase/devel/conf/scriptcase/nm_scriptcae.db /var/www/html/* rsync -av --exclude='scriptcase' /absolutePath/scriptcase/devel/conf/ /destinyPath/ **use example:**rsync -av --exclude='scriptcase' /var/www/html/scriptcase/devel/conf/ /var/www/html/ **2.2.3 –**After that, the nm_scriptcase.db file and necessary folders will be copied to the destination path.
Correcting access error for the Scriptcase database
Sometimes we encounter an error accessing the Scriptcase database itself, as shown in the image below: ADONewConnection: Unable to load database driver Screenshot - 16_08_2016 , 00_58_38.jpg It happens when Scriptcase, for some reason, loses the path to its database (nm_scriptcase.db). To correct this error, just follow the steps below: 1 - Go to the scriptcase directorye.g:C:\Program Files\NetMake\v9-php82\wwwroot\scriptcaseand change the name of the file config_.php to config.php 2 - After changing to config.php, access this file through the browser, with the folder name already changed, for example: 127.0.0.1:8093/scriptcase/config.php. 3 - In the Server field, paste the full path to the scriptcase database, for example: C:/Program Files/NetMake/v9-php82/wwwroot/scriptcase/devel/conf/scriptcase/nm_scriptcase.db - Also, In DBMS Field, select SQLite PDO 4 - Click save to finish
System error, missing file api-ms-win-crt-runtime-l1-1-0.dll
This error is solved in two optional ways. A- Installing the software via windows upgrate Microsoft has created Visual C ++ Redistributable for Visual Studio 2015 on WindowsUpdate KB2999226. So you can install it through Windows Update. 1- Type Update inthe search box from Start. Then click on Check for updates (Windows10) or on Windows Update (Windows 7) in the result. 2- Click on check for updates 3- The program will look for updates and click install updates then restart the computer. B- Download the Visual C ++ executable file Redistributable for Visual Studio 2015 1- Download the pagehttps://www.microsoft.com/en-in/download/details.aspx?id=48145 2- Follow the installation instructions. 3- Restart the device.
Configurar IIS7 con PHP 7.0.30
En las instalaciones de Windows los archivos necesarios para funcionar IIS están incluidos en el sistema, aunque no viene instalado el servidor deforma predeterminada 1 - En el Panel de control abre "Programas y características" 2 - En el panel dela izquierda escoge: "Activar o desactivar las características de Windows". 3 - En la lista defunciones de Windows marca la casilla: "Internet Information Services" y haz clic en Aceptar Esta es la instalación predeterminada que incluye las características más comunes. Al aceptar se iniciara la instalación del Servicio IIS Para iniciar el administrador Nos vamos al panel de control , luego a herramientas administrativas y en Administrador de Internet Information Service. Luego debemos instalar el Microsoft Web Plataform Installer. Link para la descarga https://www.microsoft.com/web/downloads/platform.aspx Luego lo podremos ver en el panel principal del IIS Iniciamos el instalador de plataforma Web. En donde buscaremos el php manager , una versión de php que deseemos y los instalaremos. Si por alguna razón ocurre el error de que no se puede instalar el php manager pueden instalarlo manualmente. Descarguen el instalador y lo instalan. Link para la descarga https://github.com/edgardo001/PHPManagerForIIS-Versiones Luego de instalar todo el php manager , lo podremos ejecutar y administrar las Versiones de php del servidor IIS Aquí estarán todas las versiones de php que hallamos seleccionado en el Instalador web.
Change user "admin" permissions
Many times it happens that we modify the permissions of the admin user, and when wanting to verify some configurations or when wanting to modify some characteristics of the ScriptCase we can not have access since the permissions were changed. So what we can do is change the permissions at the database level of the ScriptCase, for this we need an SQLite database administrator. Can be downloaded here: For Windows: https://github.com/sqlitebrowser/sqlitebrowser/releases For Linux: https://sqlitebrowser.org/ When the administrator is installed, enter this route: Windows: C:\Program Files\NetMake\v9\wwwroot\scriptcase\devel\conf\scriptcase Linux: /opt/NetMake/v9/wwwroot/scriptcase/devel/conf/scriptcase Search for the nm_scriptcase.db file: Then, copy that file to a secure folder, to have a backup copy. Open the copy with the SQLite administrator and check the data in the sc_tbusu (Search Data) table and modify the field called Privileges, and edit in the "priv_admin" section, it must be changed to "S": Save the changes. Copy the modified file, go to the folder: - Windows: C:\Program Files\NetMake\v9[wwwroot](http://wwwroot/)\scriptcase\devel\conf\scriptcase - Linux: /opt/NetMake/v9/wwwroot/scriptcase/devel/conf/scriptcase Modify the name of the nm_scriptcase.db file to nm_scriptcase1.db that is inside the mentioned directory. Paste the modified copy. Then restart the apache.
Connection error: error_profile_test_module
When we deploy a project and we find this type of error: "Connection error: error_profile_test_module" This error normally occurs when you use a different production environment DBMS Type than the development environment. To solve this, access your development environment and check what is your DBMS Type (Go to Database —> Edit connection —> Selec your database) As you can see, in the development environment DBMS Type is different than the Production environment. Changing DBMS Type in the production environment to the right driver: The other case may be because the drivers corresponding to the architecture of the server that contains the project are not enabled, that is, you must first have installed the drivers for the connection corresponding to the server architecture (x64 or x86), to enable the driver corresponding to the database that we wish to connect to must follow our documentation of each database for driver installation. INSTALLING DRIVERS FOR EACH DATABASE SQL Server Oracle MySQL FireBird Others
Incompatibility errors with after PHP 7.0
The only errors that may occur are due to codes used in events, libraries, and methods that are not compatible with PHP 7.0. These errors must be corrected manually. 1 - Short open tags The short_open_tag directive tells PHP whether the abbreviated form ( ?) of the PHP opening tag is allowed. Regardless of the php version, you need to check in php.ini if short_open_tags is enabled. Solution 1: Change the opening tag of php to (php ?) Solution 2: Change the short_open_tags directive in php.ini: short_open_tags = On 2 - New objects cannot be assigned by reference : The result of the new statement can no longer be assigned to a variable by reference: php<br style="box-sizing: border-box" /class C {} $c =& new C; ?> The example above will print in PHP 5: Deprecated: Assigning the return value of new by reference is deprecated in /tmp/test.php on line 3 The above example will print in PHP 7: Parse error: syntax error, unexpected 'new' (T_NEW) in /tmp/test.php on line 3 Solution: Remove reference (&) from assignment: php<br style="box-sizing: border-box" /class C {} $c = new C; ?> 3 - PHP 4 Style Constructors PHP 4 style constructors (methods that have the same name as the class where they are defined) are deprecated, and will be removed in the future. PHP 7 will issue E_DEPRECATED if a PHP 4 constructor is the only constructor defined in the class. Classes that implement the __construct () method are not affected. php<br style="box-sizing: border-box" /class foo { function foo() { echo 'Eu sou um construtor'; } } ?> The above example will print: Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3 4 - Static calls to non-static methods Static calls to methods that have not been declared as static are deprecated, and can be removed in the future. php<br style="box-sizing: border-box" /class foo { function bar() { echo 'Eu não sou estático!'; } } foo::bar(); ?> The above example will print: Deprecated: Non-static method foo::bar() should not be called statically in - on line 8 I am not static! For more information: - PHP 7.0 new features - PHP 7.0 deprecated features Source: http://php.net
Change Time Zone in the php.ini
Many times we find ourselves in the situation that the time zone configured by the tool does not correspond to our area, so we proceed to change it in the Configuration: Options > Settings: The problem is when the changes are not saved, then, what we must do is make the change through the php.ini. To locate the php.ini, I will put this example route: /opt/NetMake/v9/components/apache/conf Before entering the file we must enter with administrative permissions so that the changes are saved. Once inside the file we must look for "time" to locate and make the change of the time zone. To have a reference of the zone listings for php.ini, I leave this link. Once the change is made according to our zone, save and restart the Apache.
PHP extensions
In php.ini there is the following extensions: If you would like to use one of those extension, for example MySQL, do the following: Remove the character ";" at the beginning of the extension Ex: extension = php_mysql.dll Save the file and restart the web server.
PHP error level - error_reporting
The error_reporting directive in php.ini defines the levels of errors that PHP will report, the levels of errors are: Errors and Logging| Value | Constant | Description | Note | | --- | --- | --- | --- | | 1 | E_ERROR (integer) | Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted. | | | 2 | E_WARNING (integer) | Run-time warnings (non-fatal errors). Execution of the script is not halted. | | | 4 | E_PARSE (integer) | Compile-time parse errors. Parse errors should only be generated by the parser. | | | 8 | E_NOTICE (integer) | Run-time notices. Indicate that the script encountered something that could indicate an error, but could also happen in the normal course of running a script. | | | 16 | E_CORE_ERROR (integer) | Fatal errors that occur during PHP's initial startup. This is like an E_ERROR, except it is generated by the core of PHP. | since PHP 4 | | 32 | E_CORE_WARNING(integer) | Warnings (non-fatal errors) that occur during PHP's initial startup. This is like an E_WARNING, except it is generated by the core of PHP. | since PHP 4 | | 64 | E_COMPILE_ERROR(integer) | Fatal compile-time errors. This is like an E_ERROR, except it is generated by the Zend Scripting Engine. | since PHP 4 | | 128 | E_COMPILE_WARNING(integer) | Compile-time warnings (non-fatal errors). This is like an E_WARNING, except it is generated by the Zend Scripting Engine. | since PHP 4 | | 256 | E_USER_ERROR (integer) | User-generated error message. This is like an E_ERROR, except it is generated in PHP code by using the PHP function trigger_error(). | since PHP 4 | | 512 | E_USER_WARNING(integer) | User-generated warning message. This is like an E_WARNING, except it is generated in PHP code by using the PHP functiontrigger_error(). | since PHP 4 | | 1024 | E_USER_NOTICE (integer) | User-generated notice message. This is like an E_NOTICE, except it is generated in PHP code by using the PHP function trigger_error(). | since PHP 4 | | 2048 | E_STRICT (integer) | Run-time notices. Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code. | since PHP 5 | | 4096 | E_RECOVERABLE_ERROR(integer) | Catchable fatal error. It indicates that a probably dangerous error occured, but did not leave the Engine in an unstable state. If the error is not caught by a user defined handle (see also set_error_handler()), the application aborts as it was an E_ERROR. | since PHP 5.2.0 | | 8191 | E_ALL (integer) | All errors and warnings, as supported, except of level E_STRICT in PHP < 6. | 6143 in PHP 5.2.x and 2047 previously |
Installing Scriptcase in XAMPP with PHP 8.1 - Windows
Xammp Installation XAMPP allows you to easily install Apache on your own computer, regardless of your operating system (Linux, Windows, MAC or Solaris). First, you have to download XAMPP: https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/8.1.6/ To download the XAMPP, you must take into account the PHP version. For this example we'll be installing Xampp with PHP 8.1.6 version in order to install Scriptcase 9.8 After downloading Xampp, proceed with the standard installation. Configuring php.ini in Xampp to a better performance with Scriptcase 1 - Go to C:\xampp\php and open the php.ini file with your text editor. 2**-** Search for the directives below and increase their values for the values we recommend, then save the file before exiting. - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On - session.save_path = "C:\Windows\Temp" Enabling SourceGuardian Loader Scriptcase will use SourceGuardian with PHP 8.1 so, to get the SourceGuardian zip file, go to this link and download the file: https://www.sourceguardian.com/loaders.html 1 - Extract the file loader ixed.8.1.win and paste it into"C:\xampp\php\ext" **2 -**Go to "C:\xampp\php" and open php.ini file with your text editor 3 - Scroll down 'till the end of the file and paste this: [SourceGuardian] zend_extension=C:\xampp****php\ext\ixed.8.1.win Note: If the Apache service is on, stop the service and start the service again in the Xampp control panel. Installing Scriptcase Now that Xampp is already installed and php.ini properly configured, download Scriptcase zip file here: https://www.scriptcase.net/download/ Once the download of the .zip is finished, we proceed to unzip the .zip inside the folder htdocs of the XAMPP: C:\xampp\htdocs In your browser, enter the scriptcase webpage installation: l****ocalhost:8080/scriptcase In this example, XAMPP was configured to use port 8080. You will see a screen like the imagem below so you just need to click on "Next" On the next installation Screen, go to the bottom of the page and click on next Now, choose the Typical Installation option and click "Next" When the installation is finnished, you will be automatically redirected to Scriptcase login page
Gantt Chart
With this tutorial you will learn to create a Gantt chart from the structure of your table in the database to generate the chart itself. In this tutorial we will use a MYSQL database for table creation. 1. With the SQL command below will create the table and the fields used in the construction of the Gantt Chart. The script below is a table built from the SQL Builder option, which is found in the option (Database -> SQL Builder) in the top horizontal menu of ScriptCase. 2. To create a Gantt Chart is required consultation application (grid). Create an application grid and enable in Toolbar option and insert the Gantt. 3. Next, we must define the graph fields on Gantt settings. 4. We must associate the fields of the table with the graph, for the display correction of the information: 5. To display the chart, you should run the query application and click the chart button: 6.The graphic will be displayed in a new tab. This is an example of displaying using HTML 5.
Enabling hotkeys on Scriptcase
Scriptcase has shortcut keys for various features within the tool. The use of shortcut keys makes it easier to manipulate the tool, making access to features more intuitive and quick. To enable hotkeys, go to the top menu Options -> My Scriptcase. On the Settings screen use the Enable hotkeys option to activate the hotkeys.
Creating a Dashboard application
In this tutorial we will show how to create and configure an Dashboard. This application lets you display several types of nested widgets applications. - First we must create a Dashboard application. 1. Creating a new Dashboard application. - Then we must access the application settings to add the columns and their widgets. After we define the number of columns, we add the widgets you want. 2. Accessing application settings 3. Adding Link Widget and adding Index widgets, - For configure the widgets, click in the link editing properties. There are many options of setting , where you can inform the title, select the application that will be used , define the widget height. In the option Li**nk you can use the URL of websites, not being mandatory the utilization of an application created in ScriptCase. 4. Configuring the widget: 5. Before you run the Dashboard application. For that work correctly, is fundamental generate the source code of all Scriptcase applications related to it.
Crear menú de aplicación
En este tutorial le mostraremos cómo crear una aplicación de menú. Después de crear el proyecto, se mostrará una pantalla con todas las aplicaciones disponibles para su creación. Seleccione el menú de la aplicación, ingrese el nombre y el idioma a utilizar. Los idiomas disponibles al crear las aplicaciones se configuran al momento de crear el proyecto, también es posible seleccionar el tema que será utilizado por la aplicación. 1. Creando la aplicación: 2. Para incluir elementos en el menú, vaya a "Items del menú": 3. Para insertar un elemento, simplemente haga clic en " + ". En Propiedades puede cambiar la configuración de los elementos creados, en la pestaña de tema es posible elegir el tema utilizado por los elementos del menú. Ahora crearemos un nuevo elemento de menú y lo colocaremos como un subelemento, es decir, como un elemento secundario, y configuraremos un enlace para él (seleccionando una aplicación). Para convertirlo en niño, usaremos el botón "Mover a la derecha" o ">". Después de hacer clic en Ejecutar, la aplicación se mostrará con un menú similar al siguiente: Y después de hacer clic en el elemento, mostrará la aplicación a la que hace referencia el enlace creado anteriormente.
Using ajax: onChange events
In this article we will see how the onChange event works, available in Scriptcase. It is triggered when the object, which makes use of it, has its value changed. Down below is an example of using this event. We will use an order items form, we will use ajax on the form to capture the unit price of the product and calculate the total price based on the quantity of products desired. 1. First, let's configure the product field to display the product name at the location of the ID. We must access the application settings, and select the field in question (productid). 2. Next, we must change the type of the field to an auto-complete number, as it is of the type number. 3. Finally, we must configure the display lookup, using the products table to find the product names. 4. Next, we will create an ajax event (onChange) in the productid field, to find the unit price in the table when informing the product name. 5. We will use the sc_lookup macro (For more information click here) to search for this information in the database. 6. Next, we will create another ajax event (onChange), this time in the quantity field, to calculate the total value by informing the desired quantity. 7. Next, we can see the Ajax prcessing .
Calendar By User
In this example we'll show a connection between an application of Control and the Calendar. This feature can be used for a particular user to view your timetable where their activities are scheduled. Step 1: We will create a calendar, link: (See here how to create a calendar application) Step 2: We can go on the option "Database -> SQL Builder" so that we can run a specific script that will add a new field in a table on our database database as a parameter to pass a particular user. On the tab "Tables" select the table used on the Calendar application on the left side, then click on the arrow as show on the image to move it to the right side After this we go to the end page and and click on Selecting the tab "Run" We add the script of the image bellow and click Run. This way a field will be added to the table in our database After this we go back to the Calendar application and go on the option "Application -> Synchronize Tables" in order to add the new field After this we add this new field to appear in the application in "Form Settings -> Fileds positioning": Step 3: Let's use our field to receive the value of a global variable. In the WHERE CLAUSE of the SQL of the Calendar Application we can do the following condition: Where [var_login] is our global variable and users it's our field. Step 4: We will create a control application: We select the connection used: Inform the application name created: Step 5: Let's create the field that will serve to inform the specific user We Inform the application name created Here we defined the field datatype to "Text". We can also change the field label Step 6: Let's create a new link Between the application Select the calendar application Now we will go pass our parameter field created in Control, linked to the global variable created in Calendar. And now we can execute our control. Whenever inform a user control, the calendar will appear only with their activities.
Configuring Generation of PDF
**1-**For we set the PDF to be generated by the application, we must select the folder item Export in the Grid as shown in the image below: **2-**You can edit this session, a number of parameters to generate the format PDF our GRID. Note that these parameters are only taken into account if you use the format PDF, "Foolder Grid ->toolbar ->Formatos ->PDF". **3-**After configuring the PDF you can view it by clicking on the Export -> PDF option, as in the image below: **4-**Choose the type of printing: **5-**Download or view the PDF:
Creating a field that verifies values in another table
In this tutorial, we will see how use a field with type “Select” to checks values that are in another tables. For example, we are using two tables: “states”(that will include the values to be checked) and “city” (that will receive the values that are in states). First we will see how is organized the table that we will use to receive the information see image that are below: Try see that we have two fields, that have a relation of “Value x description”. The field stateid have the acronyms each state, the field statename have the description each state. Now we will see the form that was created in table “city”, see image that are below: How can see above, the table “city” have only three fields, cityname, stateid and statename where the field stateid will be the field used to receive the values that are in table “states”, with this way we can restrict the insert only states registered. So, we will change the type of the data of the field stateid to “select”, accessing the left menu “Field -> stateid”: And for finish, it's only create a SQL Select Statement in option “Lookup Settings”, in this example we are using the option Lookup Method “Automatic”, where the field stateid will the value to be insert in the database when the rows will be choose, and the field StateName will used only how description. Below have the statement generate that was used for this tutorial: To finish this process you will have a field with the type select that will show the values of the field description of the table “states”, and will insert in the table “city” the value select of the field stateid.
Setting Up a Proxy in Scriptcase
On this tutorial we’ll show how to configure a Proxy in the Scriptcase: First, let’s go to the menu Options -> Settings. The fields that have to be informed are: Proxy Server – Will be informed the IP for the Proxy Server Proxy Gateway – Will be informed the Port for the Proxy Server Proxy User – Will be informed the Login of the Proxy Proxy Password – Will be informed the Password of the Proxy Then click update.
Application Diagram – Graphiz Installation on Debian based Linux Platform
Scriptcase allows to generate a demonstration diagram of how the applications are organized for accessibility. To generate this diagram, it's necessary to install a program called GraphViz (Graph Visualization Software), in this tutorial we'll show how to install the program. 1. Installation: - First we need to see if the diagram isn't appearing. To do that, open Scriptcase then open any project then go to the menu Project → Show Diagram, verify if it opens like the image below: - If it showed a Diagram instead of the image above the program is already installed. - Now open the terminal and use the following command: apt-get install graphviz 2. Now access to diagram in Scriptcase - Doing the exact same procedure as the previous step 3. Example of the generated diagram Note: If the procedure above doesn't work, try the following:- Download the program for your Operating System, in http://www.graphviz.org - Find the install Graphviz in your pc, files dot and neato.cd/find -name dotfind -name neato - Verify the returning directories and make a link with the name dot and neatoln -s graphiviz_directory/dot dotln -s graphiviz_directory/neato neato
The size of the backup file is larger than supported by PHP
If some users encounter this problem, perform the following changes below: In php.ini, there is the upload_max_filesize and post_max_size directives where both are policies that determine the maximum size of files that are uploaded to the server. Change the size of policies. post_max_size upload_max_file_size This setting also affects file uploading to the server (upload). To send large files, the value must be larger than upload_max_filesize. In the php.ini directive memory_limit is responsible for controlling maximum memory used by PHP. The default size is 8MB, but it is advisable to increase, to avoid problems in procedures that require a reasonable amount of memory.
Manual Installation of Scriptcase 8
On this tutorial, we will show how to install Scriptcase for who already have an environment prepared. It is important to always verify if your have all the pre-requirements, of installation, before this procedure. Please access this link Click Here to have access to our Online Documentation. 1. After verifying the pre-requirements, you will have to download the Zip of Scriptcase according to your environment Click Here. 2. Extract the files in a folder, using 'extract here' using a Software of extracting Zip files, it will create a folder named: scriptcase.x.x.x, rename the folder to scriptcase, then move the folder to the Web Server root. Now go to your browser and open your Scriptcase, example: 127.0.0.1:PORT/scriptcase 3. Now follow the steps to configure your scriptcase: Select the Language for the setup 4. Verify the extensions installed if you click enable Scriptcase will try to configure the php.ini to work with the extension. 5. Select Customized Installation 6. It is necessary that some directories have the write permission set 7. Select your default database, Server name, User, Password, and the name of the database. 8. This image shows what tables that were create. 9. Create your Scriptcase Login 10. It will display the image bellow if the installation was successful. 11. Scriptcase Login
Setting Scriptcase on windows 2003 with IIS 6.0
Pre - Requisites: - IIS already installed - Download the PHP binary from www.php.net, in this example we are going to use php - .1.1-Win32.zip Installing the PHP: Create a folder for PHP (ex: C:/PHP) and unzip the file php-5.1.1-Win32.zip to this folder. Inside this folder create another one called session (c:/php/session). At c:/php change the name of php.ini-dist to php.ini. in the php.ini: extension_dir = "c:/php/ext" session.save_path = "c:/php/session" uncomment the php_gd2.dll module and the one you use in your database (like php_mysql.dll or php_pgsql.dll) Setting the Permissions PHP: This will be done more than once during the process of setting Scriptcase on IIS. On windows explorer, click with the right button on the PHP folder, then click in Security. Click in Advanced to search the IIS user. Click in the option Find Now to see all users. Add the IIS user (it must be like: IUSR_servername). Allow full control for this user. Setting the IIS to use the PHP extension: we can configure this using PHP-CGI or ISAPI, here we'll show it using ISAPI, however if you use CGI it can be done the same way. Select the website, then right click and select properties. On the home directory folder, click in Configuration. Click in Add, to create a new extension for PHP. On the PHP directory locate the file php5isapi.dll and inform the extension as .php Enabling the ISAPI extension on IIS: On IIS, click on Web Service Extensions, then on Add a New Web Service Extensions, give it a name and select the file php5isapi.dll on the php folder. Installing the Zend Optimizer: During the Zend Optimizer installation, select Web Server - IIS6 (Internet Information Service) and inform the location of the php.ini file (C:/php/php.ini). Installing Scriptcase: Download the Scriptcase ZIP file (windows). Unzip it to the root folder of your web server (c:\inetpub\wwwroot). Right click the scriptcase folder, then go to Sharing and Security. You will set the permissions just like in the PHP folder. Grant permissions to the user Internet Guest Account Do the same thing to the windows file cmd.exe, located in the directory system32.
Instalando o PHP no IIS - Windows 2000/XP
Instalando o PHP no Windows 2000/XP - - Instalação do PHP - Baixar do site http://www.php.net/downloads.php a seguinte versão: PHP 4.x.x zip package - Extrair o arquivo php-4.x.x-Win32.zip com WinZip para C: e após a extração renomear a pasta php-4.x.x-Win32 para C:PHP - Renomear o arquivo php.ini-dist para php.ini no diretório de instalação do PHP - - Configuração do PHP - Editar o arquivo php.ini e fazer as alterações abaixo e depois salvar: extension_dir = c:/php/extensions extension = php_gd2.dll extension = php_zip.dll cgi.force_redirect = 0 session.save_path = c:/php/tmp session.auto_start = 0 Feito isso verifique se a pasta que você extraiu o scriptcase está com permissão de escrita. Vá até a pasta clique com o botão direito e faça o mesmo procedimento que foi feito com o arquivo c:/windows/system32/cmd.exe - - - Em versões antigas do PHP trocar: extension = php_gd2.dll por extension = php_gd.dll - Configurando o IIS - - Entre em Painel de Controle=>Ferramentas Administrativas dentro do Windows 2000) e execute Controlador de Servicos Web clicando no icone. - - - Clique com o botão direito no seu Servidor Web (este provavelmente será Servidor Web Padrão), e selecione Propriedades. - - - Dentro de Pasta Base , clique no botão Configuração - - - Na pasta mapeado Aplicações. Clique adicionar. - - - Na caixa de texto Executavel escreva: c:/php/php.exe (assumindo que voce colocou o php no diretorio c:/php) e na caixa de texto Caixa de extensão escreva: .php e certifique-se que as duas ultimas caixas estejam marcadas. - - - Entrar no diretorio C:/php/tmp e dar permissão de leitura e gravação para o usuario o IUSR_maquina. - - Criar no diretório C:Inetpubwwwroot um arquivo chamado info.php com o seguinte conteúdo: - phpinfo(); ?> - Abrir em um navegador o endereço: /info.php deverá mostrar uma imagem na tela semelhante a esta: Feito isso temos o PHP já instalado porém para instalarmos o ScriptCase precisamos autorizar a execução do arquivo cmd.exe que se encontra na pasta c:/windows/system32. Para conseguirmos dar essa permissão de execução devemos abrir o windows explorer ir em ferramentas opções de pastas. Na aba modo de exibição devemos desmarcar a opção usar compartilhamento simples de arquivo e aplicar as alterações: Feito isso vá no arquivo cmd.exe que se encontra na pasta c:/windows/system32 clique em propriedades e va na aba de segurança. Para adicionar um usuário: Nesta tela devemos clicar em avançado para irmos para tela que lista todos os usuários possiveis: Clicamos em localizar agora para listar os usuários: Após selecionar o usuário IUSR_[nome da sua máquina] voce deve clicar em ok: Feito isso continue clicando em ok até aparecer a tela abaixo. Selecione o usuário e de para ele controle total: Feito isso verifique se a pasta que você extraiu o scriptcase está com permissão de escrita. Vá até a pasta clique com o botão direito e faça o mesmo procedimento que foi feito com o arquivo c:/windows/system32/cmd.exe.
Generating Credentials for Authentication with Facebook
In this article, we will learn how to generate credentials (App ID and Secret) for authentication and access to our project developed in ScriptCase through Facebook. 1 - The first step is to create a Facebook account as a "developer". We need to access the link below to create this account, and then click "Log in", as highlighted in the image below: Facebook for Developers 2 - Let's go to the "Sign up for Facebook" option, according to the first one below, and then fill in the fields with our data and click on "Sign up", as shown in the second image: 3 - You will be asked for a confirmation code to validate the registered email that we will receive through the email itself, so just insert the code and click on Continue. If the page is redirected to the Facebook social network, just exit and enter the Facebook Developer's page link again to log in with the created account credentials, and the redirect will be made to the create a Facebook for Developers account page. 4 - On the Facebook for Developers page, just click on "Continue", and follow the next steps until finished. In the "Verify account" step you will be asked for your cell phone number to confirm your account via SMS, and in the "About you" step, we will choose the "Developer" option. 5 - On the main page, we'll go to the "Create App" option, and then we'll choose the "Consumer" option as the type of application to be created, and finally, in the "Details" step, we'll name it view for our app, we'll provide a contact email for the app, click "Create App", and enter the password we created at the time of account registration. 6 - On the page to add products to our application, let's choose the option "Facebook Login", clicking on "Set Up", as shown in the image below: 7 - We will select the option "Web" as the means of access that we intend to configure this authentication, we will define the URL of our website and click on "Save": 8 - Finally, on the left side menu, we go to the option "Settings -> Basic", where we will be able to view our application ID and its secret key to connect with the ScriptCase application (in the authentication of the application type Control, ie in the security module). Remembering that we must define again the domain of our application where authentication will be performed for access to applications developed in ScriptCase.
Fixing the problem of Zendid Execute Permission
Some users receive a problem related to permission Zendid, that block them to register their Scriptcase. The error can be verified at your Scriptcase diagnosis file (Help -> Diagnosis), as you can see in the example below: In this tutorial, we will see how to solve this case. WARNING: Remember to do a backup before executing any changes. 1 - First of all, make sure that you have given all permissions recursively on your SC folder. - In a dedicated Web Server, type this command on your terminal: sudo chmod -R 777 /opt/NetMake/v9/wwwroot/scriptcase/devel/lib/third/zend - In a Host Web Server, type this command on your terminal: chmod -R 755 /public_html/scriptcase/devel/lib/third/zend 2 - Next, go to the path that we just gave permission. - cd path_to/scriptcase/devel/lib/third/zend 3 - Copy zendid.linux file inside the same folder and rename the copy to zendid (without any extension). - mv zendid.linux zendid If you are using a 64 Bit Linux, it will be necessary to use the zendid.linux64 file instead of zendid.linux. Ps: If you wish, it's also possible to download the zendid directly from the Zend website (click here), however, it's not recommended to extract in a Windows environment and copy to a Linux, and vice versa. If after doing all these procedures the problem still remains, verify in the diagnosis file if the function exec is listed in the disable_functions directive from PHP.
How to create a LDAP Database on Windows Server
Creating a LDAP Database on Windows Server. Server Manager Image 01: Server manager option on the startup menu. In Windows Server is natively possible to create a LDAP database to feed an Active Directory structure. We will need to access the Server Manager to install the Active Directory service. First, locate the Server Manager on the Startup Menu and launch it. Image 02: Server Manager Main window. In its main window, access the "Roles" Option, and create a new role using "Add Roles" Image 03: Roles. Add Role Wizard Image 04: Add Role Wizard home. Read and follow this page recomendations and then continue. Image 05: Choosing services to install. This page allows us to choose the services we want to install to the role we are adding. Check the option "Active Directory Domain Services" and continue Image 06: Active Directory Domain Services. There is some important notes about the Active Directory Domain Services in this page. Image 07: Installation. This page show what will be installed from now. To proceed with the installation click the "Install" button. After the processing, there will be shown the "Results" window with the installation log. Image 08: Results. Domain Controller Image 09: Active Directory role page. Image 10: AD DS Install Wizzard. This wizzard will create our domain(or associate an existing one). Image 11: OS compatibility. Image 12: Creating a new tree. To create a new tree, select the "Create a new domain in a forest" option and click "Next" to set up its name. Image 13: Setting up a domain Qualified Name. For this example we are going to use admartini.scriptcase.com as the domain name. Image 14: Setting the functional level for admartini.scriptcase.info. This step will define the computers that will be able to become domain servers or delegate controllers. Image 15: Additional options. To make sure that other computers will be able to find this domain, turn it on a DNS server or use your default DNS server, relationing the domain name to the AD server's IP adress. Image 16: Defining database, log and SYSVOL path. Here you can define the path for the LDAP database, the log files and the SYSVOL. There is no need to change this in most of cases. Image 17: Setting up a Restore Mode password. This password will allow you to access the AD server's Restore Mode, it is not related with the LDAP admin password. Image 18: Installation summary. Image 19: Installation progress. Image 20: Installation finished. Creating a New User Image 21: Creating new user Object. Select the "Active Directory Users and Computers" option under the AD DS menu, then select your domain and right click to create a new user object. Insert the user data and define a new password for it. Then confirm the changes to finish the process. Image 22: New User data. Image 23: Defining user's password. Image 24: Object Created. Results This tutorial created a LDAP authentication environment. The authentication data for this example are: | | | | --- | --- | | Domain | ADMARTINI | | DN | DC=admartini,DC=scriptcase,DC=info | | User Name | CN=Henrique C. Barros,DC=admartini,DC=scriptcase,DC=info OR hbarros@admartini.scriptcase.info | | | | | --- | --- | | | |
New export formats in Chart applications
With the new Scriptcase 9.1, new export formats were added to the Chart applications. Now it is possible to export to the formats PDF, WORD, XLS, XML, CSV, RTF, Image and Print. Check below the steps to enable the new export formats. In the Chart application, access the Toolbar. Select the new export formats. Save the changes and run the application. The new formats will be added to the end application.
Using tags in the Chart search
When we are using the search in the Chart applications, we can enable the display of the tags for the searched values. This option can be adjusted in the Advanced Searchsettings. Enable the option Display tags. Next, run the application and access the Advanced Search. Filter for some real values. The filter tags will be displayed according to the image below. You can edit the tag values dynamically, adding or even removing the tags.
How to create a simple LDAP Database on Linux
Creating a simple LDAP Database on Linux. Installing and configuring slapd We are going to use OpenLDAP(slapd) to build a LDAP database accessible for the security module WITHOUT simulating an Active Directory. This tutorial will create an LDAP server and a single user for access. Image 01: Installing slapd. In a Debian-based system, we need to use apt-get to retrieve and install slapd. Image 02: Using dpkg-reconfigure to change slapd settings. After the installation, we must configure the settings for the slapd. To do so, we must use dpkg-reconfigure to build. Image 03: Configuring slapd. Select the "No" option and press Enter to continue. Image 04: Defining domain name. Choose your domain name. Image 05: Defining organization name. Type the organization name and press Enter to continue. Image 06: Setting up admin password. Define the admin password and press Enter to confirm it. Image 07: Purging previous DB. Image 08: Moving old files. Adding a new user First of all, you must create a LDIF file with the info about the user on it: user@computer:~$ touch hbarros.ldif This is the content we are using for this sample file: | | | --- | | # Object 1: uid=hbarros,dc=lpessoa,dc=scriptcase,dc=info dn: uid=hbarros,dc=lpessoa,dc=scriptcase,dc=info objectclass: account objectclass: simpleSecurityObject objectclass: top uid: hbarros userpassword: {MD5}6jAUXhUfuutm7cbFC6oVUA== | Now we are ready to put it on the database itself. Get admin rights: user@computer:~$ su Stop the lapd service: root@computer:/home/user# /etc/init.d/sladp stop Use slapadd to import the file: root@computer:/home/user# slapadd -l /home/user/hbarros.ldif Restart the service. root@computer:/home/user# /etc/init.d/slapd start Results This tutorial created a LDAP authentication environment. The authentication data for this example are: | | | | --- | --- | | Domain | LPESSOA | | DN | DC=lpessoa,DC=scriptcase,DC=info | | User Name | UID=hbarros,DC=scriptcase,DC=info |
Using inline buttons in the Advanced Grid Search
When you are using the advanced filter in Grids you can configure the button display mode. In order to do this, you must access the Advanced Search toolbar, as shown below. On the toolbar configuration screen, enable the Use buttons inlineoption. You can set the position of the buttons (right / left) and the number of columns. The result is displayed below:
Email Export in Charts
In Chart applications you can configure the export by email feature. This feature is used to export the Charts and send the export directly by e-mail to the configured recipients. The e-mail export settings can be viewed in theEmail Exportmenu. Next, you need to configure the APIthat will be used for the export. You can use SMTP, Mandrill, or Amazon****SESGateways protocols. You can also use the Customoption if you need to specify a specific configuration for the application. In the example below, the Customoption is used using the SMTPprotocol for sending the emails with a Google Gmail account. In the export settings you can configure recipient information, copies, subject and email body. After you configure these options, you must enable the Send E-mail buttons on the Chart's toolbar. After setup, you can run the application. To export the Charts by email, select the export format. The following form is shown below, where you can add/remove recipients, subject and email body. Once you have set up the upload data, use the Send email button to complete the upload. A successful message will be displayed confirming the sending of emails.
Enabling Nested Grid export on XLS
You can enable Nested Grid exports when you want to export in XLS format. This option is useful when you want to generate complete XLS reports. To enable Nested Grid export, go to the menu Nested Grid -> Settings. Then, in the XLS option, you can define whether nested grids will appear in XLS. You can still set it individually if the application has more than one nested grid. In this case, we must use the XLS -> Set individuallyoption and the display configuration should be done individually in each nested grid, as in the image below. After you configure the options, you can run the application and check the results.
Using tags in the grid search
When we are using the search in the Grid applications, we can enable the display of the tags for the searched values. This option can be adjusted in the Advanced Searchsettings. Enable the option Display tags. Then run the application and access the advanced search, searching for actual values. The tags of the searched values will be displayed, according to the image below. You can edit the search values dynamically by adding and/or removing tags.
Setting the Group by level in PDF exports of the Grid chart
In the Grid applications, when the grid has more than one break level, it is possible to define what level of breakage the graph will be generated in the PDF export. To enable this option, go to the Export menu and enable the Level selection of the PDF graphic. After the option is enabled, the Grid must have more than one configured break level. When we run the application, we access the summary and export in PDF format. On the next screen, you can set the break level at which the application summary graphs will be generated.
Connection to MSSQL database (SQL Server)
Scriptcase has 5 types of connections that can be used to communicate with the MSSQL Server database. ADS MSSQL Server MSSQL Server Native SRV RFQ MSSQL Server Native SRV MSSQL Server ODBC MSSQL Server (PHP Module) 1. ADO connection (MSSQL Server ADO): This connection can be used on the following operating systems: - Windows Server 2003/2008/2012 - Windows 7 - Windows 8 / 8.1 The scriptcase .exe installer, which you can download from the website, already has the necessary configuration for using this module. For more details on this type of connection, click here. 2. ODBC connection (MSSQL Server ODBC): This connection can be used on the following operating systems: * Linux (FreeTDS) * Windows 7 * Windows Server 2008 * Windows Vista * Windows Server 2003 * Windows XP * Windows Server 2000 * Windows 98 If using a linux environment, the connection will be possible with the aid of the FreeTDS module. The drive that allows access to odbc through PHP is compiled in 32 bits. If you are using a 64-bit Windows environment, you will need to create odbc using the "odbcad32.exe" program, which should be located inside the "../windows/syswow64/" folder. Example: C: \ Windows \ SysWOW64 \ odbcad32.exe For more details on this type of connection, click here. 3. MSSQL connection - PHP module (MSSQL Server): This connection can be used in all versions of the operating system. The scriptcase .exe installer, which can be downloaded from the site, already has the necessary dll for using this module. Just for your use, uncomment the line: extension = php_mssql.dll Note: The line is in the php.ini file For more details on this type of connection, click here: 4. Native SRV connection (MSSQL Server NATIVE SRV): This connection can be used on the following operating systems: * Windows Server 2003 Service Pack 1 * Windows XP Service Pack 2 * Windows Vista * Windows Server 2008 * Windows 7 The Native SRV connection is the most recommended for use in the scriptcase. It has a higher speed of access to the database, in addition to being the only one that works perfectly with the image and document database fields. The installation of this module is manual and has two steps: Have Microsoft SQL Server Native Client installed - sqlncli Owning the Driver - SQLServerDriverForPHP For more details on this type of connection, click here.
Enable ZendGuard Loader - Linux
The Scriptcase need ZendGuard Loader enabled in php.ini to decrypt their internal files, to the execution of the system is possible. If you do not have the ZendGuard Lodar enabled, a message will appear like this in your browser: We need to perform some steps and changes in some of the php files to enable this module. First we download the ZendGuardLoader: click here. Remember to download the Loader ZendGuard specific to your operating system and php. - To check the extensions directory access through your browser: -ip:port/scriptcase/info.php - Search for: "extension_dir" After downloading the ZendGuardLoader.so place the file in the php extensions directory: To check which directory is the php.ini file access through the browser: - ip:port/scriptcase/info.php - Search for "Configuration File (php.ini) Path" Open the php.ini file and add in the end: [Zend] zend_extension = zend_loader.enable = 1 zend_loader.disable_licensing = 0 zend_loader.license_path = restart apache: sudo /etc/init.d/apache2 stop sudo /etc/init.d/apache2 start Access your ip:port/scriptcase/diagnosis and see the line of ZendGuardLoader enabled:
Enable ZendGuard Loader - Windows
The Scriptcase need ZendGuard Loader enabled in php.ini to decrypt their internal files, to the execution of the system is possible. If you do not have the ZendGuard Lodar enabled, a message will appear like this in your browser: We need to perform some steps and changes in some of the php files to enable this module. First we download the ZendGuardLoader: click here. Remember to download the Loader ZendGuard specific to your operating system and php. - To check the extensions directory access through your browser: -ip:port/scriptcase/info.php - Search for: "extension_dir" After downloading the ZendGuardLoader.dll place the file in the php extensions directory: To check which directory is the php.ini file access through the browser: - ip:port/scriptcase/info.php - Search for "Loaded Configuration File" Open the php.ini file and add in the end: [Zend] zend_extension = zend_loader.enable = 1 zend_loader.disable_licensing = 0 zend_loader.license_path = Access the Run, write services.msc, restart apache: Access your ip:port/scriptcase/diagnosis and see the line of ZendGuardLoader enabled:
Setting environment manually PHP 5.4 - Linux
Manually Configuring Php on Debian-based distros First edit the sources.list file: sudo nano /etc/apt/sources.list Add the following line to the end of the file: deb-src http://packages.dotdeb.org all wheezy Update your system: sudo apt-get update Install php sudo apt-get install php5 php5-dev Accept the installation of the dependencies. Check php version by: php-v To enable the extensions: mssql: sudo apt-get install php5-mssql postgresql: sudo apt-get install php5-pgsql mysql: php5-mysql sudo apt-get install sqlite: sudo apt-get install php5-sqlite firebird: sudo apt-get install php5-interbase odbc: sudo apt-get install php5-odbc Enabling GD library: sudo apt-get install php5-gd Do not forget to delete the php functions in disable_functions option to enable them. Accept the installation of the dependencies. Enabling ZendGuardLoader: Download the file at the end of the tutorial. At the end of the php.ini file add: [Zend] zend_extension = zend_loader.enable = 1 zend_loader.disable_licensing = 0 zend_loader.license_path = restart apache: sudo /etc/init.d/apache2 stop sudo /etc/init.d/apache2 start Remember to perform the procedure below to enable the implementation of zendid: ZendId Web server: /var/www/ ZendGuardLoader.so
Parallel Installation of Scriptcase
WarningNEVER DELETE THE DIRECTORY WHERE YOU INSTALLED YOUR SCRIPTCASE! Info The procedures in this tutorial only explain how to install the Scriptcase manually. We recommend creating a backup of your Scriptcase before proceeding with the update. You can perform the backup in Options -> Settings. Save the .zip file in a local directory, eg: C:\backup_scriptcase.zip Step 1: Download the complete Scriptcase version in zip format at the site: Download Scriptcase Step 2: In a temporary directory eg.:C:/temp, unzip the file, in WINDOWS, with the right button of your mouse choose the option "extract here". Will be create a directory: scripcasexx.xx.xx, with the number version. Step 3: Rename the directory created for the name that you want (Remember that the folder name have to be different of the folder of your ScriptCase), then copy or Cut the directory for the directory where you installed the your ScriptCase. Notes In automatic installations, the default path for Scriptcase is: Windows: C:/Program Files/Netmake/v9/wwwroot/ Linux: /opt/NetMake/v9/wwwroot/ MacOS: /Applications/NetMake/v9/ Step 4: Access the directory where you installed, the ScriptCase, and paste the folder that you cut in the previous step **Step 5:**Access the new ScriptCase using the browser normally, as if you estivece accessing another Scriptcase. But, now, you should put the name of new Scriptcase. Example: http://127.0.0.1:8090/new_scriptcase
Configurando ambiente manualmente PHP 5.4 - Windows IIS
Neste artigo veremos como instalar o IIS 7.5 junto com o PHP 5.4 no Windows Server 2008 R2 1. Primeiramente vamos baixar o Microsoft Web Platform Installer, clique aqui. 2. Logo execute e instale o arquivo que você baixou wpilauncher.exe 3. Depois de instalar o Microsoft Web Platform automaticamente abrira uma janela como a seguinte: 4. Assim que terminar de carregar a tela você verá a tela inicial do programa, logo clique em Produtos. 5. Você verá a seguinte tela: 6. Selecione a opção servidor e ordenar pelo Nome: 7. Logo adicione IIS 7.5 Express a lista de programas serem instalados: 8. Agora selecione Frameworks e ordenar por Nome: 9. Adicione PHP 5.4.9 para IIS Express (Inglês) para a lista de programas a serem instalados. 10. Depois de ter o IIS e o PHP na lista de programas a serem instalados clique em Install. 11. Aceite os termos e condições. Note que é adicionado mais um item para ser instalado MICROSOFT DRIVERS FOR PHP FOR MICROSOFT SQL SERVER. 12. Clique em finalizar. Após esse passo o IIS e o PHP 5.4 está instalado na sua maquina. 13. Logo tem que adicionar a extensão do ZendGuardLoader.dll ao PHP. Para baixar a extensão clique aqui. Lembre-se de baixar a versão do Zend Guard para versão do seu sistema operacional. 14. Após baixar a extensão coloque-o em uma pasta na raiz do disco. Exemplo: C:\ExtensaoZend\ZendGuard.dll 15. Logo acesse o php.ini (C:\Arquivos e Programas(x86)\ PHP\v5.4) e adicione ao final do arquivo adicione a seguintes linhas: [zend] zend_extension= zend_loader.enable=1 zend_loader.disable_licensing=0 zend_loader.license_path= 16. Agora reinicie o serviço do IIS. Para isso abra o cmd e execute o seguinte comando: iisreset. 17. Instalação manual do Scriptcase: Clique Aqui
Enable ZendGuard Loader - MacOs
The Scriptcase need ZendGuard Loader enabled in php.ini to decrypt their internal files, to the execution of the system is possible. If you do not have the ZendGuard Lodar enabled, a message will appear like this in your browser: We need to perform some steps and changes in some of the php files to enable this module. First we download the ZendGuardLoader: click here. Remember to download the Loader ZendGuard specific to your operating system and php. - To check the extensions directory access through your browser: -ip:port/scriptcase/info.php - Search for: "extension_dir" After downloading the ZendGuardLoader.so place the file in the php extensions directory: To check which directory is the php.ini file access through the browser: - ip:port/scriptcase/info.php - Search for "Configuration File (php.ini) Path" Open the php.ini file and add in the end: [Zend] zend_extension = zend_loader.enable = 1 zend_loader.disable_licensing = 0 zend_loader.license_path = restart apache: sudo /usr/sbin/apachectl stop sudo /usr/sbin/apachectl start Access your ip:port/scriptcase/diagnosis and see the line of ZendGuardLoader enabled:
Setting environment manually PHP 5.4 - Mac OS X
We must follow the steps below to perform the installation of php 5.4 on Mac OS X (Mavericks) Run in terminal: sudo curl -s http://php-osx.liip.ch/install.sh | bash -s 5.4 Installation path: /usr/local/php5 Run in the terminal: sudo nano /etc/apache2/httpd.conf Add a line to the end of the modules: LoadModule php5_module /usr/local/php5/libphp5.so Add in paths: sudo nano /etc/paths The line: /usr/local/php5/bin Create a page to check the php sudo nano /Library/WebServer/Documents/info.php Write in the file: php</em phpinfo(); ?> Access by safari: http://localhost/info.php Enable Zend Guard Loader: Click here Manual Installation of Scriptcase: Click here
Setting environment manually PHP 5.4 - CentOS
This article describes how to install the PHP 5.4 on a CentOS 5 or CentOS 6 server 1. First, detect if any PHP packages are installed: If packages are installed remove them, for example: 2. Add PHP 5.4 packages to yum using this command for CentOS 5.x Or, for CentOS 6.x: Now, you can check if the new PHP (5.4: php54w ) packages are available: Or, version specific search: 3. Next, install the PHP 5.4 packages, for example when installing PHP 5.4 packages I used: PHP should now be upgraded to the new version, you can verify with the command: 4. Finally, restart the Web server:
Setting environment manually PHP 5.6 - Mac OS X
We must follow the steps below to perform the installation of php 5.6 on Mac OS X (Mavericks) Run in terminal: sudo curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6 Installation path: /usr/local/php5 Run in the terminal: sudo nano /etc/apache2/httpd.conf Add a line to the end of the modules: LoadModule php5_module /usr/local/php5/libphp5.so Add in paths: sudo nano /etc/paths The line: /usr/local/php5/bin Create a page to check the php sudo nano /Library/WebServer/Documents/info.php Write in the file: php</em phpinfo(); ?> Access by safari: http://localhost/info.php Enable Zend Guard Loader: Click here Manual Installation of Scriptcase: Click here
Setting 'config.php'
For security reasons, the file config.php was protected to restrict access. This file is important because it contains the information of the base where the Scriptcase was installed. Was added an underscore ( _ ) before the extension of the file (config_.php), making the access through the browser impractical, until the protection is removed. To access the file with a protection, a blank page appears, prevented a change in the information file. Img 1: File access with protection. To access the file, go to ScriptCase root folder, in automatic installations is located at (Windows) C:/Arquivos de programas/Netmake/v9/wwwroot/scriptcase/config_php.(Linux,MacOS) /opt/Netmake/v9/wwwroot/scriptcase/config_.php. Rename this file to config.php Img 2: File directory. Then, you can access the information in the file using the browser. Img 3: File information Note: After performing the changes, protect the file again to prevent improper access to the information, just change it again to config_.php.
Setting environment manually PHP 5.6 - Linux
Installing a Manual PHP 5.6 Environment - Linux This article will explain how to install and set-up a PHP 5.6 environment with Apache 2.4 so that it'll run Scriptcase. Follow the steps below with caution. Note: This article was based on the Debian Jessie distribution Installing the PHP 5.6 Use the following command to install PHP 5.6 sudo apt-get install php5-dev php5-cli php5 php5-pear Accept the installation of the dependents. Verify the PHP version with the command: php -v Important: By default, the PHP has some disabled functions that'll be necessary for Scriptcase. So, access your php.ini (/etc/php5/apache2/php.ini) and change the variable line disable_functions according to the example: To enable the databases, we've selected some installation command examples: MSSQL Server use this command sudo apt-get install php5-mssql PostgreSQL use this command sudo apt-get install php5-pgsql MySQL use this command sudo apt-get install php5-mysql SQLite use this command sudo apt-get install php5-sqlite Firebird use this command sudo apt-get install php5-interbase Odbc use this command sudo apt-get install php5-odbc Activating the GD library Use the command sudo apt-get install php5-gd to activate the GD library. Accept the installation of the dependants. Activate Zend Guard Loader Download the Zend Guard Loader for linux, on link below and place the so in /usr/lib/php5/Zend . Download ZendGuardLoader Set the permissions 777 recursive on the folder /usr/lib/php5/Zend sudo chmod 777 -R /usr/lib/php5/Zend Open the php.ini (/etc/php5/apache2/php.ini) and at the end of the file, add the line: *[zend] zend_extension=/usr/lib/php5/Zend/ZendGuardLoader.so zend_loader.enable=1 zend_loader.disable_licensing=0 zend_loader.license_path=* After this procedure restart the Apache using the command: sudo /etc/init.d/apache2 stop sudo /etc/init.d/apache2 start
Setting environment manually PHP 5.6 - Windows
Installing a Manual PHP 5.6 Environment - Windows This article will explain how to install and set-up a PHP 5.6 environment with Apache 2.4 so that it'll run Scriptcase. Follow the steps below with caution. Download the Apache 2.4 , mod_fcgid and PHP 5.6 on the followinh links: Apache download mod_fcgid download PHP 5.6 download Note: The PHP that should be downloaded is the Non Thread Safe and all the downloads needs to be in the 32-bit architect . After downloading the Apache and the PHP 5.4, extract both of them on the root of the C:\ Drive Rename the folders to Apache24 and PHP , like the example below: Extract the Mod fcgid , and copy the file mod_fcgid.so and paste it in the directory C:/Apache24/modules Setting up the Apache Open the file C:/Apache24/conf/httpd.conf and add the following lines above the line IfModule unixd_module of the file: LoadModule fcgid_module modules/mod_fcgid.so FcgidInitialEnv PHPRC "c:/php" AddHandler fcgid-script .php FcgidWrapper "c:/php/php-cgi.exe" .php In the same file search for #ServerName www.example.com:80 and change it to ServerName localhost:80 Search for: DirectoryIndex index.html And change it to DirectoryIndex index.html index.php index.phtml Add the text: Options ExecCGI in the option Directory "c/:Apache24/htdocs" Search for IfModule mime_module above this option, add the text below: Adding the service of the Apache in Windows Open the Command Prompt(CMD) as Administrator and type the following command: c:\apache24\bin\httpd.exe -k install Setting up the PHP 5.6 Open the folder C:\php and rename the file php.ini-development to php.ini . Now open the file php.ini (C:\php), and search for the variable extension_dir and set the value " C:/php/ext " like the image below. Remove the comments of the extensions listed below. (To uncomment the extensions, just remove the ";" from the starting point of each extension) extension=php_bz2.dll extension=php_curl.dll extension=php_gd2.dll extension=php_imap.dll extension=php_interbase.dll extension=php_ldap.dll extension=php_mbstring.dll extension=php_exif.dll extension=php_mysql.dll extension=php_mysqli.dll extension=php_oci8.dll extension=php_pdo_firebird.dll extension=php_pdo_mssql.dll extension=php_pdo_mysql.dll extension=php_pdo_oci.dll extension=php_pdo_odbc.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_pspell.dll extension=php_shmop.dll extension=php_sqlite.dll extension=php_sqlite3.dll extension=php_xmlrpc.dll extension=php_xsl.dll extension=php_zip.dll Set-up the TimeZone according to your region following the list that's available at the php website . Still with the php.ini opened look for the variable date.timezone and insert a value available in the list. Save all the modifications done in the php.ini and close it. Restart the Apache running the command c:\apache24\bin\httpd.exe -k restart Activating the Zend Guard Loader Download the Zend Guard Loader dll for Windows, on link below and place the dll in the C:/php/ext . Download ZendGuardLoader Open the php.ini (C:/php/php.ini) and at the end of the file, add the line: *[zend] zend_extension=C:/php/ext/ZendLoader.dll zend_loader.enable=1 zend_loader.disable_licensing=0 zend_loader.license_path=* After this procedure restart the Apache using the command c:\apache24\bin\httpd.exe -k restart in the CMD
Using Ajax Processing(Refresh)
In this article we will learn how to use the "Ajax Processing" function available in Scriptcase. As an example, we have a control-type application with two select fields ("state" and "city"), where when we select the state we will use ajax processing to bring us, in the city field, only the cities of the state selected. To achieve such an effect, we need to maintain some sort of relationship between our tables. In our case, the city table has a field that holds the id of its state: | | | --- | | Tabela adm_estados: | | | | | | --- | | Tabela adm_cidades: | | | First, we need to create the control application and the two fields we will use Next, we need to create the SQL commands of our fields, let's start with the state field. Select the field from the interface, and go to the Lookup Editing option and assemble your select, below see how we set up ours: | | | --- | | Query SQL - state | | SELECT EstadoID, NomeEstado FROM adm_estados ORDER BY NomeEstado | Next, we will configure the SQL command of the city field: | | | --- | | Query SQL - city | | SELECT estado, cidade FROM adm_cidades WHERE state= '{state}' ORDER BY cidade | Note that in this second we make use of a where cláusua, to filter the cities by the chosen state. Finally, go back to the field state and look for the Ajax Processing option. Coming to it, select the Use Ajax option to reload other select, double select, radio, and checkbox fields, and then select the city field. Run the app and see its operation:
How to change the application's state in run time
To change the properties of application execution, changing their form of execution than initially planned, Scriptcase has a macro called sc_apl_conf. The macro should be used as follows: sc_apl_conf ( Application , property , value ) ; So, we can force a form to start the inclusion mode , or start a query by the filter , etc. . The macro can be used by on an application to modify the properties of another application . For example , in a register of request, a Seller may register a new request, but can not change it, this case, we would use a type button "PHP", the code below for register a request. if ( [ users ] == " Seller " ) { sc_apl_conf ( " apl_request_register " , "update " , "off " ) ; sc_redir ( apl_request_register.php ) ; }else{ sc_redir ( apl_request_register.php ) ; } Below is a table with the properties and values of the macro : Properties for Form applications | | | | | --- | --- | --- | | Properties | Value | Description | | start | new | Force the form to open in mode for inclusion of new record | | insert | on/off | Enables (on) or disables (off) the inclusion of new records | | update | on/off | Enables (on) or disables (off) the change of records | | delete | on/off | Enables (on) or disables (off) the exclusion of records | | field_display_off | field | Disables the display of a field | | field_display_on | field | Enables the display of a field | | field_readonly | field | Force a field to be displayed as "readonly" | | rows | | Force the amount of lines per page (for only forms multiple lines) | | rows_ins | | Force the amount of lines of inclusion (for only forms multiple lines) | Properties for Grid applications | | | | | --- | --- | --- | | Properties | Value | Description | | start | filter | Force the grid initiate from filter. | | cols | | Force the amount of columns (grids of type vertical and slide) | | rows | | Force the amount of lines per page | | lig_edit | on/off | Enables (on) or disables (off) the button to edit the registry (pencil) | Properties for all applications | | | | | --- | --- | --- | | Properties | Value | Description | | exit | apl/url | Force the application exit to the "application" or "url" informed | Below are some examples: Ex1: Force the "my_form" application Starting in the inclusion mode. sc_apl_conf("meu_formulario", "start", "new"); Ex2: Do not allow the "my_form" application, make adding new records. sc_apl_conf("my_form", "insert", "off"); Ex3: Displays the "my_field" field of the "my_form" application dynamically. sc_apl_conf("my_form", "field_display_off", "my_field"); Force the "my_consult" application Starting from filter Ex4: Force the "my_grid" application Starting from the filter. sc_apl_conf("my_grid", "start", "filter"); Ex5: Force the "my_grid" application show 20 lines. sc_apl_conf("my_grid", "rows", "20"); Ex6: Forcing application exit "my_grid" for the application "other_grid". sc_apl_conf("my_grid", "exit", "other_grid");
Show Question Message with SweetAlert - sc_alert
To use the new SweetAlert functionality and display a question message, the following parameters must be taken into accoun: When executing it would look like this:
Show Warning Message with SweetAlert (warning) - sc_alert
To use the new SweetAlert functionality and display a warning message, the following parameters must be taken into account: When executing it would look like this:
sc_alert - Show Information Message with SweetAlert (info)
To use the new SweetAlert functionality and display an information message, the following parameters must be taken into account: When executing it would look like this:
sc_alert - Show Confirmation Message with SweetAlert (success)
To use the new SweetAlert functionality and display a confirmation message, the following parameters must be taken into account: When executing it would look like this:
sc_alert - Show Error Message with SweetAlert (error)
To use the new SweetAlert functionality and display an error message, the following parameters must be taken into account: When executing it would look like this:
Dynamically change the theme of a project with the sc_set_theme macro
Scriptcase provides macros, functions created by the developers of Scriptcase, which will assist in customizing applications as well as simplifying code editing at events. In this article, we will see how to use the sc_set_theme macro in practice, to change the themes of your applications. Using the sc_set_thema macro in Login The macro changes the theme in the session, causing the change to be applied to all other applications until the session is finished or the theme changes again. 1. First, we must create a select field that must contain all the themes available for the change. The field name it's created is: set_theme The listed themes must be previously added to the project. The lookup method can be automatic, if there is a table with the name of the themes or manual, as in the example below. 2. After creating the field, at the beginning of the onValidate event, insert the macro code as in the image below: Here is the code that should be added. 1. // Change the theme of the project application 2. $theme = {set_theme}; 3. sc_set_theme($theme); The macro accepts string sc_set_theme('ThemeName'); or verifiable location as in the example above. Running the application 1. Run the login application and select a theme. 2. Click on ok, to execute the onValidity event, to change the theme. The next application, in this example the form, will receive the selected theme. How to keep the login with the default theme. This macro changes the theme in the session, as previously informed. In this way, all applications will be displayed with the selected theme, including the login application. To keep the login with the default theme, add the sc_set_theme macro to the onApplicationInit event stating the desired theme. 1. sc_set_theme('BlueBerry'); If you would like the login theme to also be changed, just do not add the macro in the onApplicationInit event.
Setting environment manually PHP 5.6 - CentOS
This article describes how to install PHP 5.6 on a CentOS 6 or CentOS 7 server Access the terminal (as root) and run the commands below, according to the version of your system: CentOS/RHEL 7.x: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm CentOS/RHEL 6.x: rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm Installing PHP 5.6: yum install php56w php56w-cli php56w-common php56w-devel php56w-mbstring php56w-pecl-imagick php56w-xml Enabling PHP extensions : Firebird/Interbase: yum install php56w-interbase Ldap Module: yum install php56w-ldap GD Module: yum install php56w-gd MySQL: yum install php56w-mysql php56w-mysqlnd MSSQL Server: yum install php56w-mssql ODBC: yum install php56w-odbc PDO: yum install php56w-pdo PostgreSQL: yum install php56w-pgsql Restart apache: service httpd restart
Setting environment manually PHP 7.0 - Windows IIS
First we will download the Microsoft Web Platform Installer, click here. 2. Then run and install the file you downloaded wpilauncher.exe 3. After installing the Microsoft Web Platform it would automatically open a window like the following: 4. As soon as you finish loading the screen you will see the initial screen of the program, then click on Products. 5. Next add IIS 7.5 Express to the list of programs to be installed: 6. Add PHP 7.0 para IIS Express (Inglês) for the list of programs to install. 7. After you have IIS and PHP in the list of programs to be installed, click Install. 8. Accept the terms and conditions. Note that one more item is added to be installed MICROSOFT DRIVERS FOR PHP FOR MICROSOFT SQL SERVER. 9. Click Finish. After that step IIS and PHP 7.0 is installed on your machine. 10. You then have to add the SourceGuardian extension to PHP SourceGuardian. To download the extension click here. "Remember to download the SourceGuardian version for your operating system version." 11. After downloading the extension, place it in a folder at the root of the disk. Example: C:\SourceGuardian\ixed.7.0.win 12. Then go to php.ini (C: \ Program Files and Programs \ PHP \ v7.0) and add to the end of the file add the following lines: [Source Guardian Loader] zend_extension= zend_loader.enable=1 zend_loader.disable_licensing=0 zend_loader.license_path= Example: [Source Guardian Loader] Zend_extension = C:\SourceGuardian\ixed.7.0.win Zend_loader.enable = 1 Zend_loader.disable_licensing = 0 Zend_loader.license_path = 13. Now restart the IIS service. To do this open the cmd and run the following command: iisreset.
Change Database Context – MSSQL
If you use the connection “MSSQL Server” and it shows you an error called “Changed database context to 'database name' ” it's because of the MSSQL Server driver which is available from PHP, because it isn't updated frequently. So, when in this driver is used a different schema, this error message is showed. Also, the SRV and SRV PDO drivers are frequently updated. To solve this issue, you should use the “MSSQL Server Native SRV PDO” connection and, to do it, it's necessary to install the ODBC driver which is correct to your system architecture. Link to ODBC's driver installation: ODBC Driver 11 64 bits ODBC Driver 11 32 bits
'No tables found in database access' error while trying to import Access data.
This error occurs because it is necessary to have the Microsoft Access Database Engine installed, which contains a series of components that facilitate the transfer of information between files of Office for the other applications. For the installation of these components, you must download the version below corresponding to your MS Access: MS Access 2007 or earlier. MS Access 2010 or later.
Informix Connection - Scriptcase 8.1 - Linux
To enable the connection to Informix on Linux, we must perform the following steps: Prerequisites Step 1 - Add the i386 architecture and install the packages below : | | | | --- | --- | | UBUNTU\DEBIAN | CENTOS\RHEL | | - sudo dpkg —add-architecture i386 - sudo apt-get update - sudo apt-get install libaio1:i386 - sudo apt-get install libncurses5:i386 - sudo apt-get install alien - sudo apt-get install gcc-multilib g++-multilib - sudo apt-get install libpam0g:i386 - sudo apt-get install ksh:i386 - sudo apt-get install unixodbc-dev:i386 unixodbc:i386 | - sudo yum update - sudo yum install libaio-devel.i686 - sudo yum install libaio.i686 - sudo yum install glibc.i686 - sudo yum install compat-libstdc++-33.i686 - sudo yum install glibc-devel.i686 - sudo yum install libstdc++.i686 - sudo yum install libstdc++.i686 - sudo yum install pam.i686 - sudo yum install ncurses-devel.i686 - sudo yum install unixODBC.i686 - sudo wget ftp://195.220.108.108/linux/centos/6.7/os/i386/Packages/ksh-20120801-28.el6.i686.rpm - sudo yum install ksh-20120801-28.el6.i686.rpm - sudo yum install nano | Step 2 - Download Informix Client SDK : - Client SDK 3.70.UC8.DE Step 3 - Download PHP extension : - PHP 56 - PHP 54 Step 4 - Copy the extension to the folder ext from scriptcase : - sudo cp pdo_informix.so /opt/NetMake/v81/components/apache/ext/ Step 5 - Edit and add on the end of php.ini file the informix extension : - sudo nano /opt/NetMake/v81/components/apache/conf/php.ini - extension=pdo_informix.so Step 6 - Install the Client SDK : - sudo tar -xf clientsdk.3.70.UC8DE.LINUX.tar - sudo ./installclientsdk Required: The Informix client installation directory should be: /opt/IBM/ifx Step 7 - Edit the php.fcgi file - sudo nano /opt/NetMake/v81/components/apache/cgi-bin/php.fcgi Step 8 - Add content down over the line exec $PHPCGI : INFORMIXDIR="/opt/IBM/ifx/" INFORMIXSQLHOSTS="/opt/IBM/ifx/etc/sqlhosts" INFORMIXSERVER="demo_on" ODBCINI="/opt/IBM/ifx/etc/odbc.ini" LD_LIBRARY_PATH="/opt/IBM/ifx/lib:/opt/IBM/ifx/lib/esql:/opt/IBM/ifx/lib/cli:/opt/IBM/ifx/lib/c++:/opt/IBM/ifx/lib/client:/opt/IBM/ifx/lib/dmi" CLIENT_LOCALE="en_US.utf8" DB_LOCALE="en_US.819" export INFORMIXDIR export INFORMIXSQLHOSTS export INFORMIXSERVER export ODBCINI export LD_LIBRARY_PATH export CLIENT_LOCALE export DB_LOCALE Step 9 - Restart apache : - sudo /etc/init.d/apachesc81 restart
DB2 Connection - Scriptcase 8.1 - Linux
To enable the connection to DB2 on Linux, we must perform the following steps: Prerequisites Step 1 - Add the i386 architecture and install the packages below : | | | | --- | --- | | UBUNTU\DEBIAN | CENTOS\RHEL | | - sudo dpkg —add-architecture i386 - sudo apt-get update - sudo apt-get install libaio1:i386 - sudo apt-get install libncurses5:i386 - sudo apt-get install alien - sudo apt-get install gcc-multilib g++-multilib - sudo apt-get install libpam0g:i386 - sudo apt-get install ksh:i386 - sudo apt-get install unixodbc-dev:i386 unixodbc:i386 | - sudo yum update - sudo yum install libaio-devel.i686 - sudo yum install libaio.i686 - sudo yum install glibc.i686 - sudo yum install compat-libstdc++-33.i686 - sudo yum install glibc-devel.i686 - sudo yum install libstdc++.i686 - sudo yum install libstdc++.i686 - sudo yum install pam.i686 - sudo yum install ncurses-devel.i686 - sudo yum install unixODBC.i686 - sudo wget ftp://195.220.108.108/linux/centos/6.7/os/i386/Packages/ksh-20120801-28.el6.i686.rpm - sudo yum install ksh-20120801-28.el6.i686.rpm - sudo yum install nano | Step 2 - Download DB2 DSDriver : DSDriver DB2 v10.5fp5_linuxia32 Step 3 - Download PHP extension : PHP 5.6 PHP 5.4 Step 4 - Copy the extension to the folder ext scriptcase : - sudo cp ibm_db2.so /opt/NetMake/v81/components/apache/ext/ Step 5 - Edit and add on the end of php.ini file the db2 extension : - sudo nano /opt/NetMake/v81/components/apache/conf/php.ini - extension=ibm_db2.so Step 6 - Install the DB2 DSDriver : - sudo mkdir /opt/IBM - sudo mkdir /opt/IBM/Db2/ - sudo cp v10.5fp5_linuxia32_dsdriver.tar.gz /opt/IBM/Db2 - sudo cd /opt/IBM/Db2/ - sudo tar -zxf v10.5fp5_linuxia32_dsdriver.tar.gz - sudo cd dsdriver - sudo ksh installDSDriver Step 7 - Restart apache : - sudo /etc/init.d/apachesc81 restart
Oracle Connection - Scriptcase 8.1 - Linux
To enable the connection to Oracle on Linux, we must perform the following steps: Prerequisites Step 1 - Add the i386 architecture and install the packages below : | | | | --- | --- | | UBUNTU\DEBIAN | CENTOS\RHEL | | - sudo dpkg —add-architecture i386 - sudo apt-get update - sudo apt-get install libaio1:i386 - sudo apt-get install libncurses5:i386 - sudo apt-get install alien - sudo apt-get install gcc-multilib g++-multilib - sudo apt-get install libpam0g:i386 - sudo apt-get install ksh:i386 - sudo apt-get install unixodbc-dev:i386 unixodbc:i386 | - sudo yum update - sudo yum install libaio-devel.i686 - sudo yum install libaio.i686 - sudo yum install glibc.i686 - sudo yum install compat-libstdc++-33.i686 - sudo yum install glibc-devel.i686 - sudo yum install libstdc++.i686 - sudo yum install pam.i686 - sudo yum install ncurses-devel.i686 - sudo yum install unixODBC.i686 - sudo wget ftp://195.220.108.108/linux/centos/6.7/os/i386/Packages/ksh-20120801-28.el6.i686.rpm - sudo yum install ksh-20120801-28.el6.i686.rpm - sudo yum install nano | Step 2 - Download Instant Client Oracle : Oracle Instant Client Basic 12.1.0.2.0-1 Oracle Instant Client Devel 12.1.0.2.0-1 Step 3 - Download PHP extension : PHP 5.6 PHP 5.4 Step 4 - Copy the extension to the folder ext scriptcase : - sudo cp oci8.so /opt/NetMake/v81/components/apache/ext/ Paso 5 - Install the Oracle Instant Client | | | | --- | --- | | UBUNTU\DEBIAN | CENTOS\RHEL | | Modificar el cliente instantánea instalador de Oracle a .deb para ser ejecutable: - sudo alien —target=amd64 oracle-instantclient12.1-devel-12.1.0.2.0-1.i386.rpm - sudo alien --target=amd64 oracle-instantclient12.1-basic-12.1.0.2.0-1.i386.rpm Install the Instant Client Oracle : - sudo dpkg -i oracle-instantclient12.1-basic_12.1.0.2.0-2_amd64.deb - sudo dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb | - yum install oracle-instantclient12.1-devel-12.1.0.2.0-1.i386.rpm - yum install oracle-instantclient12.1-basic-12.1.0.2.0-1.i386.rpm | Paso 6 - Restart apache : - sudo /etc/init.d/apachesc81 restart
MSSQL Server Connection - Scriptcase - Mac OS X
Currently we must set up the connection to SQL Server on computers running Mac OS X according to the steps below: Step 1 - We should access the connection setup, in this case MSSQL Server Click on "Set FreeTDS". Step 2 - We must set the data to connect to MSSQL Server database Name - The name chosen for use in connection Host - IP or server address where the MSSQL Server database Port - Port configured in MSSQL Server database (default: 1433) Instance - Instance used in MSSQL Server database Version - TDS protocol version used (default: 7.0) Step 3 - Now we must inform the user and password to connect to MSSQL Server database and test the connection. Server/Host - Configured name in the "Name" of FreeTDS settings User - User configured on MSSQL Server database (default: sa) Password - password set in MSSQL Server database
Filtering Connection Database - Oracle
On various occasions, we encounter slowness when connecting to the database or while editing and executing applications. It is possible to resolve these issues by optimizing data loading through filter configuration. To do so, follow these steps: Step 1 - Creating the Connection Access the “Database > New Connection” menu to create a new connection in your project. Step 2 - Selecting the Database Choose the database — in our case, "Oracle." Step 3 - Configuring Connection Parameters Now, the following connection parameters will be needed: - Connection Name: You can use any name to identify the connection — by default, Scriptcase sets the name as “conn_oracle.” - DBMS Driver: We should select the appropriate connection driver according to the Oracle database. - Database Name: We can directly use the IP/TSNAME to connect to the desired database. - Schema: SCHEMA of the database to be used. - Username: Oracle database user. - Password: Oracle database password. Once filled out, click “Test Connection.” Step 4 - Configuring the Connection Filter At this point, we should take the following steps to optimize our Oracle database connection configuration: Show: We choose which database items will be displayed when creating applications. - Tables - Views - System Tables - Procedures Filters: Here, we can configure two items with the following options: - Tables: We can type the names of the tables to be used in the configuration. - ****Owner: We should use the name — always in uppercase — of the SCHEMA, to show or not in the table list when creating the application. - Show: Defines whether the data entered in "Tables" and/or "Owner" will be displayed or not. Once configured, click "Save". Info In the example below, only the "SYSTEM" SCHEMA data will be displayed when creating applications. Conclusion By following these steps, we avoid loading all SCHEMAS or tables from the database, reducing the amount of data requested from the database and increasing the speed of application creation, editing, and execution.
Manipulate a button display dynamically
The most interesting feature in Scriptcase, is the manipulation of the display of buttons in applications, with the macro sc_btn_display ("nomebotao", "on / off"): To see all the macro documentation click here. We can use this macro to validate users' permissions to use a button, for example: We have a form with the New, Update and Delete buttons, and the User and Visitor groups.e. The User will not be allowed to Delete a record and the Visitor will only be able to view the form. We put the following code in OnLoad: if([grupo] == 'usuario'){ sc_btn_display('delete','off'); }else if([grupo]=='visitante'){ sc_btn_display('delete','off'); sc_btn_display('update','off'); sc_btn_display('new','off'); } See in execution: User: Guest:
Using macros sc_begin_trans, sc_commit_trans and sc_rollback_trans with Alert Message
When we need to maintain a control or follow-up to a specific procedure at the time of entering, modify some procedure within the database within a form we have the macro sc_begin_trans. The macro sc_begin_trans is responsible for carrying out a transaction control procedure within theScriptCase, but it can also be complemented with the sc_commit_trans and sc_rollback macros. Now, the macro sc_commit_trans takes care that once the control process has been carried out, it can be by means of a condition, confirms the transaction, that is, if all the proposed conditions are fulfilled, confirms the transaction, it can be the to insert, modify or delete a record. Otherwise the macro sc_rollback_transque is responsible for canceling the transactions given by the user, for example, when wanting to enter, modify or delete a record, this is responsible for canceling or omitting the procedure. To show an alert message we will use a JavaScript function that is responsible for displaying the alert message. Then, in the following example, it is responsible for making a control when registering: 1. Within the onAfterInsert event, it performs a control after entering by means of a condition: 2. The changes are saved, and when you save a record with the name Brazil, it does not allow you to store it.
Hide certain fields in a Grid by means of various conditions
When you need to hide fields through various conditions within the Grid, we can do it through a query. The first thing we are going to do is a query and we will store it inside a variable. Then we use the macro sc_lookup. After using said macro, we proceed to store it in an array, since within a Grid it is not possible to directly reference the field to make comparisons. So in this example we are going to be using the macro sc_field_display which is the one that allows to show or hide a said field based on a condition. Next the example:
Using the macro sc_date_dif_2
To calculate the difference between two dates we have the macro sc_date_dif_2, in this example we will see how it works and how to use it. 1. The format with which you are keeping within the database must be taken into account: Database Format Macro Format Example in Documentation (https://www.scriptcase.net/docs/en_us/v9/manual/14-macros/02-macros/) 2. Respecting that format we apply it within the macro sc_date_dif_2, as follows in the Blank application, in the onExecute event: 3. We save the changes and execute the application:
Using the macros sc_begin_trans, sc_commit_trans and sc_rollback_trans
When we need to maintain a control or follow-up to a specific procedure at the time of entering, modify some procedure within the database within a form we have the macro sc_begin_trans. The macro sc_begin_trans is responsible for carrying out a transaction control procedure within theScriptCase, but it can also be complemented with the macrossc_commit_trans and sc_rollback. Now, the macro sc_commit_trans is loaded that once the control process has been carried out, it can be by means of a condition, it confirms the transaction, that is, if all the proposed conditions are fulfilled, it confirms the transaction, it can be that of inserting, modify or delete a record. Otherwise it is the macro sc_rollback_trans that is responsible for canceling the transactions given by the user, for example, when wanting to enter, modify or delete a record, this is responsible for canceling or omitting the procedure. Then, in the following example, it is responsible for making a control when registering: 1. Within the AfterInsert event a control is made after entering: 2. When executing, we enter a code other than 85: Depending on the condition, if the entered code is not 85, then confirm the transaction with the macro sc_commit_trans. 3. Otherwise, we enter a record with code 85: 4. Then within our database administrator you can see that the record was not loaded with code 85, that's thanks to the macro sc_rollback_trans:
Example of sc_apl_conf
In this example we will see how to make a form start blank with the macro sc_apl_conf. 1. We create an application of the Form type 2. Then in the onApplicationInit event we use the macro sc_apl_conf: 3. We save the changes and execute the application: 4. When you start, start like this: To see what events can be used can be fixed in our manual: https://www.scriptcase.net/docs/en_us/v9/manual/14-macros/01-general-view/
Using the sc_field_display macro
To dynamically hide a field in this example, the macro sc_field_display is used, which is responsible for hiding or dynamically displaying a field or several. This macro has scope in the following events: In this example, it will be used within an AJAX event of type onChange: 1. The onChange type event is created: 2. Now the macro sc_field_display will be used by means of a condition that is going to hide or show a field dynamically: 3. We save the changes and execute the application 4. When executing all the fields are shown, and also the field "state" which must be hidden by means of the change that is applied to the field "familia_id" 5. Then changing the field "email" and the "customersid" is even, it hides the field "status"
Macro sc_error_continue
When we want to insert, modify or delete a record within our form it can not be possible because of the database errors that are previously configured, which can be generated by ourselves by means of triggers, for example: In this example we create a trigger for each time you want to unsubscribe or delete a record from a specified table. How can this error be already configured by default: [Microsoft][Controlador ODBC SQL Server] [SQL Server] You can not delete the record Then, to capture those types of errors, we have a macro called sc_error_continue, whose function is to capture the errors that are generated from the database. An example would be when wanting to delete, then there is a ScriptCase variable that contains the message error extracted from the database, whose variable is called sc_error_delete which has the following message in it: You can not delete this record. Then we find an example of how the macro can be used: You can also find the information within the manual: Click Here
Executing SQL statements (Insert, Update and Delete)
With the macro macro sc_exec_sql you can execute SQL statements. Note that is useful to insert, update and delete because you dont get the output. If you need te output, use sc_lookup. Sintax: sc_exec_sql("SQL statement", "connection")The parameter connection is optional. Example: if(condition) { sc_exec_sql("UPDATE table SET field='{field_value} ' where id={field_id}"); }
Macro sc_date
Scriptcase provides a very useful macro for manipulating dates, which is a very laborious process, however with the use of the sc_date macro (Increments and Decrement Dates), it is much simpler, example: sc_date (Date, format, operator, D, M, A) date - Date field containing the date to be modified format - Formatting in which the date field is operator - "" for increment and "-" for decrement D - Number of days to increase or decrease M - Number of months to increase or decrease A - Number of years to increase or decrease E.g.1: {datanasc} = sc_data ({datanasc}, "dd/mm/aaaa", " ", 30, 0, 0); E.g.2: $nova_data = sc_data ({datanasc}, "aaaa-mm-dd", "-", 15, 3, 2); E.g.3: {dt_inclusao} = sc_data (date('Ymd'), "aaaammdd", "-", 0, 1, 1); Tip: To make sure the date format, before using the function, put a command in its formula: echo "form_data =". {date field name}; Run the application and see the correct format.
DB2 connection - Scriptcase
Enabling DB2connection on Scriptcase: 1. Download the instant client of DB2 form the url below or download the file in the final of this tutorial. - Data Server Driver Package 10.5 - http://www-01.ibm.com/support/docview.wss?uid=swg27016878 DSClients-ntx64-dsdriver-10.5.500.107-FP005 for 64bit architeture ( after click, select ALL LANG ) DSClients-nt32-dsdriver-10.5.500.107-FP005 for 32bit architeture ( after click, select ALL LANG ) 2. Place the dll in the PHP extension folder - php_ibm_db2.dll ( PHP 5.4 ) Download : click here - php_ibm_db2.dll ( PHP 5.6 ) Download : click here 3. Add or uncomment the PHP.ini extension=php_ibm_db2.dll 4. Restart the apache from scriptcase. Use the Db2 ODBC Native type of DBMS Driver in the connection of scriptcase. Attachments (click to download): Client 32bit Client 64bit
Connection with MSSQL Database
Scriptcase has 3types of connections that can be used to communicate with Database MSSQL Server. - MSSQL Server Native SRV PDO - MSSQL Server Native SRV - MSSQL Server ODBC 1. Connection ODBC (MSSQL Server ODBC) This connection may be used on the following Operating Systems. - Linux (FreeTDS) - Windows 8 - Windows 7 - Windows Server 2012 - Windows Server 2008 - Windows Server 2003 - Windows XP In case you are using linux, a connection is possible with an extension module FreeTDS. The driver that allows the success to ODBC through PHP is compiled in 32 bit. If you are using Windows 64 bits, it’s necessary to create a ODBC connection using the program “odbcad32.exe” that can be found in the directory “/Windows/SysWOW64/”. Example: C:\Windows\SysWOW64\odbcad32.exe For more details about this connection, click here. 2. Connection Native SRV and Native SRV PDO (MSSQL Server Native SRV) This connection can be used on the following Operating Systems: - Windows 8 - Windows 7 - Windows XP Service Pack 2 - Windows Server 2012 - Windows Server 2008 - Windows Server 2003 Service Pack 1 A Native SRV connection is the most recommend for use on Scriptcase. This type of connection has better performance, also the only one that works perfectly with the field type’s image and document (database). The installation of these modules is manually and has 2 steps. Install the Microsoft SQL Server Native Client – sqlncli Install the Driver – SQLServerDriverForPHP
How to use local storage in your browser
In this article we'll learn how to implement a system using the localstorage of your browser. First, we'll use ES6 to create a class in javascript This class has the atributes year, month, day, category, description and a value for expense. class Expense { constructor(year, month, day, category, description, value) { this.year = year; this.month = month; this.day = day; this.category = category; this.description = description; this.value = value; } validateData() { for(let el in this ) { if(this[el] == undefined || this[el] == '' || this[el] == null) { //se for nulo vazio o indefinido return false; } return true; } } } The second step is to create a class that is a controller to manage the localstorage. class ExpenseController { constructor() { let id = localStorage.getItem('id'); if (id === null) { localStorage.setItem('id', 0); } } getNextId() { let currentId = localStorage.getItem('id'); return parseInt(currentId) + 1; } save(expense) { let id = this.getNextId(); localStorage.setItem(id, JSON.stringify(expense)); localStorage.setItem('id', id); } recoverAll() { let expenses = Array(); let id = localStorage.getItem('id'); for(let i = 1; i <= id; i++) { let expense = JSON.parse(localStorage.getItem(i)); if(expense === null) { continue; } expense.id = i; expenses.push(despesa); } return expenses; } search(expense) { let filteredExpenses = Array(); filteredExpenses = this.recoverAll(); if(expense.year != '') { filteredExpenses = filteredExpenses.filter(d => d.year == expense.year); } if(expense.month != '') { filteredExpenses = filteredExpenses.filter(d => d.month == expense.month); } if(expense.day != '') { filteredExpenses = filteredExpenses.filter(d => d.day == expense.day); } if(despesa.tipo != '') { filteredExpenses = filteredExpenses.filter(d => d.category == expense.category); } if(expense.description != '') { filteredExpenses = filteredExpenses.filter(d => d.description == expense.description); } if(expense.value != '') { filteredExpenses = filteredExpenses.filter(d => d.month == expense.month); } return filteredExpenses; } remove(id) { localStorage.removeItem(id); } } Now we need an instance of controller let controller = new ExpenseController(); This function bellow rester one expense, so you can edit it as you want. function registerExpense() { let year = = $year ?; let month = = $month ?; let day = = $day ?; let category = = $category ?; let description = = $description ?; let value = = $value ?; let expense = new Expense(year, month, day, category, description, value);if(expense.validateData()) { controller.save(expense); php sc_alert("localstorage saved"); ? year = ''; month = ''; day = ''; category = ''; description = ''; value = ''; } else { //error php sc_error_message() ? }} This function loads a list of expenses. function loadExpensesList(expenses = Array(), filter = false) { if (expenses.length == 0 && filter == false) { expenses = controller.recoverAll(); } let expensesList = document.getElementById('listaDespesas'); expensesList.innerHTML = ''; expenses.forEach(function(d) { let row = expensesList.insertRow(); //Coluna mais a esquerda. row.insertCell(0).innerHTML = `${d.day}/${d.month}/${d.year}`; switch (d.category) { case '1': d.category = 'Alimentação'; break; case '2': d.category = 'Educação'; break; case '3': d.category = 'Lazer'; break; case '4': d.category = 'Saúde'; break; case '5': d.category = 'Transporte'; break; } row.insertCell(1).innerHTML = d.category; row.insertCell(2).innerHTML = d.description; row.insertCell(3).innerHTML = d.value; let btn = document.createElement("button"); btn.className = 'btn btn-danger'; btn.innerHTML = ''; btn.id = `id_despesa_${d.id}`; btn.onclick = function() { let id = this.id.replace('id_despesa_', ''); controller.remove(id); window.location.reload(); } linha.insertCell(4).append(btn); }) } This function searches an expense. function searchExpense() { let year = document.getElementById('ano').value; let month = document.getElementById('mes').value; let day = document.getElementById('dia').value; let category = document.getElementById('tipo').value; let description = document.getElementById('descricao').value; let value = document.getElementById('valor').value; let expense = new Expense(year, month, day, category, description, value); let expenses = controller.search(expense); loadExpensesList(expenses, true); } This is the base code example to use localstorage in your scriptcase. You can use the code in the events of each application.
Update a widget based on another widget.
1-) Create a Grid (product table), whose configuration is Grid Modules → Orientation to Slide Configuration → Columns per pages: 5 Link between Applications → Link to a blank application that will perform the update, where the link will have the following properties Operation Mode Link: Open in iframe Iframe height: 5 Iframe width: 500 And send the following parameters to the blank: 2-) On the blank, you will receive the parameters of the grid, which will be stored in global variables, and will update the table and then redirect to the grid retail_detail 3-) Create a Grid_detalle_venta 4-) Create a Dashboard: Select the grid (from Step 1) with the following options Through the link of this grid with the blank application, whose scope will be "Create widget automatically". 5-) Run the dashboard and a similar result should be observed. For more information: https://www.youtube.com/watch?v=KzG6WfZR8a4
Cambiar el estilo de un campo dentro de un Formulario Registro Unico
Para cambiar un campo de forma dinámica dentro de un formulario, se debe utilizar o crear un método JavaScript que va a ser el que va a estar dando el estilo al campo. Los pasos a seguir son: 1. Inspeccionar el elemento del campo para obtener el id del campo. 2. Creamos un método Javascript, colocamos el siguiente código: 3. Creamos un evento AJAX DEL TIPO onChange y agregamos el siguiente código: 4. Guardamos los cambios y ejecutamos la aplicación.
Filter Oracle Connection
If the error above appears when connecting to the database and then creating a new application, it is necessary to make some changes regarding the database: Obs: For such changes it is necessary to know the owner who has view of the tables, such configuration must be changed/configured by the database manager. 1. Editing the database connection When opening the connections choose the connection whose error is displayed Changing table owner Open the Filter tab to perform the next steps 2. In the Filter tab edit the owner and then change the flag Show to "Yes". Changing the Database Schema 1. Still in the connection tab, you can pass a Schema of your database. This way, only the tables that belong to the informed schema will be listed.
Sample Bank Billet
In this tutorial we will learn how to create a bank slip application in Scriptcase, the bar code used will be 2 out of 5 in the Febraban Collection pattern. (The file is available for download at the end). FEBRABAN:http://www.febraban.org.br - HTML file with the billet layout. - Access the Scriptcase template option. 1. Click on New Template; 2. Select the type as Free Format; 3. Upload the HTML file. - Set the orientation of the query to free format. - Select the free format template, in this case the billet. - Create the type 2 barcode field of 5. - Create a text field for a digitable line. - Now let's create the M_codigobarras method for configuring the barcode. $ free - Variable that contains the 25 free positions of the bar code, in the example the free part does not have the 25 positions, but the macro is complete with 0 (Zeros). $ valor_boleto - formatted to work to two decimal places (truncates the value). $ data - formatted in yyyymmdd, as it must be used in that format. After formatting the values, we will use the sc_lin_cod_barra_banco macro to generate the barcode. Parameters: {codigobarras} - Type 2 barcode field of 5. '409' - Bank code (FEBRABAN). '9' - Currency Code (FEBRABAN). $ valor_boleto - Document value. $ free - Free part (FEBRABAN). $ data - Expiration Date. - In this step, we will associate the existing fields in the query with the variables defined in the free format (HTML file used). - Auxiliary application (Order inquiry), for generating the ticket according to the order. - Billet generated. We held a live showing the creation of the billet on 06/19/2015. The video with the recording of the seminar can be seen on this youtube link: https://youtu.be/0nASrp-VqlI
How to make a report in PDF using code
Small tutorial tomake a report in PDF. Other examples canbe taken from https://tcpdf.org/examples/ The scriptcase also has the follow feature natively: https://www.scriptcase.net/docs/en_us/v9/manual/06-applications/13-reportpdf-application/11-pdf-layout-pdf/ 1- You enter in theside menu in PDF Design / code where you can see some codes createdby the pdf or blank. When executing this code of the image, the result would be
Navigate between tab dynamically
In this tutorial we will show how to navigate between tabs dynamically from a tab application. In this example we will use two applications, added in the tab application. In the first tab we will have a form and after inserting a record we will be directed to the second tab containing a query application. 1. With the tabs application properly configured, we must access the form and in the onAfterInsert event insert the following code: Where X is the number of the tab that we want to redirect. In the example, I want the second tab to be displayed after inserting a record. This way the code would look like this: For more information on the application tab and other applications, visit our online documentation. SmallBestOriginalRemove
Displaying username in the Menu Header
In this article we will see how to display the name of the user logged in the system, in the header of an application menu. This example was created using the Scritpcase native security module1. First, select the user or login. Access an app_login application, make the security module, in the application settings access the onValidate event. In this event it is possible to obtain the login used by the client [usr_login]. 1. if(sc_logged_is_blocked()) { sc_error_exit(); } 2. $slogin = sc_sql_injection({login}); 3. $spswd = sc_sql_injection(hash("md5",{pswd})); 4. $sql = "SELECT 5. priv_admin, 6. active, 7. name, 8. email 9. FROM sec_users 10. WHERE login = $slogin 11. AND pswd = ".$spswd.""; 12. sc_lookup(rs, $sql); 13. if(count({rs}) == 0) 14. { 15. sc_log_add('login Fail', {lang_login_fail} . {login}); 16. sc_logged_in_fail({login}); 17. sc_error_message({lang_error_login}); 18. } 19. else if({rs[0][1]} == 'Y') 20. { 21. $usr_login = {login}; 22. $usr_priv_admin = ({rs[0][0]} == 'Y') ? TRUE : FALSE; 23. $usr_name = {rs[0][2]}; 24. $usr_email = {rs[0][3]}; 25. sc_set_global($usr_login); 26. sc_set_global($usr_priv_admin); 27. sc_set_global($usr_name); 28. sc_set_global($usr_email); 29. } 30. else 31. { 32. sc_error_message({lang_error_not_active}); 33. sc_error_exit(); 34. } 2. Then access the menu application. Access the onAplicationInit event and use the code below 1. $sql = "SELECT name FROM sec_users WHERE login = '".[]."'"; 2. sc_lookup(ds,$sql); 3. sc_reset_global([var_glob1]); 4. [nome] = {ds[0][0]}; 3. Then go to Layout> Header & Footer and then we will assign the value of the variable [name] to one of the header variables. 4. Then, when accessing the login, the user name will be displayed in the menu header.
Create a folder using PHP code
To create a folder on the server partition, use the PHP command: mkdir (); In the example below, I will create a folder where your name will be the current system date. $folder = date("Ymd");mkdir ($folder, 0755); ?> The value "0755", will be allowed to read / write the new folder. I remember: For dedicated servers, you can use 777. To host servers / cpanel, you should use the permission to 755. Source: http://br.php.net/manual/pt_BR/function.mkdir.php
jbcmotos.myscriptcase.com, ola
Olá, bom dia! Em que posso ajudar? O senhor pode entrar em contato através do e-mai: leticia.financeiro@netmake.com.br Fico a disposição.
Enabling DropBox API
This tutorial shows you how to obtain Dropbox access credentials. 1) First, it is necessary to create a Dropbox account. Access the link to create your account. (User must be an administrator). If you already have an account, please proceed to the next step. 2) You must create a Dropbox API access key from App Console. Click “Create app” 3) After that, you must specify the type of accessDropbox access and the name of your app and click Create App again. 4) The next screen will display your API information, click on the “Permissions” tab and select the desired options. These options are for team members to perform actions selected by the administrator. 5) Return to “Settings” and note that your APP's information will be available, including the "APP KEY" and "APP SECRET" options to be informed in the scriptcase API settings. - Enter the URL of your system in the Redirect URIs (OAuth 2) field and click on the “Add” button. Example: http://localhost/ - Click on the "Generate" button under "Generate Access Token" in the OAuth 2 options to generate your key. Copy the generated TOKEN and enter it in the scriptcase API settings. 6) Enter the credentials generated by your dropbox app in ScriptCase. - “API KEY” - “API Secret” - "Access Token"
Fatal error: Uncaught GuzzleHttp\Exception\RequestException
The Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error can be displayed in the Scriptcase interface in two situations 1. When using the Google-integrated Calendar application 2. When using the Google Drive API So that the error doesn't happen anymore, follow the step by step below: Download and Rename the File 1 - Download the cacert.pem file by clicking on the link below. http://curl.haxx.se/ca/cacert.pem 2 - After download, rename the cacert.pem file to curl-ca-bundle.crt When trying to rename the file, a dialog box will appear asking you to confirm the change of the file extension. Click Yes to confirm. Move and Edit the php.ini file 3 - After renaming the file, place it in the directory ..**NetMake\v9-php73\components\php**extras The location of the extras folder varies depending on the settings made in your installation. When using our installer with default values, the folder can be found in the directory below: *..\NetMake\v9-php73\components\PHP* 4 - Access the php.ini file located at *..\NetMake\v9-php73\components\php* 5 - After opening the file, locate the line ;curl.cainfo = "" 6 - Change the contents of this line to: curl.cainfo = "caminho_completo\NetMake\v9\components\php\extras\curl-ca-bundle.crt" Restart the Apache Service 7 - To finish applying the changes, restart the apache service. Press windows + R to open the windows run. 8 - Type services.msc and click OK 9 - On the services screen, look for ApacheScriptcase9php73, select the service and click on restart. 10 - Wait for the process to end, after the end, google resources within Scriptcase can be used normally.
How to change the width of your application.
There's 2 main way's of changing the width of the application. 1. The first one is the more intuitive option, first go to Layout on your application side menu and click on Pages**:** **1.1.**In this screen you shall see the minimum and maximum tab width's field, choose a value that suits you and that's it: **2.**The second method is a bit more less intuitive, first, you may enter your application and look for the area you want to change: **2.1.**Mine is rather thin, i want to make it a the size of the screen. For that we'll have to click with de RMB and click on Inspect: **2.2.**You need to find your applications class, just like this: 2.3. My class is called "scFormBorder", and with that go to Events > OnScriptInit, on your side menu: **2.4.**Now you may type this code: **2.5.**Mine will look like this: 2.6. You can change your pixels value freely, until you find a perfect fit. **2.7.**This is the final result:
Necessary libraries to install the Scriptcase in Windows 7
To install Windows 7 SP1, you need to verify that the system has the following items installed: * Visual C ++ Redistributable Packages for Visual Studio (2008) x86 and x64. * Visual C ++ Redistributable Packages for Visual Studio (2010) x86 and x64. * Visual C ++ Redistributable Packages for Visual Studio (2012) x86 and x64. * Visual C ++ Redistributable Packages for Visual Studio (2013) x86 and x64. * Visual C ++ Redistributable Packages for Visual Studio (2015) x86 and x64. * Visual C ++ Redistributable Packages for Visual Studio (2017) x86 and x64.
Enabling Amazon S3 API
This tutorial shows you how to obtain access credentials for S3 storage. 1. Create a new AWS account, and then log in as root User, entering the email and password that were informed in the registration. If you already have an account, proceed to the next step. 1. After logging in, create a user by going to Services and typing IAM in the search box. Mouse over IAM to select the Users option. 1. Click Add Users to add a new user. 1. Enter a valid username and select the AWS access type as programmatic access. 1. Select Directly attach existing policies, then select AdministratorAccess so that the user is allowed to access AWS services. 1. In this tab there is no need to do anything, just click on Next:Review 1. In this area you can check the user that is about to be created, just click on Create User. 1. User created, the access key ID and the secret access key will be shown (necessary credentials for creating the S3 API with Scriptcase). 1. 2. Click Create Bucket. 1. NOTE: For the example there was no other configuration for creating the bucket, just keep creating it by clicking Create bucket. 1. Now, just access Tools->API in Scriptcase, and click Add new: Then, fill in the information described below: 1. Define a name for API 2. Mode in which the API will be created, the Project option must be chosen 3. API Gateway, in this case Amazon S3 will be chosen 4. Add API key made available on IAM user creation 5. Add Secret API made available on IAM user creation 6. Just enter the region code 7. Enter the name of the bucket created in S3 8. Click Save
Enabling Google Drive API on the Google Console
This tutorial shows how to create a project and enable the Google Drive API for a specific Google account, and get access credentials. 1) Log in with your Google account in the reserved area where you can configure Google APIs, from this URL: https://console.developers.google.com/apis/library 2) After login select or create a new project: 3) Create or select an existing project: Creating a Project 1 - Enter a name and the organization your project will be linked to: 2 - Then click on the “Select Project” item to access the project: Enabling API 1) Click on the item “ACTIVATE APIS AND SERVICES”: 2) Search for "Google Drive API", select this option and on the next screen click "ACTIVATE": 3) In the left menu ("APIs and Services"), click on "OAuth Permission Screen": 4) Check the “External” option and click the “Create” button: 5) Enter the name of your application and click on the "SAVE" button: NOTE: Leave all other options at their default values. Using credentials in local environment 1) After creating the OAuth consent screen, select the item “Credentials” from the left menu (“APIs and services”) 2) Click on the “CREATE CREDENTIALS” item. 3) Select the “OAuth Client ID” item 4) Select the “Web App Computer App” option, type the name and click “Create”. 10) Immediately, “Customer ID” and “Secret Key” of the customer will be created. Click OK. Using credentials in external environment 1 - To use your credentials in an external environment, go to the "CREATE CREDENTIALS" button again and select the option "Help me choose": 2 - Select the options: 1. Select an API: Google Drive API 2. Check the option: User data. 3. Click the NEXTbutton 3 - On the scopes screen, click on the button to “Add or remove scopes”: 4 - Enable all extensions containing the API name: Google Drive API and Google Sheets API. Click the button to “Save and continue": 5 - In the next step, select the option: “Web application” and inform the name of the application: Notes This name will be informed in the scriptcase API interface credentials 6 - In the Redirect URL option, click to add your URL then click on the “CREATE” button: Click CONCLUDE to finish the process. Warning You need to add the full path. Example for the production environment: https://www.yourdomain.com/scriptcase9/prod/third/oauth/google-api-php-client-2.1.3/code.php Adding the API on Scriptcase 1) After creating the credentials, download the JSON file in the registry that was created: 2) After this procedure, access the scriptcase “API” interface: - Enter the name of the application created in the OAuth consent screen in the API settings. - In the JSON OAUTH field, insert the content of the JSON file downloaded in the previous procedure. NOTE: After entering these values, click on the “AUTH” button. 3) Soon after, select your gmail account again, as the authentication code will be generated. Copy and paste the “authentication code” into the API settings field and click the “SAVE” button.
How to configure a new rule in the Save grid option
The Option Save Query allows the layouts to be saved publicly or with restricted access. * Public - Anyone who has access to the application will have access to the saved Layout * Use Rule - Allows the layouts to be saved with restricted access. In this article, you will learn how to create a restricted rule in the option Save Query. Creating a Rule 1 - On the Configuration screen, click New Rule. You must define the name and Label for the identification of the rule in the Application interface. The Label field accepts a global variable 2 - Then, add a global variable, to create the access restriction to the layout In the example, the variable usr_login, which stores the login in the security module is being used. Thus, when user A creates one or more rules, only he will have access. 3 - Click Add, to include the global variable in the rule. It is possible to create the rule without a global variable, however, this way the rule will have the same behavior as the public level 4 - Then click Finish. When running the application and saving a layout with user 1, for example, only he has access to the profile created. User 1 access example User 2 access example
How to change the log module table
After creating the Scriptcase log module, it is possible to change the table. When making this change, a new table will be created from scratch with no records. The records in the previous table must be migrated to your database. How to edit log schema to change your table 1 - Access the menu: Modules**>** Log> Create / Edit Log module. 2 - Click on the icon highlighted in the image below to edit the logging scheme. The log module edit screen will be displayed. 3 - In the log schema edit screen, enter a new name for the table in the Table field and click save. 4 - Then, the creation confirmation screen will be displayed. Click the button, Close to save schema, to confirm the creation of the table and the change in the schema. With this change, the log module will start saving data in the new_tb_sc_log table. Changing table in the Log Report application In the module> log menu, it is possible to create a grid application based on the log table. If the application is already created, before changing the module table, it will be necessary to change the SQL or create a new application, so that the report is displayed correctly. To change the SQL, follow the steps below. 1 - Access the application settings and click on the SQL menu, as highlighted in the image. 2 - In the SQL settings just inform the name of the new table and click on generate source code. This change is possible only because both tables have the same field structure
Using the sc_confirm macro
In this article, see a practical example of using the sc_confirm macro. This macro can only be used on PHP buttons created in the toolbar of form and control applications, with the aim of confirming the action's excursion. See how to create a PHP field to update your application's records, thus replacing the tool's update button. Creating a PHP button 1. Click on the option New Button. 2. Select the PHP type and enter a name. 3. Configure the look of your button Using the sc_confirm macro In the PHP button event, created in the previous session, add the lines of code below The code below serves as the basis for your use. They must be appropriate to the reality of your system. 1. // Update the name according to the key field of the table 2. $ UPDATE = "UPDATE clients SET name = '" . {Name} . "'WHERE id =" . {id}; 3. sc_exec_sql ($ UPDATE); 4. // Confirms whether you really want to update therecord 5. sc_confirm("Do you really want to update the record?"); 6. // Updates the page 7. sc_redir (form_sample_sc_confirm); sc_confirm macro in operation When executing the form, change the name and click the button Save Record. A confirmation message will appear, like the one below. Clicking Cancel The action will not be performed. That is, no event command will be executed. When you click OK The action will be performed. That is, the update command will be executed and the name will be changed in the database.
How to add themes to an existing project
In the project creation process, we must select the themes that will be part of the project. If you want to add new themes to previously created projects, follow the step by step below. Adding theme to the project 1 - First, add the new theme within the project properties, access the top menu Project> Properties 2 - Then, access the themes tab. 3 - Within the themes tab, choose the desired themes and move them to the field on the right, where the themes available in the project are listed. 4 - In order for the next applications created to have the new theme already in the initial settings, it is necessary to leave the new theme selected as "Default", for that just click on the theme and click on the option "Define a default theme". To save the new theme to the project, click Finish. Applying the theme in the project applications. Once you have added the themes to your project, you can now use the Express Edition option in order to apply it to all existing applications 1 - In the top menu go to Tools > Express Edition 2 -Then select the applications that will be edited. 3 - Select the property you want to change, in this example, we are changing the Theme, and click Next. 4 - Select the theme you want and click Apply. All project applications will automatically have their theme changed to the selected one. To finish, click Generate Source, to recompile the applications with the new theme. This is the final step, make sure you do not have any changes within the express edition, if you have one, you can do the source code generation at the end of all changes
Adding Google Fonts to a Theme
Watch our Google Fonts video presentation 1 - Visit the link to access Google Fonts: https://fonts.google.com/ 2 -Select the desired font. 3 - Copy the link that is inside the tag. 4 - Go to Layout> Application Css (Themes). 5 - After that, click Advanced Mode. 6 - To use Google Fonts in apps you must first add the Google font link in your theme. 7 - Click the "Change all theme fonts" button to edit all fonts in the project. 8 - A box will appear to add the font family to use and the selection of the button group to use in the theme. With this option Scriptcase will change all fonts, including buttons, if you are using the default button template, if you are using a template you created, you can also select to change it with the new font you selected. You can also use offline sources by simply using the source link and clicking Download.
What is ScriptCase?
ScriptCase is a powerful RAD (Rapid Application Development) tool which generate PHP Applications based in a database table.
How to generate auth_code and token_code
In this article, you can see how to generate the auth_code and token_code, necessary to use the sc_api_upload and sc_api_download. These keys must be generated individually, follow the steps below to generate them without error. To use the upload and download macros with google drive, you must enable google drive api in your google account. Generate auth_code with sc_api_gc_get_url macro The sc_api_gc_get_url macro generates a URL for google account user authentication used for API configuration. It has two parameters: 1. app_name - Receive the app_name, available in your api configuration. This parameter accepts strings or variable. 2. json_oauth - Receive the content of the json file, this file is available for download in your api settings. This parameter accepts strings or variable. Follow the steps bellow. 1. Create a blank application in your project, with the objective of obtaining the auth_code. 2. In the onExecute event, add the code below. The values assigned to the variables $app_name and $json_oauth, in the example below, are for illustration only and should be changed by your account data. Code example 1. // $app_name should receive the app name configured in your google account 2. $app_name = 'scriptcase'; 3. // $json_oauth should receive the contents of the json file available for download in your google app's settings. 4. $json_oauth = '{"installed":{"client_id":"238650139811-eqrje3lqhj9a404iuduh9l5kvk5i13ng.apps.googleusercontent.com","project_id":"sample-294791","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x519_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"E-Z_t8PU-8u0BFwumHRorbTl","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}'; 5. // Generates the account authentication link 6. $url = sc_api_gc_get_url($app_name, $json_oauth); 7. // Redirects the app to the link generated by the macro 8. sc_redir($url); Google authentication 3. Then run the application. You will be asked to login with the account used to configure the API. 4. After login, access permission will be requested: 4. Then the code will be generated. Store the code in a txt file, it will be needed for us to generate the token_code. Possible errors This error occurs when the value informed in the json_oauth parameter is wrong. Open the json file again, copy the entire contents of the file, it must be informed in full. Generate token_code with sc_api_gc_get_obj macro The sc_api_gc_get_obj macro generates the token_code. It has four parameters: 1. app_name - Receive the app_name, available in your api configuration. This parameter accepts strings or variable. 2. json_oauth - Receives the content of the json file, this file is available for download in your API settings. This parameter accepts strings or variable. 3. auth_code - Receives the auth_code generated in the previous step or another valid auth_code that you have already generated. Follow the steps below. This walkthrough should only be performed for each auth_code generated. If any problem occurs when generating the token_code, it will be necessary to generate a new auth_code. In the same blank application, created to generate the auth_code, it is also possible to generate the token_code, for that follow the steps below. 5. Comment on the lines highlighted below: Code example with the lines that must be commented out. 1. // $app_name should receive the app name configured in your google account 2. $app_name = 'scriptcase'; 3. // $json_oauth should receive the contents of the json file available for download in your google app's settings. 4. $json_oauth = '{"installed":{"client_id":"238650139811-eqrje3lqhj9a404iuduh9l5kvk5i13ng.apps.googleusercontent.com","project_id":"sample-294791","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x519_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"E-Z_t8PU-8u0BFwumHRorbTl","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}'; 5. // Generates the account authentication link 6. // $url = sc_api_gc_get_url($app_name, $json_oauth); 7. // Redirects the app to the link generated by the macro 8. // sc_redir($url); 9. After the sc_redir line, which should be commented out, add the lines below. Code example 1. // Receives auth_code generated in the previous step 2. $auth_code = '4/1AY0e-g4BjstStsxAJd7A5jjlzBifl5AWSS9x04xhwp6Cyh2JON0i3r2oNd4'; 3. $auth_token = sc_api_gc_get_obj($app_name, $json_oauth, $auth_code); 4. echo $auth_token; The code should be looking like this at the moment. 7. Then run the application. The token_code value must be displayed on the screen. Store the token in a .txt file. Example of generated token_code: 1. {"access_token":"ya29.a1AfH6SMBSExys1mg0_4aaZ1H8iVNUtZ-2iid4zIjvywOpPDpL5_fhpuYu_Evgqj14Zll1mu0DKeX-UPBBbkIY33T_hIwUKNi6h5GVmE8RSt7vwj1N8rmM_ae3EjOBMDIaS_F2vkZ8ZzpnBA0V38WwYBxBNR1C","expires_in":3599,"refresh_token":"1//0heh4c5k0p_OqCgYIARAAGBESNwF-L2IrTOLtSoBOr-qdK4gDtSkyXtLYh99S1DGG6Y0x6sBwNu2sVnlqEFczG7-zEIBvCd8Bb6Q","scope":"https://www.googleapis.com/auth/drive","token_type":"Bearer","created":1623154166} The sc_api_gc_get_obj macro must be run only once for each auth_code generated. After getting the token_code, the auth_token parameter must be changed so that a new token_code is obtained. Otherwise, Fatal error: Uncaught InvalidArgumentException: Invalid token format, described below, will be displayed when running the application. Possible errors when generating token_code. Fatal error: Uncaught InvalidArgumentException: Invalid token format This error occurs when the sc_api_gc_get_obj macro is run a second time without the auth_code values having been changed. In this case, it will be necessary to generate a new auth_code, to get a new one as seen at the beginning of the article. Return to step Generate auth_code with sc_api_gc_get_url macro
How to edit records from a capture link.
In this article, see how to create a binding to edit a record from a grid used in a capture binding. We cannot use the edit link in this case, as the edit button will not be available when we access the grid to capture a value. Taking into account that the capture link is already configured, follow the steps below to configure the grid (used in the capture) and the form (used in editing the record) Grid Application In the grid application, we will create a link to edit the record using the macro sc_link. Adding the editing image to the application First we must add the image that will be used in the grid to symbolize the edit button. Why add images in the Application's Extra Images option? We must always add images that will be used in codes. This ensures that when publishing, the image will be uploaded and is also stored in the same directory, both in the publication and in the development environment, ensuring that the image is not broken after publication. 1 - In the side menu in the grid application, go to: Application > Settings 2 - In the option Application Images click on the icon to add an image: 3 - In the image manager, click Project > Icons 4 - Click File > Upload and select the icon that will represent the edit record button. The added images will be stored in this directory ../_lib/img/ When uploading, some prefixes are added to the image name, according to the directory where it will be stored. Images can be saved in the following directories: Public, Project and User. - Public - sys__NM__ - Project - grp__NM__ - User - usr__NM__ Within each directory there are some sub-directories: background images, button images, general images, icons and menu images. - Background images - bg__NM__ - Button images - btn__NM__ - General images - img__NM__ - Icons - ico__NM__ - Menu images - menu_img__NM__ When saving an image with the name contract.png in the Project > Icons directory, as in the tutorial, the image name should look like this: grp__NM__ico__NM__contract.png Creating a virtual field We must create a camp to receive the redirect link to the form. 1 - Click on the New Field option 2 - Define the field name which must be of type text. 3 - Remove the label from the field and set the title alignment as in the image below. onScriptInit Event In this event, we will reset the value of the global variable that will be passed to the form. This way, we guarantee that the variable will always have no value if we click on the record that will be edited. Code used in the event 1. // Resets the global variable that will be passed as a parameter to the form. 2. sc_reset_global([id_customer]); onRecord Event In the onRecord event, we will define the link using the sc_link macro and the image that will be displayed in the field created earlier, using the img tag. For more details on the sc_link macro, access our documentation. Code used in the event The images inserted in the Application Extra Images option will be stored in the ../scriptcase/app/projeto_name/_lib/img directory. Thus, to assign an image to a field, we must use the img tag informing the image directory and the name like this: ../_lib/img/grp__NM__ico__NM__contract.png 1. // Defines the image that will represent the button to edit the record. 2. {link} = ''; 3. // Remembering that the id_customer parameter will be received as a global variable in the form. 4. sc_link (link, form_customers.php, id_customer = {customerid}, "Click here to edit record", "_self"); Application Form In the form application, we will add a global variable in the application's SQL in addition to a validation in the onApplicationInit event. SQL Configuration In the SQL settings of the form, which will be called to edit the record, add a global variable. In the example, we are using the variable [where] onApplicationInit Event In this event, which is executed before the application's SQL assembly, the value of the variable [where] must be defined, so that the form is executed correctly. It is necessary to validate whether the variable [id_customer], passed as a parameter in the sc_link macro in the grid's onRecord event, has a value. There will be two possible situations: 1. In case the variable [id_customer] is empty - In this situation, the variable [where] must receive an empty sing. This way, the form will return all records normally. 2. If the variable [id_customer] has a value - This implies that some record was selected in the grid to be edited. Thus, the variable [where] must receive the query that will display only the record selected in the query. Remembering that we must use a key field to create this link. Código utilizado no evento 1. // Validates if the parameter passed by the query has a value 2. if ( empty( [id_customer] )) { 3. // If [id_customer] is empty, the variable [where] must receive an empty string, causing the form to display all its records. 4. [where] = ''; 5. // If [id_customer] has a value, it enters else 6. } else { 7. // In this case, the variable [where] will receive the query to display only the record selected in the grid. 8. [where] = "customerid = '[id_customer]' "; 9. } Grid in operation Grid application, opened from a capture link with the record edit button.
Fixing session issue when logging into Scriptcase
In this article, you will see how to solve the stuck session problem when trying to log in to Scriptcase. When trying to disconnect the user, nothing happens, because the session is stuck in the table responsible for storing this information. 1 - Download the sqlite.php file through the link below and place the file in Scriptcase's wwwroot folder Link: https://drive.google.com/file/d/17Lq4rmA1h33OalwR-ux0iKfLjcxxGm-1/view?usp=sharing 2 - Open the sqlite.php file directly from your browser: 127.0.0.1:8092/sqlite.php 3 - There will be a field where the database path must be inserted, the full path to the nm_scriptcase.db file must be passed and then click on the submit button Ex: Linux - /var/www/html/scriptcase/devel/conf/scriptcase/nm_scriptcase.db Windows - C:\Program Files\NetMake\v9-php81\wwwroot\scriptcase\devel\conf\scriptcase\nm_scriptcase.db This will clear the session in the database and you will now be able to log into Scriptcase. 4 - Go back to the login screen and log in to Scriptcase.
See how to generate recaptcha credentials
ReCAPTCHA is an API provided by Google for forms. It adds security, preventing automatic submission of forms through robots. reCAPTCHA sample: 1. First, we must request an API Key to activate reCAPTCHA into a Scriptcase application by following the steps below: To get a Site key and Secret Key go to the link: https://www.google.com/recaptcha/admin#list. See the image: Label It is a project identifier to create the reCAPTCHA keys. Choose the type of reCaptcha We must choose the option reCAPTCHA V2. Domains We can insert multiple domains (one per line) to limit the API uses. 2. Then, we need to accept the Terms of Service ("Accept the reCAPTCHA Terms of Service"). 3. When clicking on Register, the page refreshes and shows the integration of reCAPTCHA information. There we can get the Site Key and Secret Key:
Manual Password Reset
In this article, we'll show how to reset your password in the development environment. 1 - First you'll need to find your Scriptcase database (nm_scriptcase.db): C:\Program Files\NetMake\v9-php73\wwwroot\scriptcase\devel\conf\scriptcase In Windows should look like this. 2 - Open this Database at a Database Manager, i'll be using DBeaver for this example: 3 - When you're succesfully connected, go to the table sc_tbusu: 4 - When you enter de table, you will see the senha (password) column: 5 - It will appear the passwords you have registered in the database: 6 - If you're using Dbeaver, you may simply double click in the password field and change it to 70ff0e4194195505c750122e309f28a0 , which is the encrypted code for "admin", if you're not you may change it via an update query: 1. UPDATE st SET Senha = 70ff0e4194195505c750122e309f28a0 WHERE login = 'admin' 7 - After this, restart your apache service and try to log in with admin/admin.
Defining extensions for upload type fields
In ScriptCase, when we define a field as upload type in a Form, it is extremely important to define the Extensions allowed for this field. This setting makes these fields accept only as installation in the configuration, prevented or uploading unwanted files. List of upload type fields: - Image (File Name); - Image (Database); - Document (File Name); - Document (Database) For that, we will see below how to define and configure these extensions in a very simple way, to guarantee more security for the applications developed in ScriptCase: 1 - In the Form application, go to the left side menu of this application, more precisely in the option "Fields -> Your Field", and then choose the field type, which can be any of the 4 (four) mentioned above: 2 - Once that is done, the screen will open with all the possible configurations to be carried out in the field. We are interested in the "Extensions and upload size" option, as shown in the image below: 3 - When defining the extents, it is also possible to add a maximum size for each of them, using the following units: bytes, KB, MB or GB. Multiple extensions can be defined by clicking the Add Extension button or entering a list separated by ' ; '. For example: jpeg;png;gif OR 4 - Once that is done, just click on "Save application", generate its source code, and run it to test the new rules defined for this field. If you already have your application in production and have not defined the extensions for the Image and Document fields cited at the beginning of this article, just define it following the entire step-by-step above, and then publish only this application again, so that it can be safe and free of uploads of files of any kind.
Authentication with Facebook from a Control application
In the Control application, there is a feature on the left side menu called "Authentications". In this feature, there are authentication options for the Control application with Facebook, Twitter and PayPal. For this article, we'll learn how to use Facebook authentication. 1 - After creating a Control application, we will need to create at least one field in the Control application, and then go to the "Authentications" option on the left side menu of the Control application, as highlighted in the image below: 2 - Right in the first option, we will find the Facebook block with the fields that must be filled in for the authentication to work. These fields can be generated through the Facebook page for Developers, and to know the step by step of this generation, you can access the article link below that shows how to generate the App ID and Secret. Generating Credentials for Authentication with Facebook 3 - In addition to performing the above credentials generation procedure, we also need to enable the URL of our Control application to avoid returning the message described in the image below when we run our application and use Facebook authentication: To do this, we must go to the option "Login from Facebook -> Settings" on the Facebook for Developers page, and then enable the option "Force OAuth reauthentication on the Web" and add the URL of our Control application in "URls valid OAuth redirect": 4 - Before inserting the information in the App ID and Secret fields, let's create a method that will be inserted later in the Method Return field, which is used for validation after returning from the webservice, as defined in the field description itself. We click on the "+" icon: 5 - We will call the method name "facebook", click on the "Create" button. For the example, let's add a simple alert to the method using the sc_alert() macro just for this validation: 6 - We went back to the "Authentications" option after saving the method, and selected the facebook method in the "Method Return" field that had just been created. In addition, we inserted the credentials that were generated on the Facebook for Developers page, according to the third step: 7 - Once that's done, let's go to the "Toolbar" option on the left side menu of the Control application, as we will need to enable the Facebook authentication button taking it from the left column to the right: 8 - We save the application, generate the source code and execute it. With the application running, let's click on the "Facebook" button that has been enabled for the application. We will be redirected to enter our Facebook account password, and then the authentication will take place:
Generating Credentials for Authentication with Twitter
In this article, we will learn how to generate credentials (API Key and API Key Secret) for authentication and access to our project developed in ScriptCase through Twitter. Account Creation 1 - The first step is to create a Twitter account through the official website, as we will need to use it when creating a Twitter Developers account. If you already have a Twitter account and want to use it for this purpose, then you can skip to the next step. 2 - Let's access the Developer Platform page and "Sign in" with our Twitter account already created in the previous step, so that we can use the services offered by the Twitter API. Application Creation 1 - We will be redirected to the Twitter social network when we enter the Login and Password information, but just go back to the Developer Platform page, we will already be logged into our account. Our option of interest is "Developer Portal", as highlighted in the image below: Warning Various information will be requested for registration, and the first one is which modality the user intends to use the Twitter API services, whether it is for Professional, Academic or just Hobby purposes. In addition, it will be necessary to fill in the reasons why we want to use this service, where we need to describe. Finally, an email will be sent to the address we initially registered when creating a Twitter account, informing us that the order is being analyzed. After that, we will receive another email asking if there are government agencies that will take advantage of this service, and if they exist, let us inform the list of them. We must send a reply email according to the context and purpose of use. Within 48 hours, we will receive a new approval email for using the developer account. 2 - With the approval of use, we can go back to the main page of the Developer Portal, more precisely in the Dashboard, to create our first application, where will be the necessary information for use in ScriptCase. With the application created, we will be provided with the API Key and API Key Secret. There is also the possibility to regenerate according to the highlight in the image below. Enabling call URLs for API consumption The definition of the URLs that will be called when we are going to use the API Key and API Secret to consume the Twitter API, can be defined in the settings of the application that was created. 1 - We access the icon referring to "Settings", as highlighted in the image below: 2 - We scroll down to the "Authentication Settings" block and click on the "Edit" button: 3 - We enable the option "Enable 3-legged OAuth" and add the call URLs that we intend to use for authentication with Twitter, in addition to filling the field "Website URL" which is the main domain of the website used. Once that's done, just save the adjustments made. Notes It is important to note that the URLs to be added must have the SSL certificate active for the main domains.
Configuring Email API in ScriptCase
In ScriptCase, we can configure and enable 3 types of Email API natively. They are: SMTP, Mandrill and Amazon SES. For this article, we will use the SMTP option, which is the most commonly used, as an example. Getting SMTP Server Information There are several services that have email providers with SMTP server information, such as Google, Microsoft, and so on. In addition, it is common to see web hosting services, and for this example, we will use the SMTP server of the ScriptCase Host hosting service, where we can easily obtain the necessary information to enable the SMTP API in ScriptCase. When accessing cPanel, we go to the "Email Accounts" option, which is located right in the first block, called "Email": We will notice that our account will already be enabled for use, and we go to the "Connect Devices" option, where the SMTP server information will be: In the "Mail Client Manual Settings" block, we will find the necessary information for SMTP configuration. Remembering that the SMTP server is the outgoing server, unlike other available protocols (POP3 and IMAP), which are incoming servers. Enabling SMTP Email API in ScriptCase With the information in hand, let's enable the API in ScriptCase. The first step is to go to the option "Tools -> API", which is located in the horizontal top menu of the tool. Let's go to the "Add new" option to add the new API profile. The modal will already open selected in the Gateway "SMTP", and we will fill in the information according to what is requested in each field. A small detail for the fields "SMTP Port" and "SMTP Protocol", where you need to fill in 465 for the first, and SSL or TLS for the second. We click on "Save", and soon our API will be active for use:
Security Module Two-Factor Authentication - Google Authenticator
Google Authenticator generates 2-step verification codes on your smartphone. Two-Step Verification provides greater security for your account as it requires a second verification step at login. In addition to the password, you will need a code generated by the Google Authenticator app on your smartphone. Configuração da API do Google Authenticator 1. Choose API option from Top Menu: 2.Choose the Google_authenticator option: **3.**Fill in the given credentials: | | | | --- | --- | | | | | Name | API name | | Mode | API Availability Mode Created, at Project, User or Public level. | | Gateway | API Option Used. | | Domain | Application Domain to be executed. | Two-Factor Authentication (2FA) in the Security Module **4.**Create a security module and on the initial configuration screen choose the Authentication (2FA) option: Choose the API created in the previous step and the two-factor authentication as shown in the image below. **5.**Proceed with the default configuration of the security module and generate the source code normally 6.Download the Google Authenticator App on your Smartphone, the link can be found here or in your app store: Google Authenticator GooglePlay **7.**Run the application in Scriptcase and choose the option in the Authentication security menu: **8.**A QR Code will be generated to be used in your application downloaded in step 6 of this documentation on your smartphone. With the generated code, place it below the QR Code Below and click OK **9.**In your application Choose the option to Read the QR Code, point to the Generated Code above and your key will be registered on Google. **10.**When the Login is performed in your system created with the Security Module, it will be necessary to inform the code that will be in your application
Configuring SMS API in ScriptCase
In ScriptCase, we can configure and enable 3 types of SMS API natively. They are: Twilio, Plivo and Ckickatell. For this article, we will use the Twilio SMS API as an example, where we have the possibility to perform a free trial, as well as the ease of obtaining the necessary credentials for the configuration. Account Creation Our first step is to create an account on the official Twilio website. Little information is required, and it's very simple, just go to the "Subscribe" option in the upper right corner of the site: After creating the account, it will be necessary to verify the registered email address, and soon after, a verification through a code that is sent to the mobile number that we inform before verification. After verification, Twilio will ask for some information such as which product we intend to use on the platform (in this case it is SMS), and which service from that product will be used (it will depend on the context of each developer). After we enter this information, we will be redirected to the main dashboard. On the day of creation of this article, the value of the free trial offered by Twilio for using the SMS API is $15.50 (fifteen dollars and fifty cents). Getting the Authentication ID and Token as well as the test number The information required for ScriptCase to enable the Twilio SMS API are: - Auth ID; - Auth Token; - From (From the number). Right on the main Dashboard we were able to identify this information, the only difference being in obtaining the number that we will insert in the field "From (From number) in ScriptCase, where we will need to go to the option "Get a Trial Number -> Choose the number" to obtain this test number, as highlighted in the image below: Enabling the API in ScriptCase To enable the Twilio SMS API in ScriptCase, go to the "Tools -> API" option, which is located in the tool's top horizontal menu: Let's go to the "Add new" option to create a new API profile: In the "Gateway" field, we will select the "Twilio" option found in the SMS block. In addition to this field, we can define the name we will give this API profile in ScriptCase, in addition to the usage mode, whether it will be Public, Project or User: We enter the Auth ID and Auth Token we got from our account on the site, plus the number generated for the free trial, and click "Save": Once we save, an API is already available, as defined in the image below:
Enabling Two-Factor Authentication (2FA) in the Security of our Project
Two-factor authentication (2FA) provides more security for projects developed in ScriptCase, as well as for users of this project. In this article, we'll look at how to enable the use of two-factor authentication (2FA) when creating the project's security module. Creation of the Security Module The first step is the creation of the security module. The link below the ScriptCase documentation shows how to create the Security Module, in addition to each step until reaching the enabling of two-factor authentication (2FA). How to create the Security Module in ScriptCase Enabling API in Two-Factor Authentication (2FA) ScriptCase provides 3 APIs to be used in two-factor authentication (2FA): SMS, E-mail and Google Auth. The configuration of these APIs can be done simply and quickly through the option "Tools -> API" in the horizontal top menu of ScriptCase. - The native SMS integration options are: Twilio, Plivo and Clickatell; (See an example of how to configure) - The native E-mail integration options are: SMTP, Mandrill and Amazon SES; (See an example of how to configure) - The native integration option for Authentication is: Google Authenticator. (See an example of how to configure) The use of a single API for two-factor authentication (2FA) is only allowed. When we select an option from the three available, it will soon load the API(s) we created. We define the expiry time of the code that will be sent to the user, and then we click on Proceed: (For this example, we will use the SMS API) Before we go any further, we should go to the "Email Settings" option on the left side menu, and set the Email API we created as an option. This feature facilitates the modification of SMTP server settings when necessary, and avoids an exhaustive adjustment in the Security Module applications, or even the re-creation of a new Security Module. Once that's done, we go to the page to "Generate Security" of our project, and once it's finished, we generate the source code, open the project and run the Login application created in the security module. Enabling Two-Factor Authentication (2FA) for the project After running the Login application, we enter the Username and Password for first access, which usually by default is admin/admin, respectively. In the Security option created in the menu, go to the "Authentication" option: We fill in the field with the mobile number that will receive the verification code to enable two-factor authentication (2FA) and click on "Send SMS" (For this example, the chosen API was SMS): Once we click on Send SMS, a new field will be shown below the phone field, which is exactly the code field. When we receive the SMS, we enter the code, and click "OK": Ready! Two-factor authentication will be enabled for our account successfully. To confirm if it has really been enabled, just exit the application by clicking on "Logoff" on the left side menu, and accessing it again. When we enter the username and password, a code will be sent to the mobile number we registered previously.
Configuring the Google Authenticator API in ScriptCase
The Google Authenticator API can be very simply configured to be used primarily in the two-factor authentication (2FA) of the security module. In this article, we will show you how to perform this configuration in ScriptCase. Download the Google Authenticator app on a mobile device The app is available for Android and iOS mobile devices, so just open the stores (PlayStore or AppStore) and search for Google Authenticator. Once that's done, just install the application and then start. Right away, two options will appear that we can use to add an account that will be used for two-factor authentication (2FA). They are: Read QR Code and Enter Configuration Key. Our option of interest later will be "Scan QR code". Enabling the API in ScriptCase Let's go to the option "Tools -> API" in the horizontal top menu of ScriptCase to configure the API: Let's go to "Add new", to add a new API profile: We select the option "Google_authenticator" in the Gateway field, and then define a name for this profile, define the Mode (public, project or user), and finally the Domain, which defines the domain that will be enabled for the use of authentication in two steps. We click on "Save", and our API will already be active: When we choose the Google Authenticator API in the configuration of two-factor authentication (2FA) in the security module (see how to perform this procedure), and later when we go to enable this option in the "Security" of our project, a screen will appear with a QR Code to be read, and also a field called "Code", as shown in the image below: In the Google Authenticator app that we installed on our mobile device, let's go to the option "Scan QR Code", and bring the camera close to the QR Code that is in the image above. When the reading is done, a code will be generated in the application that keeps changing every 10 seconds, and it is exactly this code that we will insert in the "Code" field that is in the image above. After insertion, our project will have two-factor authentication (2FA) enabled for use with Google Authenticator, and to confirm activation, just click on the "Exit" option in the "Security" menu on the left side, and perform the access to project applications.
History and Version Increment in ScriptCase
One of the biggest dilemmas of working on development projects is with respect to project versions. One of the most common mistakes is to program on top of some implementation already carried out, and with that, end up overwriting documents. This type of situation can cause serious loss of information and generate a great deal of rework. That's why working with a tool that offers a safe and reliable form of versioning is essential. Scriptcase offers, in a fast and uncomplicated way, two resources capable of avoiding situations like the ones mentioned above: Version History and Version Increment. Let's see below how each of them works. Version Increment To access this feature within our project, we go to the option "Project -> Increment Version", which is located in the top horizontal menu of ScriptCase, as highlighted in the image below: By accessing this option, we will have the current version in which our project is, the "New Version" field that can be edited for the version we want to increase our project, and finally, the description of this increment, which usually contains the new features that will be added to the project. After defining the necessary information, just click on "Increment": It is worth noting that the version increment only allows only the latest version of the project to be incremented. On the next screen, information about our project will be shown, such as the number of applications, fields, events and log, as well as the time it took for this increment to occur. We click on "Open new version of the project", and soon we will be able to start development in the new version: Version History To access this feature within our project, let's follow the same path we did above, but now our option of interest is "Project -> Version History": We'll find all the versions that have been added to the project since the original version, the date and time the version was created, and some options for managing each of these versions, such as: Delete, Status and Edit. - Delete: this option allows us to permanently delete some version of the project. - Status: allows us to block the Edit option, so that we can no longer access a certain version. - Edit: when clicking on this option, we will return to the screen where all the project's applications of that particular version are located. If the lock icon is set to "Closed" in Status for that particular version, this option will be hidden. Another important point to be mentioned is that if we click on the lock button to close a certain version, and this version is the current version of the project, we are immediately redirected to the screen with all the applications from the previous version to the one that had just been closed.
Manual Backup
How to make a Manual backup of scriptcase ? The app folder is not a backup for your projects 1) First copy the scriptcase database, below are the paths to the file, and replaces in the respective directory of the new installation: You can find this file in the following directory ***Windows:***C:\Program Files\NetMake\v9-php73\wwwroot\scriptcase\devel\conf\scriptcase\nm_scriptcase.db Linux:**/opt/NetMake/v9-php73/**wwwroot/scriptcase/devel/conf/scriptcase/nm_scriptcase.db **2)**Now copy the entire contents of the following folders and paste in the respective folders of the new installation File path Windows: C:\Program Files\NetMake\v9-php73\wwwroot\scriptcase\devel\conf **Linux:****/opt/NetMake/v9-php73/**wwwroot/scriptcase/devel/conf 1. usr folder 2. upd folder 3. sys folder 4. grp folder 5. icons folder 6. font folder 7. lang folder After having copied the contents above, open your scriptcase and generate the project's source code
Hide/Show "New User" field on login screen with HTML template
In this article, we will learn how to enable the "Hide/Show" feature that is available within the "Security -> Settings" option, for the "New User" field found in the login screen that was generated with HTML template. Currently, this feature is automatically enabled when the security module is generated without using a custom HTML template for the Login screen. However, so that we can enable it in our login screen that has an HTML template, we must add two JavaScript functions inside our template's index file. Below, let's see the procedures performed in each topic: Enabling the field inside the HTML template index file If the field is not enabled in your template, we need to follow the step by step below: 1 - Within the Login application in your ScriptCase, more precisely in "UserHTML", we click on the Check button to verify the fields that are not included in the HTML template file located in the external libraries. The expected result should be as shown in the images below: 2 - When clicking on "SC_FIELD_INFO_new_user", a modal window will open that will show us an example of where the field should be added inside the HTML template: 3 - Go to the "Tools -> External Libraries" option, then "Edit" in the library that we are using for the login HTML template, and look for the ".html" file: 4 - We add the field inside the "form" tag in the HTML code, and save the file: 5 - We go back to the Login application, and click again on the Check button (according to the first step), and we get the "OK" check for the {new_user} field: Enabling "scHideUserField()" and "scShowUserField()" functions to enable "Hide/Show" For this option to work in the Security Module settings, we will need to add these two functions within the HTML code of our template. The script for both is available below so we can just copy, paste and save: 1. It is important to point out that this script must be added inside the "head" tag of the template's HTML file. Another point before finishing is related to the "id" of the field that is passed as a parameter inside the conditionals in the functions. This "id" must conform to what is referenced in the template's HTML code, and so that we can capture this information, we can inspect the element with the Login application running, and identify which "id" represents the field "new_user" to replace what is found in the above script. As you can see in the image below, on the right is the HTML code of the template, but highlighted is the "New User". The information that interests us is inside the "div" tag that is above the highlighted code, which is precisely the "id-new_user-1". Just replace the script's "id" with the "id" that appears in your HTML template. In the example script above, this id is already included in the conditional, because it is the example template from ScriptCase's sample library. Once that's done, just save and run the application again, and access the account to enter the "Security -> Settings" option, and enable or disable the new user field to be shown or not on the Login screen.
Hide/Show "Retrieve Password" field on login screen with HTML template
In this article, we will learn how to enable the "Hide/Show" feature that is available within the "Security -> Settings" option, for the "Retrieve Password" field that is found on the login screen that was generated with HTML template. Currently, this feature is automatically enabled when the security module is generated without using a custom HTML template for the Login screen. However, so that we can enable it in our login screen that has an HTML template, we must add two JavaScript functions inside our template's index file. Below, let's see the procedures performed in each topic: Enabling the field inside the HTML template index file If the field is not enabled in your template, we need to follow the step by step below: 1 - Within the Login application in your ScriptCase, more precisely in "User's HTML", we click on the Check button to verify the fields that are not included in the HTML template file located in the external libraries. The expected result should be as shown in the images below: 2 - By clicking on "SC_FIELD_INFO_retrieve_pswd", a modal window will open that will show us an example of where the field should be added inside the HTML template: 3 - We go to the option "Tools -> External Libraries", then "Edit" in the library that we are using for the HTML template of the login, and look for the ".html" file: 4 - We add the field inside the "form" tag in the HTML code, and save the file: 5 - We go back to the Login application, and click again on the Check button (according to the first step), and we get the "OK" check for the {new_user} field: Enabling "scHideUserField()" and "scShowUserField()" functions to enable "Hide/Show" For this option to work in the Security Module settings, we will need to add these two functions within the HTML code of our template. The script for both is available below so we can just copy, paste and save: 1. It is important to point out that this script must be added inside the "head" tag of the template's HTML file. Another point before finishing is related to the "id" of the field that is passed as a parameter inside the conditionals in the functions. This "id" must conform to what is referenced in the template's HTML code, and so that we can capture this information, we can inspect the element with the Login application running, and identify which "id" represents the field "retrieve_pswd" to replace what is found in the above script. As you can see in the image below, on the right is the HTML code of the template, but highlighted is the "Retrieve Password". The information that interests us is inside the "div" tag that is above the highlighted code, which is precisely the "id-retrieve_pwsd-1". Just replace the script's "id" with the "id" that appears in your HTML template. In the example script above, this id is already included in the conditional, because it is the example template from ScriptCase's sample library. Once that is done, just save and run the application again, and access the account to enter the "Security -> Settings" option, and enable or disable the "Retrieve Password" field to be shown or not on the Login screen.
Hide/Show "Remember Me" Field on Login Screen with HTML Template
In this article, we will learn how to enable the "Hide/Show" feature that is available within the "Security -> Settings" option, for the "Remember Login" field that is found on the login screen that was generated with the HTML template. Currently, this feature is automatically enabled when the security module is generated without using a custom HTML template for the Login screen. However, so that we can enable it in our login screen that has an HTML template, we must add two JavaScript functions inside our template's index file. Below, let's see the procedures performed in each topic: Enabling the field inside the HTML template index file If the field is not enabled in your template, we need to follow the step by step below: 1 - Within the Login application in your ScriptCase, more precisely in "User's HTML", we click on the Check button to verify the fields that are not included in the HTML template file located in the external libraries. The expected result should be as shown in the images below: 2 - By clicking on "SC_FIELD_INFO_remember_me", a modal window will open that will show us an example of where the field should be added within the HTML template: 3 - Go to the "Tools -> External Libraries" option, then "Edit" in the library that we are using for the login HTML template, and look for the ".html" file: 4 - We add the field inside the "form" tag in the HTML code, and save the file: For this case, we must add, in addition to the field, a "span" tag to insert the field inside it, because the "Remember me" field involves both the text itself, as well as the checkbox we selected. Therefore, we will need to insert the field inside this HTML tag. 5 - We go back to the Login application, and click again on the Check button (according to the first step), and we get the "OK" check for the {remember_me} field: Enabling "scHideUserField()" and "scShowUserField()" functions to enable "Hide/Show" For this option to work in the Security Module settings, we will need to add these two functions within the HTML code of our template. The script for both is available below so we can just copy, paste and save: 1. It is important to point out that this script must be added inside the "head" tag of the template's HTML file. Another important point that we must pay attention to is related to the "id" of the field that is passed as a parameter within the conditionals in the functions, and in addition, the "id" of the text that represents the label "Remember me", because for this in case we will have the checkbox and the text separately, as it is possible to identify inside the conditional of the field "remember_me" in the script above. These "ids" must conform to what is referenced in the template's HTML code, and so that we can capture this information, we can inspect the element with the Login application running, and identify which "ids" represent the field "remember_me" to replace what is found in the above script. As you can see in the image below, on the right is the HTML code of the template, but highlighted is the "Remember me". The information that interests us is inside the "div" tag that is above the highlighted code, which is precisely the id "txtremember" and the id "id-remember_me-1". Just replace both script "ids" with the "ids" that appear in your HTML template: In the example script above, these ids are already included in the conditional, because it is the example template from ScriptCase's samples library. Once that is done, just save and run the application again, and access the account to enter the "Security -> Settings" option, and enable or disable the field "to be shown or not on the Login screen.
Fatal error: Array and string offset access syntax with curly braces is no longer supported
You can come across this error when running a login application created by a security module generated before Scriptcase 9.8. This error occurs only in an environment with PHP 8 or superior because of a change in the array elements access, that now allows just the use of square brackets []. To fix it, follow the steps below: 1 - In your Login Application open the function remember_me_validateon the menu Programming > PHP Methods 2 - Inside the function remember_me_validatelook for the line: $code .= $chars{mt_rand(0, $max)}; 3 - Replace the curly brackets { } in the variable $chars**{mt_rand(0, $max)}**by square brackets [ ]. The code will be similar to this: $code .= $chars[mt_rand(0, $max)]; 4 - Now save the changes and generate the source code of the application.
Install ScriptCase PHP 7.3 on a XAMPP in Linux
Xampp Installation Using PHP 7.3 XAMPP It allows you to easily install Apache on your own computer, regardless of your operating system (Linux, Windows, MAC or Solaris). First you have to proceed to download XAMPP PHP 7.3: https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.3.33/ After downloading Xampp, proceed with the normal installation. Configuring php.ini in Xampp 1 - Go to your browser and enter in the URL below to test the Xampp and find the path to the PHP.ini file 127.0.0.1/dashboard/phpinfo.php 2 - The path will be shown as in the image: php.ini path: /opt/lampp/etc/php.ini 3 - Enter in the file and search for the directives below and increase their values like for the values we recommend, then save the file before exit. - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On Enabling the IonCube Loader We proceed to download the IonCube Click here 4 - Copy the file ioncube_loader_lin_7.3.so and past in the extension_dir directory of your PHP. extension_dir path : /opt/lampp/lib/php/extensions/no-debug-non-zts-20180731 5 - We enable the extension within the php.ini: Edit the php.ini file and below the last line set the path to the extension in the zend_extension parameter: zend_extension = "/opt/lampp/lib/php/extensions/no-debug-non-zts-20180731/ioncube_loader_lin_7.3.so" Restart the apache of the XAMPP: In xampp root directory: 1. sudo ./xampp restart Installing Scriptcase Once the installation is finished we must proceed to download the .zip file from the ScriptCase page: Click Here Once the download of the .zip is finished, we proceed to unzip the .zip inside the folderhtdocs of the XAMPP: /opt/lampp/htdocs Renamed the file after decompression to "scriptcase" as the image below Proceed to the installation of ScriptCase: To enter in the scriptcase: Follow this address in your browser: http://127.0.0.1:8091/scriptcase In this example the apache of the XAMPP was running on port 8091. Then, proceed to normal scriptcase installation:
Installing Scriptcase in XAMPP with PHP 7.3 - Windows
Xampp Installation XAMPP allows you to easily install Apache on your own computer, regardless of your operating system (Linux, Windows, MAC or Solaris). First, you have to download XAMPP: https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.3.30/ To download the XAMPP, you must take into account the PHP version. For this example, we are going to be installing Xampp with PHP 7.3.30 version in order to install Scriptcase 9 After downloading Xampp, proceed with the standard installation. Configuring php.ini in Xampp to a better performance with Scriptcase 1 - Go to C:\xampp\php and open the php.ini file with your text editor. 2**-**Search for the directives below and increase their values for the values we recommend, then save the file before exiting. - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On - session.save_path = "C:\Windows\Temp" Enabling IonCube Loader Scriptcase uses IonCube Loader with PHP 7.3 so, to get the zip file, click on the link below to download the file: https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win_vc15_x86-64.zip 1 - Extract the file loaderioncube_loader_win_7.3.dlland paste it into"C:\xampp\php\ext" **2 -**Go to "C:\xampp\php" and open php.ini file with your text editor 3 - Scroll down 'till the end of the file and paste this: [SourceGuardian] zend_extension=C:\xampp****php\ext\ixed.8.1.win Note: If the Apache service is on, stop the service and start the service again in the Xampp control panel. Installing Scriptcase Now that Xampp is already installed and php.ini properly configured, download Scriptcase zip file here: https://www.scriptcase.net/download/ Once the download of the .zip is finished, we proceed to unzip the .zip inside the folder htdocs of the XAMPP: C:\xampp\htdocs In your browser, enter the scriptcase webpage installation: l****ocalhost:8080/scriptcase In this example, XAMPP was configured to use port 8080. You will see a screen like the imagem below so you just need to click on "Next" On the next installation Screen, go to the bottom of the page and click on next Now, choose the Typical Installation option and click "Next" When the installation is finnished, you will be automatically redirected to Scriptcase login page
Installing Scriptcase PHP 7.0 in a Xampp on Windows
Xampp Installation XAMPP allows you to easily install Apache on your own computer, regardless of your operating system (Linux, Windows, MAC or Solaris). First, you have to download XAMPP: https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.0.33/ To download the XAMPP, you must take into account the PHP version. For this example, we are going to be installing Xampp with PHP 7.0.33 version in order to install Scriptcase PHP 7.0 After downloading Xampp, proceed with the standard installation. Configuring php.ini in Xampp to a better performance with Scriptcase 1 - Go to C:\xampp\php and open the php.ini file with your text editor. 2**-**Search for the directives below and increase their values for the values we recommend, then save the file before exiting. - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On - session.save_path = "C:\Windows\Temp" Enabling SourceGuardian Loader Scriptcase will use SourceGuardian with PHP 7.0 so, to get the SourceGuardian zip file, go to this link and download the file: https://www.sourceguardian.com/loaders.html 1 - Extract the file loader ixed.7.0.win and paste it into"C:\xampp\php\ext" **2 -**Go to "C:\xampp\php" and open php.ini file with your text editor 3 - Scroll down 'till the end of the file and paste this: [SourceGuardian] zend_extension=C:\xampp****php\ext\ixed.7.0.win Note: If the Apache service is on, stop the service and start the service again in the Xampp control panel. Installing Scriptcase Now that Xampp is already installed and php.ini properly configured, download Scriptcase zip file here: https://www.scriptcase.net/download/ Once the download of the .zip is finished, we proceed to unzip the .zip inside the folder htdocs of the XAMPP: C:\xampp\htdocs In your browser, enter the scriptcase webpage installation: l****ocalhost:8080/scriptcase In this example, XAMPP was configured to use port 8080. You will see a screen like the imagem below so you just need to click on "Next" On the next installation Screen, go to the bottom of the page and click Next Now, choose the Typical Installation option and click "Next" When the installation is finnished, you will be automatically redirected to Scriptcase login page
Install ScriptCase PHP 7.0 on a XAMPP on Linux
Xampp Installation Using PHP 7.0 XAMPP It allows you to easily install Apache on your own computer, regardless of your operating system (Linux, Windows, MAC or Solaris). First you have to proceed to download XAMPP PHP 7.0: https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.0.32/ After downloading Xampp, proceed with the normal installation. Configuring php.ini in Xampp 1 - Go to your browser and enter in the URL below to test the Xampp and find the path to the PHP.ini file 127.0.0.1/dashboard/phpinfo.php **2 -**The path will be shown as in the image: php.ini path: /opt/lampp/etc/php.ini **3 -**Enter in the file and search for the directives below and increase their values like for the values we recommend, then save the file before exit. - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On Enabling the SourceGuardian Loader We proceed to download the SourceGuardian Click here **4 -**Copy the file ixed.7.0.lin and past in the extension_dir directory of your PHP. extension_dir path : /opt/lampp/lib/php/extensions/no-debug-non-zts-20151012 5 - We enable the extension within thephp.ini: Edit the php.ini file and below the last line set the path to the extension in the extension parameter: extension = "/opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/ixed.7.0.lin" Restart the apache of the XAMPP: In xampp root directory: 1. sudo ./xampp restart Installing Scriptcase Once the installation is finished we must proceed to download the .zip file from the ScriptCase page: Click Here Once the download of the .zip is finished, we proceed to unzip the .zip inside the folderhtdocs of the XAMPP: /opt/lampp/htdocs Renamed the file after decompression to "scriptcase" as the image below Proceed to the installation of ScriptCase: To enter in the scriptcase: Follow this address in your browser: http://127.0.0.1:/scriptcase In this example the apache of the XAMPP was running on port 80. Then, proceed to normal scriptcase installation: You will see a screen like the imagem below so you just need to click on "Next" On the next installation Screen, go to the bottom of the page and click on next Now, choose the Typical Installation option and click "Next" When the installation is finnished, you will be automatically redirected to Scriptcase login page
Install ScriptCase PHP 8.1 on a XAMPP on Linux
Xampp Installation Using PHP 8.1 XAMPP It allows you to easily install Apache on your own computer, regardless of your operating system (Linux, Windows, MAC or Solaris). First you have to proceed to download XAMPP PHP 8.1: https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.1.6/ After downloading Xampp, proceed with the normal installation. Configuring php.ini in Xampp 1 - Go to your browser and enter in the URL below to test the Xampp and find the path to the PHP.ini file 127.0.0.1/dashboard/phpinfo.php **2 -**The path will be shown as in the image: php.ini path: /opt/lampp/etc/php.ini **3 -**Enter in the file and search for the directives below and increase their values like for the values we recommend, then save the file before exit. - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On Enabling the SourceGuardian Loader We proceed to download the SourceGuardian Click here **4 -**Copy the file ixed.8.1.lin and past in the extension_dir directory of your PHP. extension_dir path : /opt/lampp/lib/php/extensions/no-debug-non-zts-20210902 5 - We enable the extension within thephp.ini: Edit the php.ini file and below the last line set the path to the extension in the extension parameter: extension = "/opt/lampp/lib/php/extensions/no-debug-non-zts-20210902/ixed.8.1.lin" Restart the apache of the XAMPP: In xampp root directory: 1. sudo ./xampp restart Installing Scriptcase Once the installation is finished we must proceed to download the .zip file from the ScriptCase page: Click Here Once the download of the .zip is finished, we proceed to unzip the .zip inside the folderhtdocs of the XAMPP: /opt/lampp/htdocs Renamed the file after decompression to "scriptcase" as the image below Proceed to the installation of ScriptCase: To enter in the scriptcase: Follow this address in your browser: http://127.0.0.1:/scriptcase In this example the apache of the XAMPP was running on port 80. Then, proceed to normal scriptcase installation: You will see a screen like the imagem below so you just need to click on "Next" On the next installation Screen, go to the bottom of the page and click on next Now, choose the Typical Installation option and click "Next" When the installation is finnished, you will be automatically redirected to Scriptcase login page
Scriptcase Installer for Windows - PHP 7.3
The Scriptcase installer installs Apache, PHP, and Scriptcase on your operating system. The installer does not include a database. Prerequisites To download the Scriptcase Installer, go to our download page clicking here. Listed below are all the supported operating systems as well as the libraries that are required to function on a particular system. Check the list of supported operating systems: - Windows 7 SP1 or Higher - Windows Vista SP2 or Higher - Windows Server 2012 or Higher - Windows Server 2012 R2 SP1 or Higher For Windows 7, you must verify if the system has the following items installed: Visual C++ Redistributable Packages for Visual Studio (2008, 2010, 2012, 2013, 2015) x86 and x64. Choosing settings in the Installer Installing Scriptcase with PHP 7.3 will not conflict with an existing Scriptcase installation with PHP 7.0. The Installer configures an Apache service (ApacheScriptcase9php73) with a different port (8091) then the installer with PHP 7.0. Will be automatically installed on the operating system: - Apache Web Server v2.4.39. - PHP 7.3 with extensions MBSTRING, ZIP, BCMATH, and GD enabled. - Ioncube: PHP Loader v10.3.8. - Scriptcase 9. 1 - Choose the installation language. Language You can select the language that will be displayed in the installation process. This step does not select the Scriptcase interface language, only the installer language. Click Ok to continue. 2 - Click “Next” to continue. 3 - Read and accept the terms of the license agreement. Click Next to continue. 4 - Enter the installation directory. The default installation path is “C:\Program Files\NetMake\v9-php73”. It is not recommended to make any changes to this path unless it is necessary. Installation directory In this option, you can set the installation path. : This button lets you select the installation folder or create a new one. Click Next to continue. 5 - Configure Scriptcase Apache. Port Here will define in which port the Scriptcase Apache service will run on. We recommend using the value set in this installation. (8091). Admin Email You can configure Apache administrator email for better control of your environment. This setting serves as information when a server error occurs. A message will appear along with the administrator email to be contacted. Apache Domain The Apache domain must be set here. We do not recommend making any changes to the default value. PHP TimeZone In this option, you can set your PHP TimeZone. It is recommended to select the option corresponding to your time zone. You can check the list of available TimeZones here. Click Next to continue. 6 - Clicking “Next” will start the installation process. Wait until all components are installed and the environment is set up. 7 - Allow Apache to run on private and public networks (Firewall). You must check both options to allow Scriptcase Apache to run on the operating system. 8 - Complete the installation. View the “Read Me” file Clicking finish will show the “Read Me” file with all the necessary initial information and helpful links. Open Scriptcase 9 Clicking “Finish”, will open Scriptcase in your default browser. Access the Scriptcase You can access your Scriptcase in two ways: 1 - Access your browser and enter the local IP address and port you selected in the Apache setup. Example: http://127.0.0.1:8091/scriptcase 2 - After Scriptcase installation, run the shortcut created on your desktop. Just click on this shortcut twice and Scriptcase will open in your default browser. Login to Scriptcase After accessing the Login page, you must enter the username and password to proceed to your development environment. User In this field, you must enter the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me logged in This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking on this option, it is possible to recover the password of the informed user. An email will be sent to the user so they can access the recovery steps. Password recovery will only be possible if you have configured your SMTP information. See this article Setting password recovery in Scriptcase.
How to Register my Scriptcase
To register Scriptcase you need to have in hand: - Serial with its status Open - License Owner’s Login and Password. Same account used during the license purchase process. 1. Obtaining serial After requesting a new serial, you will receive a new serial available to register your Scriptcase. If you are not aware of the serials that are available for registration, you can check the list on our website. After logging in and accessing the Serials tab: 2. Accessing Scriptcase Now access the Scriptcase that will be registered through the browser of your choice. Example of access when performing a local installation - 127.0.0.1:8091/scriptcase - localhost:8091/scriptcase Example of access when performing the installation on a server - 180.204.163.144:8091/scriptcase/ - mysc.dominio.net/scriptcase/ 3. License registration In this step, the access data to the license owner's website and the license with Open status will be used. 3.1 After logging in, access the menu Help > License Registration 3.2 Online Registration In this step, enter the Login and Password of the license owner and the serial number that will be registered and click Register. A kind reminder that the serial must have its status: Open. Check your Internet connection - To register online, the machine where Scriptcase is installed must have internet access. Antivirus - In some cases, it can block the registry or slow it down a bit. Restricted Network - If your network has a domain restriction for scriptcase.com.br, contact your network administrator to add an exception. 3.3 Confirmation After the registration, a confirmation screen will be displayed. Click OK to complete the registration. You will then be redirected to the Login screen.
Automatic installation of Scriptcase - PHP 7.3 Linux
The Scriptcase installer installs Apache, PHP and Scriptcase on your operating system. The installer does not include a database. Prerequisites To download the Scriptcase Installer, go to our download page clicking here. Listed below are the operating systems approved for Scriptcase use. Check the list of supported distros: - Debian 8 or higher version - Ubuntu 18.04 or higher version - RHEL 7 or higher version - CentOS 7 or higher version - Fedora 30 or higher version - Manjaro Linux 19 or higher version - Linux Mint 18.04 or higher version - OpenSuse Leap 15.1 or higher version NOTE: Before proceeding with the installation, it is recommended not to have any other web environments installed (such as LAMP, Zend Server, etc) on your operating system. It is recommended to have some basic knowledge of Linux/Unix environment to use the Terminal (Shell). This documentation will describe Scriptcase installation in 3 simple steps: 1 - Run Scriptcase Installer. 2 - Choose installer settings. 3 - Run Scriptcase. Running Scriptcase Installer 1 - Browse to the directory where the installer is located. Before we can run the Scriptcase installer, we need to access the folder where the installer file is located using the cd command. Example: sudo cd /home/your_user/Downloads NOTE: Scriptcase installer requires administrative permissions to make changes to your machine. We will have to use the sudo command to run the installer. 2 - Grant permission to the installer file and run it. For you to run the chmod command that changes the permissions of a file or directory, you must also run thesudo command. Example: sudo chmod +x scriptcase_linux_installer_x86_64_en_us_v9.4.016-php73.run The chmod + x command is used to make the installer .run file executable. 3 - Run the Installer file. Example: sudo ./scriptcase_linux_installer_x86_64_en_us_v9.4.016-php73.run Choosing the Installer Settings NOTE: Installing Scriptcase with PHP 7.3 will not conflict with an existing Scriptcase installation with PHP 7.0. The Installer configures an Apache service (apachesc9php73) with a different port (8091) than the installer with PHP 7.0. Will be automatically installed on the operating system: - Apache Web Server v2.4.39. - PHP 7.3 with extensions MBSTRING, ZIP, BCMATH and GD enabled. - Ioncube: PHP Loader + ionCube24 v10.3.7. - Scriptcase 9. 1 - Choose the installation language. Language You can select the language that will be displayed in the installation process. This step does not select the Scriptcase interface language, only the installer language. Click Ok to continue 2 - Click “Next” to continue. 3 - Read and accept the terms of the license agreement. Click Next to continue. 4 - Enter the installation directory. The default installation path is “/opt/NetMake/v9-php73”. It is not recommended to make any changes to this path unless it is necessary. Installation Directory In this option, you can set the installation path. : This button lets you select the installation folder or create a new one. Click Next to continue. 5 - Configure Scriptcase Apache. Port Here will define in which port the Scriptcase Apache service will run on. We recommend using the value set in this installation (8091). Admin Email You can configure Apache administrator email for better control of your environment. This setting serves as information when a server error occurs. A message will appear along with the administrator email to be contacted. Apache Domain The Apache domain must be set here. We do not recommend making any changes to the default value. PHP TimeZone In this option, you can set your PHP TimeZone. It is recommended to select the option corresponding to your time zone. You can check the list of available TimeZones here. Click Next to continue. 6 - Clicking “Next” will start the installation process. Wait until all components are installing and the environment is set up. 8 - Complete the installation. View the “Read Me” file Clicking finish will show the “Read Me” file with all the necessary initial information and helpful links. Open Scriptcase 9 Clicking “Finish”, will open Scriptcase in your default browser. Access the Scriptcase 1 - To access your Scriptcase, you need to open your browser and enter the local IP or domain of the ported server you selected in the Apache setup. Example 1: http://127.0.0.1:8091/scriptcase Example 2: https://yourdomain.com:8091/scriptcase 2 - Login to Scriptcase After accessing the Login page, you must enter the username and password to proceed to your development environment. User In this field, you must enter the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me logged in This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? IMPORTANT: Password recovery will only be possible if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here. By clicking on this option, it is possible to recover the password of the informed user. An email will be sent to the user so they can access the recovery steps. Need to register your Scriptcase? You can access our knowledge base to understand all the steps for registering a Scriptcase license.
Installer for macOS - PHP 7.3
The Scriptcase installer installs Apache, PHP and Scriptcase on your operating system. The installer does not include a database Prerequisites To download the Scriptcase Installer, go to our download page clicking here. IMPORTANT: The Scriptcase installer is a .dmg file. To run the file, you will need to press and hold the cntrl key, right-click, and then click Open to authenticate as an administrator and install Scriptcase. Listed below are the macOS versions approved for Scriptcase use. Check the list of supported versions: | | | | --- | --- | | MacOS 12.0 | “Monterey” | | MacOS 11.0 | “Big Sur” | | MacOS 10.15 | “Catalina” | | MacOS v10.14 | “Mojave” | | MacOS v10.13 | “High Sierra” | | MacOS v10.12 | “Sierra” | | OS X v10.11 | “El Capitan” | NOTE: Before proceeding with the installation, it is recommended not to have any other web environments installed (such as MAMP, Zend Server, etc) on your operating system. Choosing settings in the Installer NOTE: Installing Scriptcase with PHP 7.3 will not conflict with an existing Scriptcase installation with PHP 7.0. The Installer configures an Apache service (apachesc9php73) with a different port (8091) than the installer with PHP 7.0. Will be automatically installed on the operating system: - Apache Web Server v2.4.41. - PHP 7.3 with extensions MBSTRING, ZIP, BCMATH and GD enabled. - Ioncube: PHP Loader v10.3.8. - Scriptcase 9. 1 - Choose the installation language. Installation language Language You can select the language that will be displayed in the installation process. This step does not select the Scriptcase interface language, only the installer language. Click Ok to continue Installer Welcome screen 2 - Click “Next” to continue. Installation license Click Next to continue. 4 - Enter the installation directory. The default installation path is “/Applications/NetMake/v9-php73”. It is not recommended to make any changes to this path unless it is necessary. Installation directory Installation directory In this option, you can set the installation path. Installation Browse: This button lets you select the installation folder or create a new one. Click Next to continue. 5 - Configure Scriptcase Apache. Installation Apache setup Port Here will define in which port the Scriptcase Apache service will run on. We recommend using the value set in this installation (8091). PHP TimeZone In this option, you can set your PHP TimeZone. It is recommended to select the option corresponding to your time zone. You can check the list of available TimeZones here. Click Next to continue. 6 - Clicking “Next” will start the installation process. Installation Wait until all components are installing and the environment is set up. Installation progress 8 - Complete the installation. Finishing the installation View the “Read me” file Clicking finish will show the “Read Me” file with all the necessary initial information and helpful links. Open Scriptcase 9 Clicking finish “Finish” will open Scriptcase in your default browser Access Scriptcase 1 - To access your Scriptcase, you need to open your browser and enter the local IP or domain of the ported server you selected in the Apache setup Example 1: http://127.0.0.1:8091/scriptcase Example 2: https://yourdomain.com:8091/scriptcase 2 - Login to Scriptcase After accessing the Login page, you must enter the username and password to proceed to your development environment. Scriptcase Login Screen User In this field, you must enter the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me logged in This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? IMPORTANT: Password recovery will only be possible if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here. By clicking on this option, it is possible to recover the password of the informed user. An email will be sent to the user so they can access the recovery steps.
Installing PHP 7.3 - macOS
This documentation will cover how to install PHP 7.3 and ScriptCase manually on macOS. Performing this type of installation is your responsible for configuring your entire environment as well as database extensions. Listed below are versions of macOS approved for use by Scriptcase. Our supported versions: - MacOS 12.0 “Monterey” - MacOS 11.0 “Big Sur” - macOS 10.15 “Catalina” - macOS 10.14 “Mojave” - macOS 10.13 “High Sierra” - MacOS 10.12 “Sierra” - MacOS 10.11 “El Capitan” NOTE: If you want access our documentation about manual install of ScriptCase PHP 7.0 in MacOS, see through our knowledge base. Requirements WARNING: If you already have a Web Server with Apache and PHP 7.3 configured, just go to the IonCube configuration and proceed to manual installation. To proceed with the installation, you need to download some files. Required Files: - IonCube Loader for OS X (x86 ou x64): Click here - Scriptcase (.zip): Click here NOTE: Before proceeding with the installation it is recommended not to have any other web environments (such as XAMP, Zend Server, etc.) installed on the operating system. Knowledge of Unix environment is recommended to use terminal. PHP configuration Listed below are the commands required for the manual installation of PHP 7.3 on macOS. Check the package naming on your macOS terminal correctly. 1 - You’ll need to install Homebrew to be able to access PHP 7.3 and other packages. Install Brew with the following commands in the macOS terminal: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2 - In the macOS terminal, execute brew update to update Brew. 3 - Use the command brew install php@7.3 for installing PHP 7.3. 4 - After the installation proccess completes, execute brew info php@7.3 to get the information that we need to proceed with environment setting up. Brew info PHP 7.3 5 - You need to configure Apache so that PHP 7.3 that was installed in the previous steps will be used as default on your system. - Edit the Apache file httpd.conf and comment out the path to the old PHP 7.3 module if present in the file. To comment, you need to add a # at the beginning of the line. Exemple: sudo nano /etc/apache2/httpd.conf 6 - Add path to PHP 7.3 module installed after last line LoadModule in httpd.conf. Exemple: LoadModule php7_module /usr/local/opt/php@7.3/lib/httpd/modules/libphp7.so PHP module configuration` After performing this action, save the file and restart the apache service.. sudo apachectl restart 7 - Add the path to the installation of PHP 7.3 in the ~ / .zshrc file with the following commands:: echo 'export PATH="/usr/local/opt/php@7.3/bin:$PATH"' >> ~/.zshrc echo 'export PATH="/usr/local/opt/php@7.3/sbin:$PATH"' >> ~/.zshrc 8 - Edit the file ~/.bash_profileand add PHP 7.3 path with these following commands: echo 'export PATH="/usr/local/opt/php@7.3/bin:$PATH"' 9 - Verify PHP version by running command: php -v Exemple: PHP version 10 - Access the php.ini file in the directory. /usr/local/etc/php/7.3/ and set the recommended minimum value correctly of these PHP directives listed below for Scriptcase work properly. Search for the directives and assign the value according to this example: - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On 11 - By default, PHP disables some functions that are important to Scriptcase. Click here to access the necessary functions list for ScriptCase - Change item line disable_functions as example below: disable_functions = Exemple: PHP disable_functions setting 12 - Set PHP TimeZone according to your region. Use the value available in the PHP documentation. Searh for date.timezone in your php.ini file, uncomment it and edit according to the selected TimeZone. Exemple: date.timezone = America/Recife 13 - Set the folder where temporary files will be stored. search for ;session.save_path, uncoment it and inform your temporary folder path. Exemple: session.save_path = "/tmp" 14 - Save all modifications made and restart the Apache service using the following command in terminal: sudo apachectl restart 15 - Verify changes made through the file info.php. You need to create this file and put it in the directory. /Library/WebServer/Documents/with the following content: php</code phpinfo(); ?> After that, check in your browser the page generated by accessing the URL 127.0.0.1/info.php. Check PHP NOTE: For more information about the function phpinfo(), verify our PHP documentation. Enable IonCube Loader Before you start installing Scriptcase, you need to enable the loader responsible for encrypting Scriptcase in PHP. Follow the steps below to perform this action successfully. 1 - Go to the Downloads folder and extract the downloaded file for IonCube Loader at the beggining of this documentation start. Exemple: cd /Users/usuario/Downloads sudo chmod 777 ioncube_loaders_dar_x86-64.zip && unzip ioncube_loaders_dar_x86-64.zip cd ioncube 2 - Copy the file ioncube_loader_dar_7.3.so and paste it into your PHP extension_dir directory. We’ll use /usr/local/lib/php/pecl/20180731 for this example. Exemple: sudo cp ioncube_loader_dar_7.3.so /usr/local/lib/php/pecl/20180731 3 - Edit the php.ini file and below the last line enter the path to the extension within the parameter zend_extension: Exemple: sudo nano /usr/local/etc/php/7.3/php.ini zend_extension = "/usr/local/lib/php/pecl/20180731/ioncube_loader_dar_7.3.so" 4 - Restart the Apache service with the following terminal command: sudo apachectl restart Manual ScriptCase installation Listed below are the steps needed to do a Scriptcase manual installation. To do the steps, it is needed that you have a web server configured in your machine. 1 - Download the Scriptcase (.zip) directly from the download page from our website. 2 - Extract the .zip file and rename the extracted folder to scriptcase. 3 - Move the scriptcase to your server root. Depending of your operating system and the installation the path can be different from the example. However, by default the paths are: | Windows | Server | | --- | --- | | C:\Apache24\htdocs\ | Apache | | C:\inetpub\wwwroot\ | IIS | | Linux | Server | | --- | --- | | /var/www/html/ | Linux Local | | /home/$(whoami)/public_html/ | Linux Server | | macOS | Server | | --- | --- | | /Library/WebServer/Documents | Apache | 4 - Access the Scriptcase using your browser: 127.0.0.1/scriptcase - By default the selected language is English. Setup Screen 5 - Check the extensions required for Scriptcase to function and database connection modules that are enabled. Screen with list of active extensions Typical installation Check the steps below to complete the manual installation of Scriptcase in a typical way. NOTE: By selecting this installation, Scriptcase will set your environment by default. Defining the installation database and the login user in Scriptcase. Installation Type Selection Screen After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps. Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here. Custom installation Check the steps below to complete the manual installation of Scriptcase in a custom manner. NOTE: By selecting this installation, you will be responsible for setting up your environment. Defining the installation database and the login user for Scriptcase. Installation type selection screen 1- Verify that the directories required by Scriptcase have the correct permissions. If any directory listed does not have the active check icon Active_icon, correct permission for this directory. System Directories Display Screen Clique em prosseguir para avançar no processo de instalação. 2- Choose the database where the Scriptcase database will be installed. By default, Scriptcase recommends that it be installed with the SQLite database. Installation Database Choice Screen - You can change the default database by clicking the Change Database button. By clicking this option you will need to set the following options: Default database change DBMS In this option, you will select the Driver to connect to your database. Server In this option, you will inform the server to connect to the desired database. User You need to inform a user who has access to the database you want Scriptcase to be installed on. Password You must enter the authentication password corresponding to the entered user. Database You must enter the name of the database where Scriptcase will be installed. Example: scriptcase Clique em prosseguir para avançar no processo de instalação. 3 - Verifique se a criação das tabelas da base de dados do Scriptcase ocorreu com sucesso. As tabelas serão marcadas com o ícone de sucesso ativo_icon na lateral. Tela de exibição das tabelas do sistema Click proceed to proceed with the installation process. 4 - Set the default user who will have access to Scriptcase. User setup screen Login In this option, you will enter the default Scriptcase User Login. Password In this option, you must enter the password that will correspond to the user informed. Confirmation You must repeat the previously entered password for successful user creation. Click proceed to proceed with the installation process. 5 - Complete Scriptcase custom installation on your web server. Finish screen of installation After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to log in to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to log in to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps. Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here.
Installing PHP 7.3 - Linux
his documentation will teach all the steps necessary for the installation of the PHP 7.0, Apache 2.4 and the Scriptcase using the manual installation in the Linux environment. Doing this kind of installation you will be responsible for configuring all your environment settings and the database extensions as well. Listed below are the operational systems approved for the Scriptcase usage. Only these distributions below and their derivatives are approved for the Scriptcase installation. Check the list of the supported operating systems: - RedHat\CentOS - Debian\Ubuntu - Suse\OpenSuse NOTE: In case you need to make a manual installation of the Scriptcase using PHP 7.0 in Linux, access the documentation in our knowledge base. Prerequisites WARNING: If you already have a Web Server with Apache and PHP 7.3 configured, just go to the IonCube configuration and proceed to manual installation. To proceed with the installation, you will need to download some files. Necessaries Files: - IonCube Loader for Linux (x86 ou x64): Click Here - Scriptcase (.zip): Click Here NOTE: Before continue with the installation is recommended that you do not have any other web environment (as XAMP, Zend Server, etc) installed in your operational system. It is recommended to know Linux/Unix environment to use the terminal. Configuring the PHP - Ubuntu 19.10\Debian 10 Listed below are the necessaries commands for the manual installation of the PHP 7.3 in the Ubuntu 19.10 or Debian 10. Check correctly the name of the packages in your terminal. 1 - Before run any other command, update your operating system with the following commands: sudo apt-get update sudo apt-get upgrade 2 - Run the command sudo apt-get install php7.3 to install the PHP 7.3. After that, accept the dependencies installation. If you are using any Ubuntu version before 19.10, it’s necessary to add a repository in your operating system to access the PHP 7.3 packages. See how you can do it below: sudo add-apt-repository ppa:ondrej/php sudo apt-get update If you are using any Debian version before Debian 10, it’s necessary to add a repository in your operating system to access the PHP 7.3 packages. See how you can do it below: sudo apt -y install lsb-release apt-transport-https ca-certificates sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.3.list sudo apt-get update | | | --- | | sudo apt-get install php7.3 | Example: Installing the PHP 3 - Check the PHP version running the command: php -v Example: PHP Version 4 - Now, install all the extensions below that are required by Scriptcase: Default Extensions: - sudo apt-get install php7.3-curl - sudo apt-get install php7.3-gd - sudo apt-get install php7.3-bcmath - sudo apt-get install php7.3-cgi - sudo apt-get install php7.3-ldap - sudo apt-get install php7.3-mbstring - sudo apt-get install php7.3-xml - sudo apt-get install php7.3-soap - sudo apt-get install php7.3-xsl - sudo apt-get install php7.3-zip Database Extensions: | Extension | Driver enabled in Scriptcase | | --- | --- | | sudo apt-get install php7.3-pgsql | PostgreSQL PDO, PostgreSQL 6.3 or below, PostgreSQL 6.4 or above, PostgreSQL 7 or above | | sudo apt-get install php7.3-mysql | MySQLi, MySQL PDO | | sudo apt-get install php7.3-sqlite3 | SQLite PDO | | sudo apt-get install php7.3-interbase | Firebird, Interbase 6, Interbase 6.5, Firebird PDO | | sudo apt-get install php7.3-odbc | DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, Oracle ODBC, Progress, DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC | | sudo apt-get install php7.3-sybase | DBLIB, Sybase PDO DBLIB | NOTE: Some database extensions will depend on third party drivers to be enabled. Click here to access the setup instructions for your database. 5 - Access the php.ini file in the directory /etc/php/7.3/apache2/ and set the recommended values for the PHP directives listed below required by the Scriptcase. Search for theses directives and set the values as the example: - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On 6 - By default, the PHP disable some functions that are required by the Scriptcase. Click here to access the list of these functions. - Change the line disable_functions as the example below: disable_functions = Example: Configuring the disable_functions 7 - Set up the PHP TimeZone according your region. Must use the values available in the PHP documentation. Search for the line date.timezone in your php.ini, uncomment and edit according with the TimeZone selected. Example: date.timezone = America/Recife 8 - Set up the folders that will store the temporary files. Search for the line ;session.save_path, uncomment and set the path to your temporary folder. Example: session.save_path = "/tmp" 9 - Save all the changes made and restart the Apache service using the following command: sudo service apache2 restart 10 - Check if the changes were made using the file info.php. You will need to create this file and place it in the /var/www/html/ path with the following content. php</code phpinfo(); ?> After that, check using your browser the page generated accessing the URL 127.0.0.1/info.php. Check PHP NOTE: For more information about the phpinfo(), check the PHP documentation. Setting up the PHP - CentOS 8 Listed below are the necessaries commands for the manual installation of the PHP 7.3 in the CentOS 8. Check correctly the name of the packages in your terminal. 1 - Before run any other command, update your operating system with the following commands: sudo yum update sudo yum upgrade NOTE: In the default CentOS 7/8 repository, the PHP 7.3 is not installed by default. It will need to add the repository to continue the installation. 2 - Add the repository below to download the PHP 7.3 packages and after that update your system: sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm sudo yum update If you use any CentOS version below the 8, it’s necessary to add another repository in your operating system to access the PHP 7.3 packages. See how to do it below: | CentOS 6 | CentOS 7 | | --- | --- | | sudo yum install epel-release | sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm | | sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | sudo yum -y install epel-release yum-utils | - In the CentOS 6, it is needed to enable the PHP 7.3 module using the command below: sudo yum --enablerepo=remi-php73 install php 3 - Run the commands below to install the PHP 7.3 and Apache 2.4 modules and accept their dependencies: sudo dnf module install php:remi-7.3 sudo yum install httpd Example: Installing the PHP 4 - Check the PHP version running the command: php -v Example: PHP version 5 - Now, install the extensions below required by the Scriptcase: - To search for packages in versions below CentOS8, you will need to use the command: yum search php73 Default Extensions: - sudo yum install php-bcmath - sudo yum install php-common - sudo yum install php-cli - sudo yum install php-gd - sudo yum install php-json - sudo yum install php-ldap - sudo yum install php-mbstring - sudo yum install php-soap - sudo yum install php-xml - sudo yum install php-zip Database Extensions: | Extension | Driver enabled in the Scriptcase | | --- | --- | | sudo yum install php-pgsql | PostgreSQL PDO, PostgreSQL 6.3 or below, PostgreSQL 6.4 or above, PostgreSQL 7 or above | | sudo yum install php-mysql | MySQLi, MySQL PDO | | sudo yum install php-sqlite3 | SQLite PDO | | sudo yum install php-odbc | DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, Oracle ODBC, Progress, DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC | | sudo yum install php-pdo-dblib | DBLIB, Sybase PDO DBLIB | NOTE: Some database extensions will depend on third party drivers to be enabled. Click here to access the setup instructions for your database. 6 - Access the php.ini file in the directory /etc/ and set the recommended values for the PHP directives listed below required by the Scriptcase. Search for theses directives and set the values as the example: - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On 7 - By default, the PHP disable some functions that are required by the Scriptcase. Click here to access the list of these functions. - Change the line disable_functions as the example below: disable_functions = Example: Configuring the disable_functions 8 - Set up the PHP TimeZone according your region. Must use the values available in the PHP documentation. Search for the line date.timezone in your php.ini, uncomment and edit according with the TimeZone selected. Example: date.timezone = America/Recife 8 - Set up the folders that will store the temporary files. Search for the line ;session.save_path, uncomment and set the path to your temporary folder. Example: session.save_path = "/tmp" 9 - Save all the changes made and restart the Apache service using the following command: sudo systemctl restart httpd 10 - Check if the changes were made using the file info.php. You will need to create this file and place it in the /var/www/html/ path with the following content. php</code phpinfo(); ?> After that, check using your browser the page generated accessing the URL 127.0.0.1/info.php. Check PHP NOTE: For more information about the phpinfo(), check the PHP documentation. Enabling the IonCube Loader Before starting the Scriptcase installation, you need to enable the loader used for the Scriptcase encryption in your PHP. Follow the steps below showing how to dot it. 1 - Access the Downloads folder and extract the file downloaded referent to the IonCube Loader at the beggining of this documentation. Example: cd /home/User/Downloads sudo chmod 777 ioncube_loaders_lin_x86-64.zip && unzip ioncube_loaders_lin_x86-64.zip 2 - Copy the file ioncube_loader_lin_7.3.so and past in the extension_dir directory of your PHP. We will use the path /usr/lib/php/20180731 for this example. Example: | Ubuntu 19.10\Debian 8 | CentOS 7/8 | | --- | --- | | /usr/lib/php/20180731 | /usr/lib64/php/modules | sudo cp ioncube_loader_lin_7.3.so /usr/lib/php/20180731 3 - Edit the php.ini file and below the last line set the path to the extension in the zend_extension parameter: Example: | Ubuntu 19.10\Debian 8 | CentOS 7/8 | | --- | --- | | /etc/php/7.3/apache2/ | /etc/ | sudo nano /etc/php/7.3/apache2/php.ini zend_extension = "/usr/lib/php/20180731/ioncube_loader_lin_7.3.so" 4 - Restart the Apache service using the following command: | Ubuntu 19.10\Debian 8 | CentOS 7/8 | | --- | --- | | sudo service apache2 restart | sudo systemctl restart httpd | IMPORTANT: To enable the IonCube in the CentOS, the SELinux service must be disabled. Check the service status using the command: sestatus. To disabled the service, access the file settings using the command sudo nano /etc/selinux/config and change the SELINUX and SELINUXTYPE directives as this: SELINUX=disabled e SELINUXTYPE=minimum. After that, save the file and restart your Centos to apply the changes and enable the IonCube. Scriptcase Manual Installation Listed below are the steps needed to do a Scriptcase manual installation. To do the steps, it is needed that you have a web server configured in your machine. 1 - Download the Scriptcase (.zip) directly from the download page from our website. 2 - Extract the .zip file and rename the extracted folder to scriptcase. 3 - Move the scriptcase to your server root. Depending of your operating system and the installation the path can be different from the example. However, by default the paths are: | Windows | Server | | --- | --- | | C:\Apache24\htdocs\ | Apache | | C:\inetpub\wwwroot\ | IIS | | Linux | Server | | --- | --- | | /var/www/html/ | Linux Local | | /home/$(whoami)/public_html/ | Linux Server | | macOS | Server | | --- | --- | | /Library/WebServer/Documents | Apache | 4 - Access the Scriptcase using your browser: 127.0.0.1/scriptcase - By default the selected language is English. Setup Screen 5 - Check the extensions required for Scriptcase to function and database connection modules that are enabled. Screen with list of active extensions Typical Installation Check the steps below to complete the manual installation of Scriptcase in a typical way. NOTE: By selecting this installation, Scriptcase will set your environment by default. Defining the installation database and the login user in Scriptcase. Installation Type Selection Screen After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps. Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here. Customized Installation Check the steps below to complete the manual installation of Scriptcase in a custom manner. NOTE: By selecting this installation, you will be responsible for setting up your environment. Defining the installation database and the login user for Scriptcase. Screen of choice of installation type 1- Verify that the directories required by Scriptcase have the correct permissions. If any directory listed does not have the active check icon Active_icon, correct permission for this directory. System Directories Display Screen Click proceed to proceed with the installation process . 2- Choose the database where the Scriptcase database will be installed. By default, Scriptcase recommends that it be installed with the SQLite database. Installation Database Choice Screen - You can change the default database by clicking the Change Database button. By clicking this option you will need to set the following options: Default database change DBMS In this option, you will select the Driver to connect to your database. Server In this option, you will inform the server to connect to the desired database. User You need to inform a user who has access to the database you want Scriptcase to be installed on. Password You must enter the authentication password corresponding to the entered user. Database You must enter the name of the database where Scriptcase will be installed. Example: scriptcase Clique em prosseguir para avançar no processo de instalação. 3 - Verifique se a criação das tabelas da base de dados do Scriptcase ocorreu com sucesso. As tabelas serão marcadas com o ícone de sucesso ativo_icon na lateral. Tela de exibição das tabelas do sistema Click proceed to proceed with the installation process. 4 - Set the default user who will have access to Scriptcase. User setup screen Login In this option, you will enter the default Scriptcase User Login. Password In this option, you must enter the password that will correspond to the user informed. Confirmation You must repeat the previously entered password for successful user creation. Click proceed to proceed with the installation process. 5 - Complete Scriptcase custom installation on your web server. Finish screen of installation After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen Conteúdo truncado na migração (limite do Chatwoot: 20.000 caracteres).
Installing Scriptcase with PHP 7.3 on Windows
This documentation will walk you through the steps necessary to install PHP 7.3, Apache 2.4, and Scriptcase manually. When performing this type of installation, you are responsible for configuring your entire environment as well as database extensions. Listed below are all the supported operating systems as well as the libraries that are required to function on a particular system. Check the list of supported operating systems: - Windows 7 SP1 or Higher - Windows Vista SP2 or Higher - Windows Server 2012 or Higher - Windows Server 2012 R2 SP1 or Higher For Windows 7, you must verify if the system has the following items installed: - Visual C++ Redistributable Packages for Visual Studio (2008, 2010, 2012, 2013, 2015) x86 and x64. NOTE: If you would like to manually install Scriptcase with PHP 7.0 on Windows, please access the documentation in our knowledge base. Prerequisites WARNING: If you already have a Web Server with Apache and PHP 7.3 configured, just go to the IonCube configuration and proceed to manual installation. To proceed with the installation, you need to download some files first. Those include the Scriptcase installation file in .zip format. Required Files: - PHP 7.3 NTS (x86 or x64): Click Here - Apache 2.4 (x86 or x64): Click Here - mod_Fcgi (x86 or x64: Click Here - IonCube Loader for Windows VC15 (x86 or x64): Click Here - Scriptcase (.zip): Click Here NOTE: Before proceeding with the installation, it is recommended not to have any other web environments installed (such as WampServer, XAMPP, Zend Server, etc.) on your operating system. Below are the actions required after downloading the items specified above:: 1 - Unzip the PHP and Apache files in separate folders on your operating system’s C: drive. 2 - Rename the PHP folder to php. The result should be like this: Apache and PHP directories 3 - Unzip the mod_Fcgi file, copy the mod_fcgid.so file to the C:\Apache24\modules folder. Mod_fcgi in directory Configure the Apache environment Listed below are the steps required to configure apache manually. Follow the steps correctly to avoid problems installing and starting the service. NOTE: Since PHP and Apache folders are at the same directory level (C:) You do not need to enter the root folder in directives that require you to enter isolated paths or points to a specific file. 1 - Edit the httpd.conf file located in the C:\Apache24\conf\ folder using a text editor in Administrator mode, so that any changes you make are saved. httpd.conf File 2 - Add the content below after the #LoadModule xml2enc_module modules/mod_xml2enc.so line: LoadModule fcgid_module modules/mod_fcgid.so FcgidInitialEnv PHPRC "/php" FcgidInitialEnv PHP_FCGI_MAX_REQUESTS "100000" FcgidIOTimeout 1800 FcgidBusyTimeout 1800 FcgidConnectTimeout 1800 FcgidMaxRequestLen 1073741824 FcgidMaxRequestsPerProcess 10000 FcgidOutputBufferSize 4000 FcgidProcessLifeTime 3600 Timeout 1024 KeepAlive On KeepAliveTimeout 50 MaxKeepAliveRequests 500 AddHandler fcgid-script .php FcgidWrapper "/php/php-cgi.exe" .php Example: httpd php fcgi configuration WARNING: This setting will only work if you have copied the mod_fcgid.so file to the C:\Apache24\modules folder as previously instructed. 3 - Search for #ServerName www.example.com:80 and change this line to ServerName localhost:80. 4 - Change the contents of the DirectoryIndex directive by adding the following contents to the directive line:: index.php index.phtml. Example: DirectoryIndex index.html index.php index.phtml Configuration of index files to be accepted 5 - Set the ${SRVROOT} variable with your Apache folder path: Search for the Define SRVROOT and edit it as follows: Define SRVROOT "/Apache24" 6 - Add the Options ExecCGI command below the Require all granted line in the directive. Require all granted Options ExecCGI Example: httpd fcgi configuration 7 - Search for the directive and add the content below above this directive: AllowOverride None Options None Require all granted Example: httpd configuration PHP directory After performing all these procedures, save the httpd.conf file to proceed with Apache installation and startup and PHP configuration. Install and start Apache Now that you have set up your apache service, all you have to do is install and start it. Below are the steps that must be followed to successfully complete this process. 1 - Run the Command Prompt (CMD) with Administrator privileges: Accessing CMD 2 - Go to the Apache bin folder to install the httpd.exe executable file: cd C:\Apache24\bin\httpd.exe 3 - Install Apache with the command below: httpd.exe -k install Wait for the message “The ‘Apache2.4’ service is successfully installed.” to proceed. 4 - Start the Apache service and verify if it is working. Use the httpd.exe -k start to start your Apache service. Starting Apache 5 - Grant execution permission to Apache on your Firewall: Select the two options available to grant permission, so Apache can function properly. Apache 2.4 Installation 6 - Check if Apache is active. To verify that the service is active, simply visit the Apache test page in your browser. You can do it in two ways: 127.0.0.1 or localhost Apache active Configure the PHP 7.3 With Apache active and functional, you now need to define and configure the PHP.ini file so those database extensions and libraries are available for use by Scriptcase. 1 - Access the PHP folder in C:\ and rename the php.ini-development file to php.ini. Php.ini 2 - Access the php.ini file with a text editor using Administrative privileges and search for the ;extension_dir = "ext" directive. Assign the value “C:\php\ext” to this directive. Example: extension_dir = "C:\php\ext" PHP Extension 3 - Enable the extensions listed below, by uncommenting them (Remove the semicolon ; at beginning of line). Default Extensions - extension=bz2 - extension=curl - extension=gd2 - extension=gettext - extension=imap - extension=ldap - extension=fileinfo - extension=mbstring - extension=openssl - extension=exif - extension=xsl - extension=soap Database Extensions: | Extensions | Driver enabled in Scriptcase | | --- | --- | | extension=mysqli | MySQLi | | extension=odbc | DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, MS SQL Server ODBC, Oracle ODBC, Progress | | extension=pdo_mysql | MySQL PDO | | extension=pdo_odbc | DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC | | extension=pdo_pgsql | PostgreSQL PDO | | extension=pdo_sqlite | SQLite PDO | | extension=pgsql | PostgreSQL 6.3 or below, PostgreSQL 6.4 or above, PostgreSQL 7 ou Acima | NOTE: Some database extensions will depend on third party drivers to be enabled. Click here to access configuration instructions for your desired database. 4 - Set the recommended minimum value of these PHP directives listed below for Scriptcase to work proprely. Search for the directives and assign the value according to this example: - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On IMPORTANT: By default PHP can disable some functions that are important for Scriptcase to function properly. Search for the disable_functions directive and make sure it is as follows: disable_functions=. Click here to access the list of functions required for Scriptcase to function properly. 5 - Set up PHP TimeZone according to your region. You must use the value available in PHP documentation. Search for the date.timezone line, uncomment it and edit it according to the selected TimeZone: Example: date.timezone = America/Recife PHP TimeZone 6 - Set the folder where temporary files will be stored. Search for the ;session.save_path line, uncomment it, and enter the path to your temporary folder. Example: session.save_path = "C:\Windows\Temp" Session File Folder 7 - Save all changes made to the php.ini file. 8 - Restart the Apache service using the Command Prompt (CMD) with Administrator privileges the following command: C:\Apache24\bin\httpd.exe -k restart Restarting Apache 9 - Verify changes made through the info.php file. You need to create this file and place it in the C:\Apache24\htdocs directory with the following content: php</code phpinfo(); ?> After this, check the generated page in your browser by going to the URL 127.0.0.1/info.php. Verify PHP NOTE: For more information about the phpinfo() function, check the documentation do PHP. Enable the IonCube Loader Before you start the Scriptcase installation, you need to enable the loader responsible for encrypting Scriptcase in PHP. Follow the steps below to perform this action successfully. 1 - Extract the IonCube Loader file downloaded at the beginning of this documentation. 2 - Copy the ioncube_loader_win_7.3.dll file and paste it into the PHP extensions directory C:\php\ext. Pasting IonCube File 3 - Edit the php.ini file and below the last line enter the path to the extension within the zend_extension parameter: Example: zend_extension = "C:\php\ext\ioncube_loader_win_7.3.dll" IonCube Extension 4 - Restart the Apache service using the Command Prompt (CMD) with Administrator privileges the following command: C:\Apache24\bin\httpd.exe -k restart Restarting Apache Manual Scriptcase Installation Listed below are the steps needed to do a Scriptcase manual installation. To do the steps, it is needed that you have a web server configured in your machine. 1 - Download the Scriptcase (.zip) directly from the download page from our website. 2 - Extract the .zip file and rename the extracted folder to scriptcase. 3 - Move the scriptcase to your server root. Depending of your operating system and the installation the path can be different from the example. However, by default the paths are: | Windows | Server | | --- | --- | | C:\Apache24\htdocs\ | Apache | | C:\inetpub\wwwroot\ | IIS | | Linux | Server | | --- | --- | | /var/www/html/ | Linux Local | | /home/$(whoami)/public_html/ | Linux Server | | macOS | Server | | --- | --- | | /Library/WebServer/Documents | Apache | 4 - Access the Scriptcase using your browser: 127.0.0.1/scriptcase - By default the selected language is English. Setup Screen 5 - Check the extensions required for Scriptcase to function and database connection modules that are enabled. Screen with list of active extensions Typical Installation Check the steps below to complete the manual installation of Scriptcase in a typical way. NOTE: By selecting this installation, Scriptcase will set your environment by default. Defining the installation database and the login user in Scriptcase. Installation Type Selection Screen After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps. Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here. Custom Installation Check the steps below to complete the manual installation of Scriptcase in a custom manner. NOTE: By selecting this installation, you will be responsible for setting up your environment. Defining the installation database and the login user for Scriptcase. Installation type selection screen 1- Verify that the directories required by Scriptcase have the correct permissions. If any directory listed does not have the active check icon Active_icon, correct permission for this directory. System directories display screen Click proceed to proceed with the installation process . 2- Choose the database where the Scriptcase database will be installed. By default, Scriptcase recommends that it be installed with the SQLite database. Installation Database Choice Screen - You can change the default database by clicking the Change Database button. By clicking this option you will need to set the following options: Default database change DBMS In this option, you will select the Driver to connect to your database. Server In this option, you will inform the server to connect to the desired database. User You need to inform a user who has access to the database you want Scriptcase to be installed on. Password You must enter the authentication password corresponding to the entered user. Database You must enter the name of the database where Scriptcase will be installed. Example: scriptcase Clique em prosseguir para avançar no processo de instalação. 3 - Verifique se a criação das tabelas da base de dados do Scriptcase ocorreu com sucesso. As tabelas serão marcadas com o ícone de sucesso ativo_icon na lateral. Tela de exibição das tabelas do sistema Click proceed to proceed with the installation process. _4 -__ Set the default user who will have access to Scriptcase. User setup screen Login In this option, you will enter the default Scriptcase User Login. Password In this option, you must enter the password that will correspond to the user informed. Confirmation You must repeat the previously entered password for successful user creation. Click Proceed to proceed with the installation process. 5 - Complete Scriptcase custom installation on your web server. Finish screen of installation After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps. Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here.
How to use the Accent insensitive option
To use this option in applications that use PostgreSQL it will be necessary to enable the UNACCENT extension. This extension is natively available in PostgreSQL as of version 10 Enabling extension 1 - Connect to your DB instance as a user who has administrator privileges. If you do not have access to the admin user of your database, contact your DBA or your shared hosting support 2 - To activate the extension, use the CREATE EXTENSION command as shown below. 1. CREATE EXTENSION unaccent; Now your database will have the extension enabled and the Accent insensitive feature can be used. This procedure must be performed individually for each database Check if the extension is available in your PostgreSQL The UNACCENT extension is available natively in your PostgreSQL database starting with version 10. However, it can be used from version 9.5.24 onwards. To check if the extension is available in your database, run the command below: 1. SELECT * FROM pg_available_extensions() WHERE name = 'unaccent'; When available this will be the result:
How to configure Amazon S3
Some users with environments installed before Scriptcase release 9.8.007 can have problems downloading files using Amazon S3. This problem occurs only in Scriptcase installed in Windows OS. To fix this problem you need to follow the step by step: 1. You need to download the file cacert.zip. 2. Extract the file cacert.pem and move to directory: components > php > extras Directory example in an automatic installation C:\Program Files\NetMake\v9-php81\components\php\extras 3. open the file php.ini in a text editor 4. Search by curl.cainfo. In this line change the value by informing the path to the cacert.pem file Example of what it should look like: curl.cainfo = "C:\Program Files\NetMake\v9-php81\components\php\extras\cacert.pem" 5.- Search for OpenSSL.cafile and enter the path to the cacert.pem file. To uncomment the OpenSSL.cafile line just remove the semicolon (;) Example of what it should look like: openssl.cafile= "C:\Program Files\NetMake\v9-php81\components\php\extras\cacert.pem"
Connecting with Firebird on linux - PHP 7.3
Prerequisites If you are using a manual installation on Linux, you will need to install the Firebird php extension. See below for how to do this. 1 - Log into your Linux terminal and type this line below according to your operating system to install the Firebird driver. | Ubuntu | CentOS | | --- | --- | | sudo apt-get install php7.3-interbase | sudo yum install php-interbase | 2 - Check that the Firebird driver is enabled in your Scriptcase diagnostics. Here is how to locate your diagnostics and verify that the driver is enabled. - By accessing the top menu Help > Diagnostics, you can find it easily through the interface. Diagnostic Access - Help Menu - Or, by accessing your Scriptcase installation path: 127.0.0.1/scriptcase/diagnosis.php or domain.com/scriptcase/diagnosis.php Creating a connection in Scriptcase Here’s how to create a connection in your Scriptcase project using the Firebird database. 1 - Access any project from your Scriptcase. 2 - Click on the New connection icon to create a connection. Creating a new connection or go to the Database > New Connection menu. Creating a new connection After that a new page will appear with all the database connections. 3 - Select the Firebird connection. Database connection selection Connection Enter the parameters for connecting to your Firebird database as follows: Database Connection - Connection Name: Set the name of your new connection. By default, Scriptcase adds the prefix conn along with the database name. - DBMS Driver: Select the Firebird Driver used to connect. In this example we use the Firebird Driver. - Server/Host (Name or IP): Enter the IP or domain of the server where the database is installed. - Ex: serverdomain.com or 192.168.254.170. - Port: Enter the numeric port for your database server. - Ex: 3050 - Database Name: Enter the database created for use by the entered user. - Username: Enter the user to authenticate the connection to your Firebird database. - Password: Enter the password to complete the authentication process. - Test Connection: Click this button to get a response from Scriptcase request to know if the entered parameters are correct. Testing the database connection Filter By accessing this tab, you can configure which items from the Database will be displayed in the connection, depending on the owner or not. Filtering the database connection Show Allows the Firebird connection to see tables, views, system tables and procedures depending on the items selected by the user. By default, the items Tables and Views are already selected by Scriptcase. - Tables: By selecting this option, the tables in your database will be displayed. - By default, Scriptcase enables this option. - Views: Selecting this option will display your database views. - By default, Scriptcase enables this option. - System tables: By selecting this option, the system tables of your database will be displayed. - Procedures: When you select this option, the procedures from your database will be displayed. Searches Allows you to define which tables and owners are displayed. - Tables: You can define in this option which tables are displayed. The setting can contain a PREFIX% or name of the tables to be displayed. - By default, Scriptcase leaves this option empty. - Ex: Example of prefix usage - Owner: Inform the user who sees the inserted tables for display. - User must be in capital letters, as in the example above. - Show: Choose whether tables are displayed for the owner entered. NOTE: By using table filtering, you eliminate unnecessary tables for your project and improve the performance of your database connection. Advanced In this tab, you have access to connection-specific settings. Changes made in this section impact the data display and performance of the application. Advanced database connection configuration - client_encoding: Select the encoding used in your database. In the example above, we used client_encoding UTF-8. - Decimal Separator: Select the separator type for decimal records, between comma and period. - By default, period . is selected as the separator. - Persistent connection: Set whether connections will be closed after your scripts run in Scriptcase applications. - By default, Scriptcase disables this option. - Use schema before table name: Set whether the database schema is displayed before table names. - By default, Scriptcase enables this option. - Ex: Exemplo de utilização do esquema
Connecting with Firebird on macOS - PHP 7.3
Prerequisites If you are using a manual installation on MacOS, you will need to install PHP and the Firebird driver will be enabled. Click here to see how to do this. 1 - Check that the Firebird driver is enabled in your Scriptcase diagnostics. Here is how to locate your diagnostics below and verify that the driver is enabled. - By going to the top menu Help > Diagnostics, you can easily find it through the interface. Diagnostic Access - Help Menu - Or, by accessing your Scriptcase installation path: 127.0.0.1/scriptcase/diagnosis.php or domain.com/scriptcase/diagnosis.php Creating a connection in Scriptcase Here’s how to create a connection in your Scriptcase project using the Firebird database. 1 - Access any project from your Scriptcase. 2 - Click on the New connection icon to create a connection. Creating a new connection or go to the Database > New Connection menu. Creating a new connection After that a new page will appear with all the database connections. 3 - Select the Firebird connection. Database connection selection Connection Enter the parameters for connecting to your Firebird database as follows: Database Connection - Connection Name: Set the name of your new connection. By default, Scriptcase adds the prefix conn along with the database name. - DBMS Driver: Select the Firebird Driver used to connect. In this example we use the Firebird Driver. - Server/Host (Name or IP): Enter the IP or domain of the server where the database is installed. - Ex: serverdomain.com or 192.168.254.170. - Port: Enter the numeric port for your database server. - Ex: 3050 - Database Name: Enter the database created for use by the entered user. - Username: Enter the user to authenticate the connection to your Firebird database. - Password: Enter the password to complete the authentication process. - Test Connection: Click this button to get a response from Scriptcase request to know if the entered parameters are correct. Testing the database connection Filter By accessing this tab, you can configure which items from the Database will be displayed in the connection, depending on the owner or not. Filtering the database connection Show Allows the Firebird connection to see tables, views, system tables and procedures depending on the items selected by the user. By default, the items Tables and Views are already selected by Scriptcase. - Tables: By selecting this option, the tables in your database will be displayed. - By default, Scriptcase enables this option. - Views: Selecting this option will display your database views. - By default, Scriptcase enables this option. - System tables: By selecting this option, the system tables of your database will be displayed. - Procedures: When you select this option, the procedures from your database will be displayed. Searches Allows you to define which tables and owners are displayed. - Tables: You can define in this option which tables are displayed. The setting can contain a PREFIX% or name of the tables to be displayed. - By default, Scriptcase leaves this option empty. - Ex: Example of prefix usage - Owner: Inform the user who sees the inserted tables for display. - User must be in capital letters, as in the example above. - Show: Choose whether tables are displayed for the owner entered. NOTE: By using table filtering, you eliminate unnecessary tables for your project and improve the performance of your database connection. Advanced In this tab, you have access to connection-specific settings. Changes made in this section impact the data display and performance of the application. Advanced database connection configuration - client_encoding: Select the encoding used in your database. In the example above, we used client_encoding UTF-8. - Decimal Separator: Select the separator type for decimal records, between comma and period. - By default, period . is selected as the separator. - Persistent connection: Set whether connections will be closed after your scripts run in Scriptcase applications. - By default, Scriptcase disables this option. - Use schema before table name: Set whether the database schema is displayed before table names. - By default, Scriptcase enables this option. - Ex: Exemplo de utilização do esquema
How to find my serial in Scriptcase
Every Scriptcase installation has a registration serial, even in trial installations. In this article, see where to locate your serial within Scriptcase. 1 - Login to your Scriptcase with your username. In this example we are using the default installation user admin / admin 2 - After the link, in the upper right corner of your screen, click on your username, as in the image below. 3 - A menu will open with some information about your license. Next to the exit button, it will be possible to see the SERIAL field, which is being used by Scriptcase. In the image below we can see a serial trial
Connecting with Firebird on Windows - PHP 7.3
If you are using a manual installation on Windows, you will need to enable the Firebird extensions in the php.ini file. See below for how to do this. 1 - In the **php.ini** file uncomment the line for the Firebird extension php_pdo_firebird by removing the ; from the start of the line. See the example below: 2 - Restart the Apache service using the Task Manager. 2.1 - Open Task Manager and click on the Services tab. 2.2 - Look for the Apache2.4 or ApacheScriptcase9php73 service and right click on this service, then Restart. 1 - Access any project from your Scriptcase. 2 - Click on the New connection icon to create a connection. 3 - Select the Firebird connection. 4 - Enter the parameters for connecting to your Firebird database as follows 1. Connection Name: Set the name of your new connection. By default, Scriptcase adds the prefix conn along with the database name. 2. DBMS Driver: Select the Firebird Driver used to connect. In this example we use the Firebird PDO Driver. 3. Server/Host (Name or IP): Enter the IP or domain of the server where the database is installed. Ex: serverdomain.com or 192.168.254.170. 4. Port: Enter the numeric port for your database server. Ex: 3050 5. Database Name: Enter the database created for use by the entered user. 6. Username: Enter the user to authenticate the connection to your Firebird database. 7. Password: Enter the password to complete the authentication process. 5 - Click Test Connectionbutton to get a response from Scriptcase request to know if the entered parameters are correct.
Getting Credentials on Stripe
1. Create a Stripe account https://stripe.com/br 2. Access the dashboard and activate the test mode 3. Click on developers 4. Click API Keys SPECIFICATIONS 1. Test Mode Secret Key: Use this key to authenticate requests to your server when in test mode. By default, you can use this key to perform any API request without restriction. 2. Test Mode Publishable Key: Use this key for testing purposes in your mobile app's client-side code. 3. Production Mode Secret Key: Use this key to authenticate requests to your server when in production mode. By default, you can use this key to perform any API request without restriction. 4. Production mode publishable key: Use this key when you are ready to release your application, in the client-side code of your mobile or web application.
Creating your credentials in Mercado Pago
1. Access the development panel of your applications. https://www.mercadopago.com.br/developers/panel 2. Enter creation settings. 3) Enter the creation settings. * Application name: Name to refer to your application. * Type of payment to integrate: Online payments. * Using any e-commerce platform: No * Which product you are integrating: Transparent Checkout. 4) After creation, return to the previous page and select the name of your created application. 5) Activate your credentials in production or use credentials for the test environment. 6) In the test credentials, it is only necessary to use the Access Token for configuration within the creation of the API in scriptcase. 7) Enabling credentials in production. Click the "Enable Credentials" button. 8) Enter the settings to activate your credentials. 9) Once enabled, it is only necessary to use the Access Token for configuration within the creation of the API in scriptcase.
Getting Credentials on Braintree
1-Access your Braintree Sandbox or Production account Log in to your Braintree account To use the API it is necessary to have an account. 2 - Acesse o dashboard no menu Settings > API 3 - In the Private Key column, click on the View link to access the credentials. 4 - Your keys will be displayed. To use Scriptcase we will need the following information: Public Key - Each user associated with your Braintree gateway will have their own public key. Private Key - Each user associated with your Braintree gateway will have their own private key. Your private key must not be shared outside of using an API call. Marchant ID - Your Merchant ID is the unique identifier for your entire gateway account, including the various merchant accounts that may be on your gateway. Often called a public ID or production ID, your Merchant ID will be different for your production and sandbox gateways
Finding my serial on the site
The serial is one of the required data needed to perform the Scripcase Register. In this article, discover how to find your serials and what each status means. 1. Log in to our website. This login must be performed with the user who owns the license. On our website, the login button is located in the upper right corner of the screen. 2. Enter the license owner login and password. 3. After login click on the Serials tab 4. In this tab all serials linked to the account will be listed. These serials can be found with three statuses: 1. Open: This status indicates that the serial is available for use. This will be the status in the new Serial that should be used toregister the sriptcase 2. In use: This status indicates that the serial is already registered in another Scriptcase, so it cannot be used**. Look for serials with this status to**request a nesw serial. 3. ****Canceled: The serial is no longer available for use. This will be the status of the serial after being used to request a new serial.
How to do a Offline Registration
This type of registration has two steps: 1. Offline Request - In this step we will generate and validate a file that will be used in the Offline Registration step. 2. Offline Registration - In this step, in possession of the .lic file, we will register the Scriptcase. Offline Registration is used when Scriptcase is installed on machines/servers with restrictions or that do not have internet access. Follow the steps below: Required Data To register the scriptcase you need to have: 1. License owner login and password. It is the same account used during the license purchase process. 2. Serial with the status Open**.** If you have made a recent purchase, your serial number will be sent along with the purchase confirmation email. It is also possible to obtain your serial on the website, in the customer area. See how find the serial at the website. Accessing the Offline Request screen 1. With these data, access your Scriptcase installation using the browser of your choice. Example of access with local installation 1. 127.0.0.1:8092/scriptcase 2. localhost:8092/scriptcase Example of access withserverinstallin 1. 180.204.163.144:8092/scriptcase/ 2. mysc.dominio.net/scriptcase/ 2. After the login access the menu: Options > Settings 3. Then, in the Licenses block in the side menu, click on Offline Request Offline Request In this step we will generate a file .req, for that, access data to the license owner's website and a license available for registration (Open status) will be required. If you have made a recent purchase, your serial number will be sent along with the purchase confirmation email. It is also possible to obtain your serial on the website, in the customer area. See how find the serial at the website. 4. Inform the Login and Password of the license owner and the Serial that will be used to register the Scriptcase. 5. Click Download to download the file scriptcase_v9.req. To do the next step, you will need to use a machine with internet access. Download tje arquivo .lic 6. With the .lic file, go to the following link: https://www.scriptcase.net/licenserequest/ 7. Inform the serial that will be used to register and perform the arquivo .req upload, that had been downloaded at the step 5. The Serial entered in this step must be the same used in step 4 of the tutorial, in the Offline Request 8. Do the download of .lic file created by clicking in Download. This file will be used to register Scriptcase. Offline Registration **9.**Back in Scriptcase, access the menu again in **Options > Settings .**at the block license, in the menu side bar , click in Offline Registration. 10. Enter the Login and Password of the license owner and the Serial used in the previous steps and click Register. On the Offline License Registration screen, we must inform the same data (User, Password and Serial) used in step 4 of this tutorial, in the Offline Request. **11.**After clicking Register, a confirmation message will be displayed. After registration, you will be redirected to the Scriptcase login screen.
Creating Your Credentials for the Google Sheets API
Creating your credentials 1 - Log in with your Google account in the reserved area where you can configure Google APIs, from this URL: https://console.cloud.google.com/apis/library 2 - If you already have projects created, just click on the selected project and then click on NEW PROJECT. If you don't have any project created, just search for a new project and create a new project. 3 - Enter the name of the project and click CREATE 4 - After the project is created, you will be directed to the OAuth permission screen: 1. You must first click on the select project so that the project you just created is selected, as indicated by number 1 in the photo. 2. Choose the External option and click Create 5 - When you click on Create in step 4, you will see the following screen, and you will need to provide the necessary information; after providing the mandatory data, at the end of the page click on Save and continue. 6 - On the next screen, click on save for the steps, and on the last one click on BACK TO DASHBOARD at the end of the page. 7 - Now, you will need to activate the Google Drive and Google Sheets APIs, so go to ENABLE APIS AND SERVICESand click onACTIVE APIS AND SERVICES 8 - Look for Google Drive and Google Sheets APIs to enable 9 - Click to Enable Google Sheets API 10 - Click to Enable Google Drive API Using credentials in a local environment 1 - After activating the APIs, click on the “Credentials” option 2 - Click on "CREATE CREDENTIALS" and then click on "OAuth Client ID" . 3 - Select the option “Computer App” 4 - - Enter the name and click on the “CREATE” button 5 - Download the JSON file 6 - In the creation of the API, inform in App name the name of the application created in google and in JSON OAUTH the JSON code that is in the downloaded file. 7 - Click on the “Auth Code” option to get the code generated by the Google API. You will be redirected to a page, copy the code, paste it in the Auth Code field and click the "Save" button. Using credentials in an external environment 1 - To use your credentials in an external environment, go to the "CREATE CREDENTIALS" button again and select the option "Help me choose" 2 - Select the options: 1. Select an API: Google Sheets API 2. Check the option: User data. 3. Click the NEXT button 3 - On the scopes screen, click on the button to “Add or remove scopes” 4 - Enable all extensions containing the API name: Google Drive API and Google Sheets API. Click the button to “Save and continue" 5 - In the next step, select the option: “Web application” and inform the name of the application. NOTE: This name will be informed in the scriptcase API interface credentials 6 - In the Redirect URL option, click to add your URL then click on the “CREATE” button. Click CONCLUDE to finish the process. You need to add the full path. Example for the production environment: https://www.yourdomain.com/scriptcase9/prod/third/oauth/google-api-php-client-2.1.3/code.php 7 - Then just download the JSON file credentials to be informed in the scriptcase API. 8 - In the creation of the API, inform in App name the name of the application created in google and in JSON OAUTH the JSON code that is in the downloaded file. 9 - Click on the “Auth Code” option to get the code generated by the Google API. You will be redirected to a page, copy the code, paste it in the Auth Code field and click the "Save" button.
Creating a Field grouping
See how to create groups of fields in a simple way in the query application. 1. In a grid application, access the Fields menu and click New field. 2. Set the quantity and click Continue. In this case we only need one field. 3. On the field inclusion screen, in the Type field, search for the Special category and select the Field Grouping type. Define a Name and Label for the button group. The Label field is not mandatory, leaving it blank will assign the value of the Name field. 4. Finally, Select fields must be part of the button group. After saving the settings, just run the application.
Creating the Google Maps API Key
In this article we will see how to enable and obtain the key to use Google Maps in Scriptcase applications. Accessing the Google Maps Platform 1.Go to the link https://mapsplatform.google.com/ to create your key. You will need to login to a google account 2. Click on First Steps image.png If you are on your google cloud console, just search for google maps and select Google Maps Platform. 3. Click Finish Account Setup Getting key The configuration will be carried out in two steps. 1. Accept the terms and inform the country of your account. 2. Enter the requested data and payment method The date of birth must contain the slashes / 3. Answer a few google questions and click submit to finish the process. 4. At the end it will show you the generated key, which must be used in Scriptcase applications. Usage Restriction (Optional) You can configure restrictions on the generated keys to prevent unauthorized use. To access this configuration, just click on edit the key. Using credentials in Scriptcase This key must be used in fields like google maps. Go to the field's configuration and look for API Key. When publishing an application that uses google maps, the key can be configured for the entire environment, in the Environment Settings menu
Update of the security module synchronization application
In order to improve security in our projects, we made several changes to the application files. One of these changes affected a crucial file that tells applications how to sync. To ensure that the synchronization continues to work correctly, we made a modification to the onValidate event code of the synchronization application. All future modules will follow this fix in the code, which will provide greater security and efficiency in our projects. However, for users who are using a previous version of the security module, it will be necessary to perform a small adjustment in their application to ensure correct operation. Here is the steps to follow: **1-**Access the sync application: In development, inside the security folder, open the application: "app_sync_apps" . By default, the application has the name app_sync_apps, however it is possible to change the application prefix when creating the security module. If the application with the default name is not found, use only the end of the application name: sync_apps 2- New code for the app_sync_apps application The app_sync_apps application is created by generating modules of the types: Group, Applications and LDAP - Total Control. Make sure the type of module being used before replacing the codes. For modules of the type: Group Copy the code below: 1. $arr_apps = array(); 2. $_arr_apps = array_diff(scandir($this->Ini->path_aplicacao . "../_lib/_app_data/"), array('.','..', 'index.php', 'index.html')); 3. foreach($_arr_apps as $k => $v) 4. { 5. if(substr($v, -12) != "_mob_ini.php") 6. { 7. $arr_apps[] = substr($v, 0, -8); 8. } 9. } 10. if({check_deleted} == 'Y') 11. { 12. foreach($arr_apps as $k => $app) 13. { 14. require($this->Ini->path_aplicacao . "../_lib/_app_data/". $app . '_ini.php'); 15. $app = (isset($arr_data['friendly_url']) && !empty($arr_data['friendly_url']))?$arr_data['friendly_url']:$app; 16. if( !is_dir($this->Ini->path_aplicacao . "../" . $app) ) 17. { 18. unset($arr_apps[$k]); 19. } 20. } 21. } 22. sc_select(rs, "SELECT app_name FROM sec_apps"); 23. $arr_apps_db = array(); 24. while(!$rs->EOF) 25. { 26. $arr_apps_db[] = $rs->fields[0]; 27. $rs->MoveNext(); 28. } 29. $rs->Close(); 30. $arr_apps = array_diff($arr_apps, $arr_apps_db); 31. //========= Groups ========= 32. $arr_grp = array(); 33. sc_select(rs, "SELECT group_id FROM sec_groups"); 34. while(!$rs->EOF) 35. { 36. $arr_grp[] = $rs->fields[0]; 37. $rs->MoveNext(); 38. } 39. $rs->Close(); 40. foreach($arr_apps as $k => $app) 41. { 42. require($this->Ini->path_aplicacao . "../_lib/_app_data/". $app . '_ini.php'); 43. $app_type = isset($arr_data['type'])?$arr_data['type']:''; 44. $sql = "SELECT count(*) FROM sec_apps WHERE app_name = '". $app ."' "; 45. sc_lookup(rs, $sql); 46. if({rs[0][0]} == 0) 47. { 48. $sql = "INSERT INTO sec_apps(app_name, app_type) VALUES ('". $app ."', '".$app_type."')"; 49. sc_exec_sql( $sql ); 50. foreach($arr_grp as $grp) 51. { 52. $sql = "INSERT INTO sec_groups_apps(app_name, group_id) VALUES ('". $app ."', '". $grp ."')"; 53. sc_exec_sql( $sql ); 54. } 55. } 56. } ### For modules of the type: Application Copy the code below: 1. $arr_apps = array(); $_arr_apps = array_diff(scandir($this->Ini->path_aplicacao . "../_lib/_app_data/"), array('.','..', 'index.php', 'index.html')); foreach($_arr_apps as $k => $v) { if(substr($v, -12) != "_mob_ini.php") { $arr_apps[] = substr($v, 0, -8); } } if({check_deleted} == 'Y') { foreach($arr_apps as $k => $app) { require($this->Ini->path_aplicacao . "../_lib/_app_data/". $app . '_ini.php'); $app = (isset($arr_data['friendly_url']) && !empty($arr_data['friendly_url']))?$arr_data['friendly_url']:$app; if( !is_dir($this->Ini->path_aplicacao . "../" . $app) ) { unset($arr_apps[$k]); } } } sc_select(rs, "SELECT app_name FROM sec_apps"); $arr_apps_db = array(); while(!$rs->EOF) { $arr_apps_db[] = $rs->fields[0]; $rs->MoveNext(); } $rs->Close(); $arr_apps = array_diff($arr_apps, $arr_apps_db); //========= Users ===== $arr_usr = array(); sc_select(rs, "SELECT login FROM sec_users"); while(!$rs->EOF) { $arr_usr[] = $rs->fields[0]; $rs->MoveNext(); } $rs->Close(); foreach($arr_apps as $k => $app) { require($this->Ini->path_aplicacao . "../_lib/_app_data/". $app . '_ini.php'); $app_type = isset($arr_data['type'])?$arr_data['type']:''; $sql = "SELECT count(*) FROM sec_apps WHERE app_name = '". $app ."' "; sc_lookup(rs, $sql); if({rs[0][0]} == 0) { sc_exec_sql("INSERT INTO sec_apps(app_name, app_type) VALUES ('". $app ."', '".$app_type."')"); foreach($arr_usr as $usr) { sc_exec_sql("INSERT INTO sec_users_apps(app_name, login) VALUES ('". $app ."', '".$usr."')"); } } } For modules of types: LDAP - Total Control Copy the code below:$arr_apps = array(); 1. $_arr_apps = array_diff(scandir($this->Ini->path_aplicacao . "../_lib/_app_data/"), array('.','..', 'index.php', 'index.html')); 2. foreach($_arr_apps as $k => $v) 3. { 4. if(substr($v, -12) != "_mob_ini.php") 5. { 6. $arr_apps[] = substr($v, 0, -8); 7. } 8. } 9. if({check_deleted} == 'Y') 10. { 11. foreach($arr_apps as $k => $app) 12. { 13. require($this->Ini->path_aplicacao . "../_lib/_app_data/". $app . '_ini.php'); 14. $app = (isset($arr_data['friendly_url']) && !empty($arr_data['friendly_url']))?$arr_data['friendly_url']:$app; 15. if( !is_dir($this->Ini->path_aplicacao . "../" . $app) ) 16. { 17. unset($arr_apps[$k]); 18. } 19. } 20. } 21. sc_select(rs, "SELECT app_name FROM sec_apps"); 22. $arr_apps_db = array(); 23. while(!$rs->EOF) 24. { 25. $arr_apps_db[] = $rs->fields[0]; 26. $rs->MoveNext(); 27. } 28. $rs->Close(); 29. $arr_apps = array_diff($arr_apps, $arr_apps_db); 30. //========= Users ========= 31. $arr_usr = array(); 32. sc_select(rs, "SELECT login FROM sec_users"); 33. while(!$rs->EOF) 34. { 35. $arr_usr[] = $rs->fields[0]; 36. $rs->MoveNext(); 37. } 38. $rs->Close(); 39. foreach($arr_apps as $k => $app) 40. { 41. require($this->Ini->path_aplicacao . "../_lib/_app_data/". $app . '_ini.php'); 42. $app_type = isset($arr_data['type'])?$arr_data['type']:''; 43. $sql = "SELECT count(*) FROM sec_apps WHERE app_name = '". $app ."' "; 44. sc_lookup(rs, $sql); 45. if({rs[0][0]} == 0) 46. { 47. sc_exec_sql("INSERT INTO sec_apps(app_name, app_type) VALUES ('". $app ."', '".$app_type."')"); 48. foreach($arr_usr as $usr) 49. { 50. sc_exec_sql("INSERT INTO sec_users_apps(app_name, login) VALUES ('". $app ."', '".$usr."')"); 51. } 52. } 53. } 3-Replacethe "onValidate" event: In the events folder, select the "onValidate" event. Replace the existing code with the one you copied in step 2. In the provided code, the tables are prefixed with "sec_" pattern which is generated by the security module. In case you changed the prefix during the generation of your module, it is necessary to adjust the code, replacing "sec_" by the used prefix. 4- Generate the source code After completing these steps and generating the source code, you are ready to synchronize the applications. If you have any questions, please contact our support.
Setting environment manually PHP 8.1 - Windows IIS
Install IIS on Windows Server **1)**On the Start page, click the Server Manager tile. 2) In Server Manager, select Dashboard, and click Add roles and features. 3) In the Add Roles and Features Wizard, on the Before You Begin page, click Next. 4) On the Select Installation Type page, select Role-based or Feature-based Installation and click Next 5) On the Select Destination Server page, select Select a server from the server pool, select your server, and click Next. 6) On the Select Server Roles page, select Web Server (IIS), and then click Next. 7) Check "Include Management tools(if applicable)" and click "Add Features". 8) On the Select Features page, note the preselected features that are installed by default, and then click Next. 9) On the Web Server Role (IIS) click Next 10) On the Select Role Services page, note the preselected role services that are installed by default, and then select CGI checkbox, click next**.** 11) On the Confirm Installation Selections page, confirm your selections, check the option to restart the destination server automatically and then click Install. To verify that IIS installed successfully, type the following into a web browser: http://localhost You should see the default IIS Welcome page, check the example below: Download and Install PHP Manually 1. Install PHP and WinCache. 2. Add the PHP installation folder to the Path environment variable. 3. Set up a handler mapping for PHP. 4. Add default document entries for PHP. 5. Test your PHP installation. Download PHP and the WinCache extension. 1) Open your browser to Windows for PHP Download Page and download the PHP 8.1 non-thread-safe zip package . 2) Download the WinCache extension from the List of Windows Extensions for PHP. 3) Extract all files in the PHP .zip package to a folder of your choice, for example: In this documentation we are using php installation in Windows root *C:\php* 4) Extract the WinCache .zip package to the PHP extensions folder (**C:\php**ext), click OK: The WinCache .zip package contains one file (Php_wincache.dll). 5) Open Control Panel, click System and Security, click System, and then click Advanced system settings. 6) In the Environment Variables optionUnder System variables, select Path option, and then click Edit. 7) Add the path to your PHP installation folder to the end of the Variable value, for example C:\php and Click OK. 8) Open IIS Manager. 9) Select the hostname of your computer in the Connections panel, and then double-click Handler Mappings. 10) In the Action panel, click Add Module Mapping. Follow values below: 1. In Request path, type: *.php. 2. From the Module menu, select FastCgiModule. 3. In the Executable box, type the full path to Php-cgi.exe, for example C:\php\Php-cgi.exe. 4. In Name, type a name for the module mapping, for example FastCGI,Click OK. 11) Select the hostname of your computer in the Connections panel, and double-click Default Document. 12) In the Action panel, click Add. Type Index.php and****Default.php in the Name box, and then click OK. Configuring PHP environment 1) Rename php.ini-development to php.ini in path c:\php And change the following values in the php.ini file: - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On 2) Enable the extensions listed below, by uncommenting them (Remove the semicolon**;**at beginning of line). You must enable the pdo_sqlite extension for scriptcase to work. Default Extensions - extension=bz2 - extension=curl - extension=gd2 - extension=gettext - extension=imap - extension=ldap - extension=fileinfo - extension=mbstring - extension=openssl - extension=exif - extension=xsl - extension=soap | Extensions | Driver enabled in Scriptcase | | --- | --- | | extension=mysqli | MySQLi | | extension=odbc | DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, MS SQL Server ODBC, Oracle ODBC, Progress | | extension=pdo_mysql | MySQL PDO | | extension=pdo_odbc | DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC | | extension=pdo_pgsql | PostgreSQL PDO | | extension=pdo_sqlite | SQLite PDO | | extension=pgsql | PostgreSQL 6.3 or below, PostgreSQL 6.4 or above, PostgreSQL 7 ou Acima | Enabling the SourceGuardian Loader Before you start the Scriptcase installation, you need to enable the loader responsible for encrypting Scriptcase in PHP. Follow the steps below to perform this action successfully. 1 - Extract the SourceGuardian Loader file downloaded. If you haven’t downloaded it yet click here and download the file according to the architecture used. 2 - Copy the ixed.8.1.win file and paste it into the PHP extensions directory C:\php\ext. Pasting SourceGuardian Loader File 3 - Edit the php.ini file and below the last line enter the path to the extension within the zend_extension parameter: Example:[SourceGuardian] zend_extension=C:\php\ext\ixed.8.1.win Adicionando extensão do Loader no php.ini 4 - Restart the IIS Manual Scriptcase Installation 1) To install scriptcase, follow the documentation through this link: Scriptcase Typical Installation
Security module password recovery error
To fix the error during the security module password recovery process, you need to follow the steps below: Only available when using the option to email the change new password link. 1- Access the application app_change_pswd By default, when generating the module, all applications are inside the security folder and with the prefix app_, searching the list of applications for the name: app_change_pswd, it should be possible to access it. It is necessary to check if the prefix used to create the module was "app_", if it was another one, look only for the name change_pswd 2- Access the onLoad event With the application open inside Scriptcase, access the onLoad option inside the "Events" folder, as shown in the following image: 3- Change the code Change the current code to the following: 1. if(isset([act_code]) && !empty([act_code])) 2. { 3. sc_field_display({old_pswd}, 'off'); 4. sc_field_no_validate({old_pswd}); 5. sc_btn_display("exit","off") 6. } 7. else 8. { 9. sc_field_display({old_pswd}, 'on'); 10. sc_btn_display("exit","on"); 11. } 4- Generate the application After replacing the code, you must generate the source of the application, so that it can be used normally in the correct way. If you have any questions, please contact our support.
Offline Documentation
Starting with version 9.9.021, Scriptcase documentation is only available on our website, in two languages: English: https://www.scriptcase.net/docs/en_us/v9/manual/01-introduction/01-general-view/ Spanish: https://www.scriptcase.net/docs/es_es/v9/manual/01-introduction/01-general-view/ However, some Scriptcase are installed on machines without internet access or that have access restrictions to some external websites, in these cases it will be necessary to configure local documentation. To this end, we make our manual available in compressed format (.zip). Follow the steps below: 1- Download documentation zip 1.1- You need to access our website on the documentation page by clicking the link below. English documentation page Spanish documentation page **1.2-**So to start the download click on the download button 2- Documentation directory After downloading, you must move the file to the directory: ../wwwroot/scriptcase/doc We'll use Windows for the images in this article, but you can follow the same steps regardless of your operating system. 3- Unzip the zip Now you just need to unzip the zip that was downloaded in step one into this folder. 4- File structure After unzipping this should be the structure of the files inside the doc folder there should be the manual .zip file and the manual_mp folder If you already have a directory called manual_mp, simply overwrite the directory and the manual must be updated. Inside the manual_mp folder there should be the structure below, with the folders: assets, components, manual and some documentation files.
Retrieve password
An inconsistency was observed when trying to reset the password using the "app_retrieve_pswd" application. The correction was made for new modules, created from release 9.10.001. For modules created in previous releases that use this option, we must make a small change to the app_retrieve_pswd application code, check out the tutorial below. This tutorial covers security modules created before release 9.10.001 and that use the Send email with a link to generate new password option 1- Open the app_retrieve_pswd application By default, the prefix of security applications is app_ and the "security" folder, so, with scriptcase open, it is possible to locate the application: The prefix and folder may have been changed during module generation. 2- Access the send_act method Access the Programming block, in the PHP Methods folder select the send_act method. 3- Add the code In old modules, the code for this event looks like this: 1. $act_code = act_code(); 2. $sql = "UPDATE 3. sec_1users 4. SET 5. activation_code = '". $act_code ."' 6. WHERE 7. login = '". [usr_login] ."'"; 8. sc_exec_sql($sql); 9. send_mail_message({lang_send_act_code} 10. . " [http://".$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']. "?act_code=" . $act_code ."](http://". $_SERVER[) "); Below $act_code = act_code(); add the following code: $act_code = substr($act_code, 0, 32); The code should look like this: 1. $act_code = act_code(); 2. $act_code = substr($act_code, 0, 32); 3. $sql = "UPDATE 4. sec_1users 5. SET 6. activation_code = '". $act_code ."' 7. WHERE 8. login = '". [usr_login] ."'"; 9. sc_exec_sql($sql); 10. send_mail_message({lang_send_act_code} 11. . " [http://".$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']. "?act_code=" . $act_code ."](http://". $_SERVER[) ");
Resolving email sending issues with the sc_mail_send macro on Linux or Mac.
If, when using the sc_mail_send macro in a Linux or MAC environment, the following error occurs: Fatal error: Uncaught Swift_TransportException: Connection could not be established with host smtp.gmail.com [ #0] in /opt/Scriptcase/v9-php81/wwwroot/scriptcase/prod/third/swift/classes/Swift/Transport/StreamBuffer.php:269 Stack trace: #0 /opt/Scriptcase/v9-php81/wwwroot/scriptcase/prod/third/swift/classes/Swift/Transport/StreamBuffer.php(62): Swift_Transport_StreamBuffer->_establishSocketConnection() #1 /opt/Scriptcase/v9-php81/wwwroot/scriptcase/prod/third/swift/classes/Swift/Transport/AbstractSmtpTransport.php(113): Swift_Transport_StreamBuffer->initialize(Array) #2 /opt/Scriptcase/v9-php81/wwwroot/scriptcase/prod/third/swift/classes/Swift/Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start() #3 /opt/Scriptcase/v9-php81/wwwroot/scriptcase/app/teste_mantis/blank/index.php(2425): Swift_Mailer->send(Object(Swift_Message), Array) #4 /opt/Scriptcase/v9-php81/wwwroot/scriptcase/app/teste_mantis/blank/index.php(2793): blank_apl->controle() #5 {main} thrown in /opt/Scriptcase/v9-php81/wwwroot/scriptcase/prod/third/swift/classes/Swift/Transport/StreamBuffer.php on line 269 It will be necessary to follow the steps below to correct the error: 1º - Locate the php.ini file that is in the root directory: - Linux : /opt/Scriptcase/v9-php81/components/php - MAC : /Applications/Scriptcase/v9-php81/components/php/ 2º - After locating the php.ini file, access it. - Afterward, perform a search for lines 1932 and 1940 and insert the following values: LINUX in the line 1932 : curl.cainfo = "/opt/Scriptcase/v9-php81/components/php/etc/curl-ca-bundle.crt" in the line 1940 : openssl.cafile="/opt/Scriptcase/v9-php81/components/php/etc/curl-ca-bundle.crt" MAC in the line 1932 : curl.cainfo = "/Applications/Scriptcase/v9-php81/components/php/etc/curl-ca-bundle.crt" in the line 1940 : openssl.cafile = "/Applications/Scriptcase/v9-php81/components/php/etc/curl-ca-bundle.crt" As shown in the image below 3º - After making changes to the php.ini file, save the changes and restart the Apache service for Scriptcase. LINUX /opt/Scriptcase/v9-php81/components/apache/sc_apache restart Mac /Applications/Scriptcase/v9-php81/components/apache/sc_apache restart After restarting, attempt to send the email again in the application using the sc_send_mail macro. This time, the email will be sent without errors.
How to Generate the Report for PHP Migration
In order to assist clients who use Scriptcase with an outdated version of PHP (7.0 or 7.3), we have prepared a guide to help with project migration. To assist with the migration, it is necessary to send a report containing some information about the projects for analysis. Info Note that installations in environments with PHP 7.0 no longer receive updates due to incompatibility with the new libraries offered in the latest versions. For PHP 7.3 users, Scriptcase updates will be maintained until June 30, 2025. After this date, no further updates will be released for Scriptcase in these environments. What will be generated in the report? 1. Total PHP code in the applications. 2. Number of applications in the project. 3. Code snippets that need to be adjusted to work with PHP 8.1. WarningThe report is generated in a ZIP file, without exposing sensitive data or accessing your database. Step-by-Step Guide to Generate the Report Quote This tutorial will use an environment with PHP 7.3 for illustration. The steps are the same regardless of your PHP version. 1- Download the file corresponding to the PHP version where Scriptcase is installed. If you are unsure about the PHP version in use, consult the Scriptcase diagnosis 1. For environments with PHP 7.0 - Download the file sc_projects_info.enc70.php 2. For environments with PHP 7.3 - Download the file sc_projects_info.enc73.php 2- After downloading, place the file in the main Scriptcase folder. 3- Access the file through the URL in your preferred browser. 4- The existing projects in your Scriptcase installation will be listed along with the options for generating the report: All and Select. All - Generates the report for all Scriptcase projects. Select - Generates the report only for the selected projects. After choosing the desired option, click OK and wait. 5- Upon completion, a .zip file containing the collected information will be generated. 1. Total PHP code in the applications. 2. Number of applications in the project. 3. Code snippets that need to be adjusted to work with PHP 8.1. WarningThis report is generated in a ZIP file, without exposing sensitive data or accessing your database. Sending the file The generated file must be sent to our team of specialists using the email marcia@scriptcase.net, so that the project can be analyzed.
Updating the Security Module to Support the New LDAP
LDAP is a widely used protocol for user management and authentication in corporate networks. It allows applications to connect to a centralized directory with Active Directory to validate credentials and obtain user information. In version 9.12, Scriptcase now includes the LdapRecord library, bringing significant improvements in integration with LDAP servers. This new library expands access control capabilities, allowing for more comprehensive management of users and groups within Scriptcase. Below is a comparison of the features of adLDAP and LdapRecord, which is now available in the tool: | Aspect | adLDAP - Old | LdapRecord - New Library | | --- | --- | --- | | Architecture | Older and less flexible implementation. | Modern framework with support for Active Directory, OpenLDAP, and 389 Directory Server. | | Data Retrieval | Limitations in obtaining all attributes of users and groups. | Allows retrieving all user data and detailed group information directly from the LDAP directory. | | Integration with Frameworks | Limited integration with modern frameworks. | Includes robust integration with modern frameworks, facilitating PHP application development with LDAP authentication. | | Maintenance and Updates | Less active in terms of updates and support. | Actively maintained, offering continuous improvements and up-to-date support. | Enabling the LdapRecord Library in the Project Info This step is only necessary for older projects. For new projects (in installations with an active upgrade), the LdapRecord library is already enabled. In existing Scriptcase projects created in earlier releases of the tool, it will be necessary to define the use of the library in the project properties. Follow the steps below: 1. Access the project where you want to update the LDAP security module. 2. Within the project, go to Project → Properties. 3. In "Ldap Library", select the LdapRecord library and Save. Creating the Security Module with LDAP 1. Go to Modules → Security: 2. Choose the type of LDAP security to be used: 3. Select the connection you used in the old LDAP and click Next: 4. In General, define a name for the applications of the new module: 5. In LDAP, enter your server information: 6. In Insert data, enter the login information and click Connection Test. If successful, click Generate Security: 7. The Save Profile tab is optional. Click OK: Conclusion With version 9.12, Scriptcase introduced support for the LdapRecord library as a new feature for integration with LDAP servers. This implementation offers greater compatibility, better performance, and the ability to retrieve all user and group data, providing more comprehensive authentication control. The adLDAP library remains available for users without an active upgrade, ensuring compatibility with previous implementations. If you have access rights, to take advantage of the benefits of LdapRecord, you need to enable the new library, which can be set globally in Administration > Options or specifically for existing projects in Project Properties. With this update, LDAP authentication in Scriptcase becomes more robust, secure, and prepared for corporate environments that require greater flexibility in access management.
Upgrading the Security Module: how to migrate from the old to the new
Web application attacks are constantly evolving. With data being such a valuable asset, it is crucial to keep system security updated to avoid losses. The new security module, besides being extremely flexible and intuitive, implements several security features and best practices, making the system much more robust against these attacks. In this article, we will learn how to migrate from the old security module to the new one, taking advantage of all these benefits. What is required? Before we can carry out the migration, we need to prepare the old module to receive updates because, as mentioned earlier, the new module implements several improvements and features that were not present in the old one. To do this, we will need to modify the “sec_users” table created by the module. Notes By default, tables created by the security module have the prefix "sec_" and are located in the "Security" directory of the project. Modifying the sec_users Table Warning The Database builder is not available for all DBMS. It is possible to make the same changes using any tool that allows database management — such as Dbeaver, for example. 1. Access the database builder via Database → Database builder: 2. Look for the “SQL command” option: 3. Execute the SQL Alter table command to add the fields “role,” “phone,” “pswd_last_updated,” and “mfa_last_updated” to the sec_users table Alert Note that “role” and “phone” will be of type TEXT, while “pswd_last_updated” and “mfa_last_updated” will be of type TIMESTAMP. It is important to select the appropriate data type according to your DBMS — like Varchar and TIMESTAMP for MySQL, for example. 1. ALTER TABLE sec_users ADD COLUMN phone TEXT NULL DEFAULT NULL; 2. ALTER TABLE sec_users ADD COLUMN role TEXT NULL DEFAULT NULL; 3. ALTER TABLE sec_users ADD COLUMN pswd_last_updated TIMESTAMP NULL DEFAULT NULL; 4. ALTER TABLE sec_users ADD COLUMN mfa_last_updated TIMESTAMP NULL DEFAULT NULL; Migrating to the New Security Module Once the modification to the sec_users table is complete, you can proceed with the migration to the new security module: 1. Access Modules → Security 2. Click on “Create security module”: 3. Select the type of security that will be used: Alert It is important that the security type of the new module matches the old one. 4. Select the connection that contains the tables from the old module and check the “Use existing tables” option 5. Click the reload button “↻” to Scriptcase can see the changes in the table and click “Next” 6. Associate the fields with the corresponding columns and click “Next”: USER: - Table → sec_users - Login → login - Password → pswd - Name → name - Phone → phone - Position → role - E-mail → email - Active → active - Activation code → activation_code - Administrator privilege → priv_admin - Two-Factor authentication (2FA) → mfa - Picture → picture - Last password change → pswd_last_updated - Revalidation time → mfa_last_updated GROUP: - Table → sec_groups - ID → group_id - Description → description APPLICATION: - Table → sec_apps - Application Name → app_name - Description → description - Type of Application → app_type USER/GROUP: - Table → sec_users_groups - Login → login - Group Code → group_id GROUP/APPLICATION: - Table → sec_groups_apps - Group Code → group_id - Application Name → app_name - Access Privilege → priv_access - Insert Privilege → priv_insert - Delete Privilege → priv_delete - Update Privilege → priv_update - Export Privilege → priv_export - Print Privilege → priv_print SETTINGS: - Table → sec_settings - Name → set_name - Value → set_value 7. Choose the prefix for the new module’s applications. 8. Fill in the “Email Settings” tab and click on “Generate security” 9. The option to save the profile is optional — you can read more about it in the documentation of the new security module. Click “OK”. 10. Generate the source code for the new applications. Conclusion In this article, we learned about the importance of keeping the security of a project updated, the differences between the old and new security modules, and how to migrate from one to the other. For questions related to the old module and its functionalities, refer to the documentation of the old security module. For questions related to the new module, refer to the official documentation of the new security module.
Enabling the Google Identity Service Library
To use the login functionality with Google Authentication in Scriptcase, it is necessary to have the Google Identity Service previously configured and the "ClientID" and "Secret" keys available for use. In this article, we will learn how to configure it and obtain these keys to use in the integration with Google Authentication. Setting Up and Configuring Google Identity Service 1. Access Google Cloud Console at: https://console.cloud.google.com/ 2. At the top of the screen, click "Select Project" and choose an existing project or click "New Project": 3. In the side menu, go to "APIs and services > OAuth Permission Screen": Idea If you have already configured the OAuth client, skip to step 9 4. Click in "Let's get started": 5. In "App Information," define the name and an email for support. Then, click "Next": 6. Under "Public," select "External": 7. In "Contact Information," enter your email and click "Next": 8. Accept the terms and click "To Create": 9. In the side menu, go to "APIs & Services > Library": 10. Search for "Cloud Identity" in the search bar and select it: 11. Click in "Activate": 12. Again in "APIs & Services > OAuth Permission Screen," go to "Clients > Create Client": 13. In "Application Type," select "Web Application" and choose a name: 14. In "Authorized Redirect URIs," enter your domain with the path to the application that will use Google Identity Platform and click "Create": Info app_link_social.php is an internal application of the security module and is used to link the system login with the Google account. 15. Now, just click the download button to view the "Client ID" and "Secret": Conclusion In this article, we learned how to create and configure Google Identity Service to be later used in Scriptcase via Google Authentication. To learn how to configure and use this feature in Scriptcase, read the tutorial on integrating with Google Authentication. Best regards and see you later!
Updating the Security Module to Support Google Login
With the replacement of the NCP protocol with the ARPANET TCP/IP protocol, the internet gained space to evolve constantly. As more people joined the internet, things needed to happen faster, making the evolution process almost exponential: the faster a service was, the faster we wanted it to be. Nowadays, such speed can often be translated into to eliminate monotonous steps. With the new Google account login feature in the security module, it is possible to take advantage of all the security layers of the Google ecosystem while maintaining a high level of agility. In this article, we will learn how to update the security module to have this powerful feature in our system. Info Be aware that you will need the "ClientID" and "Secret" credentials from the Google Identity Service library pre-configured to use this feature. If you have questions or do not know how to create and configure the library, read the tutorial on how to set up the Google Identity Service! Info If you are using the old security module, you will need to migrate to the new one. If you have any doubts or are unsure how to migrate, read the module migration tutorial! Warning Always make a security backup before any changes! If I did not use the social network option If your security module does not use the social login option, you will need to prepare it to receive this new function. For this, we will create a new table in the database called "sec_users_social": Notes If your security module already uses the social network option with Twitter and/or Facebook, skip to the next section. Warning The Database Builder is not available for all DBMSs. The same changes can be made using any tool that allows database management, such as DBeaver. 1. Access the Database Builder in "Database → Database Builder": 2. Look for the "SQL Command" option: 3. Execute the "CREATE TABLE" SQL command with the fields "login", "resource" and "resource_id": Alert Note that the fields are of type VARCHAR(255) because we are using MySQL as an example. You need to select the corresponding type according to your DBMS. 1. CREATE TABLE `sec_users_social` ( `login` VARCHAR(255) NOT NULL, `resource` VARCHAR(255) NOT NULL, `resource_id` VARCHAR(255) NOT NULL, PRIMARY KEY (`login`, `resource`, `resource_id`) ); Updating the module with the new option With everything properly configured, just update the security module: 1. Access "Modules → Security": 2. Click on "Create Security Module"": 3. Select the type of security to be used: Notes The option is only available for the types "Group", "Application", and "User". 4. Select the connection that has your security module tables, choose "Use existing tables", and check "Use social networks": 5. Click the reload button “↻” so Scriptcase can see the table changes and click “Next”: 6. Associate the fields with the corresponding columns and click “Proceed”: USER - Table → sec_users - Login → login - Password → pswd - Name → name - Phone → phone - Position → role - E-mail → email - Active → active - Activation code → activation_code - Administrator privilege → priv_admin - Two-Factor authentication (2FA) → mfa - Picture → picture - Last password change → pswd_last_updated - Revalidation time → mfa_last_updated GROUP: - Table → sec_groups - ID → group_id - Description → description APPLICATION: - Table → sec_apps - Application Name → app_name - Description → description - Type of Application → app_type USER/GROUP: - Table → sec_users_groups - Login → login - Group Code → group_id GROUP/APPLICATION: - Table → sec_groups_apps - Group Code → group_id - Application Name → app_name - Access Privilege → priv_access - Insert Privilege → priv_insert - Delete Privilege → priv_delete - Update Privilege → priv_update - Export Privilege → priv_export - Print Privilege → priv_print SOCIAL NETWORKS: - Table → sec_users_social - Login → login - Social network type → resource - Social network ID → resource_id SETTINGS: - Table → sec_settings - Name → set_name - Value → set_value 7. In "General", choose the prefix for the applications of the new module: 8. Fill in the "E-mail Settings" tab: 9. In "Social Network", select "Google" and fill in the "ClientID" and "Secret" fields. After that, click on "Generate security": 10. The "Save Profile" tab is optional — you can read more about it in the documentation of the new security module. Click on "OK": Configuring in the production environment When publishing the project, it is possible that the Google login option may not be working correctly. This happens because it is necessary to configure "ClientID" and "Secret" in the production environment as well. To do this, we need to prepare the production environment's database and then insert the variables in the security module settings tab: 1. Execute the SQL command "CREATE TABLE" in the production database: Notes If you were already using the social login option with Twitter and/or Facebook in production, there is no need to execute the CREATE TABLE command. Alert Note that the fields are of type VARCHAR(255), as we are using MySQL for the example. You should select the corresponding type based on your DBMS. 1. CREATE TABLE sec\_users\_social ( 2. login VARCHAR(255) NOT NULL, 3. resource VARCHAR(255) NOT NULL, 4. resource\_id VARCHAR(255) NOT NULL, 5. PRIMARY KEY (login, resource, resource\_id) 6. ); 2. Execute the SQL "INSERT" command into the sec_settings table in the production database: 1. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_position', 'below'); 2. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_fb', 'N'); 3. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_fb_app_id', ''); 4. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_fb_secret', ''); 5. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_x', 'N'); 6. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_x_key', ''); 7. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_x_secret', ''); 8. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_google', 'N'); 9. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_google_client_id', ''); 10. INSERT INTO sec_settings(set_name, set_value) VALUES ('auth_sn_google_secret', ''); 11. In the security module menu, access the app_settings application: Info By default, it is linked to the shortcut named "Settings" 4. Go to the "Authentication via Social Networks" tab and fill in the "Client ID" and "Secret" fields: 5. Click "Ok" to save the changes. Conclusion In this article, we learned about Google Authentication and how to implement it in the Scriptcase security module. For questions related to the security module, access the official security module documentation. For questions related to the social network option, access the official option documentation. Best regards, see you soon!
wkhtmltopdf update
**1.**Check the current version of wkhtmltopdf **1.1 -**Navigate to the directory: 1. _lib/prod/third/wkhtmltopdf/linux-amd64/linux-amd64 **1.2 -**Then, run the following command to check the installed version: 1. ./wkhtmltopdf-amd64 --version Quote The returned version will possibly be 12.04. **2.**Download of the new version Access the library's official website at the link below and download the version corresponding to your operating system: wkhtmltopdf.org/downloads.html **3.**Extract the downloaded file After the download, extract the file using the following commands:" 1. mkdir wkhtmltox_extraido sudo dpkg-deb -x wkhtmltox_0.12.6-1.xenial_amd64.deb wkhtmltox_extraido **4.**Copy and replace the file 4.1 - Navigate to the newly created directory: 1. wkhtmltox_extraido/usr/local/bin **4.2 -**Copy the wkhtmltopdf file to the destination directory: 1. _lib/prod/third/wkhtmltopdf/linux-amd64 5. Rename the files Modify the filenames as needed: Rename the wkhtmltopdf file to wkhtmltopdf-amd64. Alert The old file, named wkhtmltopdf-amd64, should be renamed to another name that doesn't cause a conflict.
Fixing the Oracle Connection Error: ORA-12154
Fixing the Oracle Connection Error: ORA-12154: TNS:could not resolve the connect identifier specified To fix this error when connecting to an Oracle database, follow the steps below: 1. Create the tnsnames.ora file Create a file named tnsnames.ora with the following content: REALDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = YOUR_IP_OR_HOST)(PORT = YOUR_PORT)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = YOUR_SERVICE_NAME) ) ) Warning Replace YOUR_IP_OR_HOST, YOUR_PORT, and YOUR_SERVICE_NAME with the actual connection details. 2. Save it to the correct directory Save the file to the following path: C:\instantclient_19_6\network\admin If the network and admin folders do not exist, create them manually. 3. Set environment variables in Windows Go to: Control Panel → System → Advanced system settings → Environment Variables Add or edit the following System Variables: Add or edit the following environment variables: - TNS_ADMIN Name: TNS_ADMIN Value C:\instantclient_19_6\network\admin - ORACLE_HOME Name: ORACLE_HOME Vakue: C:\instantclient_19_6 4. Edit the Apache configuration Open the file: C:\Program Files\NetMake\v9-php81\components\apache\conf\httpd.conf Add the following lines: FcgidInitialEnv TNS_ADMIN "C:/instantclient_19_6/network/admin" FcgidInitialEnv ORACLE_HOME "C:/instantclient_19_6" These lines should be inserted between the FcgidMaxRequestLen and Timeout directives. 5. Apply the environment setup - Save the httpd.conf file after adding the FcgidInitialEnv variables. - Restart your computer so the environment variables (TNS_ADMIN and ORACLE_HOME) are correctly applied. 6. Create the connection in Scriptcase - pen Scriptcase and go to the database connection creation screen. - Select the desired Oracle driver. - In the "Database" field, enter the name defined in the tnsnames.ora file (e.g., REALDB). If everything is configured correctly, the connection to the Oracle database will be established successfully.
Corrigindo sincronizar aplicação no módulo de segurança
In this article, we’ll see how to fix the issue in the sync_app application (default name) without having to recreate the security module. Info This fix applies to a security module created in a version prior to 9.12.021 and using the following types: - Group - Application - Ldap/Application The issue When deleting an application from the system in the application list and using the synchronize applications option to update the database, some tables were not being updated and the deleted applications continued to appear. How to fix To fix the synchronization issue in the security module, it is necessary to edit the code in the onValidate and onValidateSuccess events of the sync_apps application (default name). Step-by-step Follow the steps below. If you have any questions, contact our support team through the official channels. 1. Locating the application No matter what prefix was used during the creation of the security module, the default name of the application is sync_apps. On the home screen of your project, search for sync_apps. 2. Code for onValidate Comment out the existing code and add the new version below inside the onValidate event. Below is a summary of the SQL commands used in this section. This list is meant to help developers quickly identify the database operations involved: 1. sc_select(rs, "SELECT app_name FROM sec_apps"); 2. sc_exec_sql("DELETE FROM sec_groups_apps WHERE app_name = " . sc_sql_injection($app)); 3. sc_exec_sql("DELETE FROM sec_apps WHERE app_name = " . sc_sql_injection($app)); 4. sc_select(rs, "SELECT group_id FROM sec_groups"); 5. "SELECT count(*) FROM sec_apps WHERE app_name = '". $app ."' "; 6. "INSERT INTO sec_apps(app_name, app_type, description) VALUES ('". $app ."', '".$app_type."', '".$app_desc."')"; 7. "INSERT INTO sec_groups_apps(app_name, group_id) VALUES ('". $app ."', '". $grp ."')"; onValidare 1. $arr_apps = array(); 2. $arr_app_desc = array(); // >>> New <<< 3. $_arr_apps = array_diff(scandir($this->Ini->path_aplicacao . "../_lib/_app_data/"), array('.','..', 'index.php', 'index.html')); 4. foreach($_arr_apps as $k => $v) 5. { 6. if(substr($v, -12) != "_mob_ini.php") 7. { 8. $arr_apps[] = substr($v, 0, -8); 9. } 10. } 11. sc_select(rs, "SELECT app_name FROM sec_apps"); 12. $arr_apps_deleted = array(); // >>>New<<< 13. $arr_apps_db = array(); 14. while(!$rs->EOF) 15. { 16. $arr_apps_db[] = $rs->fields[0]; 17. $rs->MoveNext(); 18. } 19. $rs->Close(); 20. if({check_deleted} == 'Y') 21. { 22. $arr_apps_deleted_dir = array_diff($arr_apps_db, $arr_apps); // >>>New<<< 23. foreach($arr_apps_deleted_dir as $k => $app){ // >>>New<<< 24. if(substr($app, 0, 8) == 'https://' || substr($app, 0, 7) == 'http://'){ // >>>New<<< 25. continue; // >>>New<<< 26. } 27. $arr_apps_deleted[] = $app; // >>>New<<< 28. sc_exec_sql("DELETE FROM sec_groups_apps WHERE app_name = " . sc_sql_injection($app)); // >>>New<<< 29. sc_exec_sql("DELETE FROM sec_apps WHERE app_name = " . sc_sql_injection($app)); // >>>New<<< 30. } 31. foreach($arr_apps as $k => $app) 32. { 33. require($this->Ini->path_aplicacao . "../_lib/_app_data/". $app . '_ini.php'); 34. $app = (isset($arr_data['friendly_url']) && !empty($arr_data['friendly_url']))?$arr_data['friendly_url']:$app; 35. if( !is_dir($this->Ini->path_aplicacao . "../" . $app) ) 36. { 37. unset($arr_apps[$k]); 38. } 39. } 40. } 41. $arr_apps = array_diff($arr_apps, $arr_apps_db); 42. //========= Groups ========= 43. $arr_grp = array(); 44. sc_select(rs, "SELECT group_id FROM sec_groups"); 45. while(!$rs->EOF) 46. { 47. $arr_grp[] = $rs->fields[0]; 48. $rs->MoveNext(); 49. } 50. $rs->Close(); 51. foreach($arr_apps as $k => $app) 52. { 53. require($this->Ini->path_aplicacao . "../_lib/_app_data/". $app . '_ini.php'); 54. $app_type = isset($arr_data['type'])? $arr_data['type'] : ''; 55. $app_desc = isset($arr_data['description']) ? $arr_data['description'] : ''; 56. $arr_app_desc[ $app ] = $app_desc; // >>>New<<< 57. $sql = "SELECT count(*) FROM sec_apps WHERE app_name = '". $app ."' "; 58. sc_lookup(rs, $sql); 59. if({rs[0][0]} == 0) 60. { 61. $sql = "INSERT INTO sec_apps(app_name, app_type, description) VALUES ('". $app ."', '".$app_type."', '".$app_desc."')"; 62. sc_exec_sql( $sql ); 63. foreach($arr_grp as $grp) 64. { 65. $sql = "INSERT INTO sec_groups_apps(app_name, group_id) VALUES ('". $app ."', '". $grp ."')"; 66. sc_exec_sql( $sql ); 67. } 68. } 69. } 3. Code for onValidateSuccess After applying the necessary changes in the onValidate event, access the onValidateSuccess event. This event includes only visual improvements, aimed at providing clearer feedback when using the synchronize applications option. Comment out the current code and add the code below. onValidateSuccess 1. $html = ' '; // >>> New <<< 2. $html .= '| '.{lang_sec_app_name}.' | '.{lang_sec_description}.' | | --- | --- | '; // >>> New <<< 3. if(is_array($arr_apps)) 4. { 5. $total_apps = count($arr_apps); 6. foreach($arr_apps as $app) 7. { 8. $html .= "|"; // >>> New <<< | | 9. $html .= " ". $app .' |'; // >>> New <<< 10. $html .= ' '. ( isset($arr_app_desc[ $app ]) ? $arr_app_desc[$app] : '') . " |"; // >>> New <<< 11. $html .= ""; // >>> New <<< 12. } 13. } 14. if(is_array($arr_apps_deleted)) // >>> New <<< 15. { 16. $total_apps_deleted = count($arr_apps_deleted); // >>> New <<< 17. foreach($arr_apps_deleted as $app) // >>> New <<< 18. { 19. $html .= "|"; // >>> New <<< | | 20. $html .= " ". $app .' |'; // >>> New <<< 21. $html .= ' '. ( isset($arr_app_desc[ $app ]) ? $arr_app_desc[$app] : '') . " ".{lang_sec_deleted}." |"; // >>> New <<< 22. $html .= ""; // >>> New <<< 23. } 24. } 25. $html .= ""; // >>> New <<< 26. {sync} = " ". $total_apps. " ". {lang_syncronized_apps} . ""; // >>> New <<< 27. {sync} .= " ". $total_apps_deleted. " ". {lang_sec_deleted_apps} . ""; // >>> New <<< 28. if($total_apps > 0 || $total_apps_deleted > 0){ // >>> New <<< 29. {sync} .= " " . $html; // >>> New <<< 30. } 4. Testing and Deployment After making the changes, compile the application source code and perform tests to ensure that the changes have been applied correctly. If everything works as expected in the tests, simply deploy the application so that the fix is applied to your production system. If you have any questions or issues with the update, please contact our support team through official channels.
Compatibility Adaptations for PHP 8.2
Starting with release 9.13.012, Scriptcase is now compatible with PHP 8.2, both in the development environment and in production. When upgrading the environment to PHP 8.2, custom code (events, methods, and internal or external libraries) may start emitting warnings/deprecations or even fail, depending on the use of deprecated features or features with changed behavior. Below are the most relevant PHP 8.2 changes. 1) Dynamic properties — Deprecated In PHP 8.2, creating properties that do not exist in the class directly on an object (for example, obj->new = 1;) now triggers a deprecation notice. This behavior is only allowed when the class itself explicitly allows dynamic properties or when the object is of type stdClass. Before (no warning): It was possible to create dynamic properties on objects without PHP emitting any warning. 1. class User {} $u = new User(); 2. $u->name = "Ana"; // dynamic property PHP 8.2 (triggers deprecation): This type of usage now triggers a deprecation notice. To avoid the warning, you can: 1. Declare the property directly in the class; Use the #[\AllowDynamicProperties] attribute (temporary workaround); Use WeakMap when you do not control the class. 2) “Relative callables” — Deprecated Some callable formats that worked with call_user_func(), but do not work correctly when executed as $callable(), have been marked as deprecated in PHP 8.2. This includes calls that depend on the class context, such as "self::method", "parent::method", "static::method" and ["self", "method"] Avoid using: 1. call_user_func("self::doStuff"); 2. call_user_func(["self", "doStuff"]); Use instead: The full class name: 1. call_user_func("MyClass::doStuff"); 2. call_user_func(["MyClass", "doStuff"]); Or a closure, when you need access to the current context: 1. call_user_func(fn() => $this->doStuff()); 3) Interpolation "${var}" and "${expr}" in strings — Deprecated In PHP 8.2, using interpolation in the format"${var}" and "${expr}" in strings has been marked as deprecated, because this style is less clear and can be ambiguous. Avoid: 1. echo "Hello ${name}"; 2. echo "Total: ${arr['total']}"; Use: 1. echo "Hello $name"; 2. echo "Hello {$name}"; 3. echo "Total: {${arr['total']}}"; // for expressions 4) utf8_encode() and utf8_decode() — Deprecated The utf8_encode() and utf8_decode() functions have been marked as deprecated in PHP 8.2, because they assume a fixed encoding, which can lead to incorrect results in different scenarios. Common replacements: 1. mb_convert_encoding($str, 'UTF-8', 'ISO-8859-1') // adjust the source encoding as needed 2. iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $str) // when applicable Quote These functions assume ISO-8859-1 as the default encoding, which can cause confusion and incorrect conversions; that is why they were deprecated. 5) “Case-insensitive” functions and uppercase/lowercase conversion — Behavior change In PHP 8.2, several functions that convert or compare text while ignoring case now use ASCII rules (the default “C” locale). This includes functions such as strtolower(), strtoupper(), ucwords() and str_ireplace(). With this change, these functions no longer follow language-specific rules, which can affect accented text or languages with special capitalization rules, such as Portuguese (pt-BR) and Turkish (tr-TR). To properly handle localized text or accented characters, use the MBString extension, for example: 1. mb_strtolower($texto, 'UTF-8'); 6) glob() with open_basedir — Return value change In PHP 8.2, the behavior of the glob() function changed when the open_basedir directive is enabled. 1. If all paths are blocked by open_basedir, glob() now returns an empty array ([]) — previously, it returned false. 2. If only some paths are blocked, a warning may be displayed. Code that may be affected: 1. $files = glob($pattern); 2. if ($files === false) { 3. // ... 4. } Recommended adjustment: Update the check to also handle the [] return value, ensuring the code properly covers both cases. Fix (handle false and []): 1. $files = glob($pattern); 2. if ($files === false || $files === []) { 3. // No files found OR access blocked by open_basedir 4. // handle it here (fallback, log, etc.) 5. } else { 6. foreach ($files as $file) { 7. // process the files 8. } 9. } Shorter alternative (when you do not need to distinguish false from []): 1. $files = glob($pattern); 2. if (empty($files)) { 3. // empty ([]) or false 4. } else { 5. foreach ($files as $file) { 6. // ... 7. } 8. } 7) Other behaviors that may cause “side effects” (less common) In PHP 8.2, some smaller changes may cause different results in code that relies on the exact returned value or on the order of data. str_split("") now returns [] This can affect validations that always expect at least one item in the array. 1. var_dump(str_split("")); 2. // PHP 8.2: array(0) { } 3. // Before: array(1) { [0]=> string(0) "" } var_export() and fully qualified class names The var_export() function now exports class names using the fully qualified name (including \), especially when the class is inside a namespace. This can cause differences in automated tests, snapshots, or string comparisons. 1. namespace App\Model; 2. class User {} 3. echo var_export(new User(), true); 4. // PHP 8.2: \App\Model\User::__set_state(array( 5. // ... 6. // )) ksort() / krsort() with SORT_REGULAR and numeric strings In some cases, the order of elements may change when the array keys are numeric strings. For example, "2" and "10", because they follow the current comparison rules. 1. $a = ["10" => "dez", "2" => "dois", "1" => "um"]; 2. ksort($a, SORT_REGULAR); 3. var_dump(array_keys($a)); 4. krsort($a, SORT_REGULAR); 5. var_dump(array_keys($a));
PHP 7.x to PHP 8.2 Migration Guide
Starting with release 9.13.012, Scriptcase is compatible with PHP 8.2, both in the development environment and in production. When migrating directly from PHP 7.x to PHP 8.2, custom code (events, methods, and internal or external libraries) may start generating warnings, deprecations, or even fail, due to behavior changes and the discontinuation of features introduced in newer PHP versions. This tutorial brings together the main points to watch for when migrating to PHP 8.2, with explanations and practical examples to help you adapt your code and reduce the impact during the update. 1) Nested ternary operators without explicit parentheses — Not allowed Conditional expressions using nested ternary operators without explicit parentheses are not allowed in PHP 8.2. This type of syntax can lead to ambiguities and is no longer accepted by the PHP interpreter. ❌ Not allowed example: 1. $result = $aa != "" ? $xxx : isset($bb) && $bb != "" ? $zzz : ""; ✅ Recommended approach: Rewrite the logic explicitly using conditional structures: 1. if ($aa != "") { 2. $result = $xxx; 3. } elseif (isset($bb) && $bb != "") { 4. $result = $zzz; 5. } else { 6. $result = ""; 7. } 2) Accessing array and string values using curly braces — Deprecated Accessing values from arrays and strings using the curly braces syntax {} is not allowed in PHP 8.2. This format is deprecated and may generate warnings or runtime errors. Always use square brackets [] to access indexes. ❌ Not allowed example: 1. $array = [1, 2]; 2. echo $array{1}; 3. $string = "foo"; 4. echo $string{0}; Quote This type of access generates messages such as: Deprecated: Array and string offset access syntax with curly braces is deprecated ✅ Correct approach: 1. $array = [1, 2]; 2. echo $array[1]; // outputs 2 3. $string = "foo"; 4. echo $string[0]; // outputs "f" 3) Required parameters after optional parameters — Deprecated Declaring functions or methods with required parameters after optional parameters is not allowed in PHP 8.2. This type of signature is considered incorrect and may generate warnings or deprecations at runtime. ❌ Not allowed example: 1. function foo($param_optional = null, $param_required) { 2. // ... 3. } Quote This type of declaration may generate messages such as: Deprecated: Required parameter $param_required follows optional parameter $param_optional ✅ Correct approach: Always declare required parameters first, followed by optional parameters: 1. function foo($param_required, $param_optional = null) { 2. // ... 3. } 4) Arithmetic operations with non-numeric strings — Not allowed Arithmetic operations involving non-numeric strings are not allowed in PHP 8.2. This type of operation may generate warnings or errors, because values that do not represent numbers are no longer implicitly treated as zero. ❌ Not allowed example: 1. $b = ""; 2. $a = $b + 2; Quote This type of operation may result in an error because $b does not contain a valid numeric value. ✅ Correct approach: Before performing the operation, make sure the value is numeric. Example 1 — direct validation: 1. $a = is_numeric($b) ? $b + 2 : 2; Example 2 — value normalization: 1. if (!is_numeric($b)) { 2. $b = 0; 3. } 4. $a = $b + 2; 5) Non-existent variables and indexes — Watch out for warnings Using undefined variables or non-existent array indexes may generate warnings in PHP 8.2. This happens when the code tries to access values that have not been defined yet. If warnings are enabled, these situations may result in frequent messages during runtime. ❌ Not recommended example: 1. $a = $b + 2; Or: 1. $a = $array['key'] + 2; Quote When $b or $array['key'] do not exist, a warning may be displayed. ✅ Correct approach: Before using a variable or an array index, check whether it exists. 1. $a = isset($b) ? $b + 2 : 2; Or, for arrays: 1. $a = isset($array['key']) ? $array['key'] + 2 : 2; 6) each() function — Removed The each() function returns the current key/value pair of an array and advances its internal pointer. This function is not available in PHP 8.2. If it is used in your applications, the code must be updated before deploying to an environment with PHP 8.2 or higher. Common replacement options: 1. foreach() 2. key() 3. current() 4. next() ❌ Not supported example: 1. $result = ""; 2. $tab = array( 3. 0 => array('tp' => 1, 'vl' => 'aaa'), 4. 1 => array('tp' => 2, 'vl' => 'bbb'), 5. 2 => array('tp' => 3, 'vl' => 'ccc') 6. ); 7. while (list($key, $val) = each($tab)) { 8. $result .= $tab[$key]["vl"]; 9. } ✅ Recommended approach (using foreach()): 1. $result = ""; 2. $tab = array( 3. 0 => array('tp' => 1, 'vl' => 'aaa'), 4. 1 => array('tp' => 2, 'vl' => 'bbb'), 5. 2 => array('tp' => 3, 'vl' => 'ccc') 6. ); 7. foreach ($tab as $key => $val) { 8. $result .= $tab[$key]["vl"]; 9. } 7) array\_key\_exists() function — Using it on objects is deprecated The array_key_exists() function checks whether a key or index exists in an array. In PHP 8.2, using this function to check object properties is deprecated. For this scenario, use isset() or property_exists(). ❌ Not recommended example: 1. if (array_key_exists('index', $array1)) { 2. // code 3. } ✅ Recommended approach: 1. if (isset($array1['index'])) { 2. // code 3. } 8) money\_format() function — Removed The money_format() function formats a number as a currency string. This function is not available in PHP 8.2. To format currency values, use the Intl extension through the NumberFormatter class. ❌ Not supported example: 1. echo money_format("%.2n", 1234.56); ✅ Recommended approach (using NumberFormatter): 1. $currencyObject = new NumberFormatter("pt-BR", NumberFormatter::CURRENCY); 2. echo $currencyObject->format(1234.56); 9) mb\_strrpos() function — Encoding parameter is deprecated The mb_strrpos() function finds the position of the last occurrence of a value in a string. In PHP 8.2, passing the encoding as the third parameter is deprecated. Instead, pass an offset as the third parameter and the encoding as the fourth. ❌ Not recommended example: 1. $string = 'O rato roeu a roupa'; 2. echo mb_strrpos($string, 'roeu', 'UTF-8'); ✅ Correct approach: 1. $string = 'O rato roeu a roupa'; 2. echo mb_strrpos($string, 'roeu', 0, 'UTF-8'); 10) Dynamic properties — Deprecated In PHP 8.2, creating properties that do not exist in the class directly on an object (for example, $obj->new = 1;) triggers a deprecation notice. This behavior is only allowed when the class explicitly permits dynamic properties or when the object is of type stdClass. Before (no warning): It was possible to create dynamic properties on objects without PHP emitting any warnings. 1. class User {} $u = new User(); 2. $u->name = "Ana"; // dynamic property PHP 8.2 (triggers deprecation): This type of usage now triggers a deprecation notice. To avoid it, you can: 1. Declare the property directly in the class; 2. Use the #[\AllowDynamicProperties] attribute (temporary workaround); 3. Use WeakMap when you do not have control over the class. 11) Relative callables — Deprecated Some callable formats that worked with call_user_func(), but do not work correctly when executed as $callable(), have been marked as deprecated in PHP 8.2. This includes calls that depend on class context, such as "self::method", "parent::method", "static::method" and ["self", "method"]. Avoid using: 1. call_user_func("self::doStuff"); 2. call_user_func(["self", "doStuff"]); Use instead: The fully qualified class name: 1. call_user_func("MyClass::doStuff"); 2. call_user_func(["MyClass", "doStuff"]); Or a closure, when you need access to the current context: 1. call_user_func(fn() => $this->doStuff()); 12) "${var}" and "${expr}" interpolation in strings — Deprecated In PHP 8.2, using string interpolation in the "${var}" and "${expr}" formats has been marked as deprecated, as this style is less clear and may cause ambiguity. Avoid: 1. echo "Hello ${name}"; 2. echo "Total: ${arr['total']}"; Use: 1. echo "Hello $name"; 2. echo "Hello {$name}"; 3. echo "Total: {${arr['total']}}"; // for expressions 13) utf8_encode() and utf8_decode() — Deprecated The utf8_encode() and utf8_decode() functions have been marked as deprecated in PHP 8.2, as they assume a fixed encoding, which may lead to incorrect results in different scenarios. Common replacements: 1. mb_convert_encoding($str, 'UTF-8', 'ISO-8859-1') // adjust the source encoding as needed 2. iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $str) // when applicable Quote These functions assume ISO-8859-1 as the default encoding, which may cause confusion and incorrect conversions; therefore, they were deprecated. 14) Case-insensitive functions and uppercase/lowercase conversion — Behavior change In PHP 8.2, several functions that convert or compare text in a case-insensitive way now follow ASCII rules (default “C” locale). This includes functions such as strtolower(), strtoupper(), ucwords(), and str_ireplace(). With this change, these functions no longer consider language-specific rules, which may affect accented characters or languages with special capitalization rules, such as Portuguese (pt-BR) and Turkish (tr-TR). To correctly handle localized text or accented characters, use the MBString extension, for example: 1. mb_strtolower($text, 'UTF-8'); 15) glob() with open_basedir — Return value change In PHP 8.2, the behavior of the glob() function changed when the open_basedir directive is enabled. 1. If all paths are blocked by open_basedir, glob() now returns an empty array ([]) — previously, it returned false. 2. If only some paths are blocked, a warning may be displayed. Code that may be affected: 1. $files = glob($pattern); 2. if ($files === false) { 3. // ... 4. } Recommended adjustment: Update the check to also consider the [] return value, ensuring the code properly handles both scenarios. Fix (handle false and []): 1. $files = glob($pattern); 2. if ($files === false || $files === []) { 3. // No files found OR access blocked by open_basedir 4. // handle it here (fallback, logging, etc.) 5. } else { 6. foreach ($files as $file) { 7. // process files 8. } 9. } Shorter alternative (when you do not need to differentiate false from []): 1. $files = glob($pattern); 2. if (empty($files)) { 3. // empty ([]) or false 4. } else { 5. foreach ($files as $file) { 6. // ... 7. } 8. } 16) Other behaviors that may cause “side effects” (less common) In PHP 8.2, some smaller changes may cause differences in results for code that depends exactly on return values or data ordering. str_split("") now returns [] This may affect validations that always expect at least one item in the array. 1. var_dump(str_split("")); 2. // PHP 8.2: array(0) { } 3. // Before: array(1) { [0]=> string(0) "" } var_export() and fully qualified class names The var_export() function now exports class names using the fully qualified name (including \), especially when the class is inside a namespace. This may cause differences in automated tests, snapshots, or string comparisons. 1. namespace App\Model; 2. class User {} 3. echo var_export(new User(), true); 4. // PHP 8.2: \App\Model\User::__set_state(array( 5. // ... 6. // )) ksort() / krsort() with SORT_REGULAR and numeric strings In some cases, the order of elements may change when the array keys are numeric strings. For example, "2" and "10", because they follow the current comparison rules. 1. $a = ["10" => "dez", "2" => "dois", "1" => "um"]; 2. ksort($a, SORT_REGULAR); 3. var_dump(array_keys($a)); 4. krsort($a, SORT_REGULAR); 5. var_dump(array_keys($a));
Installing PHP 8.1 - Linux
This documentation will teach all the steps necessary for the installation of the PHP 8.1, Apache 2.4 and the Scriptcase using the manual installation in the Linux environment. Doing this kind of installation you will be responsible for configuring all your environment settings and the database extensions as well. Listed below are the operational systems approved for the Scriptcase usage. Only these distributions below and their derivatives are approved for the Scriptcase installation. Check the list of the supported operating systems: - RedHat - Debian\Ubuntu - Suse\OpenSuse NOTE: In case you need to make a manual installation of the Scriptcase using PHP 7.3 in Linux, access the documentation in our knowledge base. Prerequisites WARNING: If you already have a Web Server with Apache and PHP 8.1 configured, just go to the SourceGuardian configuration and proceed to manual installation. To proceed with the installation, you will need to download some files. Necessaries Files: - SourceGuardian for Linux (x86 ou x64): Click Here - Scriptcase (.zip): Click Here NOTE: Before continue with the installation is recommended that you do not have any other web environment (as XAMP, Zend Server, etc) installed in your operational system. It is recommended to know Linux/Unix environment to use the terminal. Configuring the PHP - Ubuntu 22.04\Debian 10 Listed below are the necessaries commands for the manual installation of the PHP in the Ubuntu 22.04 or Debian 10. Check correctly the name of the packages in your terminal. 1 - Before run any other command, update your operating system with the following commands: sudo apt-get update sudo apt-get upgrade 2 - Run the command sudo apt-get install php8.1 to install the PHP 8.1. After that, accept the dependencies installation. If you are using any Ubuntu version before 19.10, it’s necessary to add a repository in your operating system to access the PHP 8.1 packages. See how you can do it below: sudo add-apt-repository ppa:ondrej/php sudo apt-get update If you are using any Debian version before Debian 10, it’s necessary to add a repository in your operating system to access the PHP 8.1 packages. See how you can do it below: sudo apt -y install lsb-release apt-transport-https ca-certificates sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php8.1.list sudo apt-get update | | | --- | | sudo apt-get install php8.1 | Example: Installing the PHP 3 - Check the PHP version running the command: php -v Example: PHP Version 4 - Now, install all the extensions below that are required by Scriptcase: Default Extensions: - sudo apt-get install php8.1-curl - sudo apt-get install php8.1-gd - sudo apt-get install php8.1-bcmath - sudo apt-get install php8.1-cgi - sudo apt-get install php8.1-ldap - sudo apt-get install php8.1-mbstring - sudo apt-get install php8.1-xml - sudo apt-get install php8.1-soap - sudo apt-get install php8.1-xsl - sudo apt-get install php8.1-zip Database Extensions: | Extension | Driver enabled in Scriptcase | | --- | --- | | sudo apt-get install php8.1-pgsql | PostgreSQL PDO, PostgreSQL 6.3 or below, PostgreSQL 6.4 or above, PostgreSQL 7 or above | | sudo apt-get install php8.1-mysql | MySQLi, MySQL PDO | | sudo apt-get install php8.1-sqlite3 | SQLite PDO | | sudo apt-get install php8.1-interbase | Firebird, Interbase 6, Interbase 6.5, Firebird PDO | | sudo apt-get install php8.1-odbc | DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, Oracle ODBC, Progress, DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC | | sudo apt-get install php8.1-sybase | DBLIB, Sybase PDO DBLIB | NOTE: Some database extensions will depend on third party drivers to be enabled. Click here to access the setup instructions for your database. 5 - Access the php.ini file in the directory /etc/php/8.1/apache2/ and set the recommended values for the PHP directives listed below required by the Scriptcase. Search for theses directives and set the values as the example: - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On 6 - By default, the PHP disable some functions that are required by the Scriptcase. Click here to access the list of these functions. - Change the line disable_functions as the example below: disable_functions = Example: Configuring the disable_functions 7 - Set up the PHP TimeZone according your region. Must use the values available in the PHP documentation. Search for the line date.timezone in your php.ini, uncomment and edit according with the TimeZone selected. Example: date.timezone = America/Recife 8 - Set up the folders that will store the temporary files. Search for the line ;session.save_path, uncomment and set the path to your temporary folder. Example: session.save_path = "/tmp" 9 - Save all the changes made and restart the Apache service using the following command: sudo service apache2 restart 10 - Check if the changes were made using the file info.php. You will need to create this file and place it in the /var/www/html/ path with the following content. php</code phpinfo(); ?> After that, check using your browser the page generated accessing the URL 127.0.0.1/info.php. Check PHP NOTE: For more information about the phpinfo(), check the PHP documentation. Enabling the SourceGuardian Before starting the Scriptcase installation, you need to enable the loader used for the Scriptcase encryption in your PHP. Follow the steps below showing how to dot it. 1 - Access the Downloads folder and extract the file downloaded referent to the SourceGuardian at the beggining of this documentation. Example: cd /home/User/Downloads sudo chmod 777 loaders.linux-x86_64.zip && unzip loaders.linux-x86_64.zip 2 - Copy the file ixed.8.1.lin and past in the extension_dir directory of your PHP. We will use the path /usr/lib/php/20210902 for this example. Example: | Ubuntu 22.04\Debian 10 | | --- | | /usr/lib/php/20180731 | sudo cp ixed.8.1.lin /usr/lib/php/20210902 3 - Edit the php.ini file and below the last line set the path to the extension in the zend_extension parameter: Example: zend_extension_ini | Ubuntu 22.04\Debian 10 | | --- | | /etc/php/8.1/apache2/ | sudo nano /etc/php/8.1/apache2/php.ini zend_extension = "/usr/lib/php/20210902/ixed.8.1.lin" 4 - Restart the Apache service using the following command: | Ubuntu 22.04\Debian 10 | | | --- | --- | | sudo service apache2 restart | sudo systemctl restart httpd | Typical Installation Check the steps below to complete the manual installation of Scriptcase in a typical way. NOTE: By selecting this installation, Scriptcase will set your environment by default. Defining the installation database and the login user in Scriptcase. Installation Type Selection Screen After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps. Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here. Customized Installation Check the steps below to complete the manual installation of Scriptcase in a custom manner. NOTE: By selecting this installation, you will be responsible for setting up your environment. Defining the installation database and the login user for Scriptcase. Screen of choice of installation type 1- Verify that the directories required by Scriptcase have the correct permissions. If any directory listed does not have the active check icon Active_icon, correct permission for this directory. System Directories Display Screen Click proceed to proceed with the installation process . 2- Choose the database where the Scriptcase database will be installed. By default, Scriptcase recommends that it be installed with the SQLite database. Installation Database Choice Screen - You can change the default database by clicking the Change Database button. By clicking this option you will need to set the following options: Default database change DBMS In this option, you will select the Driver to connect to your database. Server In this option, you will inform the server to connect to the desired database. User You need to inform a user who has access to the database you want Scriptcase to be installed on. Password You must enter the authentication password corresponding to the entered user. Database You must enter the name of the database where Scriptcase will be installed. Example: scriptcase Clique em prosseguir para avançar no processo de instalação. 3 - Verifique se a criação das tabelas da base de dados do Scriptcase ocorreu com sucesso. As tabelas serão marcadas com o ícone de sucesso ativo_icon na lateral. Tela de exibição das tabelas do sistema Click proceed to proceed with the installation process. _4 -__ Set the default user who will have access to Scriptcase. User setup screen Login In this option, you will enter the default Scriptcase User Login. Password In this option, you must enter the password that will correspond to the user informed. Confirmation You must repeat the previously entered password for successful user creation. Click proceed to proceed with the installation process. 5 - Complete Scriptcase custom installation on your web server. Finish screen of installation After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps.
Instalando
Esta documentação irá informar os passos necessários para a instalação do PHP 8.1 e Scriptcase de forma manual em ambientes MacOS. Realizando este tipo de instalação, você é responsável por configurar todo o seu ambiente, bem como as extensões de bancos de dados. Abaixo estão listadas as versões do MacOS homologadas para uso do Scriptcase. Confira a lista de versões suportadas: Tabela de Compatibilidade O Scriptcase é compatível com as seguintes versões do macOS. | Versão | Codinome | | --- | --- | | macOS 15.0 | “Sequoia” | | macOS 14.2 | “Sonoma” | | macOS 13.0 | “Ventura” | | macOS 12.0 | “Monterey” | | macOS 11.0 | “Big Sur” | | macOS 10.15 | “Catalina” | | macOS v10.14 | “Mojave” | | macOS v10.13 | “High Sierra” | | macOS v10.12 | “Sierra” | | OS X v10.11 | “El Capitan” | Veja como instalar o Scriptcase com o PHP 7.0 ou 7.3 no MacOS. - Instalando o Scriptcase com PHP 7.0 no MacOS - Instalando o Scriptcase com PHP 7.3 no MacOS Pré-requisitos Se você já possui um Servidor Web com Apache e PHP 8.1 configurados, basta seguir para a configuração do SourceGardian Loader e prosseguir para a instalação manual do Scriptcase. Para proceder com a instalação, você precisa realizar o download de alguns arquivos. - SourceGuardian Loader para MacOS - macOS: Clique Aqui - Scriptcase (.zip): Clique Aqui Configure o PHP Abaixo serão listados os comandos necessários para a instalação manual do PHP 8.1 no MacOS. Verifique corretamente a nomenclatura dos pacotes em seu MacOS terminal. 1 - Você precisa ter o Homebrew instalado para ter acesso ao PHP 8.1 e seus pacotes. Realize a instalação do Brew com o seguinte comando no MacOS terminal: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 2 - No terminal macOS execute o comando brew update para atualizar o componente Brew. 3 - Utilize o comando brew install shivammathur/php/php@8.1 para instalar o PHP 8.1. 4 - Após o processo de instalação ser concluído, execute o comando brew info php@8.1 e siga as instruções mostradas para para prosseguir na configuração do ambiente. Brew info do PHP 8.1 5 - Você precisa configurar o Apache para que o PHP 8.1 que foi instalado no passo anterior seja utilizado como padrão em seu sistema. Para usarmos o PHP no Apache nativo do MacOS, vamos precisar criar um certificado que autorize seu uso. Até o Monterey esse processo era opcional, mas agora é necessário ter o PHP Code Signed. Siga esse post para fazer a assinatura de código (em inglês) 5.1 - Edite o arquivo httpd.conf do Apache, encontre o bloco de linhas “Loadmodule” e adicione a linha de acordo com o seu equipamento: Exemplo: sudo nano /etc/apache2/httpd.conf Chip Intel LoadModule php_module /usr/local/opt/php@8.1/lib/httpd/modules/libphp.so Chip da Apple LoadModule php_module/opt/homebrew/opt/php@8.1/lib/httpd/modules/libphp.so No final do arquivo adicione: SetHandler application/x-httpd-php 6 - Adicione o caminho até o módulo do PHP 8.1 instalado após a última linha LoadModule no httpd.conf. Exemplo: LoadModule php_module /usr/local/opt/php@8.1/lib/httpd/modules/libphp.so Configuração do módulo do PHP` Após realizar esta ação, salve o arquivo e reinicie o serviço de apache. sudo apachectl restart 7 - Adicione o caminho para a instalação do PHP 8.1 no arquivo ~/.zshrccom os seguintes comandos: sudo nano ~/.zshrc echo 'export PATH="/opt/homebrew/opt/php@8.1/bin:$PATH"' >> ~/.zshrc echo 'exportPATH="/opt/homebrew/opt/php@8.1/sbin:$PATH"' >> ~/.zshrc 8 - Edite o arquivo ~/.bash_profile e adicione o caminho para a instalação do PHP 8.1 com o seguinte comando: echo 'export PATH="/opt/homebrew/opt/php@8.1/bin:$PATH"' 9 - Verifique a versão do PHP executando o comando: php -v Exemplo: Versão do PHP 10 - Acesse o arquivo php.ini no diretório /opt/homebrew/etc/php/8.1/ e defina corretamente o valor mínimo recomendado destas diretivas do PHP listadas abaixo para que o Scriptcase funcione corretamente. Procure pelas diretivas e atribua o valor de acordo com este exemplo: - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On 11 - Por padrão, o PHP desabilita algumas funções que são importantes para o Scriptcase. Clique aqui para ter acesso a lista de funções necessárias para o funcionamento do Scriptcase. - Altere a linha do item disable_functions conforme exemplo abaixo: disable_functions = Exemplo: Configuração do disable_functions do PHP 12 - Configure o TimeZone do PHP de acordo com sua região. Deve-se utilizar o valor disponível na documentação do PHP. Procure pela linha date.timezone no seu php.ini, descomente-a e edite de acordo com o TimeZone selecionado. Exemplo: date.timezone = America/Recife 13 - Configure a pasta em que serão armazenados os arquivos temporários. Procure pela linha ;session.save_path, descomente-a e informe o caminho até a sua pasta temporária. Exemplo: session.save_path = "/tmp" 14 - Salve todas as modificações realizadas e reinicie o serviço do Apache utilizando o seguinte comando no terminal: sudo apachectl restart 15 - Verfique as alterações realizadas através do arquivo info.php. Você precisa criar este arquivo e colocar no diretório /Library/WebServer/Documents/com o seguinte conteúdo: php<br/phpinfo(); ?> Após isto, verifique no seu navegador a página gerada acessando a URL 127.0.0.1/info.php. Verificar PHP Para mais informações sobre a função phpinfo(), verifique a documentação do PHP. Habilite o SourceGuardian Loader Antes de dar início a instalação do Scriptcase, você precisa habilitar o loader responsável pela criptografia do Scriptcase no PHP. Siga os passos abaixo para realizar esta ação com sucesso. 1 - Acesse a pasta de Downloads e realize a extração do arquivo baixado referente ao SourceGuardian Loader no início desta documentação. Caso ainda não tenha feito o download do SourceGuardian Loader clique aqui e baixe o arquivo de acordo com a arquitetura utilizada. Exemplo: cd /Users/usuario/Downloads sudo chmod 777 loaders.macosx-arm64.zip && unzip loaders.macosx-arm64.zip cd loaders.macosx-arm64 2 - Copie o arquivo ixed.8.1.dar e cole no diretório referente ao extension_dir do seu PHP. Usaremos o /opt/homebrew/lib/php/pecl/20210902 para este exemplo. Exemplo: sudo cp ixed.8.1.dar /opt/homebrew/lib/php/pecl/20210902 3 - Edite o arquivo php.ini e abaixo da última linha informe o caminho para a extensão dentro do parâmetro zend_extension: Exemplo: sudo bash -c 'echo "zend_extension=/opt/homebrew/lib/php/pecl/20210902/ixed.8.1.dar" > /opt/homebrew/etc/php/8.1/conf.d/sourceguardian.ini' 4 - Reinicie o serviço do Apache utilizando o seguinte comando no terminal: sudo apachectl restart Instalação manual do Scriptcase Abaixo estão listados os passos necessários para se realizar uma instalação manual do Scriptcase. Para realizar os passos descritos, é necessário que você tenha um servidor web configurado em sua máquina. 1 - Realize o download do Scriptcase (.zip) diretamente da página de downloads do Scriptcase. 2 - Extraia o arquivo .zip e renomeie a pasta extraída para scriptcase. 3 - Mova a pasta scriptcase para a raiz do seu servidor web. Dependendo do seu sistema operacional e instalação, este caminho pode variar de acordo com a sua configuração. Mas, por padrão temos os seguintes diretórios: | Windows | Servidor | | --- | --- | | C:\Apache24\htdocs\ | Apache | | C:\inetpub\wwwroot\ | IIS | | Linux | Servidor | | --- | --- | | /var/www/html/ | Linux Local | | /home/$(whoami)/public_html/ | Linux em Hospedagem | | macOS | Servidor | | --- | --- | | /Library/WebServer/Documents | Apache | 4 - Acesse o Scriptcase em seu navegador seguindo o exemplo abaixo: 127.0.0.1/scriptcase - Por padrão o idioma selecionado para a instalação é o Português. Tela inicial da instalação 5 - Verifique as extensões necessárias para o funcionamento do Scriptcase e módulos de conexão ao banco de dados que estão habilitados. Tela com a lista de extensões ativas Instalação Típica Verifique os passos abaixo para concluir a instalação manual do Scriptcase de forma típica. NOTA: Selecionando esta instalação, o Scriptcase irá configurar o seu ambiente de forma padrão. Definindo o banco de dados de instalação e o usuário de login no Scriptcase. Tela de escolha do tipo de instalação Após clicar em prosseguir, você será redirecionado para a página de Login do Scriptcase. Tela de acesso ao Scriptcase Usuário Neste campo é necessário informar o usuário para realizar o login no Scriptcase. Por padrão, o usuário é admin. Senha Neste campo é necessário informar a senha para realizar o login no Scriptcase. Por padrão, a senha é admin. Mantenha-me conectado Esta opção mantém o usuário logado até que o mesmo se deslogue pela interface do Scriptcase. Esqueceu sua senha? Ao clicar nesta opção, é possível recuperar a senha do usuário informado. Será enviado um email para o usuário em questão para que ele possa ter acesso aos passos de recuperação. IMPORTANTE: Só será possível realizar a recuperação de senha caso você tenha configurado suas informações de SMTP. Para acessar nossa documentação que mostra como realizar esta configuração clique aqui. Instalação Customizada Verifique os passos abaixo para concluir a instalação manual do Scriptcase de forma customizada. NOTA: Selecionando esta instalação, você será responsável por configurar o seu ambiente. Definindo o banco de dados de instalação e o usuário para login no Scriptcase. Tela de escolha do tipo de instalação 1 - Verifique se os diretórios requeridos pelo Scriptcase estão com as permissões corretas. Caso algum diretório listado não possuir o ícone de verificação ativo ativo_icon, corrija a permissão deste diretório. Tela de exibição dos diretórios do sistema Clique em prosseguir para avançar no processo de instalação. 2 - Escolha o banco de dados em que será instalada a base de dados do Scriptcase. Por padrão, o Scriptcase recomenda que seja instalado com o banco de dados SQLite. Tela de escolha do banco de dados da instalação - Você pode alterar o banco padrão clicando no botão Alterar Banco de Dados. Ao clicar nesta opção, você precisará definir as seguintes opções: Alteração do banco de dados padrão SGBD Nesta opção você selecionará o Driver de conexão ao seu banco de dados. Servidor Nesta opção você informará o servidor para conexão com o banco de dados desejado. Usuário Você precisa informar um usuário que tenha acesso ao banco de dados que você quer que o Scriptcase seja instalado. Senha Você deve informar a senha de autenticação correspondente ao usuário informado. Banco Você precisa informar o nome do banco de dados em que o Scriptcase será instalado. Exemplo: scriptcase Clique em prosseguir para avançar no processo de instalação. 3 - Verifique se a criação das tabelas da base de dados do Scriptcase ocorreu com sucesso. As tabelas serão marcadas com o ícone de sucesso ativo_icon na lateral. Tela de exibição das tabelas do sistema Clique em prosseguir para avançar no processo de instalação. 4 - Configure o usuário padrão que irá ter acesso ao Scriptcase. Tela de configuração do usuário Login Nesta opção você informará o Login do usuário padrão do Scriptcase. Senha Nesta opção você deve informar a senha que será correspondente ao usuário informado. Confirmação Você precisa repetir a senha informada anteriormente para que a criação do usuário seja realizada com sucesso. Clique em prosseguir para concluir o processo de instalação. 5 - Finalize a instalação customizada do Scriptcase em seu servidor web. Tela de finlização da instalação Após clicar em prosseguir, você será redirecionado para a página de Login do Scriptcase. Tela de acesso ao Scriptcase Usuário Neste campo é necessário informar o usuário para realizar o login no Scriptcase. Por padrão, o usuário é admin. Senha Neste campo é necessário informar a senha para realizar o login no Scriptcase. Por padrão, a senha é admin. Mantenha-me conectado Esta opção mantém o usuário logado até que o mesmo se deslogue pela interface do Scriptcase. Esqueceu sua senha? Ao clicar nesta opção, é possível recuperar a senha do usuário informado. Será enviado um email para o usuário em questão para que ele possa ter acesso aos passos de recuperação.
Installing PHP 8.1 - MacOS
This documentation will cover how installing PHP 8.1 and ScriptCase manually on macOS. Performing this type of installation is your responsible for configuring your entire environment as well as database extensions. Listed below are versions of macOS approved for use by Scriptcase. Compatibility Table Scriptcase Automatic Installer is compatible with the following macOS versions | Version | Codename | | ------------ | ------------- | | macOS 15.0 | “Sequoia” | | macOS 14.2 | “Sonoma” | | macOS 13.0 | “Ventura” | | macOS 12.0 | “Monterey” | | macOS 11.0 | “Big Sur” | | macOS 10.15 | “Catalina” | | macOS v10.14 | “Mojave” | | macOS v10.13 | “High Sierra” | | macOS v10.12 | “Sierra” | | OS X v10.11 | “El Capitan” | You can install the Scriptcase with PHP 7.3 or PHP 7.0: See how to install with PHP 7.3 See how to install with PHP 7.0 Requirements If you already have a Web Server with Apache and PHP 8.1 configured, just go to the SourceGuardia configuration and proceed to manual installation. To proceed with the installation, you need to download some files. Required Files: - SourceGuardian Loader 13.0.3 for macOS - macOS: Click here - Scriptcase (.zip): Click here Before proceeding with the installation it is recommended not to have any other web environments (such as XAMP, Zend Server, etc.) installed on the operating system. Knowledge of Unix environment is recommended to use terminal. PHP configuration Listed below are the commands required for the manual installation of PHP 8.1 on macOS. Check the package naming on your macOS terminal correctly. 1 - You’ll need to install Homebrew to be able to access PHP 8.1 and other packages. Install Brew with the following commands in the macOS terminal: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 2 - In the macOS terminal, execute brew update to update Brew. 3 - Use the command brew install shivammathur/php/php@8.1 for installing PHP 8.1. 4 - After the installation proccess completes, execute brew info php@8.1 to get the information that we need to proceed with environment setting up. 5 - You need to configure Apache so that PHP 8.1 that was installed in the previous steps will be used as default on your system. To use PHP on MacOS native Apache, we will need to create a certificate that authorizes its use. Until Monterey this process was optional, but now PHP Code Signed is required. Follow this post to do the code signing 5.1 - Edit the Apache file httpd.conf, find the “Loadmodule” line block and add the line according to your equipment: Exemple: sudo nano /etc/apache2/httpd.conf Chip Intel LoadModule php_module /usr/local/opt/php@8.1/lib/httpd/modules/libphp.so Chip da Apple LoadModule php_module/opt/homebrew/opt/php@8.1/lib/httpd/modules/libphp.so At the end of the file add: SetHandler application/x-httpd-php 6 - Add path to PHP 8.1 module installed after last line LoadModule in httpd.conf. Exemple: LoadModule php_module /usr/local/opt/php@8.1/lib/httpd/modules/libphp.so PHP module configuration` After performing this action, save the file and restart the apache service. sudo apachectl restart 7 - Add the path to the installation of PHP 8.1 in the ~ /.zshrc file with the following commands: echo 'export PATH="/opt/homebrew/opt/php@8.1/bin:$PATH"' >> ~/.zshrc echo 'exportPATH="/opt/homebrew/opt/php@8.1/sbin:$PATH"' >> ~/.zshrc 8 - Edit the file ~/.bash_profile and add PHP 8.1 path with these following commands: echo 'export PATH="/opt/homebrew/opt/php@8.1/bin:$PATH"' 9 - Verify PHP version by running command: php -v Exemple: PHP version 10 - Access the php.ini file in the directory. /opt/homebrew/etc/php/8.1/ and set the recommended minimum value correctly of these PHP directives listed below for Scriptcase work properly. Search for the directives and assign the value according to this example: - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On 11 - By default, PHP disables some functions that are important to Scriptcase. Click here to access the necessary functions list for ScriptCase - Change item line disable_functions as example below: disable_functions = Exemple: PHP disable_functions setting 12 - Set PHP TimeZone according to your region. Use the value available in the PHP documentation. Searh for date.timezone in your php.ini file, uncomment it and edit according to the selected TimeZone. Exemple: date.timezone = America/Recife 13 - Set the folder where temporary files will be stored. search for ;session.save_path, uncoment it and inform your temporary folder path. Exemple: session.save_path = "/tmp" 14 - Save all modifications made and restart the Apache service using the following command in terminal: sudo apachectl restart 15 - Verify changes made through the file info.php. You need to create this file and put it in the directory. /Library/WebServer/Documents/with the following content: php<br/phpinfo(); ?> After that, check in your browser the page generated by accessing the URL 127.0.0.1/info.php. Check PHP NOTE: For more information about the function phpinfo(), verify our PHP documentation. Enable SourceGuardian Loader Before you start installing Scriptcase, you need to enable the loader responsible for encrypting Scriptcase in PHP. Follow the steps below to perform this action successfully. 1 - Access the Downloads folder and extract the downloaded file referring to SourceGuardian Loader at the beginning of this documentation. If you have not yet downloaded the SourceGuardian Loader click here and download the file according to the architecture used. Exemple: cd /Users/usuario/Downloads sudo chmod 777 loaders.macosx-arm64.zip && unzip loaders.macosx-arm64.zip cd loaders.macosx-arm64 2 - Copy the file ixed.8.1.dar and paste it into your PHP extension_dir directory. We’ll use /opt/homebrew/lib/php/pecl/20210902 for this example. Exemple: sudo cp ixed.8.1.dar /opt/homebrew/lib/php/pecl/20210902 3 - Edit the php.ini file and below the last line enter the path to the extension within the parameter zend_extension: Exemple: sudo bash -c 'echo "zend_extension=/opt/homebrew/lib/php/pecl/20210902/ixed.8.1.dar" > /opt/homebrew/etc/php/8.1/conf.d/sourceguardian.ini' 4 - Restart the Apache service with the following terminal command: sudo apachectl restart Manual ScriptCase installation Listed below are the steps needed to do a Scriptcase manual installation. To do the steps, it is needed that you have a web server configured in your machine. 1 - Download the Scriptcase (.zip) directly from the download page from our website. 2 - Extract the .zip file and rename the extracted folder to scriptcase. 3 - Move the scriptcase to your server root. Depending of your operating system and the installation the path can be different from the example. However, by default the paths are: | Windows | Server | | --------------------- | ------ | | C:\Apache24\htdocs\ | Apache | | C:\inetpub\wwwroot\ | IIS | | Linux | Server | | ------------------------------ | ------------ | | /var/www/html/ | Linux Local | | /home/$(whoami)/public_html/ | Linux Server | | macOS | Server | | ------------------------------ | ------ | | /Library/WebServer/Documents | Apache | 4 - Access the Scriptcase using your browser: 127.0.0.1/scriptcase - By default the selected language is English. Setup Screen 5 - Check the extensions required for Scriptcase to function and database connection modules that are enabled. Screen with list of active extensions Typical installation Check the steps below to complete the manual installation of Scriptcase in a typical way. NOTE: By selecting this installation, Scriptcase will set your environment by default. Defining the installation database and the login user in Scriptcase. Installation Type Selection Screen After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps. Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here. Custom installation Check the steps below to complete the manual installation of Scriptcase in a custom manner. NOTE: By selecting this installation, you will be responsible for setting up your environment. Defining the installation database and the login user for Scriptcase. Installation type selection screen 1- Verify that the directories required by Scriptcase have the correct permissions. If any directory listed does not have the active check icon Active_icon, correct permission for this directory. System Directories Display Screen Clique em prosseguir para avançar no processo de instalação. 2- Choose the database where the Scriptcase database will be installed. By default, Scriptcase recommends that it be installed with the SQLite database. Installation Database Choice Screen - You can change the default database by clicking the Change Database button. By clicking this option you will need to set the following options: Default database change DBMS In this option, you will select the Driver to connect to your database. Server In this option, you will inform the server to connect to the desired database. User You need to inform a user who has access to the database you want Scriptcase to be installed on. Password You must enter the authentication password corresponding to the entered user. Database You must enter the name of the database where Scriptcase will be installed. Example: scriptcase Clique em prosseguir para avançar no processo de instalação. 3 - Verifique se a criação das tabelas da base de dados do Scriptcase ocorreu com sucesso. As tabelas serão marcadas com o ícone de sucesso ativo_icon na lateral. Tela de exibição das tabelas do sistema Click proceed to proceed with the installation process. 4 -_ Set the default user who will have access to Scriptcase. User setup screen Login In this option, you will enter the default Scriptcase User Login. Password In this option, you must enter the password that will correspond to the user informed. Confirmation You must repeat the previously entered password for successful user creation. Click proceed to proceed with the installation process. 5 - Complete Scriptcase custom installation on your web server. Finish screen of installation After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps.
Generating the reCAPTCHA keys
1. Access the Google Cloud Console Access the Google Cloud Console at the address below: https://console.cloud.google.com/ Quote If prompted, log in with your Google account. 2. Select (or create) a project. At the top of the console, click the project selector and choose the correct project. Quote If you need to create a project, do it through the project selector. 3. Enable the reCAPTCHA Enterprise API in the project Use the link below to open the API activation page: https://console.cloud.google.com/apis/library/recaptchaenterprise.googleapis.com You can also access the API activation page by searching for: reCAPTCHA Enterprise API 4. Generate reCAPTCHA keys On the Google Cloud reCAPTCHA page: https://console.cloud.google.com/security/recaptcha Within the correct project, on the reCAPTCHA page, click Create Key (or Configure reCAPTCHA protection). 5. Fill in the required information 1. Display Name: Descriptive name used to identify the key in the key list 2. Application type: Select WEB for Scriptcase applications. 3. Domain list: Click Add Domain and inform the domains where this API will be used. Examples: 4. mysite.com 5. localhost Click Next step to define the reCAPTCHA behavior. Info After these settings, reCAPTCHA will already be ready to use in the application, working by default in score-based mode, equivalent to reCAPTCHA v3, where validation occurs automatically without requiring user interaction. Click Create Key to finish creating the key. 6. Other Settings (Optional) This configuration step is optional and defines whether or not to use challenges such as the checkbox "I'm not a robot" or image challenges. Enable the option Will you use challenges? and define the challenge difficulty level. Click Create Key to finish. 7. Getting the Site Key After finishing the reCAPTCHA configuration, the key will be displayed at the top of the page. 8. Getting the Secret Key To obtain the Secret Key click on Integrate with an external plugin service. A screen with the key will be displayed. Configuration in Scriptcase The keys obtained in steps 7. Getting the Site Key and 8. Getting the Secret Key must be used to configure Recaptcha -V2 or Recaptcha -V3. The type used will depend on how it was configured in step 6. Other Settings (Optional). 1. If the challenge is enabled – Select Recaptcha -V2 2. If the challenge is disabled – Use Recaptcha -V3 Applications with reCAPTCHA available 1. Form 2. Calendar 3. Control In the applications 1. Site Key – Enter the ID (7. Getting the Site Key) 2. Secret Key – Enter the secret key (8. Getting the Secret Key) Recaptcha in the Security Module When creating the security module it is possible to configure Recaptcha (V2 and V3). To configure it in the security module enter: 1. Secret Key – Enter the secret key (8. Getting the Secret Key) 2. Site Key – Enter the ID (7. Getting the Site Key)
Updating the cacert.pem File in the Scriptcase Environment
n Scriptcase v10, the cacert.pem file has been updated in the PHP environment used by the tool. This update fixes HTTPS communication issues required for AI features to work in Windows environments. Notes For new installations performed with the v10 installer, no additional action is required, as the updated file is already included automatically in the environment. When is this procedure required? 1. When installing Scriptcase v10 in an environment where a previous Scriptcase installation already exists. 2. When performing a manual installation using PHP and Apache, where Scriptcase v10 will be executed. Step-by-step file update 1. Download the updated cacert.pem file, available as an attachment at the end of the article. 2. Access the file directory in the environment where Scriptcase v9 is installed. By default, in Windows installations performed with our installer, the cacert.pem file should be located at: C:\Program Files\NetMake\v9\components\php\extras 3. Copy the downloaded file to the directory: C:\Program Files\NetMake\v9\components\php\extras 4. Confirm the file replacement. 5. Restart the Apache service of the environment used by Scriptcase. Open the services screen and locate Apache for your environment. 6. Select the service and click Restart.
Installing Scriptcase with PHP 8.1 no Windows
This documentation will walk you through the steps necessary to install PHP 8.1, Apache 2.4, and Scriptcase manually. When performing this type of installation, you are responsible for configuring your entire environment as well as database extensions. You can install the Scriptcase with PHP 7.3 or PHP 7.0: See how to install with PHP 7.3 See how to install with PHP 7.0 Listed below are all the supported operating systems as well as the libraries that are required to function on a particular system. Compatibility Table Scriptcase Automatic Installer is compatible with the following Windows versions | Windows | Windows Server | | --- | --- | | Windows 11 | Windows Server 2022 | | Windows 10 | Windows Server 2019 | | Windows 8.1 | Windows Server 2016 | | Windows 8 | Windows Server 2012 R2 | | Windows Vista SP2 | Windows Server 2012 | | Windows 7 SP1 | Windows server 2008 R2 SP1 | | | Windows server 2008 SP2 | For Windows 7 SP1, you must verify if the system has the following items installed: Visual C++ Redistributable Packages for Visual Studio (2008, 2010, 2012, 2013, 2015) x86 and x64. Prerequisites If you already have a Web Server with Apache and PHP 8.1 configured, just go to How to Enable SourceGuardia Loader and proceed to manual installation. To proceed with the installation, you need to download some files. Check below for the files you will need: - PHP 8.1 NTS (x86 or x64): Click Here - Apache 2.4 (x86 or x64): Click Here - mod_Fcgi (x86 or x64): Click Here - SourceGuardian Loader 13.0.3 for Windows (x86 or x64): Click Here - Scriptcase (.zip): Click Here NOTE: Before proceeding with the installation, it is recommended not to have any other web environments installed (such as WampServer, XAMPP, Zend Server, etc.) on your operating system. Below are the actions required after downloading the items specified above:: 1 - Unzip the PHP and Apache files in separate folders on your operating system’s C: drive. 2 - Rename the PHP folder to php. The result should be like this: Apache and PHP directories 3 - Unzip the mod_Fcgi file, copy the mod_fcgid.so file to the C:\Apache24\modules folder. Mod_fcgi in directory Configure the Apache environment Listed below are the steps required to configure apache manually. Follow the steps correctly to avoid problems installing and starting the service. NOTE: Since PHP and Apache folders are at the same directory level (C:) You do not need to enter the root folder in directives that require you to enter isolated paths or points to a specific file. 1 - Edit the httpd.conf file located in the C:\Apache24\conf\ folder using a text editor in Administrator mode, so that any changes you make are saved. httpd.conf File 2 - Add the content below after the #LoadModule xml2enc_module modules/mod_xml2enc.so line: LoadModule fcgid_module modules/mod_fcgid.so FcgidInitialEnv PHPRC "/php" FcgidInitialEnv PHP_FCGI_MAX_REQUESTS "100000" FcgidIOTimeout 1800 FcgidBusyTimeout 1800 FcgidConnectTimeout 1800 FcgidMaxRequestLen 1073741824 FcgidMaxRequestsPerProcess 10000 FcgidOutputBufferSize 4000 FcgidProcessLifeTime 3600 Timeout 1024 KeepAlive On KeepAliveTimeout 50 MaxKeepAliveRequests 500 AddHandler fcgid-script .php FcgidWrapper "/php/php-cgi.exe" .php Example: httpd php fcgi configuration WARNING: This setting will only work if you have copied the mod_fcgid.so file to the C:\Apache24\modules folder as previously instructed. 3 - Search for #ServerName www.example.com:80 and change this line to ServerName localhost:80. In this tutorial apache is configured with port 80. To define another port it is necessary to change the value informed in ServerName, for example (localhost:8092). Also, you will need to change the Listen, for example (Listen 8092). Before changing you must make sure that the port is not being used by another service 4 - Change the contents of the DirectoryIndex directive by adding the following contents to the directive line:: index.php index.phtml. Example: DirectoryIndex index.html index.php index.phtml Configuration of index files to be accepted 5 - Set the ${SRVROOT} variable with your Apache folder path: Search for the Define SRVROOT and edit it as follows: Define SRVROOT "/Apache24" 6 - Add the Options ExecCGI command below the Require all granted line in the directive. # Require all granted Options ExecCGI Example: httpd fcgi configuration 7 - Search for the directive and add the content below above this directive: "/php"> # AllowOverride None Options None Require all granted # Example: httpd configuration PHP directory After performing all these procedures, save the httpd.conf file to proceed with Apache installation and startup and PHP configuration. Install and start Apache Now that you have set up your apache service, all you have to do is install and start it. Below are the steps that must be followed to successfully complete this process. 1 - Run the Command Prompt (CMD) with Administrator privileges: Accessing CMD 2 - Go to the Apache bin folder to install the httpd.exe executable file: cd C:\Apache24\bin\httpd.exe 3 - Install Apache with the command below: httpd.exe -k install Wait for the message “The ‘Apache2.4’ service is successfully installed.” to proceed. 4 - Start the Apache service and verify if it is working. Use the httpd.exe -k start to start your Apache service. Starting Apache 5 - Grant execution permission to Apache on your Firewall: Select the two options available to grant permission, so Apache can function properly. Apache 2.4 Installation 6 - Check if Apache is active. To verify that the service is active, simply visit the Apache test page in your browser. You can do it in two ways: 127.0.0.1 or localhost Apache active Configure the PHP 8.1 With Apache active and functional, you now need to define and configure the PHP.ini file so those database extensions and libraries are available for use by Scriptcase. 1 - Access the PHP folder in C:\ and rename the php.ini-development file to php.ini. Php.ini 2 - Access the php.ini file with a text editor using Administrative privileges and search for the ;extension_dir = "ext" directive. Assign value “C:\php\ext” to this directive and remove ;. Example: extension_dir = "C:\php\ext" PHP Extension 3 - Enable the extensions listed below, by uncommenting them (Remove the semicolon ; at beginning of line). Default Extensions - extension=bz2 - extension=curl - extension=gd2 - extension=gettext - extension=imap - extension=ldap - extension=fileinfo - extension=mbstring - extension=openssl - extension=exif - extension=xsl - extension=soap Database Extensions: | Extensions | Driver enabled in Scriptcase | | --- | --- | | extension=mysqli | MySQLi | | extension=odbc | DB2 ODBC GENERIC, DB2 ODBC GENERIC 6, Generic ODBC, MS Access ODBC, MS SQL Server ODBC, Oracle ODBC, Progress | | extension=pdo_mysql | MySQL PDO | | extension=pdo_odbc | DB2 PDO ODBC, Progress PDO ODBC, Sybase PDO ODBC | | extension=pdo_pgsql | PostgreSQL PDO | | extension=pdo_sqlite | SQLite PDO | | extension=pgsql | PostgreSQL 6.3 or below, PostgreSQL 6.4 or above, PostgreSQL 7 ou Acima | NOTE: Some database extensions will depend on third party drivers to be enabled. Click here to access configuration instructions for your desired database. 4 - Set the recommended minimum value of these PHP directives listed below for Scriptcase to work proprely. Search for the directives and assign the value according to this example: - max_execution_time = 3600 - max_input_time = 3600 - max_input_vars = 10000 - memory_limit = 1024M - post_max_size = 1024M - upload_max_filesize = 1024M - max_file_uploads = 200 - short_open_tag = On IMPORTANT: By default PHP can disable some functions that are important for Scriptcase to function properly. Search for the disable_functions directive and make sure it is as follows: disable_functions=. Click here to access the list of functions required for Scriptcase to function properly. 5 - Set up PHP TimeZone according to your region. You must use the value available in PHP documentation. Search for the date.timezone line, uncomment it and edit it according to the selected TimeZone: Example: date.timezone = America/Recife PHP TimeZone 6 - Set the folder where temporary files will be stored. Search for the ;session.save_path line, uncomment it, and enter the path to your temporary folder. Example: session.save_path = "C:\Windows\Temp" Session File Folder 7 - Save all changes made to the php.ini file. 8 - Restart the Apache service using the Command Prompt (CMD) with Administrator privileges the following command: C:\Apache24\bin\httpd.exe -k restart Restarting Apache 9 - Verify changes made through the info.php file. You need to create this file and place it in the C:\Apache24\htdocs directory with the following content: php</span phpinfo(); ?> After this, check the generated page in your browser by going to the URL 127.0.0.1/info.php. Verify PHP NOTE: For more information about the phpinfo() function, check the documentation do PHP. Enabling the SourceGuardian Loader Before you start the Scriptcase installation, you need to enable the loader responsible for encrypting Scriptcase in PHP. Follow the steps below to perform this action successfully. 1 - Extract the SourceGuardian Loader file downloaded at the beginning of this documentation. If you haven’t downloaded it yet click here and download the file according to the architecture used. 2 - Copy the ixed.8.1.win file and paste it into the PHP extensions directory C:\php\ext. Pasting SourceGuardian Loader File 3 - Edit the php.ini file and below the last line enter the path to the extension within the zend_extension parameter: Example: [SourceGuardian] zend_extension=C:\php\ext\ixed.8.1.win Adicionando extensão do Loader no php.ini 4 - Restart the Apache service using the Command Prompt (CMD) with Administrator privileges the following command: C:\Apache24\bin\httpd.exe -k restart Restarting Apache Manual Scriptcase Installation Listed below are the steps needed to do a Scriptcase manual installation. To do the steps, it is needed that you have a web server configured in your machine. 1 - Download the Scriptcase (.zip) directly from the download page from our website. 2 - Extract the .zip file and rename the extracted folder to scriptcase. 3 - Move the scriptcase to your server root. Depending of your operating system and the installation the path can be different from the example. However, by default the paths are: | Windows | Server | | --- | --- | | C:\Apache24\htdocs\ | Apache | | C:\inetpub\wwwroot\ | IIS | | Linux | Server | | --- | --- | | /var/www/html/ | Linux Local | | /home/$(whoami)/public_html/ | Linux Server | | macOS | Server | | --- | --- | | /Library/WebServer/Documents | Apache | 4 - Access the Scriptcase using your browser: 127.0.0.1/scriptcase - By default the selected language is English. Setup Screen 5 - Check the extensions required for Scriptcase to function and database connection modules that are enabled. Screen with list of active extensions Typical Installation Check the steps below to complete the manual installation of Scriptcase in a typical way. NOTE: By selecting this installation, Scriptcase will set your environment by default. Defining the installation database and the login user in Scriptcase. Installation Type Selection Screen After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps. Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here. Custom Installation Check the steps below to complete the manual installation of Scriptcase in a custom manner. NOTE: By selecting this installation, you will be responsible for setting up your environment. Defining the installation database and the login user for Scriptcase. Installation type selection screen 1- Verify that the directories required by Scriptcase have the correct permissions. If any directory listed does not have the active check icon Active_icon, correct permission for this directory. System directories display screen Click proceed to proceed with the installation process . 2- Choose the database where the Scriptcase database will be installed. By default, Scriptcase recommends that it be installed with the SQLite database. Installation Database Choice Screen - You can change the default database by clicking the Change Database button. By clicking this option you will need to set the following options: Default database change DBMS In this option, you will select the Driver to connect to your database. Server In this option, you will inform the server to connect to the desired database. User You need to inform a user who has access to the database you want Scriptcase to be installed on. Password You must enter the authentication password corresponding to the entered user. Database You must enter the name of the database where Scriptcase will be installed. Example: scriptcase Clique em prosseguir para avançar no processo de instalação. 3 - Verifique se a criação das tabelas da base de dados do Scriptcase ocorreu com sucesso. As tabelas serão marcadas com o ícone de sucesso ativo_icon na lateral. Tela de exibição das tabelas do sistema Click proceed to proceed with the installation process. _4 -__ Set the default user who will have access to Scriptcase. User setup screen Login In this option, you will enter the default Scriptcase User Login. Password In this option, you must enter the password that will correspond to the user informed. Confirmation You must repeat the previously entered password for successful user creation. Click proceed to proceed with the installation process. 5 - Complete Scriptcase custom installation on your web server. Finish screen of installation After clicking proceed, you will be redirected to the Scriptcase Login page. Scriptcase access screen User In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin. Password In this field, you must enter the password to login to Scriptcase. By default, the password is admin. Keep me connected This option keeps the user logged in until they log out through the Scriptcase interface. Forgot your password? Conteúdo truncado na migração (limite do Chatwoot: 20.000 caracteres).