DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 18th July 2008
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Default compiling Apache 2.2.9 with php support on FreeBSD 7.0

I've got a standard FreeBSD 7.0-STABLE installation that I'm going to be setting up to run Apache 2.2.9. I have installed php 5.2.5 from ports, as well as MySQL 5.0, and things are going pretty good until I attempt to compile Apache manually using the --enable-so flag. For some reason this my configure returns "command not found."

When I installed php from ports I checked the box to create a module for apache and libphp5.so exists. I've enabled verbose debugging but nothing is showing up in /var/log/messages.

Has anyone run into this and can perhaps offer a solution?
Reply With Quote
  #2   (View Single Post)  
Old 18th July 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Quote:
things are going pretty good until I attempt to compile Apache manually using the --enable-so flag. For some reason this my configure returns "command not found."
Why aren't you installing apache from ports? The port applies many fixes/patches.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 30th October 2008
kasse kasse is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 67
Default

Hello I today I tried to get php5 working on apache22, I followed the instructions on http://www.freebsdmadeeasy.com/tutor...eb-hosting.php
but when I try everything with my browser, it does not display the .php files. A possible problem might be that there is no
Code:
LoadModule php5_module libexec/apache22/libphp5.so
in httpd.conf. Anyhow the file libphp5.so never exists on my installations.

I just assume this is the problem, perhaps there is something else wrong.
Reply With Quote
  #4   (View Single Post)  
Old 30th October 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Did you compile lang/php5 with the WITH_APACHE option?

Quote:
A possible problem might be that there is no
Code:
LoadModule php5_module libexec/apache22/libphp5.so
in httpd.conf.
Well, add those lines to httpd.conf then.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #5   (View Single Post)  
Old 30th October 2008
kasse kasse is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 67
Default

There is no such file libphp5.so. I read elsewhere that some people installed php and did not get this file.

I followed the instructions on freebsdmade easy and chose apachwe in make config

I usually have all these weird problems, sometimes it has to do with that I use sudo when I run make. Perhaps enviroment/special thingy is not working correctly with sudo.

Last edited by kasse; 30th October 2008 at 05:56 PM.
Reply With Quote
  #6   (View Single Post)  
Old 30th October 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 445
Default

@kasse, you've already got your answer here.

An example from my FBSD box:
Code:
mrbig# cd /usr/ports/lang/php5 && make showconfig
===> The following configuration options are available for php5-5.2.6_2:
     CLI=off "Build CLI version"
     CGI=on "Build CGI version"
     APACHE=on "Build Apache module"
     DEBUG=off "Enable debug"
     SUHOSIN=off "Enable Suhosin protection system (not for jails)"
     MULTIBYTE=off "Enable zend multibyte support"
     IPV6=off "Enable ipv6 support"
     MAILHEAD=off "Enable mail header patch"
     REDIRECT=off "Enable force-cgi-redirect support (CGI only)"
     DISCARD=off "Enable discard-path support (CGI only)"
     FASTCGI=on "Enable fastcgi support (CGI only)"
     PATHINFO=on "Enable path-info-check support (CGI only)"
===> Use 'make config' to modify these settings

mrbig# locate libphp5.so
/usr/local/libexec/apache22/libphp5.so
OK?
__________________
Kill your t.v.
Reply With Quote
  #7   (View Single Post)  
Old 30th October 2008
kasse kasse is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 67
Default

I dont really follow?
Code:
$ make showconfig
===> The following configuration options are available for php5-5.2.6_2:
     CLI=on "Build CLI version"
     CGI=on "Build CGI version"
     APACHE=on "Build Apache module"
     DEBUG=off "Enable debug"
     SUHOSIN=on "Enable Suhosin protection system (not for jails)"
     MULTIBYTE=off "Enable zend multibyte support"
     IPV6=on "Enable ipv6 support"
     MAILHEAD=off "Enable mail header patch"
     REDIRECT=off "Enable force-cgi-redirect support (CGI only)"
     DISCARD=off "Enable discard-path support (CGI only)"
     FASTCGI=on "Enable fastcgi support (CGI only)"
     PATHINFO=on "Enable path-info-check support (CGI only)"
===> Use 'make config' to modify these settings
$ locate libphp5.so

I know I do something wrong, but what do you refer to when you say that I already have my answer here?

Last edited by kasse; 30th October 2008 at 06:04 PM.
Reply With Quote
  #8   (View Single Post)  
Old 30th October 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 445
Default

You missed part of the instructions you followed. You need to:

# cd /usr/ports/lang/php5 && make config

And select APACHE this time. Then rebuild the port and... off you go...
Attached Images
File Type: png look.png (18.4 KB, 83 views)
__________________
Kill your t.v.
Reply With Quote
  #9   (View Single Post)  
Old 30th October 2008
kasse kasse is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 67
Question

No but I have selected apache in the make config. I must misunderstand what you are trying to say. from what I understand this shows up in my make showconfig
Reply With Quote
Old 30th October 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

Quote:
Originally Posted by dk_netsvil View Post
I've got a standard FreeBSD 7.0-STABLE installation that I'm going to be setting up to run Apache 2.2.9. I have installed php 5.2.5 from ports, as well as MySQL 5.0, and things are going pretty good until I attempt to compile Apache manually using the --enable-so flag. For some reason this my configure returns "command not found."
The problem is that you are trying to combine ports and manually installed apps. Don't do that.

The simple method for getting PHP, MySQL, and Apache installed is to:
edit /etc/make.conf, by adding:
APACHE_VERSION=22
WITH_MYSQL_VER=50

That will set the dependencies for everything in the ports tree to use Apache 2.2.x and MySQL 5.0.x (the fastest version of MySQL on FreeBSD).

Then, it's a simple matter of:
cd /usr/ports/lang/php5
make install clean (be sure to select Apache module option)

cd /usr/ports/databases/php5-mysql
make install clean

Everything else will be done for you, including pulling in the MySQL server and Apache ports, as dependencies.

Quote:
When I installed php from ports I checked the box to create a module for apache and libphp5.so exists. I've enabled verbose debugging but nothing is showing up in /var/log/messages.

Has anyone run into this and can perhaps offer a solution?
Check the output of pkg_info, then use pkg_delete -ix <port> to delete everything related to mysql, php, and apache.

After that, try the install using the notes above.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 30th October 2008
hamba hamba is offline
Fdisk Soldier
 
Join Date: Apr 2008
Posts: 71
Default

Hi

I just would like to add that its easier to use php5-extensions when installing most of the php extensions

Follow the same procedures as what the other people said
Code:
# cd /usr/ports/lang/php5-extensions/
# make config
select the extensions
Code:
# make install clean
This way it will automatically install all the extensions you've selected.
There is one golden rule, after installing your extensions and everything is working, make a backup copy of /usr/local/etc/php/extensions.ini, I've found that sometimes when updating php it messes with that file and stuff can break, all you then have to do is copy your old file over the new one, restart apache and your off.
Reply With Quote
Old 30th October 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

Ah, that's the port I was looking for. I knew there was one where you could just check off the ones you wanted. It's been many, many, many years since I installed PHP. Thanks for the update.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Epkowa Oko OpenBSD Packages and Ports 3 30th December 2008 10:01 PM
Support FreeBSD. Spark Some Interest For Adobe! Citsakots FreeBSD General 5 8th December 2008 09:46 PM
Asus P5Q-E support in FreeBSD 7.1-BETA (amd64) hydra FreeBSD General 4 1st October 2008 06:22 PM
Compiling a blob-free FreeBSD 7.0 kernel Tsuroerusu FreeBSD General 5 12th September 2008 08:56 PM
Compiling Nagios 3.02 roundkat Solaris 1 2nd June 2008 09:09 PM


All times are GMT. The time now is 02:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick