loshMiS

loshMiS supports this item

Supported

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

757 comments found.

zoedog9

zoedog9 Purchased

Having a problem installing. On the database screen upon submitting, I just get a red bar with no error message. Browser Console shows this:

install.js:97 Uncaught TypeError: Cannot read property ‘message’ of undefined at Object.error (install.js:97) at j (jquery.min.js:2) at Object.fireWith [as rejectWith] (jquery.min.js:2) at x (jquery.min.js:4) at XMLHttpRequest.b (jquery.min.js:4)

Also, on the system requirement screen just get a list of numbers from 0 to 176 all with green checkmarks. In the console there are a lot of errors for Vue regarding duplicate values. Is that normal?

Thanks, Tim

Hey,

Hmm nope, it should no be like that. Can you provide me the link to your AS installation so I can take a look?

Regards,

Milos

zoedog9

zoedog9 Purchased

Never got it to work untilI moved the site to a different server and all worked fine. I can let you take a look at the previous server if you are interested in troubleshooting. I did confirm all the requirement components were installed, but it just didn’t like something on that specific original server.

Thanks, Tim

What does this script set in the sessions?

Hey,

It sets the user_id, CSRF token as well as those “bot protection” numbers to support bot protection on registration page. You can see all the variables by simply echo them out, like following:

include "ASEngine/AS.php"; // this will automatically start the session

var_dump($_SESSION);

Regards,

Milos

Oh I see, thanks!

edjhome

edjhome Purchased

Hello. I purchased AS and am trying to install it. When I get to “Database Info” it shows “Connecting” forever and never goes beyond that. What should I look for?

edjhome

edjhome Purchased

Never mind this comment. I was able to install, and was given a “Success” message. The databases were created. Now when I invoke the site, I get a page saying “The website cannot display the page”

edjhome

edjhome Purchased

Never mine. I figured it out.

Hello Milos and Happy New Year!

The purpose of my site is for record collectors to manage their collections.

I’m having another “Invalid CSRF token” problem on a form that is part of an mysql INSERT.

For reference, the page is here: http://fiendcollectors.com/collectiontest.php and you can login with username: testtest password: tttttt

Here is the code. I omitted irrelevant code to save space and time. Can you spot what is generating the error?

<?php include “ASEngine/AS.php”; include ‘templates/header.php’;

$userId = ASSession::get(“user_id”); $releaseID = $row[“release_id”]; $newRecord = $_POST[“addToCollection”];

foreach ($newRecord as $var) { $db->insert(‘collections’, array( “user_id” => $userId, “release_id” => $releaseID, ));

header(“Location: collection.php”); } ?>

<?php $result = $db->select( “SELECT * FROM `releases`);

if ($result) { echo ” <form action=’’ method=’POST’> <input type=’hidden’ name=”.ASCsrf::getTokenName().” value=”.ASCsrf::getToken().”>

} echo “
”;

foreach($result as $row) { echo “

<label class=’btn btn-outline-success’> <input type=’checkbox’ autocomplete=’off’ name=’”.$row[“release_id”].”’ onClick=’addCollection()’> + </label> </form>
} ?>
<button type='submit' name='addToCollection'>add to collection</button></form>";

<script src=”ASLibrary/js/index.js”></script> <script src=”ASLibrary/js/js-bootstrap.php”></script>

Thank you for time,

Michae;

Nevermind, I forgot to make the pages use AJAX.

But now I’m having trouble with an INSERT. The INSERT works fine and data gets correctly inserted into database. But I still get the error message instead of the success message and I’m not sure why.

<?php include “ASEngine/AS.php”; $db = app(‘db’);

