Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

May the bluebird of happiness twiddle your bits.


computers / rocksolid.shared.helpdesk / Bracket Match Not Found

SubjectAuthor
* Bracket Match Not FoundAnonymous
+- Bracket Match Not Foundtrw
`- Bracket Match Not FoundRetro Guy

1
Bracket Match Not Found

<e2d853a874908f1b696241010eb2b21b$1@news.novabbs.com>

 copy mid

https://news.novabbs.com/computers/article-flat.php?id=158&group=rocksolid.shared.helpdesk#158

 copy link   Newsgroups: rocksolid.shared.helpdesk
Path: i2pn2.org!.POSTED!not-for-mail
From: Anonym...@novabbs.i2p (Anonymous)
Newsgroups: rocksolid.shared.helpdesk
Subject: Bracket Match Not Found
Date: Wed, 23 Dec 2020 02:09:55 +0000
Organization: novaBBS
Message-ID: <e2d853a874908f1b696241010eb2b21b$1@news.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="6644"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Rslight-Site: $2y$10$3RBN/SOxK63PefHkNbiKD.J1ZRVfIQ73/UpXs2PukBXbUh4WeTOuq
 by: Anonymous - Wed, 23 Dec 2020 02:09 UTC

Hey. If you read some of my previous posts, like "Notice: Undefined Variable" and "Notice: Undefined Variable (continued)", you know that I had some difficulty with code that I wrote. One problem mentioned is that I get no error logs when I remove the captcha parts of my code after fixing the _SESSION error and registering for an account with only a username and password, yet still not getting registered. I think I MAY have been able to find the main problem. Not completely sure, though.

When I opened my text editor and scrolled through the code, I noticed that the brackets in VALUES('' , '".$user_name."', '".$password."') was giving my text editor a 'Bracket Match Not Found'. This just so happens to be heavily linked to the inserting of the username and password to phpmyadmin and is the only line of code that got this error message. Coincidence? Maybe, maybe not.

For the millionth time, please note that the different {number}, {color}, {text}, {host}, {username}, {password}, and {database} brackets are supposed to represent different elements in my code that I believe aren't too necessary to type out and are also elements that I feel uncomfortable sharing. I put multiple hashtags around the main line of code that I think you should focus on. Also, if you need any additional information or clarification, then please feel free to ask.

If you see why I'm getting this message, know of any possible reasons why I'm getting this message, and/or know how to fix this, then sharing would be much appreciated, as this line of code seems perfectly fine to me.

index.php:

<!doctype html>
<html>
<head>
<style>
*{margin:{number}px; padding:{number}px;}
#account{border-radius: {number}px {number}px {number}px {number}px; border: {number}px solid {color}; width:
{number}px; margin-top: {number}px; margin-left: {number}px; }
#login{border-radius: {number}px {number}px {number}px {number}px; border: {number}px solid {color}; width: {number}px; margin-top: {number}px; margin-left: {number}px; margin-right: {number}px; }
</style>
</head>

<body style="background-color:{color}">
<?Php
session_start();

$con = mysqli_connect("{host}", "{username}", "{password}", "{database}") ;

if(isset($_POST['register'])){
$user_name = $_POST['user_name'] ;
$password = $_POST['password'] ;

if($user_name != "" and $password != ""){

$q= "INSERT INTO `user` (`id`, `user_name`, `password`)
#####VALUES('', '".$user_name."', '".$password."')";#####

if(mysqli_query($con, $q)){
echo '{text1}' ;
}else{
echo "{text2}" ;
}
}else{
echo "{text3}" ;
}

}
?>
--
Posted on novaBBS
news.novabbs.com

Re: Bracket Match Not Found

<7716ca3c86e9c061a11cb467dcc1318b@def4>

 copy mid

https://news.novabbs.com/computers/article-flat.php?id=159&group=rocksolid.shared.helpdesk#159

 copy link   Newsgroups: rocksolid.shared.helpdesk
Path: i2pn2.org!rocksolid3!.POSTED.rocksolid3!POSTED.localhost!not-for-mail
From: trw...@anon.org (trw)
Newsgroups: rocksolid.shared.helpdesk
Subject: Re: Bracket Match Not Found
Date: Wed, 23 Dec 2020 08:09:15+0000
Organization: def5
Message-ID: <7716ca3c86e9c061a11cb467dcc1318b@def4>
References: <e2d853a874908f1b696241010eb2b21b$1@news.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: rocksolidbbs.com; posting-host="rocksolid3:10.128.3.129";
logging-data="32751"; mail-complaints-to="usenet@rocksolidbbs.com"
In-Reply-To: <e2d853a874908f1b696241010eb2b21b$1@news.novabbs.com>
 by: trw - Wed, 23 Dec 2020 08:09 UTC

>you know that I had some difficulty with code that I wrote.

That's what this group was created for.

>One problem mentioned is that I get no error logs when I remove the captcha

Might I suggest to follow some of the guides in here:
https://stackify.com/php-debugging-guide/

>the different {number}, {color}, {text}, {host}, {username}, {password}, and {database} brackets are supposed to represent different elements in my code that I believe aren't too necessary to type out and are also elements that I feel uncomfortable sharing.

While i agree that some stuff should not be shared, the problem I see with your approach (of changing the code for publishing) is that you/we will not catch any typos in the code, only wrong constructions or something like that. For me, typos are quite often the source of a problem. You might want to use a syntax checker (in your ide, or online), to make sure that your original code does not contain formal errors.

As for the line marked with the #####:
don't you need a value for "id" ? Seems to me like it would be empty, in which the inserting cannot work.

--
Posted on def4

Re: Bracket Match Not Found

<8d9eb003e71d7f9bfe437a8ab98d3731$1@news.novabbs.org>

 copy mid

https://news.novabbs.com/computers/article-flat.php?id=160&group=rocksolid.shared.helpdesk#160

 copy link   Newsgroups: rocksolid.shared.helpdesk
Path: i2pn2.org!rocksolid2!.POSTED.localhost!not-for-mail
From: retro....@rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.shared.helpdesk
Subject: Re: Bracket Match Not Found
Date: Wed, 23 Dec 2020 08:42:34 +0000
Organization: Rocksolid Light
Message-ID: <8d9eb003e71d7f9bfe437a8ab98d3731$1@news.novabbs.org>
References: <e2d853a874908f1b696241010eb2b21b$1@news.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: novabbs.org; posting-account="retrobbs1"; posting-host="localhost:127.0.0.1";
logging-data="5099"; mail-complaints-to="usenet@novabbs.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs.org
X-Rslight-Site: $2y$10$mAJn6dDp/gvvHZKwhwbNt.MD88GjVmJKyqwZ4LogF8p372N2AAIDa
 by: Retro Guy - Wed, 23 Dec 2020 08:42 UTC

Anonymous wrote:

> Hey. If you read some of my previous posts, like "Notice: Undefined Variable" and "Notice: Undefined Variable (continued)", you know that I had some difficulty with code that I wrote. One problem mentioned is that I get no error logs when I remove the captcha parts of my code after fixing the _SESSION error and registering for an account with only a username and password, yet still not getting registered. I think I MAY have been able to find the main problem. Not completely sure, though.

> When I opened my text editor and scrolled through the code, I noticed that the brackets in VALUES('' , '".$user_name."', '".$password."') was giving my text editor a 'Bracket Match Not Found'. This just so happens to be heavily linked to the inserting of the username and password to phpmyadmin and is the only line of code that got this error message. Coincidence? Maybe, maybe not.

The brackets look ok in my editor (vi). This is assuming that it's all one line, not broken into two lines.

When you run it, what get's echoed, text 1, 2 or 3?

While you're testing, echo all sorts of stuff (and delete it later). Like values of variables, echo "I'm HERE!" to see if you ever made it into part of the code. Use echo to see what's going on. I echo variables a lot when testing and it quickly shows me things like some variable isn't set, or has a trailing space or whatever. It's very helpful.

--
Posted on Rocksolid Light
news.novabbs.org

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor