FreeBSD 9.2 64 bits Error for install PHP5 and Extension

Hi :)
I contact you because I need help for install Apache / php5 and php5 extension for a dedicated server FreeBSD 9.2 64 bits.
Now It's difficult because Use pkg() command.

First question, how install Apache, PHP5 and extensions with pkg()? Because I need make config for put config apache ... and extension.

For install MySQL it's good, it's just: pkg-config mysql55-server

After I have tested new solution for use make install clean...

With this:

Code:
1. pkg update	
2. pkg upgrade (Y)	
3. go /usr/local/etc/ and Delete pkg.conf	
4. pkg_add -r portupgrade	
5. /usr/local/sbin/portupgrade -a

For install apache it's ok with:
Code:
cd /usr/ports/www/apache22
make config
make install
But after for install php5 :'‑( :

Code:
root@ns385667:/usr/ports/www/apache22 # cd /usr/ports/www/mod_php55
root@ns385667:/usr/ports/www/mod_php55 # make config

With make config it's good. But for make install clean I have little error:

Code:
root@ns385667:/usr/ports/www/mod_php55 # make install clean
===>  mod_php55-5.5.17_1 is marked as broken: : Error from bsd.apache.mk. apache22 is installed (or APACHE_PORT is defined) and port requires apache.
*** [install] Error code 1
You are solution?
 
The first I see is you use pkg_add - is deprecated - use pkg add.

Do you have:
Code:
DEFAULT_VERSIONS=apache=2.2
in your /etc/make.conf?
 
Mmmmmh.

Now, I have a problem : URL removed

My PHP doesn't work. But I have all, I've put the line in: httpd.conf. And generate the php.ini. But doesn't work.

How install with pkg?
 
The (one ?) line?

All this lines are there?

Code:
LoadModule php5_module        libexec/apache22/libphp5.so

Code:
<IfModule dir_module>
    DirectoryIndex index.html index.php index.sh default.jsp
</IfModule>

Code:
AddType application/x-httpd-php .php .phtml .php3 .php4 .php5 .php6 .html
    AddType application/x-httpd-php-source .phps
    AddHandler php5-script php
    AddType application/x-httpd-php .xml
    AddHandler application/x-httpd-php .xml

Code:
<IfModule mod_php5.c>
  php_value include_path ".:/usr/local/lib/php"
  php_admin_flag safe_mode on
</IfModule>
 
I have no skype, you can mail questions. Yes in the httpd.conf.
But read the file careful, maybe they are already there.
 
Mmmmh don't work :'‑(

It's possible give me a full tutorial for installing Apache/PHP5/extension with FreeBSD? (pkg)
Thanks ^^
 
Don't work is a little bit less. Any error messages ? Starts apache if you run apachectl -k onestart ? Is mod_session installed (www/php5-session).

(Put later apache22_enable="YES" in your /etc/rc.conf).

Uncomment the line
Code:
DocumentRoot "/usr/local/www/apache22/data"
in httpd.conf.

Look in /usr/local/etc/php/extensions.ini - if there are double-listed modules. If there are doubles delete one.

Do you have a phpinfo.php ? If not create on in Document-Root with only

Code:
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
in it. So you can check if php works.

One thing, I can't answer you - a apache-tutorial, I think someone other has an answer, I never found a good.
 
OK ^^

I reinstall my dedicated server FreeBSD 9.2. My tutorial:

1) For mysql work, I put this command :
pwd_mkdb /etc/master.passwd

2) Portsnap :
portsnap fetch extract

3) Apache 22 or 24 ? the best ?
pkg_add -rv apache22
I put this to /etc/rc.conf:
Code:
# Apache 2.4
apache24_enable="YES"
apache24_flags="-DSSL" # Active le support de SSL

And to http.conf:

Ajoutez à /usr/local/etc/apache22/httpd.conf ou créez /usr/local/etc/apache22/Includes/php.conf tel que :

Code:
    <IfModule php5_module>
        <FilesMatch "\.php$">
            SetHandler application/x-httpd-php
        </FilesMatch>
    </IfModule>

Trouver et remplacer dans /usr/local/etc/apache22/httpd.conf afin d'ajouter index.php comme nom des pages de répertoire par défaut :

Code:
    <IfModule dir_module>
        DirectoryIndex index.html
    </IfModule>

Par :

Code:
    <IfModule dir_module>
        <IfModule php5_module>
            DirectoryIndex index.php index.html
        </IfModule>
        <IfModule !php5_module>
            DirectoryIndex index.html
        </IfModule>
    </IfModule>

In make.conf:
Code:
DEFAULT_VERSIONS=apache=2.2

4) PHP5
pkg_add -rv php5
But The problem here, how config PHP5 for Apache?

Other command?

5) PHP5 extension:
Command? and add extension mbstring ...

6) generate php.ini
cp /usr/local/etc/php.ini-development /usr/local/etc/php.ini

Please Help me :(
2 day, I need install Apache, PHP5 and extension ...
Thanks.
 
You cannot write in the /etc/rc.conf:
Code:
apache24
and in the /etc/make.conf
Code:
apache=2.2
, it should the version you have installed.

By the way I think it's better you install apache24, it's the default-version (In this case, you don't need the line in /etc/make.conf)

extension mbstring : install converters/php5-mbstring sometimes you had add a line to /usr/local/etc/php/extensions.ini:
Code:
extension=mbstring.so
 
Back
Top