|
|
|
06-25-2005, 05:03 PM
|
#21
|
Thumbs Must Hurt
Join Date: Jun 2005
Model: 7520
Posts: 76
|
Thanks
Please Login to Remove!
Quote:
Originally Posted by bbieber
I have found that you need to have some additional perl modules installed. CGI.pm & File-Temp. I used CGI.pm-3.0.8.tar.gz & File-Temp-0.16.tar.gz
They don’t seem standard on a generic RedHat install.
I hope this helps.
Brian
|
Thanks Brain I just installed both of them and I was able to test the CGI.pm and it came back saying I had 3.10 which is what I installed. So that install seemed to work. Also installed the File-Temp as per the release notes and it seemed to install ok also but still getting the same messages from my earlier post.
I might be doing something wrong not that good with Linux yet. But figured it is easier to install bbcorrector on Linux than a Novell Server.
I also did not modify the BBCorrectorServer.cgi since it seemed fine for the perl path, and aspell seems to run from any directory I try.
Thanks,
Ted
|
Offline
|
|
06-26-2005, 08:11 AM
|
#22
|
Talking BlackBerry Encyclopedia
Join Date: Apr 2005
Location: Los Angeles, CA USA
Model: 9000
OS: 4.6.0.247
Carrier: AT&T
Posts: 209
|
PHP instead of Perl
If anyone is interested in running the server with PHP instead of Perl, I translated BBCorrectorServer.cgi from Perl into PHP as BBCorrectorServer.php.
I've tested it for awhile now and had no problems with it but I'm not an expert in Perl or PHP. The script works just like the cgi version. It takes the input text from the blackberry through _POST and writes it to a temp file on the server which then gets opened in aspell. The output of aspell is then formatted, written in xml and sent back to the blackberry.
PHP Code:
<?php
$text = $_POSTxxx91;'check'xxx93;;
if ( $text == NULL )
$text = $_GETxxx91;'check'xxx93;;
$tmpFile = tempnam("/", "bbCorrector");
$aspellcmd = "cat $tmpFile | aspell -a";
//Remove extra escape backslashes that were added by PHP
$text = stripslashes($text);
if ($mFile = fopen($tmpFile,"w")) {
$textArray = explode("\n",$text);
// Force Aspell to check whole line via ! ^ contol character
fwrite($mFile,"!\n");
foreach($textArray as $key=>$value) {
fwrite($mFile,"^$value\n", strlen($value) + 2);
}
}
fclose($mFile);
$mAspellOutput = shell_exec($aspellcmd);
//Delete temp file
$mDeleteOutput = unlink($tmpFile);
//parse $mAspellOutput
$mAspellOutputArray = explode("\n",$mAspellOutput);
$xmlPacket = "<spell-results>";
$lineIdx = -1;
$charCount = 0;
foreach($mAspellOutputArray as $key=>$value) {
if (substr($value,0,1) == "&") { //There is an error with suggestion
$corVals = explode(" ",$value);
$word = $corValsxxx91;1xxx93;;
$posAbsolute = substr($corValsxxx91;3xxx93;,0,-1) - 1 + $charCount;
$startPos = strpos($value,":") + 2;
$suggestion = substr($value,$startPos);
$suggestionArray = explode(", ",$suggestion);
// Start error element
$xmlPacket .= "<error>";
// Add word element which contains original misspelled word
$xmlPacket .= "<word>$word</word>";
$xmlPacket .= "<position>$posAbsolute</position>";
// Add each suggestion
foreach ($suggestionArray as $key=>$value) {
$xmlPacket .= "<suggest>$value</suggest>";
}
// Close error element
$xmlPacket .= "</error>";
}
elseif (substr($value,0,1) == "#") { //There is an error but no suggestion
$corVals = explode(" ",$value);
$word = $corValsxxx91;1xxx93;;
$posAbsolute= $corValsxxx91;2xxx93; - 1;
// Start error element
$xmlPacket .= "<error>";
// Add word element which contains original misspelled word
$xmlPacket .= "<word>$word</word>";
$xmlPacket .= "<position>$posAbsolute</position>";
// Close error element
$xmlPacket .= "</error>";
}
elseif (substr($value,0,1) == "*") {//No error
}
elseif (substr($value,0,1) == "@") {//Apsell About Line
}
else {
$lineIdx++;
$charCount += strlen($textArrayxxx91;$lineIdxxxx93;) + 1;
}
}
$xmlPacket .= "</spell-results>\n";
print $xmlPacket;
?>
Last edited by tateu; 06-27-2005 at 01:25 AM..
Reason: Fixed some PHP code
|
Offline
|
|
06-26-2005, 02:23 PM
|
#23
|
Knows Where the Search Button Is
Join Date: Dec 2004
Location: Los Angeles, California
Model: 8800
Carrier: at&t
Posts: 19
|
Ted,
I am not sure this is the problem. I have found when I transferred the BBCorrectorServer.cgi file from my windows box to my Linux box I needed to transfer in ASCII mode instead of Binary mode. For some reason that made a difference.
Brian
|
Offline
|
|
06-26-2005, 04:19 PM
|
#24
|
Talking BlackBerry Encyclopedia
Join Date: May 2005
Location: Michigan
Model: 7520
Carrier: Nextel
Posts: 265
|
All .cgi and .php files must be transferred in ascii mode or they will not work.
|
Offline
|
|
06-26-2005, 04:47 PM
|
#25
|
Thumbs Must Hurt
Join Date: Jun 2005
Model: 7520
Posts: 76
|
Ascii
I downloaded the BBCorrectorServer.zip directory to the Linux box and than copied the cgi file to the cgi-bin directory I didn't transfer through ftp and I also did it as root.
Just not having much luck setting it up under Redhat 9 is there another flavor of Linux that might be suited better for the BBCorrectorServer? I don't have a problem blowing away the Redhat it is just an extra server. Once it is running just taking an image of the box and making it a public BBCorrectorServer open to all that want to use it.
Hope to have it up and running soon was using bbspell the freeware version once in awhile so can't justify the yearly costs when I have a dedicated connection, static IP, and 4 domain names and an extra server that I can run it on. The only cost I will have is the time trying to get it working
Thanks for your help,
Ted
|
Offline
|
|
06-26-2005, 05:05 PM
|
#26
|
Knows Where the Search Button Is
Join Date: Dec 2004
Location: Los Angeles, California
Model: 8800
Carrier: at&t
Posts: 19
|
Ted,
I cannot recommend an operating system. I have gotten it to work on RHEL 4 WS & ES, and SUSE 9.2
I have not experimented with other operating systems.
Brian
|
Offline
|
|
06-26-2005, 06:20 PM
|
#27
|
New Member
Join Date: May 2005
Location: Spartanburg SC
Model: 7520
Posts: 13
|
With my bbcorrector setup, it was very simple. I have a linux box, kernel 2.4.21-27.0.4.ELsmp, Perl 5.8.0. Just upped the scripted chmod to 755 and all is well. The defaults in the script were inline with my server, so i didnt have to modify anything.
|
Offline
|
|
06-27-2005, 07:06 AM
|
#28
|
Thumbs Must Hurt
Join Date: Jun 2005
Model: 7520
Posts: 76
|
Quote:
Originally Posted by mistrfree
With my bbcorrector setup, it was very simple. I have a linux box, kernel 2.4.21-27.0.4.ELsmp, Perl 5.8.0. Just upped the scripted chmod to 755 and all is well. The defaults in the script were inline with my server, so i didnt have to modify anything.
|
Thats exactly what I want to be able to do. Who is the distro for the Linux version you are using?
|
Offline
|
|
07-01-2005, 07:20 AM
|
#29
|
Thumbs Must Hurt
Join Date: Jun 2005
Model: 7520
Posts: 76
|
I troubleshooted the 500 Internal error and came up with it being a problem with the file. I origanally downloaded the file on my linux box as root and unzipped it to the cgi-bin directory, and even tried to copy from one directory to the other also.
I didn't think I would have to ftp the program since I was working on the box it was going to, but I was wrong once the file was on my Novell Server I ftp'd to the Novell box from linux terminal set to acsii and transfered the file over right to the cgi-bin directory. Than chmod'ed it 755 and it worked fine.
So anyone else that might try it just make sure you ftp it to the box and not unzip from linux.
Just doing some backups on the system and than will post the domain for a public bbcorrector server.
Thanks for all your help,
Ted
__________________
BB Model: 7520
PIN: 40098213
Blackberry Messenger
|
Offline
|
|
07-02-2005, 07:34 PM
|
#30
|
Thumbs Must Hurt
Join Date: Aug 2004
Location: Denver, CO
Model: 8703e
Carrier: Sprint PCS
Posts: 97
|
Public BBCorrector Server?
Quote:
Originally Posted by darwin
Ok, in the other thread, it was mentioned that for BBCorrector to work, you need a CGI capable server to connect BBCorrector (formerly BBSpellCheck, not to be confused with another product called bbSpell) to.
If anyone can point me in the right direction, I'd be willing to set up a server through my hosting for Blackberryforums members, assuming the bandwidth requirement isn't astronomical (like, over 5-10GB/month).
|
Does anyone have a public server available for use?
Thanks.
|
Offline
|
|
07-03-2005, 12:22 PM
|
#31
|
Thumbs Must Hurt
Join Date: Jun 2005
Model: 7520
Posts: 76
|
Quote:
Originally Posted by supermanfan
Does anyone have a public server available for use?
Thanks.
|
Actually I just finished it up and it is online right now for anyone to use.
Just have to install the bbcorrector program to your BB and use this for the server URL:
"http://www.rebreathertech.com:81/cgi-bin/BBCorrectorServer,cgi"
Username and password leave blank if you have a nextel you will also have to check the disable MDS proxy in the configuration.
Also the URL is case sensitive so enter it exactly as above or you will get a 404 error
__________________
BB Model: 7520
PIN: 40098213
Blackberry Messenger
|
Offline
|
|
07-13-2005, 12:53 PM
|
#32
|
BlackBerry Extraordinaire
Join Date: Jun 2005
Location: NJ, USA
Model: 9650
OS: 6.0.0.524
PIN: 007
Carrier: Verizon
Posts: 2,762
|
I installed this and when I tried to go to your site via BB it says i am not authorized to view this page error 403. I composed an e-mail with obvious mistakes and no option to correct came up, please direct me to a place where there are instructions for it thanks.
__________________
BB Tour 9650
Running OS 6.0.0.524
|
Offline
|
|
07-13-2005, 02:29 PM
|
#33
|
Thumbs Must Hurt
Join Date: Jun 2005
Model: 7520
Posts: 76
|
Quote:
Originally Posted by KonTiki
I installed this and when I tried to go to your site via BB it says i am not authorized to view this page error 403. I composed an e-mail with obvious mistakes and no option to correct came up, please direct me to a place where there are instructions for it thanks.
|
Are you on a BES? Also what model BB do you have? Did you try to turn off your firewall and also check the MDS box?
__________________
BB Model: 7520
PIN: 40098213
Blackberry Messenger
|
Offline
|
|
07-13-2005, 07:23 PM
|
#34
|
BlackBerry Extraordinaire
Join Date: Jun 2005
Location: NJ, USA
Model: 9650
OS: 6.0.0.524
PIN: 007
Carrier: Verizon
Posts: 2,762
|
I have a 7250 and BWC. Firewall disabled and still cannot get in says access denied.
__________________
BB Tour 9650
Running OS 6.0.0.524
|
Offline
|
|
07-13-2005, 07:24 PM
|
#35
|
BlackBerry Extraordinaire
Join Date: Jun 2005
Location: NJ, USA
Model: 9650
OS: 6.0.0.524
PIN: 007
Carrier: Verizon
Posts: 2,762
|
I now see the spelling option but it still does not do the check. I wish there were instructions. Like for example do i need to have a browser open to the server while i do the check, or since i saw in the download a file folder called server does that mean i have to install a server at my machine? Help
__________________
BB Tour 9650
Running OS 6.0.0.524
Last edited by KonTiki; 07-13-2005 at 08:34 PM..
|
Offline
|
|
07-14-2005, 08:07 AM
|
#36
|
Thumbs Must Hurt
Join Date: Jun 2005
Model: 7520
Posts: 76
|
Quote:
Originally Posted by KonTiki
I now see the spelling option but it still does not do the check. I wish there were instructions. Like for example do i need to have a browser open to the server while i do the check, or since i saw in the download a file folder called server does that mean i have to install a server at my machine? Help
|
It's a very simple and plain program. You should see a icon with a "Aa" on the main screen of your blackberry. All that has to be done there is to put in a URL. On the 7520's they have to check the disable MDS proxy.
I did check both server's log files and I did see someone was hitting the wrong server so maybe that was you if your hitting my other server it will give an access denied for sure. The URL HAS to have the port in it :81 without that port it will goto the WRONG server.
The correct URL that has to be entered EXACTLY (Yes even case senitive).
Code:
http://www.rebreathertech.com:81/cgi-bin/BBCorrectorServer.cgi
This is on a Linux box so if you put in a small b instead of a capital B you will also get an error message. If you forget to put in the :81 you will goto another one of my servers and it will give you an error as well.
There is no username or password for the site leave them blank.
Once you put in the URL and set that up I have that icon hidden, than go into memo pad, email and test it you can start typing than click in the track wheel you will see Spelling click that and it should connect to my server and check the spelling for you and than return with any spelling errors underlined.
If something is spelled wrong move to that word with the track wheel and click the wheel in than select suggest spelling. From there you can scroll down and find the right spelling.
Let me know how you make out,
Ted
__________________
BB Model: 7520
PIN: 40098213
Blackberry Messenger
|
Offline
|
|
07-14-2005, 09:18 AM
|
#37
|
BlackBerry Extraordinaire
Join Date: Jun 2005
Location: NJ, USA
Model: 9650
OS: 6.0.0.524
PIN: 007
Carrier: Verizon
Posts: 2,762
|
Ted thanks for your response, I am still trying, I have checked and rechecked the spelling and the case for the server URL. It is 100% correct. If I try to get in through the browser to the sight I get the same 403 error still, If I try to correct a document I am getting something that says:"BBCorrector Error: Could not find a service book entry for IPPP".
So anything I should do I would appreciate very much. Thanks for the explanation above, I do have the icon with the Aa, since mine is not a 7520 (It is actually the 7250 from Verizon, i have left the MDS unchecked, though I have tried it both ways).
*******UPDATE*******UPDATE******
After retyping the URL again making sure it was correct and case sensitive, i decided to once again go in and try it with the MDS checked since it had just not worked with it unchecked,and it worked.
*******SO MORAL OF THE STORY IS THAT THE 7250 FROM VERIZON ALSO NEEDS THE MDS CHECKED******
THANKS A BUNCH TED
__________________
BB Tour 9650
Running OS 6.0.0.524
Last edited by KonTiki; 07-14-2005 at 09:26 AM..
|
Offline
|
|
07-14-2005, 10:08 AM
|
#38
|
Thumbs Must Hurt
Join Date: Jun 2005
Model: 7520
Posts: 76
|
Quote:
Originally Posted by KonTiki
Ted thanks for your response, I am still trying, I have checked and rechecked the spelling and the case for the server URL. It is 100% correct. If I try to get in through the browser to the sight I get the same 403 error still, If I try to correct a document I am getting something that says:"BBCorrector Error: Could not find a service book entry for IPPP".
So anything I should do I would appreciate very much. Thanks for the explanation above, I do have the icon with the Aa, since mine is not a 7520 (It is actually the 7250 from Verizon, i have left the MDS unchecked, though I have tried it both ways).
*******UPDATE*******UPDATE******
After retyping the URL again making sure it was correct and case sensitive, i decided to once again go in and try it with the MDS checked since it had just not worked with it unchecked,and it worked.
*******SO MORAL OF THE STORY IS THAT THE 7250 FROM VERIZON ALSO NEEDS THE MDS CHECKED******
THANKS A BUNCH TED
|
You are very welcome just glad to help out....Enjoy
__________________
BB Model: 7520
PIN: 40098213
Blackberry Messenger
|
Offline
|
|
10-17-2005, 11:46 AM
|
#39
|
New Member
Join Date: Oct 2005
Model: 7290
Posts: 1
|
is te server still up?
I tried the spelling function and it gave me an error "could not open tunnel - failed"
thanks
|
Offline
|
|
11-27-2005, 09:40 PM
|
#40
|
No longer Registered.
Join Date: Nov 2005
Location: Orlando, FL
Model: 8700c
Posts: 41
|
Is it possible to configure this to work if you're not on a BES? If so how would I go about configuring my BB to work correctly. I have the software installed on my 8700c and when I try to do a spell check I get the following error:
BBCorrector Error: could not open tunnel - failed
I am on Cingular using their BIS service. I would appreciate any and all help.
|
Offline
|
|
|
|