I am trying to use the pspell function in my php application I am developing however when I run my code I get the error: "Call to undefined function pspell_new()". I am using an Apache 2.4 server on my localhost to run the application. Nothing I do seems to fix the problem. I have downloaded the aspell/pspell module with a "en" dictionary. I added the pspell-15.dll and aspell-15.dll to my System32 folder and I enabled the extension=php_pspell.dll line in my php.ini file and restarted the apache 2.4 service. What am I missing here because nothing seems to work? Thanks.
As of php 5.3. Pspell is no longer supported/bundled. Instead you can use the enchant which is bundled by default in 5.3.
Related
I am trying to configure a server using Apache 1.3 (apache-httpd-openbsd) , PHP 5.5 and MySQL on an OpenBSD 5.6 machine.
The problem occurs when i try to load the PHP module into Apache. I have added the following line in my httpd.conf file:
LoadModule php5_module /usr/local/lib/php-5.5/libphp5.so
The problem is that when i try to load this file by using
apachectl start
I get a bunch of errors like this:
/usr/local/sbin/httpd:/usr/local/lib/php-5.5/libphp5.se: undefined symbol 'apr_bucket_eos_create'
It seems that the PHP library refers to APR methods in Apache that should be included in the Apache distribution that i have. How can i help PHP to find those methods and be able to run on my server?
I found the issue and the solution.
After investigating my configuration further I noticed I had the Apache 2 version of PHP installed (php-5.5.14p0-ap2) instead of the correct 1.x one (php-5.5.14p0). APR in the 1.x versions of Apache uses "ap_" instead of "apr_" in their method signatures which was the cause of the problem.
Hi friends i am using Apache 2.4.4 (Win64), PHP 5.4.12. I need to install a new extension in it. I have a dll file of that extension i.e. pspell.dll. How should i make it work in my Apache? I have copied this dll to apache/Apache2.4.4/bin/. And enabled extension=php_pspell.dll in apache/Apache2.4.4/bin/php.ini. Restarted my apache but still getting no sign of this extension in phpinfo();. Please tell me what should i do?
Also getting this error:
Fatal error: Call to undefined function pspell_new()
Check server logs to see where is the problem.
Usually it's because file can't be found on disk or DLL file is not compatible with PHP - both PHP and DLL have to be compiled for same architecture, with same compiler and thread safety options.
I am trying of install the dependency manager for php "composer", but "composer" needs the extension "phar". I've realized php6 comes with phar by default, but is disabled and not necessary in order to execute "phar" files.
When I try execute "composer.phar" (in the cmd: php composer.phar) it throws the error:
Fatal error: Class 'Phar' not found in composer.phar on line 13.
If I try to execute the Composer installer, "installer.php" (in the cmd: php installer.php) throws this error:
Some settings on you machine make composer unable to work properly. Make sure that you fix the issues listed below and run this script again:
The phar extension is missing. How can I fix this?
Should I install it or recompile php without --disable-phar I am using appserv 2.6.4 (apache 2.2, php6, mysql 4).
You really shouldn't use cutting edge theoretical software. PHP6 doesn't actually exist. Downgrading to a more realistic version of appserv would solve your problem. But if you insist on using 2.6.4, you should do the following:
check that phar.so exists in the php extensions directory. If not, you need to install that extension.
if it exists, check if it's listed in php.ini as extension=phar.so. If it's not, add that line.
if it is, check that it's listed in the php.ini that command line PHP uses, too. Command line PHP and web PHP sometimes use different php.ini files, and while one might have phar.so activated, the other might not.
I need the MongoDB PHP driver on my CentOS 5.4 machine. My PHP version is 5.1.6. I downloaded the RPM and installed it. That created several files in /usr/bin directory. I copied
/usr/bin/mongo
to
/usr/lib/php/modules
which was what extension_dir showed on doing phpinfo();.
I also added
extension=mongo.so
in /etc/php.ini.
However on executing my PHP script, i still get
Mongo class not found.
What's going wrong here ?
Also, my phpinfo() shows PHP version 5.1.6 whereas running PHP from command line shows 5.3.3. Could anything be wrong with that ?
Thanks in advance.
You're saying your webserver and command line PHP report different versions. These are going to be installed in different locations, and their extensions are API incompatible with each other.
When you installed the php_mongo extension, it may have used the command line php to determine the directory to install the extension to.
Make sure you have the correct php_mongo for the php version of your webserver, and it is in the correct extensions directory. (get the directory from the php.ini returned by phpinfo())
I hope you realise PHP 5.1 is also many years out of date. Unless you have a specific reason to use a version that old, you should also look at upgrading to a more recent version.
Edit:
Just read your comment "I must also mention that /usr/bin/mongo is a binary executable file but its not having a .so extension. Im copying it as is to /usr/lib/php/modules"
No no no! :)
This is the mongo command line client. This is not the PHP extension!
You can run a find /* -name "mongo.so" to see where the installer put the file, this will probably also give you an indication of which version of PHP it was installed for.
It looks as though you are confusing the RPM-packages for the MongoDB server with the requirements to install the MongoDB PHP driver. The PHP driver provides access to the server from your PHP applications, and does not install any command line tools.
restart httpd !
yum service httpd restart
I have developed a PHP site using PHP 5.3.4 and deployed it to a server that has PHP 5.2.6 installed. I am not doing anything fancy; in fact, the only major library I am using is PHP's native SOAP library.
However, when I test my deployed site, I get the error:
Fatal error: Class 'SoapClient' not found in (path) on line 20
Are there any major differences between PHP 5.2.x and 5.3.x with respect to the SOAP library? I have already changed the configuration files. (Well, actually I told the sysadmin to do it, because I don't have permission to do so.) And I get the same error. Any ideas?
EDIT: More information...
I'm deploying my site to a Windows server.
The server has AppServ installed.
For some reason I don't understand, PHP's configuration file is C:\Windows\php.ini instead of PHP_DIR\php.ini.
I dont think soap is installed on the server try
sudo aptitude install php-soap
change the following line in php.ini:
;extension=php_soap.dll // before
extension=php_soap.dll // after
this enables the soap extension since PHP 5.0