php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16288 Timeout while checking on a string
Submitted: 2002-03-26 09:56 UTC Modified: 2002-08-23 20:30 UTC
Votes:7
Avg. Score:4.6 ± 0.5
Reproduced:7 of 7 (100.0%)
Same Version:4 (57.1%)
Same OS:3 (42.9%)
From: loginx at linkadmin dot org Assigned: vlad (profile)
Status: Not a bug Package: Pspell related
PHP Version: 4.1.2 OS: RedHat 7.2
Private report: No CVE-ID: None
 [2002-03-26 09:56 UTC] loginx at linkadmin dot org
Hi,

After having a few problems with the RedHat's pre-installed RPM's for Aspell and Pspell, I decided to remove them and grab the latest versions on the official website, versions:

aspell-.33.7.1
pspell-.12.2
php 4.1.2

I first compiled  pspell (./configure ; make ; make install)
then aspell the same way
then in the modules dir for pspell I did ./add-modules and it seemed to work, then I simply compiled PHP with:
./configure --with-apxs=/usr/sbin/apxs --with-sybase=/usr/local/freetds/ --with-pdflib --enable-debug --enable-trans-sid --with-pspell ; make ; make install ; /etc/init.d/httpd restart ; echo all done

And everything seemed to work so far but then while calling a simple script, I get the following error:
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/spellcheck.php on line 9...
here is the script:

<?php
$string = "checking the pspell iinterface";
echo $string . "<br>\n";
$string = str_replace(",", "", $string);
$keys = explode(" ", $string);
$mylink = pspell_new("en");
foreach($keys as $value)
{
        if (!(pspell_check($mylink, $value)))
        {
                echo "$value - invalid spelling";
                $suggest = pspell_suggest($mylink, $value);
                echo "<br>Suggesting $suggest";
        }
}

Did they break backward source compatibility again or is it a problem with my config or install ?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-26 18:12 UTC] vlad@php.net
I use the *exact* same configuration on my test box and it works (redhat7.2, php4.1.2, same exact versions of pspell and aspell).

Two questions: 
- can you build and run a sample app in pspell/examples directory? (e.g. 'make example-c' followed by './example-c en')?

- what are your build steps when building aspell and pspell, and in which exact order?

I suspect misconfiguration :(
 [2002-03-26 20:44 UTC] loginx at linkadmin dot org
went in /usr/local/downloads (where I build packages before installing them) and built example-c, it works perfectly fine.

my steps for installing pspell, aspell and php were:

Pspell:
cd /usr/local/download/pspell
./configure
make
make install
cd ../aspell
./configure
make
make install
cd ../pspell/modules
./add-modules
cd ../../php
./configure --with-apxs=/usr/sbin/apxs --with-sybase=/usr/local/freetds/
--with-pdflib --enable-debug --enable-trans-sid --with-pspell ; make ;
make install ; /etc/init.d/httpd restart ; echo all done
 [2002-03-27 08:55 UTC] loginx at linkadmin dot org
I don't know if I'm supposed to open the bug report again or not...
 [2002-04-02 21:21 UTC] vlad@php.net
Sorry, took me a while to reply

After you do:
./add-modules

did you remember to do rebuild pspell?
that is,
./add-modules
cd ..
make
make install

???

That should fix the problem.
 [2002-04-03 10:08 UTC] loginx at linkadmin dot org
Okay well unfortunately, I just tried this and it didn't work so I tried again from scratch...
pspell:
./configure
make ; make clean install
aspell
./configure
make ; make clean install
pspell again:
./add-modules
cd .. ; make ; make install
php:
./configure --with-apxs=/usr/sbin/apxs --with-sybase=/usr/local/freetds/ --with-pdflib --enable-debug --enable-trans-sid --with-pspell
make
make install

/etc/rc.d/init.d/httpd restart


still the same timeout...
 [2002-04-03 13:47 UTC] vlad@php.net
Ok. Back to the question I asked earlier then.

Could you go into the directory where  pspell source is and from there to examples, and try to compile and run an example:

cd pspell/examples
make example-c
./example-c en
s helllo

and please tell if it gives you a list of suggestions for the misspelled word 'helllo'.

 [2002-04-03 17:30 UTC] loginx at linkadmin dot org
Yes, as before, it still works fine and I do get a list of suggestions for the word helllo.
 [2002-04-09 15:39 UTC] loginx at linkadmin dot org
I tried again everything, first compile pspell, then aspell (from the author's website), then went back on aspell, made the modules, recompiled and installed pspell, tryed the example (it worked), recompiled php, still timeout of 30 seconds...
no error in /var/log/messages in /var/log/httpd/error_log no error except the obvious "/var/www/html/spellcheck.php(4) : Fatal error - Maximum execution time of 30 seconds exceeded" one, I'm clueless...

Vlad, would you like to check it out for yourself ?
I could set you up a guest account to see if there's any problem that I wouldn't have detected...

Thanks.
 [2002-08-23 20:30 UTC] iliaa@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

If you still have the problem make sure that the pspell library your php is linked against and not the one you've compiled. Redhat's known for store libraries in 'unique' paths, it is likely that you have 2 seperate libspell libraries and your php is being linked against the wrong one.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 22:01:27 2024 UTC