Debian install netbeans - "No protocol specified"

506

I guest this comes too late, but instead of calling it from root you can try as the normal user with:

sudo ./netbeans-whatever.sh

or

sudo sh netbeans-whatever.sh

It seems to work also with uninstaller. You can also install as user for the user without using sudo.

Share:
506

Related videos on Youtube

Lauren
Author by

Lauren

Updated on September 18, 2022

Comments

  • Lauren
    Lauren over 1 year

    So I am a newb to php & mysql. I keep getting this error each time I fill out a form that I created. When I check phpmyadmin to see if the information from the form has been added to the table, it's nowhere to be found. I found a similar question on here and their problem was fixed by running a query to turn the strict mode off of SQL. I tried to do so and it added an entry to the table but all the values in the entry were 0. Here's my php block:

    <?php
    
        require('connect2.php');
        session_start();
        $username = $_SESSION['username'];
    
    
        //My queries will be here
        $bloodquery = mysql_query("SELECT * FROM `CodesBloodType` ORDER BY `BloodTypeText`");
        $donor_add = "INSERT INTO `Donor`(`DonorID`, `PersonID`, `DateRegistered`, `AgeRegistered`, `DonorPreRegistered`, `MedicalFacilityID`, `NationalLocalRegistry`, `NationalLocalRegistryID`, `Height`, `Weight`, `BloodTypeCode`, `OrganCriteriaID`, `LivingDonor`, `DirectedDonor`) VALUES ($donorid,$personid,$dateregistered,$ageregistered,$donorpreregistered,$medicalfacilityid,$nationallocalregistry,$nationallocalregistryid,$height,$weight,$bloodtypecode,$organcriteriaid,$livingdonor,$directeddonor)";
    
    
    
    
    //Check to see if something is entered in my fields, if so then define variables
    
    
    // Loop over field names, make sure each one exists and is not empty
    
    
    
    $required = array('donorid', 'personid', 'dateregistered', 'ageregistered','medicalfacilityid','nationallocalregistry','nationallocalregistryid', 'height', 'weight','organcriteriaid');
    $error = false;
    $var = $_POST['submit'];
    if($var){
    foreach($required as $field) {
      if (empty($_POST[$field])) {
        $error = true;
        if ($error) {
        echo $field. ' is empty';
        ?> 
        <html><br></html>
        <?php
        }
    }
    
      else{
        $error = false;
    
            }
    
    }
    
     if(!$error){
    
        $donorid = $_POST['donorid'];
        $personid = $_POST['personid'];
        $dateregistered = $_POST['dateregistered'];
        $ageregistered = $_POST['ageregistered'];
        if(isset($_POST['donorpreregistered'])){
        $donorpreregistered = "1";}
        else{
            $donorpreregistered = "0";
        }
        $medicalfacilityid = $_POST['medicalfacilityid'];
        $nationallocalregistry = $_POST['nationallocalregistry'];
        $nationallocalregistryid = $_POST['nationallocalregistryid'];
        $height = $_POST['height'];
        $weight = $_POST['weight'];
        $bloodtypecode = $_POST['bloodtypec'];
        $organcriteriaid = $_POST['organcriteriaid'];
        if(isset($_POST['livingdonor']))
        {
            $livingdonor = "1";
        }
        else{
            $livingdonor = "0";
        }
    
        if(isset($_POST['directeddonor'])){
        $directeddonor = "1";}
        else{
            $directeddonor = "0";
        }
    
    
    
    
        $result = mysql_query($donor_add);
        if (!$result) {
        die('Invalid query: ' . mysql_error()); 
        //echo "Form Submitted Successfully";    
    
            }
        }
    
    }   
    
    
    
    ?>
    

    Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,,,,,)' at line 1

    • FooBee
      FooBee almost 13 years
      I guess you don't run this either in an X session or with ssh -X? If it complains about a missing DISPLAY variable, it appears to need a GUI, which you are likely lacking or the variable would be present.
    • hmontoliu
      hmontoliu almost 13 years
      You meant export DISPLAY=:0.0 not extract DISPLAY=:0.0, don't you?
    • David
      David almost 13 years
      yes i meant export
    • John Conde
      John Conde about 9 years
      In the future always post the error message. Not all of us are mind readers.
    • Saagar Elias Jacky
      Saagar Elias Jacky about 9 years
      do you really need all those single quotes inside the INSERT statement? - just curious...
    • Lauren
      Lauren about 9 years
      Will do. Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',,,,,,,,,,,,)' at line 1
    • John Conde
      John Conde about 9 years
      Your values are obviously missing! How do you not see this?
    • Lauren
      Lauren about 9 years
      Please explain like I'm 5. I do not understand.
    • Jay Blanchard
      Jay Blanchard about 9 years
      Please, stop using mysql_* functions. They are no longer maintained and are officially deprecated. Learn about prepared statements instead, and use PDO.
    • Jay Blanchard
      Jay Blanchard about 9 years
      See all of the commas next to each other in the error @Lauren? There should be a value between each one.
    • Marc B
      Marc B about 9 years
      You're treating PHP like it can time travel. You're executing your INSERT query BEFORE you defined any of the variables that hold the values you're trying to insert.
    • newfurniturey
      newfurniturey about 9 years
      @SaagarEliasJacky Those aren't single quotes, they're backticks; it's an identifier quote character in mysql to mark table and column names =]
    • Michael Berkowski
      Michael Berkowski about 9 years
      At the time the variable $donor_add is created, all the field variables to populate it from $_POST have not yet been given values. The $donor_add = "INSERT...." needs to be done after all the vars are populated, just before mysql_query().
    • Jay Blanchard
      Jay Blanchard about 9 years
      $donorid,$personid,$dateregistered,$ageregistered,$donorprer‌​egistered,$medicalfa‌​cilityid,$nationallo‌​calregistry,$nationa‌​llocalregistryid,$he‌​ight,$weight,$bloodt‌​ypecode,$organcriter‌​iaid,$livingdonor,$d‌​irecteddonor are not populated. You need to move your query a place in the code after the variables have been set.
    • Lauren
      Lauren about 9 years
      Thank you for the clarification @MichaelBerkowski :)
    • halfer
      halfer about 9 years
      In addition to the feedback already given, you should be seeing notices/warnings in your development environment to alert you to the fact that variables are being read without being defined. If you don't see them, it is possible they are turned off in your PHP configuration. Try adding error_reporting(-1); at the start of your script temporarily (don't add this to live, but it is helpful during development).
  • Falcon Momot
    Falcon Momot over 8 years
    Running X as root?!