Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Links 2 Character Question/Problem

Quote Reply
Links 2 Character Question/Problem
I am attempting to implement the "&" sign into my category names by editing the line in nph-build.pl (renamed all files to ".pl" & replaced all instances of ".cgi" to ".pl") & category.def. When I try to add or modify a category name I get the following error:

CGI ERROR
==========================================
Error Message : fatal error: /^[\w\d/_-&]+$/: invalid [] range in regexp at c:/inetpub/wwwroot/cgi-bin/links/admin/db_utils.pl line 94.

Script Location : C:\InetPub\wwwroot\cgi-bin\links\admin\admin.pl
Perl Version : 5.00503


Any help with this problem would be appreciated.
Quote Reply
Re: Links 2 Character Question/Problem In reply to
You need to make a change in two places:

1. category.def, %db_def:

Change:

Quote:
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],

To read:

Quote:
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-&]+$'],

2. nph-build.cgi, sub build_check_dir:

Change:

Quote:
my $chrs = quotemeta ("/_-");

To Read:

Quote:
my $chrs = quotemeta ("/_-&");

I hope this helps.


[This message has been edited by Bobsie (edited May 04, 1999).]
Quote Reply
Re: Links 2 Character Question/Problem In reply to
I changed both of those line before I posted the origional message. That was the error I got after doing what you said. I read through many of the post to the forum before submitting this question. I also looked in the links.cfg but realized that fix must have applied to the previous version.

Thanks for any insight you can provide.
Quote Reply
Re: Links 2 Character Question/Problem In reply to
Try changing the "&" in both places to look like: ^[\w\d/_-\&]+$.

I hope this helps.

[This message has been edited by Bobsie (edited May 05, 1999).]
Quote Reply
Re: Links 2 Character Question/Problem In reply to
Still the same error, any ideas?


CGI ERROR
==========================================
Error Message : fatal error: /^[\w\d/_-\&]+$/: invalid [] range in regexp at c:/inetpub/wwwroot/cgi-bin/links/admin/db_utils.pl line 94.

Script Location : C:\InetPub\wwwroot\cgi-bin\links\admin\admin.pl
Perl Version : 5.00503

Form Variables
-------------------------------------------
Description : test test
Footer :
Header :
ID : 11
Meta Description :
Meta Keywords :
Name : Local
add_record : Add category
db : category

Environment Variables
-------------------------------------------
COMPUTERNAME : EOSIIS4
COMSPEC : C:\WINNT\system32\cmd.exe
CONTENT_LENGTH : 123
CONTENT_TYPE : application/x-www-form-urlencoded
GATEWAY_INTERFACE : CGI/1.1
HTTPS : off
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
HTTP_ACCEPT_CHARSET : iso-8859-1,*,utf-8
HTTP_ACCEPT_ENCODING: gzip
HTTP_ACCEPT_LANGUAGE: en
HTTP_CONNECTION : Keep-Alive
HTTP_CONTENT_LENGTH : 123
HTTP_CONTENT_TYPE : application/x-www-form-urlencoded
HTTP_HOST : "Will give per request"
HTTP_REFERER : http://?/cgi-bin/links/admin/admin.pl?db=category&add_form=1
HTTP_USER_AGENT : Mozilla/4.51 [en] (Win98; I)
INCLUDE : C:\Program Files\Mts\Include
INSTANCE_ID : 1
LIB : C:\Program Files\Mts\Lib
LOCAL_ADDR : ?
NUMBER_OF_PROCESSORS: 1
OS : Windows_NT
OS2LIBPATH : C:\WINNT\system32\os2\dll;
PATH : C:\Perl\bin;C:\WINNT\system32;C:\WINNT;C:\Program Files\Mts
PATHEXT : .COM;.EXE;.BAT;.CMD;.VBS;.JS
PATH_INFO : /cgi-bin/links/admin/admin.pl
PATH_TRANSLATED : C:\InetPub\wwwroot\cgi-bin\links\admin\admin.pl
PROCESSOR_ARCHITECTURE: x86
PROCESSOR_IDENTIFIER: x86 Family 5 Model 1 Stepping 10, GenuineIntel
PROCESSOR_LEVEL : 5
PROCESSOR_REVISION : 010a
REMOTE_ADDR : ?
REMOTE_HOST : ?
REQUEST_METHOD : POST
SCRIPT_NAME : /cgi-bin/links/admin/admin.pl
SERVER_NAME : ?
SERVER_PORT : 80
SERVER_PORT_SECURE : 0
SERVER_PROTOCOL : HTTP/1.0
SERVER_SOFTWARE : Microsoft-IIS/4.0
SYSTEMDRIVE : C:
SYSTEMROOT : C:\WINNT
USERPROFILE : C:\WINNT\Profiles\Default User
WINDIR : C:\WINNT
Quote Reply
Re: Links 2 Character Question/Problem In reply to
Note: When doing either of the two previous suggestions for adding extra characters I can nolonger Add or Modify any category name without getting the above message regardless of whether the name I am using contains the character or not.
Quote Reply
Re: Links 2 Character Question/Problem In reply to
Trying moving the & to the beginning of the list. I have found that, for some reason, that seems to help. Try it that way with and without the "\" character preceding it.
Quote Reply
Re: Links 2 Character Question/Problem In reply to
That did it, Thanks for all the assistance!