loshMiS

loshMiS supports this item

Supported

This author's response time can be up to 1 business day.

831 comments found.

hello dear milos I install this script on my main Domain, its working Good I have a some sub domain, I want to copy some of your code to subdomains that just to loading database data. when I open my site and one of sub domains in time I get this error :Warning: session_start(): open(/var/cpanel/php/sessions/ea3/sess_356f2c3bbae4718162af1aa487d2768b, O_RDWR) failed: Permission denied (13) in /home/cstuhdedu/public_html/barewbar/ASEngine/ASSession.php(1) : eval()’d code(3) : eval()’d code on line 34

Warning: session_start(): Cannot send session cache limiter – headers already sent (output started at /home/cstuhdedu/public_html/barewbar/ASEngine/ASSession.php(1) : eval()’d code(3) : eval()’d code:34) in /home/cstuhdedu/public_html/barewbar/ASEngine/ASSession.php(1) : eval()’d code(3) : eval()’d code on line 34 . so I have to question: how can I fix this error? and what folder and file need to (just loading and show datas) in your script?

regards

Hey,

Well from what I can see from the error above, you have some permission issues and session cannot be started properly. That’s probably because your are including the code from your main domain on your subdomain, which is probably running under different system user.

If you just want to load database data, you don’t need to start the session on your subdomains, then you can create another file that is similar to ASEngine/AS.php file but without ASSession::startSession(); code inside it. This will allow you to use all the AS classes inside your subdomain projects, but it won’t start the session so you won’t see these permissions errors.

However, since it won’t start the session, it means that you won’t be able to see the authenticated user etc. If you still need this feature, then the easiest way for you is to install AS separately on your subdomain.

Regards,

Milos

thanks and regards dear milos

Hello Milos, long time no see. I know my support has expired, but I would really appreciate if you could help me.

I did a fresh install and I already had an SSL Cert, forced HTTPS url etc.

I could not get the script to install while using HTTPS, I had to remove the line from .htaccess to get it to install.

Now when I try to login, the page hangs (click the button and the spinners spins forever), no errors, I have tried HTTP and HTTPS, nothing.

Any help is much appreciated.

Thank you

Hey,

I’m really sorry but, if you need my help, please extend your support.

Thanks for understanding.

Regards,

Milos

kernant

kernant Purchased

Hi, we are having trouble getting AS Engine to work for local development. Any ideas on how to do it? It looks like the database connection fails

Hey,

Well I’ll need some more info about the issue so I can help. Have you stuck on installation step where you need to provide database credentials?

Regards,

Milos

Hi Milos,

Hope you are doing well. I would like to ask for your advice on a small issue.

I understand that the statement $db = app(‘db’) is used to query tables in the AS Database which was created during the installation. I have another website on the same server, and now I want to access that website’s database (MySQL as well) when I am in an AS Session. how could I accomplish this?, for example something like $db1 = app(‘db1’) which points to another website’s database.

Thanks so much!!

Hi Milos,

I have one more question in the meantime. How could I know the list of users who are currently being logged in to the website?

Thanks so much!

Hey,

Well you will have to bind that “db1” database to the container, the same way that “db” is bound. Check the AS.php file and you will see how it works. Eventually, you should just copy the code and update the credentials that are being passed to the constructor of ASDatabase class.

About your second question, it is not possible to list currently logged users in AS out of the box. If you would want to implement that, you should implement database session driver (to make all sessions be stored in database instead of plain file, which is PHP default session driver) and assign sessions to specific user after successful authentication.

Regards,

Milos

Thanks so much for your help. I am clear abt this.

Hi Milos,

Hope you are doing well. I have a small issue and would like to have your suggestion.

One of my user tried to login, but after she hit Login, the button label changed to Logging in… (button disabled), and then the page was refresh to the login page with empty user and pass forms. It is very interesting was that in my admin panel, her Last login time was still updated whenever she tried. So, I think she was forced to logout immediately after logging in successfully. However, at the same time, she asked her friend to login using her account, and that friend had no problem with that account. I also succeeded login using her account at the same time.

I guess something wrong with her browser and it couldn’t start session. But it’s only my guess. What do you think?

Regards, Phu

Hey Phu,

Well yeah, it looks like session cookie is not kept by the browser for some reason. So I would say that it is specific to her browser only. Which browser does she use? If you can, ask her to try using some other browser to see if she can log in in that case.

Regards,

Milos

Hi Milos,

Thanks for your quick response. She was using Edge on her laptop. She also tried on mobile Chrome but same thing happened. I asked her to install Chrome on her laptop, but haven’t heard from her again. I also think the problem is on her browser’s side, not the server. What you think reasons that cause this kind of problem, I mean can you guess what’s wrong with the browser?

Hey,

Well I cannot be sure what is the problem, but it has something to do with session cookie for sure. Maybe it is not configured to allow cookies, or something like that. If here “last_login” timestamp is being updated it means that she is being authenticated properly. Since nobody else is experiencing the same issues, it makes sense that the problem is with her browser.

Regards,

Milos

AkMaLiTo

AkMaLiTo Purchased

Hello,

I got your awesome system a few months ago an it was easily integrated into my existing website without diving deep into the technical details of the system itself as I only needed a secured membership area to hold simple content for registered users…

Now I am planning to extend on that and create a simple web app with your system in the core, but I am having hard time wrapping my head around the general flow of data and how everything works….

