Fatal Error on Step 16, and Aspell/PSpell issues


(Matt) #21

Here's what Pear says:


PEAR executables directory bin_dir /usr/bin

PEAR documentation directory doc_dir /usr/lib/php/docs

PHP extension directory ext_dir /usr/lib/php/extensions/no-debug-non-zts-20020429

PEAR directory php_dir /usr/lib/php

PEAR Installer cache directory cache_dir /tmp/pear/cache

PEAR data directory data_dir /usr/lib/php/data

PHP CLI/CGI binary php_bin /usr/bin/php

PEAR test directory test_dir /usr/lib/php/tests

Cache TimeToLive cache_ttl 3600

Preferred Package State preferred_state stable

Unix file mask umask 22

Debug Log Level verbose 1

HTTP Proxy Server Address http_proxy <not set>

PEAR server master_server pear.php.net

PEAR password (for password <not set>

maintainers)

Signature Handling Program sig_bin /usr/local/bin/gpg

Signature Key Directory sig_keydir /usr/etc/pearkeys

Signature Key Id sig_keyid <not set>

Package Signature Type sig_type gpg

PEAR username (for username <not set>

maintainers)


(Andrei Railean) #22

You’ll need to modify your php.ini file. The PHP is not seing PEAR, at least it is not seing the right PEAR.


Your PEAR config says that packages are kept in /usr/lib/php stated on this line

    PEAR directory php_dir /usr/lib/php
PHP’s include path is
    include_path	.:/usr/local/php/lib/php
Open php.ini located at /usr/local/php/lib/php.ini, find the line that says
    include_path = “.:/usr/local/php/lib/php”
comment that line out by preceding it with a # character. define a new include path by pasting the following above or below that line
    include_path = “.:/usr/lib/php”


Save. Restart apache. See if you still get the same error.

(Matt) #23

Thanks, I'll try it later today and post back. (I'm not going to be able to tinker until tonight/Monday as I am in meetings for the rest of the day)


Regards,

Matt


(Matt) #24

OK - its getting stranger and stranger.


my copy of php.ini doesn't have that line anywhere. The closest is

;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories ;

;;;;;;;;;;;;;;;;;;;;;;;;;



; UNIX: "/path1:/path2"

;include_path = ".:/php/includes"



So I commented it out and replaced it with

;include_path = ".:/usr/lib/php"



did a sudo apachectl graceful and it still failed to find cache.php on the install and gave me the same error.



What is strange is that when I search in the finder I have two complete php folders, one at

usr/lib/php (this is where i can see cache.php)

and one at

(usr/local/php/lib (where I can see php.ini)



The contents look pretty similar but the aspell folder isn't in either of them, it is in a folder called

sw/share/aspell



In the short terms I can live without spelling, )but I'd like to know why it doesn't show up) but what is going on with my PHP directories and why does my php.ini file have completely different code in it to what was outlined?



In classic blundering fashion I have copied and pasted my PHP content into the folder that the installer was looking for and it seems to have all worked… I realise this probably isn't the proper way to go about it, but I really just need to get something running so I can show people around the office and start to explain it to them.



But what do I have to do to get PSpell working and visible now that I have it installed?



Thanks,

Matt


(Avi Miller) #25

Aspell/Pspell doesn't need to be in the PHP directory, but PHP does need to be complied with Pspell support. If the PHP you're using doesn't have this, it won't find the libraries. This is why I recommend Complete Apache and Complete PHP for MacOS X – it comes with all the good stuff already enabled. :slight_smile:


(Andrei Railean) #26

oops, my bad. You should use ";" to comment things out. So the line you just introduced is not active. Remove the ";" and try again.


(Matt) #27

But the Requirements page on the MySource site specifies that Apache 2 is not fully supported? I'm having enough trouble with the basic install, I'm not sure I know enough to tweak my mac to use Apache 2 (it serves sites from a different location than the basic 10.3.x install).


If I can get a rough version working and get some content in I'll be happy! do you have any tips on how I can get PSpell to show up without going to Apache 2?



Thanks,

Matt


(Andrei Railean) #28

First try it without aspell. The problems you're getting now are not because of lack of support for aspell/pspell. Once php stops complaining about missing PEAR packages and you still cannot get Matrix to run, you might consider compiling php from source. That's a bit tricky, but you might be able to do it in a day. There are good instructions on recompiling php on the apple website.


(Sam Bauers) #29

If I can chime in…


I can fix your PEAR problem, but not your ASPELL problem.

The entropy php binaries don't support ASPELL at the moment mainly because you need to have ASPELL installed for it to work and it is not part of a standard OSX system. So Marc doesn't include it.



