We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

gbrann
Posts: 3
Joined: Mon May 23, 2016 5:48 pm

Server-Side Validation Issues

Well.. we need to have Server-Side Validation. We got the MySQL server up and running just fine. We have the php script up on our server and publicly accessible. We used the example scripts directly from your tutorial, using the limited install structure. All we need is the SN to install. We don't care for the user's name, company, email, etc. So we have done some minor altering. In the php (based on validateLimit.php) we removed the $language_id calls, as they are not used in the MySQL database. The database is also pulled from your example - except we removed the unneeded fields and instead have the "client_id", "license_no", and "validation_no' only under the Client2 table.

When we attempt the install, Auto Update runs, no issues (on the same server as the php). Then when we enter the Installation ID (serial number) then we get an error : "Could not verify serial number".

The Licensing tab has the following values:

Template : <###-####-####-##>
Server-Side Validation URL: http://residential-helpdesk.000webhosta ... eLimit.php (when you goto this url in a web browser you get the "602 Missing Serial Number !" message)
Under Condition, the Expression = 1

We (3 of us that is here in the office) have been pouring over all the docs, templates, and everything. The office still uses 12.8. Any ideas?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Server-Side Validation Issues

Hi and welcome to our forums.

I'm not sure why you encounter this problem. Can you please send us the .AIP (project file), the modified PHP script and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Server-Side Validation Issues

Hi,

I looked over the files you sent to me via email and also tested them. They are configured correctly, but it seems that the server where your "validationLimit.php" script is located does not accept POST requests.

I tried to send a POST request to it from my browser and it did not work. Also, after moving that script on another server, everything worked as expected. Can you check if there is any issue on your server related to this?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
gbrann
Posts: 3
Joined: Mon May 23, 2016 5:48 pm

Re: Server-Side Validation Issues

Well.. months later we have the issue again. The only change after we fixed it (if you remember we were using PHP 7.x and went down to 5.6 - which fixed the issue) was we added the server to the domain name. I tested the server using the HTML test file you made to POST the SN to the Server and get a response... no issues, comes back 601. SQL database shows 1 validation, all normal.

Then comes in the installer. We updated the installer and tested.. "Invalid SN" - I know it's communicating and getting 601 back from the server, as the database shows, 1 validation. I will post the related debug entries from the installer below.
We are using the validate.php example in documentation as it fits our needs.

::START AIP::
<ROW Property="AI_SERVAL_TYPE" Value="3"/>
<ROW Property="AI_SERVAL_URL" Value="https://www.residentialhelpdesk.com/rhd ... eLimit.php"/>
...
<COMPONENT cid="caphyon.advinst.msicomp.SerValComponent">
<ROW SerialValidation="SerVal" Template="PIDTemplate" Type="AI_SERVAL_TYPE" ValidateCA="AI_VALID_SERIAL" Serial="1~" Condition="1"/>
</COMPONENT>

