Jump to content

Arnsenal

Members
  • Posts

    34
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Arnsenal's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi Guys Thanks For Looking At Least I found the solution in the depths of the easy php forum, they dont make it very easy to find and its rather important, anyways... If anyone else runs into this problem just follow the link, http://www.easyphp.org/forums/52/151095/how_to_run_php_from_command_line_
  2. Hello Ive been trying to install Symfony 2, I got it installed, the demo is working. Now Im trying to install Composer via the excutable that is available at thier website. When I select the php exe file and hit next during the installation I get... PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\NVIDIA.... (more win PATH values)... C:\Program Files (x86)\EasyPHP-12.1\php\php546x130322180633\ext\php_bz2.dll' - The spcified module could not be found. It give me this dialouge box about 15 times for different dlls which can be seen by the changing file in the last directory path listed above. As you may see I am using easy php In the php.ini file easy php has their ${path} variable, I tried changing that to the actual path without the ${path} and I imediately got the dialogue boxes again, just by saving the ini file. ; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir ; extension_dir = "./" ; On windows: extension_dir = "${path}\php\php546x130322180633\ext\" Ive also included the location of all the dlls in the Windows Path envrioment vaiable. I really have no idea how this all works and have been at it for a total of oh maybe 7 hours trying to figure it out. Can anyone help? Thanks, Jerry
  3. Christian F. That is exactly what I am trying to do!! Requinix, thank you for the detailed response!! If you guys still think persistent connections is not the way to go then I will drop the idea. The other way to go, I figure, is to have the application just create a connection with the correct user type as the application needs it. I thought persistent connections would be good because anytime my app needs scripting I will need a connection to the database, therefore if I have 1000 users on the site they will not be continually connecting to the database and therefor improving the applications performance.
  4. Hello Masters... Freaks I have a PDO Persistent Connections question. 1. If I connect to mySQL using PDO persistent connections turned as so.... $db = new PDO("mysql:host=localhost";"dbname=$this->dbName"; "$this->mySQLuser", "$this->mySQLpassword",array(PDO::ATTR_PERSISTENT => true,PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION )); 2. Then I rerun this script (I rerun this script because it is a class that is auto loaded). 4. Will PDO reconnect to mySQL? Will PDO reconnect if the connection parameters change? The whole idea is to create db class that connects to mySQL using a user name and password that changes depending on the state of the user (logged in, not activated, not logged in). (Thought this would improve security because of the changing of the mySQL privliges based on user state, but Im a noob so I really dont know if it helps) Here is my full script. <?php class db { private $dbName='vulnVult'; public $tableName='users'; protected $mySQLuser='anon'; private $mySQLpassword="$this->mySQLuser".'password'; private $db; function __construct($PDO) { try { $db = new $PDO("mysql:host=localhost";"dbname=$this->dbName"; "$this->mySQLuser", "$this->mySQLpassword",array(PDO::ATTR_PERSISTENT => true,PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION )); //Following Logic Sets MySQL user type if ($_SESSION['userID']) { $query= 'SELECT `activated` from `users` where'."$SESSION['userID']".'=`userID`'; $stmt = $db->query($query); $row = $stmt->rowCount(); if ($row = 1) { $this->mySQLuser='registered'; } else { $this->mySQLuser='notActivated'; } } else { $this->mySQLuser='anon' } // return a new PDO object with the corrct MySQL user type. Persistent Connection is On. return new $PDO("mysql:host=localhost";"dbname=$this->dbName"; "$this->mySQLuser", "$this->mySQLpassword",array(PDO::ATTR_PERSISTENT => true,PDO::ATTR_EMULATE_PREPARES => false, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION )); } catch (PDOException $e) { echo "<br />There was a problem connecting to the database : ".$e->getMessage()."<br />"; die(); } } } $db = new db(PDO); ?>
  5. Very long explanation, Very easy fix. All I had to do was add :last to my Jquery selectors. Jquery so good.
  6. Yes, peipst9lker is right, it appears your script is running before the DOM's are finished loading, rendering it useless.
  7. Do you have Jquery linked in your HTML doc? <script src"../myrelative/jquery/directory/jquery1.5.js"></script>
  8. If you have Jquery linked in your document you can use this. <script src="../myRelative/js/directory/jquery1.7.js"></script> //link that make Jquery available to you browser. <script type="text/javascript"> $(".del").click(function(){ $(this).parent().remove(); }) </script> I changed your html to suit... You can easily change your all you <a> tags to have a class="del" by using the replace function of you text editor. <div id='50' class='player' style='display: block;'> <a class="del" href='#' >X</a> Beck, John <input type='hidden' id='input' name='starters[]' value='50' /> </div>​​​​​​​​​ Here is a working example... http://jsfiddle.net/42xkK/
  9. If you have a link to a Jquery file in your html document you can use this. <script type="text/javascript>$("input").before("<button>My Button</button>");</script> If we need to be more specific about which inputs should get buttons give them a class and we can do something similar. Does this help? Jerry
  10. Hello All I have a problem with my following example on js fiddle. http://jsfiddle.net/7nx6j/2/ My goal is to append on additional group of input fields into a existing form when a button is clicked. The server side php needs the name attributes of the input fields to be unique. So with j query I copy and append a div containing the addition input elements into a containing div when a button is clicked. Also, I change the value of the name attributes by incrementing a var and appending that number value to the existing value of all the name attribute. It works except for when I go to add the 2nd set of input elements. The Jscript selector selects all the existing name attributes with the ascendant class .appendRunTableRight and appends the increment value. So the first set of input elements will have a name attribute looking like : name="mill_rpm1_2_3" the second set will look like: name="mill_rpm2_3" and the third: name="mill_rpm_3" and so on... So logically the jquery selector must only select the last div with class .appendRunTableRight not all of them. Given my current script Im not sure how to rewrite it to fix the problem. Here is to hoping that someone will understand my problem and what Im trying to do! Thank You
  11. Alright!! Thanks Much Requinix, That's what I had in mind but didn't know how to use static properties to do such a thing. That will work perfectly thank you!!
  12. Hello, I have a db.php that initializes a MySQLI object. I have other scripts that include this db.php script. Is it possible to use the MYSQLI object inside functions from these other scripts that are including the db.php without passing the MYSQLI object as a parameter? Basically is there a way I can make the scope inside function have access to mysqli object without passing it in as a parameter? Thanks
  13. JC Bones The example replacement code you gave we works except that its seems the internal pointer of the $row array is always advanced 1 row when the for each statement executes. So this means that the first row is never printed out to the html table. I've tried using prev($row) right before the for each statement, but it had no affect. Any thoughts? Never Mind!! I didn't comment out the first $row = $result->fetch_row(); All works great.
×
×
  • 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.