You have two PHP directories at the moment:

    • the standard OS X version installed in /usr
    • the Entropy.ch version installed in /usr/local/php



      From what I have read so far, you are running PEAR out of install 1, but your apache config is pointing to install 2. Clearly not going to work very well.



      You need to run PEAR from the following location in install 2 to enable and disable PEAR modules.



      /usr/local/php/bin/pear



      First run:

      /usr/local/php/bin/pear list



      To check it is working at all.



      Then upgrade the base pear package there:

      sudo /usr/local/php/bin/pear upgrade pear



      (You will need to have administrator access to the machine and supply your password at least the first time you use sudo)



      Then upgrade any existing packages there:

      sudo /usr/local/php/bin/pear upgrade-all



      Then install or upgrade any packages as needed there (you will probably need to do this as root using sudo - or fix the permissions - using sudo as above is easier) e.g.:

      sudo /usr/local/php/bin/pear install Cache



      If anything gives you trouble whilst attempting to upgrade it, just un-install it and re-install it.



      Now, and here's the undocumented part, you need to fix up a folder permission if it's wrong…



      The Matrix install seems to want to write some files in your PHP install so make sure that the web server can write to the following directory:

      /usr/local/php/lib/php



      The easiest (and most insecure) way to do that is:

      sudo chmod 777 /usr/local/php/lib/php



      You will then need to go and undo that little bit of buggery you did earlier to the php.ini file at:

      /usr/local/php/lib/php.ini



      Line:

      include_path = ".:/usr/lib/php"

      Should go back to:

      include_path = ".:/usr/local/php/lib/php"



      Or just copy the php.ini-recommended file there over the top of your fiddled with one:

      sudo cp /usr/local/php/lib/php.ini-recommended /usr/local/php/lib/php.ini



      Restart apache:

      sudo apachectl graceful



      And try again.



      To be extra cautious dump the old matrix directory and make a fresh one from the original download. The install directory should be fine to use again. Start from step 1.



      I know it looks like a lot to do, but it just looks that way. It's really not a big deal.



      Of course your next challenge is to get it working on a mac browser… :rolleyes:



      Sam



      P.S. does the neatest and most correct post in the thread get a prize?

(Sam Bauers) #30

I’d also recommend using darwinports instead of fink.


Darwinports has the advantage that it detects and uses binaries/libraries that are already installed.



e.g. if you have X11 installed (which has an xfree86 library in it) it won’t try to download it’s own personal copy of xfree86 if it needs it, it just references the installed one.



Darwinports homepage



There is also a very good chance it will be a standard part of Mac OS X 10.4 (Apache 2 on Mac OS X Server is the darwinports version for example, indicating potential future integration)


(Avi Miller) #31

Thanks for the link to DarwinPorts, Sam. I have to build a few MacOS X servers to run Matrix in the New Year and this will come in handy. :slight_smile:


(Sam Bauers) #32

It’s much better than fink as far as I can tell, just make sure it has a port for everything you need to run.



You could build Apache/PHP out of it too if you wanted. I think you’d have to hack into the portfile to enable aspell support on php though.



Also look out for the newer MySQL 4 versions, they have changed the password storage methods for database users!



Fix is here:

MySQL Manual



Should probably be fixed in Matrix source code though, and you probably knew about that anyway…


(Avi Miller) #33

You should be aware that we are dropping MySQL support in the next version of MySource Matrix (the reason can be found here). We recommend the use of PostgreSQL for future compatibility and overall performance.


(Sam Bauers) #34

Oooooo…kay…


Don't you think that MySQL will be up to speed by the time it becomes dropped?

Isn't that the point of them releasing a development version?



No skin off my nose really, I'm just more familiar/comfortable with MySQL. But I went from MS-SQL to MySQL once a couple of years ago, so learning the quirks of PostgreSQL shouldn't be a biggie.



I hope you guys don't ever go proprietary only. We need at least one open-source DB in there!


(Greg Sherwood) #35

We'll always keep an open source DB in Matrix. Our limitations will be based on PostgreSQL now instead of MySQL.


As for MySQL, we are not dropping support for ever. Once they release a version with the features we need (which looks like v5), we'll add support back in.


(Andrei Railean) #36

Juat a quick note that the main question of this topic (PHP/PEAR/Aspel) seems to have been resolved, and the original poster managed to get Matrix up and running.


(Matt) #37

Even though I have it running I do plan to go back and follow Sam's advice though. (thanks Sam!! Legend!!)


I alread have Darwinports installed, but haven't got it running properly (got a "ports" command not found error in the terminal) so I have subscribed to the Darwinports mailing list to try and resolve this. Man what a learning curve!

:o



I know HTML, CSS and javascript, so basically anything to do with the web - no matter how complex - falls on my mac desktop. I thought getting a CMS up and running would be a little easier than this

:wink:



PHP is still behaving badly, and I guess that to get Pspell working I will need to go through the install all over again and dump all the info in the db that I have already put in place in my practice attempts so far?



Thanks,

Matt


(Sam Bauers) #38

The command is "port" not "ports" :slight_smile:


Try:

port search jpeg



If that doesn't work try:

/opt/local/bin/port search jpeg



If that works then you have two options:

  1. Type "/opt/local/bin/port" every time
  2. Add "/opt/local/bin" to your PATH



    To do number 2 do this:



    Go to your home directory (using terminal):

    cd ~



    List the contents (fully):

    ls -la



    There is probably a file up the top called (note the prepended full-stop):

    .bashrc



    If there isn't when we do the following a new one will be created:

    pico .bashrc



    Edit the file by adding the following line (it doesn't matter if a similar line already exists):

    export PATH=$PATH:/opt/local/bin



    This will only work if "port" is installed in "/opt/local/bin" the default location for "port", check it's there by:

    ls /opt/local/bin



    Now quit terminal to reload your profile and you should be able to just type "port" in a new terminal session to get the command running

(Eric Blanchi) #39

Regarding apsell/pspell: I used Marc Lyianage's PHP too which has a lot of options but no pspell…
Is there any alternative to re-compiling PHP (which is my last step in getting aspell/pspell working)? Afterall, on a Debian system my phpinfo states: --without-pgsql, but that doesn't stop me from using PostgreSQL.


(Avi Miller) #40

If you can get PHP to compile with pspell, please let me know how! Everytime I try to compile it, I get compile errors when I set it as a static module and if I compile it shared, I get errors when I start Apache.