[prev in list] [next in list] [prev in thread] [next in thread] 

List:       aspell-user
Subject:    [Aspell-user] Enabling pspell in PHP on Mac OS X 10.6
From:       Torrey Jones <torrey () curiousmedia ! com>
Date:       2011-11-18 22:12:49
Message-ID: 81FE7BE7-3B53-474D-8F50-FBD612AD2153 () curiousmedia ! com
[Download RAW message or body]

Hello,

I've been attempting to get the pspell functions in PHP to work for a while now with \
no success.  I was directed by http://php.net/manual/en/function.pspell-new.php to \
"check out inline manual pspell website:» http://aspell.net/."  This led me to \
conclude that I must install aspell in order to get the PHP pspell functions to work, \
so that's what I did.  Before proceeding, I shut down MAMP (Mac, Apache, MySQL, and \
PHP) to avoid any conflicts during the install process.

First, I installed aspell-0.60.6.1 as well as aspell6-en-7.1-0, doing the \
"./configure" and "make" and "sudo make install" steps for each.  I'm able to confirm \
from the terminal command line that aspell is actually working ("aspell help" yields \
a nice long list of command syntax, options, and available dictionaries).

Next, I downloaded the PHP source code for php-5.3.6 (which is what my version of \
MAMP came with, and I didn't want to upset the apple cart by trying to change \
versions) then recompiled it using the following command:  "./configure \
--prefix=/Applications/MAMP/bin/php/php5.3.6/bin \
--exec-prefix=/Applications/MAMP/bin/php/php5.3.6/bin \
--sysconfdir=/Applications/MAMP/bin/php/php5.3.6/conf \
--with-config-file-path=/Applications/MAMP/bin/php/php5.3.6/conf --with-pspell" \
(NOTE: I was not able to supply the --with-pspell option with a directory because I \
couldn't figure out which directory it wanted.  I tried the directory returned by the \
command "which aspell" so it was "--with-pspell=/opt/local/bin/aspell" for me, but \
that caused this error "configure: error: Cannot find pspell".  So I simply left off \
the directory and it appeared to work.)  make
	sudo make install

After this, I restarted MAMP and it seemed to me that I should be able to use \
pspell_new() and then all the other pspell functions in PHP, but they're still not \
working.  By checking my PHP log file, I see this error: "PHP Fatal error:  Call to \
undefined function pspell_new() in /Applications/MAMP/htdocs/test.php on line 23"

What am I missing here?  How come PHP isn't recognizing my aspell installation and \
using it for the pspell functions?

Thanks in advance,
Torrey


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic