Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Install PHP 5.0.2 on FreeBSD

Status
Not open for further replies.

zum

Technical User
Mar 31, 2003
148
US
When installing PHP 5.0.2, how are you able to install php and select different options to be installed with it. It use to be that a menu would come up and you could select things like, curl support or filePro support, etc. Now what I've done is I have edited the Makefile in the /usr/ports/lang/php5 directory to enable curl and so one but it doesn't seem to work. My install always fails. Is there something I'm not doing right? I little help would be great.

Thanks,

Zum
 
I cannot speak for BSD, but on Linux, I download and uncompress the source tarball. In that tarball is a script called "configure", which programmatically creates your makefile for you. It is to this script that you pass the arguments which will eventually set which optional parts of PHP get compiled into the software.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Under FreeBSD php now is loaded from /usr/ports/lang/php5. To install any extensions, you use /usr/ports/lang/php5-extensions.

You will then see the old familiar options list.

I suggest restoring your Makefile to original state first.

Howard
 
Thanks hpicken.

That helped.
 
After installing php port from that directory what do you add to the rc startup file so that php will start with the server?

I added the AddType application/x-httpd-php .php line that was mentioned at the end of the install to httpd.conf, but I don't think php is loading.
 
Make sure you have the following line in your apache httpd.conf file

LoadModule php5_module libexec/apache2/libphp5.so

This loads php when apache starts. There is no seperate command to start php.

To test if php is working, create a file in your web page dir like this

<html>
<body>
<?php echo $phpinfo(); ?>
</body>
</html>

Change

AddType application/x-httpd-php .php
to
AddType application/x-httpd-php .php .html

It should then work with both .php and .html extensions.

See how you go

Howard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top