cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
New

cPanel Location of Folder for PSpell Dictionary Files

I have an account using cPanel and I have installed PHP 5.6 and have PSpell enabled (configured with '--with-pspell=shared', and the .ini file at /opt/cpanel/ea-php56/root/etc/php.d/pspell.ini). It seems to function in a script, but a dictionary is not found by it. I need to know: What folder (full directory path) do I put the Dictionary file in so it can be used by pspell_new() and other spellchecker functions? Also, can I simply copy the dictionary file there using the cPanel File Manager, or does it require some command entered in Terminal?

1 ACCEPTED SOLUTION

@TygerG 

 

Take a look at this link http://www.serveridol.com/2014/01/20/how-do-i-enable-php-pspell-extension-and-verify-the-install/ 

 

There is a yum install for both pspell and aspell-en  

 

Yum in the linux install utility and it does all the compile and everything else.

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post

9 REPLIES 9
Super User IV

@TygerG 

 

1) I would HIGHLY recommend upgrading to PHP7.X as 5.6 is EOL and could have security issues.

 

Here are the instructions for defining a personal dictionary file

 

https://www.php.net/manual/en/function.pspell-new-personal.php

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Thank you PL281 for responding to my question.
 
I am aware of the 7.x / 5.6 issues. Thank you for your recommendation. 
 

Your suggested link does not address my question. The Pspell functions require a dictionary file (that has all words used for spellchecking) to be installed on the server. I have the Aspell dictionary file, but I need to know where in the file structure it is supposed to go, what directory it needs to be in. (I assume I can use the File Manager to upload it, but if not, I also need to know how to do so otherwise.) The pspell-new-personal( ) function would create a unique local dictionary for an individual User. I need to install a dictionary on the server that my PHP program can use with the other Pspell functions to check the spelling of words that are entered during the use of the program by any User. 
 
Re: Forum – I thought that the cPanel forum was the appropriate place to ask my question, and the correct answer would assist anyone else who might have a similar problem using cPanel and trying to install PHP and use Pspell with it. WHM/cPanel seems to have its own file structure, and it is different than a Unix or Windows operating system, so I thought maybe someone who has more experience with it could help me. Also, GoDaddy seems to have their own way of doing things that often are a little different than other hosting services. I figured this GoDaddy Community forum was a logical place to ask a question for people who are most knowledgable of their ways.

@TygerG 

 

You are in the correct forum - Do you have a VPS or a cPanel account ???  if it is just a cPanel account than it maybe an issue that you don't have access (although the dictionary should be there for the entire server)

 

cPanel/WHM is just a GUI for a Linux server - my understanding what what I was reading regarding pspell is that there is a global dictionary as part of the server / setup - the only reason to specify a dictionary is that you have specific words you want to add.

 

Also I have found that most systems have stopped using Server Side spell checkers 

a) as the use up resources

b) issues with the dictionary as you are finding

c) most modern browsers have spell check built into them for any form input thereby no longer requiring server side checking.

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Thank you for replying, PL281.
 
I'm an old saber-tooth (at 71, now) who first started programming and website designing before the turn of last century. My hosting back then was a "VPS" and once I was connected to the server, I could open a secure Terminal-like window, with Putty if I recall, and talk to the server directly using the Command line. It was FreeBSD and I could navigate to the appropriate directory and read and edit .config files myself. I had to know what I was changing, or risk great trouble, but I was good at what I did. Now, I am faced with using cPanel for the most part, and it has a thousand different graphic icons that I have to click to do virtually anything. I understand the need for this, but it gets tedious, and I spend a lot of time trying to learn what various icons are for and where things are located so I can make the changes I need. I AM gradually learning, but my mental processor chip runs at the speed of an Intel 486, and even with my internal math coprocessor, which still works quite well, I'm not that fast anymore.
 
Yes, I have a GoDaddy VPS server, using CentOS 6 + cPanel, with my own IP address, and it is supposedly "managed", but I don't really know what they do for me. I used to be able to call my hosting company's technical assistance and ask them questions if I had a problem and they would give me the information I needed or point me to the correct page in their documentation. Of course, that is no longer the case, and I don't have the hundreds of dollars a month it would require to get that kind of help. (I DO appreciate what you do here, though.)

Yes, I need to use a dictionary that is on my specific server, one that has a complete list of words in it already, but to which I can add and delete words in for my particular need, programmatically using PHP. A global dictionary was not set up (that I can find, and the error notices in PHP using Pspell functions indicate that there isn't one). Yes, this is not something that the User's browser can provide.
 
Pspell support on the cPanel forum says precisely what I need to do:
" You will need to install the Aspell dictionaries for the languages you require. They are available at: 
ftp://ftp.gnu.org/gnu/aspell/dict/0index.html#0.60
Here is an example of the commands you would run to install a dictionary:
Code:

# wget ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-7.1-0.tar.bz2
# tar -xjvf aspell6-en-7.1-0.tar.bz2
# cd aspell6-en-7.1-0
# ./configure
# make
# make install

"

Great. So far, so good. I have the Dictionary I want, and it's on my local desktop computer. But I still don't know where to go to install it within my cPanel page of icons, or where in the file structure the dictionary file I selected is supposed to be copied. My HTML/PHP files are in the /public_html/ directory of the /home/[myUserName]/ directory in File Manager, so I suspect the the PHP installation was done in the /root/ or whatever directory on my VPS that is deeper than the /home/ is. But I have no understanding on how to access this. The /.cpanel/ directory in /home/ contains nothing that looks relevant. I have other "user" accounts on the VPS, but they are not associated. WHM doesn't seem to contain anything useful.

  
I would greatly appreciate any insight you might be able to provide on this. 😺 

@TygerG 

 

Thanks for the additional information.....

 

So I would log into WHM and go to Terminal - this is the SSH terminal and you are in as root - Then you should be able to run the code you showed in your last reply (each line after the #) and it should install this for the server.

 

Hope this is pointing you in the right direction

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

Once in WHM, I had to use Search to find the Terminal option. But without WGet installed, the commands I listed (in my reply, which has since disappeared) didn't do anything. What I really need, wherever it might be located, is:
1. A way to upload the Dictionary file I have to my server where it can be accessed by PHP, 
2. The name of the directory on the server where the pspell( ) PHP functions can use it.
Terminal doesn't provide me that information or capability. Essentially, the File Manager of cPanel would do that for me, but it only works for one domain account at a time, not the whole managed server. I can't figure out how to do this with WHM, but I will keep trying to find the solution. By googling for cPanel and Pspell or Aspell, I did find another user here who had basically the same problem as I do. There's gotta be an answer somewhere. Thanks for your time and efforts, PL281!

@TygerG

You should be able to do
yum install wget

The instructions you posted isn’t just unzipping a file but rather compiling a program.
I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

I understand. I just updated my response. I already have the Dictionary file, so it shouldn't require compiling a program on my server. Just file transfer to the right location. I think.

Or, maybe I do, and the Yum thing is what I need. I will have to keep trying.

Thanks!

@TygerG 

 

Take a look at this link http://www.serveridol.com/2014/01/20/how-do-i-enable-php-pspell-extension-and-verify-the-install/ 

 

There is a yum install for both pspell and aspell-en  

 

Yum in the linux install utility and it does all the compile and everything else.

I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

Once your issue is resolved,
please be sure to come back and click accept for the solution

Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community

View solution in original post