I am very experienced in Apache and PHP on Windows, but now I am working on a FreeBSD server and I know almost nothing about FreeBSD and *nix.
I have to install and enable Tidy for PHP 5. Under Windows it is as easy as downloading the appropriate DLL, modify php.ini and restart the web server. Takes 2 minutes.
After googling a lot, it seems that on FreeBSD I have to download the source code, compile the module, and even recompile PHP as many sites suggest. But these sites presume the reader is experienced in FreeBSD!
How do I compile the module source?
It is really necessary to recompile PHP?
If so, how do I recompile PHP?
Although my question is specifially about Tidy, I will need to install other modules as well. so I am interested in a generel solution if possible.
Please give exact guidings as just saying "recompile this or that" really don't help me on this stage.
Does this mean that the compiled file will end up in /../../lang/php5?
I ask before I see no PHP binary there.
Maciej S
../../lang/php5 is in fat /usr/ports/lang/php5. It's path to php5 port.
After installing php5-tidy port, you should have three additional files.
# pkg_info -L php5-tidy-5.2.8
Information for php5-tidy-5.2.8:
One more question - how did you install your apache and php? Was it installed via ports?
Can you run below commands?
pkg_info | grep apache
pkg_info | grep php5
flyskyhigh
ASKER
Re. your questions:
1. I don't know how it was installed. The server was set up for me.
2. Yes. The output is:
$ pkg_info | grep apache
apache-2.2.9_5 Version 2.2.x of Apache web server with prefork MPM.
$ pkg_info | grep php5
php5-5.2.8 PHP Scripting Language
php5-mysql-5.2.8 The mysql shared extension for php
php5-mysqli-5.2.8 The mysqli shared extension for php
php5-session-5.2.8 The session shared extension for php
php5-simplexml-5.2.8 The simplexml shared extension for php
php5-spl-5.2.8 The spl shared extension for php
Will there be any harm in running "make install clean" or should I just give it a try?
Ok - as you have apache and php5 as packages, then they are probably in default directories - so far so good :)
There shouldn't be any problems with running "make install clean" in /usr/ports/www/php5-tidy. In case of any problems, you will end up without php5-tidy, so you will be in same situation as you are now.
Remember to restart apache (/usr/local/etc/rc.d/apache22 restart) after successful installation.
flyskyhigh
ASKER
Ok, tried it and got:
$ make install clean
===> Vulnerability check disabled, database not found
===> Extracting for php5-tidy-5.2.8
=> MD5 Checksum OK for php-5.2.8.tar.bz2.
=> SHA256 Checksum OK for php-5.2.8.tar.bz2.
mkdir: /usr/ports/www/php5-tidy/work: Permission denied
*** Error code 1
CATEGORIES= www
MASTERDIR= ${.CURDIR}/../../lang/php5
PKGNAMESUFFIX= -tidy
.include "${MASTERDIR}/Makefile"
Does this mean that the compiled file will end up in /../../lang/php5?
I ask before I see no PHP binary there.