First server installation, unable to login

Issues related to WebLM
Post Reply
signal_integrity
Posts: 8
Joined: Wed Jul 28, 2021 3:27 pm

First server installation, unable to login

Post by signal_integrity »

After installing Web License Manager, I am unable to login. The machine is a clean, shared server. By default it was set up with PHP 7.4. I used cPanel PHP Version to set the PHP version to 5.6. Info.php reports the PHP version as 5.6.40. I created a database and user in the Databases application in cPanel (they don’t allow dB creation in phpMyAdmin). I ran install.php and everything went well. The module checks were okay, the database tables were created correctly and the admin user information is correct.

At this point, I deleted install.php and changed the privileges on the configuration file to 0444. Then I clicked the link to go to the login page and I could not log in. There was no error message. It just seemed to do nothing.

Looking into this (using alert messages), I noticed that the validateForm function does not run when called from login.php. Processing just stops and never returns to the calling script. I temporarily commented out the call to validateForm and the proper username and password lets me log in. Incorrect credentials generate an error message as should happen. The odd thing is that validateForm works during installation. The only difference that I can see in its use is that install calls it from HTML form submit while login calls it from JavaScript script tag. I couldn’t guess if that could make any difference.

I installed XAMPP with PHP 5.6.40 on my local machine, installed WebLM and I can login without issue. I had been using it locally, without problems under XAMPP and PHP 5.6.15 to test my implementation of VMProtect.

Using Web License Manager Ver. 2.4.6.23. The server is running LiteSpeed V8.0.1 Cloudlinux 1.3. I’m not sure where to go from here.

Thanks for your help, it's greatly appreciated
signal_integrity
Posts: 8
Joined: Wed Jul 28, 2021 3:27 pm

Re: First server installation, unable to login

Post by signal_integrity »

Issue resolution
The difference between the XAMPP installation and the Linux server is the web server software. XAMPP installed Apache 2.4 and the Linux server is running LiteSpeed 8.0 (a high performance replacement for Apache). As this is a shared server, I have no control over what web server software is installed. There is a difference in behavior between Apache and LiteSpeed. Apparently, LiteSpeed is more stringent in its enforcement of MIME types with strict MIME-type checking enabled.

When validation.php is included in login.php the file type is set to “text/javascript” but the LiteSpeed server, under strict MIME-type checking, considers validation.php to be type “text/html” and refuses to download it because it is "not executable."

To remedy the situation, I added a header statement in the PHP section of validation.php to inform the server of the file type: header("Content-type: text/javascript");

WebLM now logs in under LIghtspeed (Linux) and Apache (XAMPP) servers. Additionally, language selection still works for the login page labels. I tried other functions, such as adding products, etc. and had no problems. It looks like the issue is resolved.

Cheers
Post Reply