Debian install netbeans - "No protocol specified"
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
.
Related videos on Youtube
Lauren
Updated on September 18, 2022Comments
-
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 almost 13 yearsI guess you don't run this either in an X session or with
ssh -X
? If it complains about a missingDISPLAY
variable, it appears to need a GUI, which you are likely lacking or the variable would be present. -
hmontoliu almost 13 yearsYou meant
export DISPLAY=:0.0
notextract DISPLAY=:0.0
, don't you? -
David almost 13 yearsyes i meant export
-
John Conde about 9 yearsIn the future always post the error message. Not all of us are mind readers.
-
Saagar Elias Jacky about 9 yearsdo you really need all those single quotes inside the INSERT statement? - just curious...
-
Lauren about 9 yearsWill 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 about 9 yearsYour values are obviously missing! How do you not see this?
-
Lauren about 9 yearsPlease explain like I'm 5. I do not understand.
-
Jay Blanchard about 9 yearsPlease, stop using
mysql_*
functions. They are no longer maintained and are officially deprecated. Learn about prepared statements instead, and use PDO. -
Jay Blanchard about 9 yearsSee all of the commas next to each other in the error @Lauren? There should be a value between each one.
-
Marc B about 9 yearsYou'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 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 about 9 yearsAt 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 beforemysql_query()
. -
Jay Blanchard about 9 years
$donorid,$personid,$dateregistered,$ageregistered,$donorpreregistered,$medicalfacilityid,$nationallocalregistry,$nationallocalregistryid,$height,$weight,$bloodtypecode,$organcriteriaid,$livingdonor,$directeddonor
are not populated. You need to move your query a place in the code after the variables have been set. -
Lauren about 9 yearsThank you for the clarification @MichaelBerkowski :)
-
halfer about 9 yearsIn 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 over 8 yearsRunning X as root?!