I believe that if I understood a single complete data route for any scenario I’ll be able to understand how everything else works, so may you help me out with that by explaining the registration scenario? I guess there are only two possible data routes when a user clicks the register button: 1- registration error scenario: javascript/jquery function(s) will validate user input > error response generated > other js functions will update the current registration form using ajax (php isn’t involved at all in this cycle?) 2- registration successful scenario: javascript/jqueryfunction(s) will validate user input > no error detected > send success message and use php/js to update mysql database > redirect

I tried understanding the flow of data using network tab in chrome’s dev tools, but all I got was ASAjax.php only in the case of a successful registration, so the full data route is still vague to me, hopefully you can tell me which js and php files are used in the case of successful registration in the order they are triggered

I hope I was able to explain what i need in a clear matter, many thanks in advance

Hey,

I’m glad you like the script! :)

Well the whole registration scenario is pretty simple, when you fill out the registration form and click “Create Account” button, an on button click callback function is executed (check register.js file), which first do some basic javascript validation and then executes register.registerUser javascript function and send an AJAX request to the server (to ASAjax.php file with action : "registerUser" parameter).

In ASAjax.php file, this action parameter is being checked and according to that parameter specific handler is called. Server then validates this register request again and create user if everything is ok (check register method inside ASRegister class).

Hopefully this will guide you and help you to properly understand how everything works. :)

Regards,

Milos

AkMaLiTo

AkMaLiTo Purchased

Hey Milos,

That definitely helped a lot, I am now starting to understand the modular hierarchy of your system by tracing the data route with respect to the order you explained above, and I guess I’ll eventually be able to build my web app with your system in the core…

Thanks a lot my friend, for both your support and the system itself, have a great day.

Hi Milos,

Thanks for the great security system.

I would like to use your security system for the back end of my dashboard. For extra security I would like to place most of the files above the root, outside of the public folder.

  • Is this easily done and do you recommend this?
  • Which files can I place above the root and which files must be in the public folder?
  • Do I need to make changes to certain paths?

I hope to hear from you.

Thanks in advance. Fred.

Hey Fred,

I’m glad you like the app. :)

Please take a look to the documentation, since everything is explained there related to moving files above document root (which is highly recommended btw): https://docs.vanguardapp.io/installation.html#application-url

Regards,

Milos

Hi Milos,

Thanks for the quick reply.

I have purchased Advanced Security for the security of mu dashboard. Your reply is related to the Vanguard app. Do you recommend this for the back end of a dashboard?

Regards, Fred.

Hey Fred,

Ah, you are right. I’m sorry about that, I haven’t noticed that you were asking about AS.

For AS you can move most of the files from “ASEngine” folder (everything except ASAjax.php file) out of document root, as well as complete “vendor” folder. After that you will need to update the path to AS.php file in all files where it is used (ASEngine/ASAjax.php and files like login.php, index.php etc). You don’t have to move other files out of document root.

About using Vanguard over AS, it really depends on what your are going to build and on your knowledge of PHP (and Laravel framework, which is used by Vanguard). If you don’t need some advanced features that Vanguard provides, AS is the way to go.

Regards,

Milos

Hi, Milos. Is there a simple way to migrate my Advanced Security system – with almost 1k users – to Vanguard? Please, describe the process, if possible.

Hey,

Well Vanguard is completely different application, with completely different database and code structure. So it means that you will basically have to rewrite most parts of your application, and to force your users to reset their passwords when you complete the rewrite process and when you import your users from AS.

So basically, if you are familiar with Laravel and you want to rewrite your app, you will have to do everything manually, page by page, and once everything is ready you will need some small php script to import users from your current app.

Regards,

Milos

Havouza15

Havouza15 Purchased

Hi

I now bought the Advanced login Script. I have looked into the code and added 3 columns in the user details table. Also forms are updated and js scripts.

However there is some problems and I hope you can hint about what I can have forgotten. The update of user details work as it should. Strangely one column does not get updated as the others. It is called town and I cant see any difference in the code.

The insert of new customers does NOT insert the new fields at all. Where can I have missed. Please a hint and I will find the problem

Regards

Anders

Hey Anders,

I’ve just replied to your email. Just turn the debug mode on and you should be able to easily debug it and see what is causing the issue.

Regards,

Milos

Hi, IoshMis — I want to purchase your Secure Login product - but I have one question. I understand the PHP-side install. However, do I add HTML code that is provided in the PHP application TO THE WEB PAGE? I’m not sure how I link the web page to the PHP application.

Would this be correct? 1. I create a blank web page with buttons like: “Register” and “Login” 2. I link each of these buttons to the PHP Applicatoin 3. In the PHP Application I designate the Follow-thru Page. 4. The User—if they enter the right UN/PW, goes to the designated page.

I saw your install materials—they are very clear but I don’t know how to create the LINK from my web page.

Thanks! Karl

Hey Karl,

The process you have described is correct, you can link to the AS login page and when use click on “Login” link he will be redirected to the login page. After he provides the username/password, he will be redirected to any other protected website page.

Now, to protect some website page, you just add the following PHP code at the very top of your PHP file for that page:

<?php

include 'ASEngine/AS.php';

if (! app('login')->isLoggedIn()) {
    redirect("login.php");
} 

This code will prevent users that are not logged in to access the protected page and automatically redirect them to the login page if they are not logged in.

I hope that I explained how the system works a bit more clearly now. :)

You should always check the demo to see the app in action: https://as-php.com/login.php

As you can see on item description page, demo credentials are:

username: admin password: admin123

Regards,

Milos

Milos—One other question, too – thanks. Is there an admin page where user accounts can be managed? I didn’t see this with the screenshots. Thanks.

Hey,

Please check the demo: https://as-php.com/users.php

Regards,

Milos

by
by
by
by
by
by