Jump to content

JonnySnip3r

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by JonnySnip3r

  1. Hey guys, I'm currently using (or trying to use) the php laravel framework. Before I can use this framework I am getting the error: Call to undefined function Laravel\mcrypt_create_iv() I did some research and apparently I don't have the mcrypt extension enabled. I am using php 5.4.7 (AMP Stack) on my mac. I have followed this tutorial and can't seem to get it working at all. http://www.glenscott.co.uk/blog/2011/08/29/install-mcrypt-php-extension-on-mac-os-x-lion/ Anyone else had this issue and manage to resolve it? Thanks.
  2. cheers buddy so should i start again with the installation and do it then? as im guessing its too late to do it now? Thanks!
  3. Hi guys, Ok I have been using php 5.4.0 since it's release I have recently updated to php 5.4.7 (I'm using Mountain Lion) I do have everything installed using the default apache web server that came with my mac nice little AMP stack. The default file in my Sites directory is index.php with phpinfo() (http://localhost) will show this file weirdly I see this PHP Version 5.3.15 Last time i checked i was developing on 5.4.7 so the applications i'm now coding doesnt work (due to outdated php) When i check the php version in my terminal i see php version 5.4.7. I'm an idiot when it comes to figuring this out has anyone had the same problem? If so please help Do i have to recompile php as it takes SO long. Thanks guys!
  4. Hi Guys, This is just a quick question. I have been doing php for a fair while now, but up until now I have never really made a query intense php application. Im currently creating a app that makes allot of database requests each time the page is loaded (as the stats needed need to be updated pretty much all the time) I'm using OOP techniques and refining my queries to only select info needed etc. I'd say it makes around 13 request each page load but some of the methods inside a class make a couple more requests + calculations etc. all in all around 19 - 20. Other than looking into database caching techniques should I be doing anything else to help minimise the server load? Or am I being paranoid? I' closing connections when finishing with queries etc. BTW to clear confusion i'm not yet using db caching techniques. Any help will be much appreciated. Thanks!!
  5. hi dude, do you not want the values show at all or do you just want it where they can't edit them? If so when paypal pass the details back to your IPN script you can double check the values to ensure everything is ok before you grant them access to premium or to purchase what ever product. So if they changes the values they wouldnt be able to purchase what the bought its their own fault
  6. LOL. Seriously though you should check your website with something else then FF4 and Chrome10 there are still people around that use FF2&3 or even older Chrome browsers. There is also Opera, and Safari. You should also make sure your website works in IE7,8&9. They still have the largest market share. Thats a very unfortunate piece of information but true =[
  7. A very interesting a useful topic []
  8. http://codecanyon.net/item/simple-secure-login/155308 Awesome app dude!
  9. Hey guys when we make a class and you see: var myName; var myAddress; do we still need the var? or have they removed it? Thanks!
  10. Hey dude! could you post a sample url from a working url
  11. Hey! Can anyone help with this, is it possible to make a post to a remote website, so when the use runs the script it will post some information to a remote server and then grab some info it gets back in a get request or something along those lines? Hope someone can guide me to more info thanks!
  12. Hey guys does anyone know of a good dynamic directory solution? What i mean by this is when i am creating an application and i use require_once 'includes/config.php'; and then i create a class that needs the config file so i include it into the class like so: require_once '../include/config.php'; then i make a new folder named member then i have to require this class (created above) and it fails to find the directory. What would be a good solution for this? Thanks guys!!
  13. Hey guys im fairly good with php dont do much struggling apart from now. I decided to make an app that helps the user install itself by checking certain files are writable if there is an installation directory etc etc. But i have come to the point where i want the user to change the username/passwords to access his/her database. i have them pre-defined like so: define('DB_USER','myUsername'); these are stored in includes/config.inc.php I know how to grab data from a user submitted form wither by post/get how would i go about changing these values depending on what the user inputs. So say i capture someones db username like so. $username = $_POST['db_username']; how would i change what ever is stored in the $username variable to replace whats in the define? Thanks guys hope this makes sense
  14. Hey guys i have created a paypal IPN script and it takes various info from users via paypal. Anyways i store their info into a database along with their email however i dont want them to be able to purchase again with the same email (long story) anways by the time i receive the info from paypal the payments already gone through so its too late for me to do the checking against the database. Is there anyway i can auto refund the payment do paypal allow this? Hope someone can help. Thanks!
  15. Hey guys i was wondering if someone could help or guide me. I have been messing around with php for quite some months now to the stage where i can code pretty much what i need to. but recently i started using paypals IPN and during testing i realised some problems arise for example when testing and people buying things say the payment failed due to a line not executing in your script for what ever reason, the person has lost their money yet you have gained it and they are lost. Take this code below for example: public function insertIntoDatabase($firstName,$lastName,$emailAddress,$merchant,$code,$database,$gameNumber) { $year = date("Y"); // Check what database we need to submit too:: $sql = "INSERT INTO playerGame (playerFirstName, playerLastName, playerEmailAddress, playerAccountType, playerCode, playerGameDate, playerGameNumber) VALUES (?,?,?,?,?,?,?)"; $stmt = $this->conn->prepare($sql); $stmt->bind_param('ssssssi',$firstName,$lastName,$emailAddress,$merchant,$code,$year,$gameNumber); $stmt->execute(); $stmt->close(); return true; } this is called on success the paypal IPN script. But what happens if this fails to execute? I suppose i could wrap it in a variable on the other side and test it if($task) { echo "code executed"; } but what happens if this fails ? of am i just being paranoid ? hope someone can help dont want to be ripping people off =] Thanks!
  16. Hey guys does anyone know where i can find a pre-written jquery text scroller plugin? Where there will be a piece of text and then it will fade out and then bring in a new piece of text that it pulls from a database? I seen a tutorial on this not so long ago cant seem to find it anywhere. Hope someone can help thanks!!
  17. This maybe a bit of a silly question but i am interested to know. Ok when coding its better to play by the rules im sure you all know so i was wondering if a more experienced developer would help me to tell me to shut up. Ok i have created a form that has 3 sections after each section it allows you to save the details you have entered, submitting to another file with jquery. Then they move onto the next section at the end of it, the application stores all the information to the database. But when i save the details it stores them in sessions i dont know how else i could temporary store the information. is this a silly way? or is there a better way to do it. I suppose i could submit the data into a temporary database but too much hassle. What do you guys think?
  18. Hey guys im new to jquery and just trying to do summin. i want it to count the amount of fields its adding and when it has reached a set number it will stop (Temp display an alert) here is what i have: $('#add').click(function(){ var i; if(i == 3){ alert("Max number of fields have been added!"); }else{ $('#clone-field').clone(true).insertBefore('#clone-field'); i++; return true; } }); what am i doing wrong guys ? hope someone can help. Thanks!
  19. Thanks for the fast reply Will check it out now
  20. Hey guys im new to jquery, anyways im testing out some stuff and i have been making a form that submits without refresh. Anyways so far so good but i seem to have a problem i can manage to gather all of the information from the text fields echo them out in an alert to ensure i have everything and i can pass it through to another page even add it to a database. But how do i return a message to let the user know it was successful? If my php script returns true; how do i catch this? here is what i have:: $(document).ready(function(){ $("#submit").click(function(){ var name = $('input[name=fullname]'); var email = $('input[name=email]'); var subject = $('input[name=subject]'); var comment = $('textarea[name=comment]'); var captcha = $('input[name=captcha]'); if(name.val()==''){ name.addClass('error'); return false; }else{ name.removeClass('error'); } if(email.val()==''){ email.addClass('error'); return false; }else{ name.removeClass('error'); } if(subject.val()==''){ subject.addClass('error'); return false; }else{ subject.removeClass('error'); } if(comment.val()==''){ comment.addClass('error'); return false; }else{ comment.removeClass('error'); } if(captcha.val()==''){ captcha.addClass('error'); return false; }else{ captcha.removeClass('error'); } var data = 'name=' + name.val() + '&email=' + email.val() + '&subject=' + subject.val() + '&comment=' + comment.val() + '&captcha=' + captcha.val(); $("#submit").fadeOut("fast"); $("#loading").show(); $.ajax({ url: "process.php", type: "POST", data: data, cache: false, success: function(html){ if(html==1){ $("#loading").hide(); alert("Sent!"); }else{ $("#loading").hide(); alert("Failed!"); } } }); return false; }); }); I found online the (html) but how else could this be done it seems that when my script returns true it will alert me saying failed even when though everything was successful. Hope someone can help thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.