::START DEBUG::
Action start 17:20:27: FolderDlg.
MSI (c) (88:E0) [17:20:27:306]: Note: 1: 2205 2: 3: AI_ControlEx
MSI (c) (88:E0) [17:20:27:306]: Note: 1: 2228 2: 3: AI_ControlEx 4: SELECT `Dialog_`,`Control`,`Type`,`Parent`,`Attributes`,`Data` FROM `AI_ControlEx` WHERE `Dialog_` = 'UserRegistrationDlg'
MSI (c) (88:E0) [17:20:44:515]: PROPERTY CHANGE: Adding PIDKEY property. Its value is '010-5476-0763-62'.
MSI (c) (88:5C) [17:20:45:796]: PROPERTY CHANGE: Adding SERIAL_VALIDATION property. Its value is 'FALSE'.
MSI (c) (88:5C) [17:20:45:796]: PROPERTY CHANGE: Adding ProductID property. Its value is '{98FB81EA-719E-4C5A-ABAA-4E83BB37A8E5}'.
Action ended 17:20:45: FolderDlg. Return value 1.
MSI (c) (88:68) [17:20:45:796]: Doing action: AI_VALID_SERIAL
Action 17:20:45: AI_VALID_SERIAL.
Action start 17:20:45: AI_VALID_SERIAL.
MSI (c) (88:30) [17:20:45:858]: Invoking remote custom action. DLL: C:\Users\IEUser\AppData\Local\Temp\MSICB69.tmp, Entrypoint: ValidateSerial
MSI (c) (88!C4) [17:20:46:264]: PROPERTY CHANGE: Adding AI_SV_POST_SENT property. Its value is '010-5476-0763-62Microsoft'.
MSI (c) (88!C4) [17:20:46:280]: PROPERTY CHANGE: Adding AI_SERVAL_RESPONSE_CODE property. Its value is '601'.
MSI (c) (88!C4) [17:20:46:280]: PROPERTY CHANGE: Modifying SERIAL_VALIDATION property. Its current value is 'FALSE'. Its new value: 'TRUE'.
Action ended 17:20:46: AI_VALID_SERIAL. Return value 1.
MSI (c) (88:68) [17:20:46:280]: Doing action: UserRegistrationDlg
Action 17:20:46: UserRegistrationDlg.
Action start 17:20:46: UserRegistrationDlg.
MSI (c) (88:E0) [17:20:46:296]: Note: 1: 2205 2: 3: AI_ControlEx
MSI (c) (88:E0) [17:20:46:296]: Note: 1: 2228 2: 3: AI_ControlEx 4: SELECT `Dialog_`,`Control`,`Type`,`Parent`,`Attributes`,`Data` FROM `AI_ControlEx` WHERE `Dialog_` = 'VerifyReadyDlg'
Action ended 17:20:50: UserRegistrationDlg. Return value 1.
MSI (c) (88:68) [17:20:50:358]: Doing action: InstallValidate
Action 17:20:50: InstallValidate. Validating install
Action start 17:20:50: InstallValidate.
...
Action start 17:20:50: LaunchConditions.
Action ended 17:20:50: LaunchConditions. Return value 1.
MSI (s) (A0:B0) [17:20:50:936]: Skipping action: ValidateProductID (condition is false)
MSI (s) (A0:B0) [17:20:50:936]: Skipping action: AI_VALID_SERIAL (condition is false)
MSI (s) (A0:B0) [17:20:50:936]: Doing action: AI_EXIT_ACTION
Action 17:20:50: AI_EXIT_ACTION.
Action start 17:20:50: AI_EXIT_ACTION.
Invalid serial number.
MSI (s) (A0:B0) [17:20:53:624]: Product: Residential.Helpdesk -- Invalid serial number.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Server-Side Validation Issues

Hello,

This may happen if you are launching the installation in full UI, but you are skipping the "UserRegistrationDlg" dialog. This dialog should not be skipped during a full UI installation. If this dialog is skipped the license check custom action won't run at all and the installation will be aborted due to invalid serial number.

Can you please give us more details about how do you perform the installation? Do you run a full UI installation, but skipping the "UserRegistrationDlg" dialog? Also, can you send us again the latest version of your AIP (project file) so we can investigate its settings?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
gbrann
Posts: 3
Joined: Mon May 23, 2016 5:48 pm

Re: Server-Side Validation Issues

'UserRegistrationDlg' does exist and does show up to the EU during install. The calls are in place.

AIP Attached.
rhd_2x.aip
(253.91 KiB) Downloaded 243 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Server-Side Validation Issues

Hello,

Thank you for your sent setup project. After investigating your project it seems you encounter this behavior because you have edited the execution condition of the "Install Execution Stage -> Paths Resolution -> ValidateProductID" standard action. For this action you have added the following condition:

Code: Select all

(Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ))
Please note that you should not condition this standard action execution. This standard action is part of our serial validation support. It sets the "ProductID" property which is further used by our serial validation custom action. So, please go to "Custom Actions" page and remove the above condition you set on the "ValidateProductID" action.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”