if ($_SERVER[‘REQUEST_METHOD’] == ‘POST’) {

$band = strip_tags(stripslashes(trim(htmlentities($_POST['band']))));
   $title = strip_tags(stripslashes(trim(htmlentities($_POST['title']))));
$result = $db->insert(`releases`, array(
        "band"=> $band, 
        "title"=> $title, 
    ));
if ($result) {
       $success =  ' entry successful '; 
       } else { 
           echo ' Error '; 
       }

Hey,

Sorry for my late response, I was on vacation.

$db->insert() function does not have a return value which means that your $result variable is set to null, and that’s why you get the error message instead of success.

Regards,

Milos

edjhome

edjhome Purchased

Hello,

I was able to install the site and the databases were created. When I attempt to go to the site I get “The website cannot load the page”. The error log has the following.

[01-Jan-2017 09:28:14 America/Denver] PHP Warning: include_once(/home5/compres7/public_html/ASEngine/vendor/autoload.php): failed to open stream: No such file or directory in /home5/compres7/public_html/ASEngine/AS.php on line 22

[01-Jan-2017 09:28:14 America/Denver] PHP Warning: include_once(): Failed opening ’/home5/compres7/public_html/ASEngine/vendor/autoload.php’ for inclusion (include_path=’.:/usr/php/54/usr/lib64:/usr/php/54/usr/share/pear’) in /home5/compres7/public_html/ASEngine/AS.php on line 22

[01-Jan-2017 09:28:14 America/Denver] PHP Fatal error: Class ‘ASSession’ not found in /home5/compres7/public_html/ASEngine/AS.php on line 24

Please advise what to look for. Thank you.

edjhome

edjhome Purchased

More… I notice the vendor directory in ”/public_html/ASEngine/vendor/autoload.php” does not exist, instead the vendor folder reference would be /public_html/vendor/” Vendor is not under ASEngine. So its looking in the wrong place. Please help.

Hello Milos,

I’m having trouble writing the query statements,

The purpose of the website is for users to add and remove rows into a table.

For reference, I made a test page is here: http://fiendcollectors.com/collectiontest.php and you can login with username: testtest password: tttttt

I need 2 queries, an INSERT and a DELETE.

1. The table on top is the user’s collection. It matches the user_id with the record_id. Here I want the user to delete multiple rows by selecting checkboxes and POST submit.

2. The table below is the complete records database. Here I want users to add multiple rows by selecting checkboxes and posting submit.

Here is how I get the row: if ($result) { echo " <form action='darkness/addCollection.php' method='POST' id='addCollectionForm'> <input type='hidden' name='".ASCsrf::getTokenName()."' value='".ASCsrf::getToken()."'> [table stuff here] echo " <button type='submit' name='addToCollection'>add to collection</button></form>"; And here is the PHP: <?php include "ASEngine/AS.php"; $db = app('db'); $userId = ASSession::get("user_id"); $releaseID = $_POST["recordID"]; if (isset($_POST['addToCollection'])) { foreach ($releaseID as $add) { $r = $db->insert('collection', array( "user_id" => $userId, "release_id" => $releaseID )); }} if ($r){ echo'<script>alert("Inserted Successfully")</script>'; } else { echo'<script>alert("Failed To Insert")</script>'; }

I can’t figure out how to write the SQL statement for AS.

Hey,

As I explained in previous comment, $db->insert() function does not return any value so you will always get “Failed To Insert” message.

Have you checked the docs for working with ASDatabase class: http://docs.as-php.com/database-queries.html

As it says inside the docs, ASDatabase class extends PDO, which means that you don’t have to use those methods for ASDatabase class if you don’t want to. You can use native PDO methods instead. Here you can learn more about PDO: http://php.net/manual/en/book.pdo.php

Regards,

Milos

Hello Milos,

Great product, I’m able to use google api to log in but after clicking allow it takes me back to the log in screen. Is there a configuration for the redirect that I’m missing?

Thank you!

No worries, and yes I believe we followed the instructions thoroughly. As mentioned above I don’t get any errors, but instead of being redirected to index.php I am redirected back login.php. Facebook works though. Thanks

Hey,

Can you please provide the url to your script installation (or send it to me via contact form on my CodeCanyon profile page) so I can check what can be a problem?

Regards,

Milos

Milos, thank you the update you sent fixed the issue :)

CentalHQ

CentalHQ Purchased

Hi, I bought your system, and its great, but when I`m logged in a page with another submit form, whenever I try to submit that form, it gives me invalid CSRF token. How to generate that, and thanks in advance!

Hey,

Sorry for my late response, I was on vacation.

All AS forms use ajax, and ajax requests are configured to send CSRF token by default. However, if you don’t want to use ajax, you will have to add CSRF token manually as a hidden field inside your form, which should look like following:

<input type="hidden" name="<?= ASCsrf::getTokenName() ?>" value="<?= ASCsrf::getToken() ?>" />

Regards,

Milos

myConni

myConni Purchased

Hi Now I have a full integration on my website and it work’s very well. – Great

I have some additional questions:

-) how can I secure the Folder ASEngine? only with -RX-RX ? -) is there also a php site where I can clean the not confirmed emails after min 24h? then I can run a automated cron job.

Kind regards Peter

Hey,

1) Well yeah, those are all PHP classes, so there are nothing to secure really. However, what would I do is probably moving all files from ASEngine folder except ASAjax.php file (and AS.php maybe) to some other folder that is not accessible from the browser. Or, if you are using apache you can add .htaccess file which will allow browser access to ASAjax.php file only.

2) There is no code for that out of the box, so you will have to write that php file and set up the cron job manually.

Regards,

Milos

Apologies to bombard you with another question, I’m sure its a simple issue but I am not able to make the mail nor the smtp work. The regular php mail definitely works because that is what we are currently using. But the phpmailer is not working for us for some reason. I’m wondering if this is a composer issue?

Thank you in advanced (no pun intended)

Hey,

That PHP version should be completely fine for phpmailer. Are you 100% sure that standard mail() function is working properly on your server? Here is an example test script that you can use to verify if it is working properly: https://www.conetix.com.au/support/article/simple-php-mail-test

It’s really strange to have such scenario where PHPMailer don’t work even with regular “mail” function usage.

Regards,

Milos

Yup we used that exact same script and it works fine. It is definitely strange since I feel like I’m the only person having this issue lol

Hey,

Hmmm is there a way for you to provide me some temporary FTP credentials so I can see what can be a problem here?

Regards,

Milos

Highly suggest adding functionality to the validator that makes the user remove tags (strip_tags) from all fields but the password. This way users can’t bold their names!

you can use html tags as a user editing your portfolio user details or you can use tags as an admin editing a user details. check it out!

Hey,

Of course you can. Why would you restrict your users to enter any username they want? The point is that it cannot do any harm to your application because all output is being escaped.

So, even if your username is <b>afagard</b> it won’t be actually bolded, and it will be displayed in the same form you have entered it.

Regards,

Milos

I’m not talking about it in the input. I’m talking about any display where you show the username or address or whatever field that hadn’t had the tags stripped. It will pull the and be directly echoed. Also, what’s the point of allowing the user to use html tags in address or phone fields…..

I can create accounts using the admin account with no issue.

When I try to register an account in the front end it returns UNDEFINED and the below error. The user data does make it to the DB. Just the email isn’t being sent. Also I test the mail() function in a simple test and it works.


Fatal error: Uncaught exception ‘Exception’ with message ‘E-Mail could not be sent. Info: Could not instantiate mail function.’ in /home/wpbumc5/public_html/agents/ASEngine/ASEmail.php:47 Stack trace: #0 /home/wpbumc5/public_html/agents/ASEngine/ASRegister.php(108): ASEmail->confirmationEmail(‘emailaddress@y…’, ‘8088531aa46f4e3…’) #1 /home/wpbumc5/public_html/agents/ASEngine/ASAjax.php(13): ASRegister->register(Array) #2 {main} thrown in /home/wpbumc5/public_html/agents/ASEngine/ASEmail.php on line 47

That’s not it. I ran the below as a separate file and it works just fine. Removed the email addresses just for privacy.

<?php ini_set( ‘display_errors’, 1 ); error_reporting( E_ALL ); $from = ””; $to = ””; $subject = “PHP Mail Test script”; $message = “This is a test to check the PHP Mail functionality”; $headers = “From:” . $from; mail($to,$subject,$message, $headers); echo “Test email sent”; ?>

Hey,

Ok, can you provide me some temporary FTP account so I can debug it for you and see what can be a problem?

It’s definitely server issue, but we just need to figure out what is the problem. I’ve just resolved the same issue for another client who is using GoDaddy, and it is probably something similar with your server too.

Regards,

Milos

Just messaged you FTP info. I am using inmotion hosting.

Hello,

First of all, good job on this script. I bought it today and installation was smooth.

One bug and I don’t know how to fix it:

When as a user you are logged in and would like to change language the following happens

When you click on a flag it the final URL is wrong as shown below:

initial URL: http://www.website.com/demo/index.php

and after click on the french flag it redirects to: http://www.website.com/demo/demo/index.php

as you can see the directory /demo/ is added a second time for some reason and it only happens when you click on a flag therefore ending in a 404 error. When clicking back on the browser to return to previous page, the new language is applied correctly.

I do not have any htaccess redirect rules that could cause this. Everything else looks good. Thanks for your comments.

Hans

Hey Hans,

Thank you, I’m glad you like the app. :)

Hmm that’s strange. AS is using $_SERVER['PHP_SELF'] value to redirect the user after changing the language, and value inside $_SERVER['PHP_SELF'] should always point to the current URL.

The source code for that is available inside ASLang::setLanguage method, so please try to echo out the $_SERVER['PHP_SELF'] and see what you get there and does it point to your current page?

Regards,

Milos

Hi

I’m trying to use the ASdatabase class to insert some data from a form into my database.

But everytime the form is submitted I get the following error.

Invalid CSRF token.

I’ve no idea how to set this token, maybe im missing something?

Here is my code.

include ‘templates/header.php’;

if(isset($_POST[‘save’])){

$userid = 1;
$id = trim($_POST['FBKey']);
$secret =  trim($_POST['FBSecret']);
$google =  trim($_POST['GoogleKey']);        
$timezone =  trim($_POST['timezone']);
$db = app('db');
$db->insert('as_users', array(
    "userid" => $userid,
    "fbid"  => $id,
    "fbsecret"  => $secret,
    "googleid" => $google,
    "timezone" => $timezone
));

}

Sure, http://virtuamarketing.com/FanMarketer/settings.php

You should be able to register to login and take a look.

Anything else you need let me know

Thanks Milos!

Hey,

Ah, ok, I see what’s the problem.

Basically AS is configured to allow only ajax request, and before CSRF token is even validated, it will check if it is valid request. To fix that just remove “is ajax request” check from ASCsrf.php class. The easiest solution is to just modify isValidRequest method to look like following:

private static function isValidRequest()
    {
        return self::isValidReferer();
    }

Regards,

Milos

That worked like a charm, thanks Milos!

Hi wanted,

Customization services Installation services

Please let me know

Hey,

You can request a refund if you want, but I really don’t see the valid reason for that. All this info is already available for you before you even buy the item.

Regards,

Milos

i’d like a refund found something else….Thank You

Hey,

You can learn how to request refund at following link, and if you have valid reason for that, I’ll be glad to approve it: https://help.market.envato.com/hc/en-us/articles/202821460-Can-I-Get-A-Refund-

Regards,

Milos

I have been using a version from 3-4 years ago that I purchased for a clients site. I decided to purchase the updated version today and for the life of me can not get past the ASEngine Folder (writable). I have the old version working on a site copy. Any suggestions? This is an internal site.

Hey,

So have you set the permissions for ASEngine folder to 777 to make it writable?

Regards,

Milos

lenamtl

lenamtl Purchased

Hi,

I’m working on login page to save usename to DB loging_attemps

How can I get $username value form public function userLogin($username, $password) to public function increaseLoginAttempts()

Thanks

lenamtl

lenamtl Purchased

Ok thanks I figured out.

I’m just wondering why when checking for brute force _getLoginAttempts() > max.. instead of equal? When setting this to 3 MAX in config the visitor can in fact try it 4 times.

lenamtl

lenamtl Purchased

Oups I mean >=

Hey,

It looks like I have missed that. :) Thank you for pointing that out, will fix it in next release.

Regards,

Milos

by
by
by
by
by
by