Help with apache22 error

Good night! How can I solve this problem?

Code:
tnnuyt# /usr/local/etc/rc.d/apache22 restart
Performing sanity check on apache22 configuration:
httpd: Syntax error on line 106 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/libphp5.so into server: Cannot open "/usr/local/libexec/apache22/libphp5.so"
tnnuyt#
 
ericmacmini said:
Code:
cd /usr/ports/lang/php5
make config

And check in the options that Apache Module is selected.



I did it select the Apache

Code:
     │ │ [X] CLI        Build CLI version                               │ │
     │ │ [X] CGI        Build CGI version                               │ │
     │ │ [ ] FPM        Build FPM version                               │ │
     │ │ [X] APACHE     Build Apache module                             │ │
     │ │ [ ] AP2FILTER  Use Apache 2.x filter interface (experimental)  │ │
     │ │ [ ] EMBED      Build embedded library                          │ │
     │ │ [ ] DEBUG      Enable debug                                    │ │
     │ │ [ ] DTRACE     Enable DTrace support                           │ │
     │ │ [X] IPV6       Enable ipv6 support                             │ │
     │ │ [ ] MAILHEAD   Enable mail header patch                        │ │
     │ │ [X] LINKTHR    Link thread lib (for threaded extensions)       │ │
 
Reinstall lang/php5 as following:

# cd /usr/ports/lang/php5 && make deinstall clean reinstall clean

Check you have enabled and isn't duplicated this line in httpd.conf
Code:
LoadModule php5_module        libexec/apache22/libphp5.so
 
cpu82 said:
Reinstall lang/php5 as following:

# cd /usr/ports/lang/php5 && make deinstall clean reinstall clean

Check you have enabled and isn't duplicated this line in httpd.conf
Code:
LoadModule php5_module        libexec/apache22/libphp5.so


rather not have 2 times the same line, already tried to do it again and always the same error:(
 
Check libphp5.so is located in /usr/libexec/apache22/

# ls /usr/libexec/apache22/libphp5.so

Optionally, you can add to /etc/make.conf. Read /usr/ports/Mk/bsd.apache.mk for details.
Code:
APACHE_PORT= www/apache22

Reinstall again www/apache22.
 
Hello good night! Already installed FreeBSD 8.2 from new, mysql, apache22, lang/php5, lang/php5-extentions ... and continue with the same error ...

Code:
#new-host-2# ls: /usr/libexec/apache22/libphp5.so: No such file or directory
ls:: Too many arguments.
Not there -----> libexec/apache22/libphp5.so
 
Please, show your /etc/make.conf

Use find(1) in the work directory of /usr/ports/lang/php5 to check if library exist.
Code:
# cd /usr/ports/lang/php5
# make
# find . -name libphp5.so
 
not there ---> /etc/make.conf
I found here -> /usr/share/examples/etc/make.conf
 

Attachments

  • make.conf.txt
    10.6 KB · Views: 178
Tnnuyt said:
hello good night! already installed FreeBSD 8.2 from new, mysql, www/apache22, lang/php5, lang/php5-extensions ... and continue with the same error ...

Upgrade to FreeBSD 8.3, 8.2 is EoL (End-of-Life) since 31 July 2012. Read more about FreeBSD security.

Tnnuyt said:
not there ---> /etc/make.conf
I found here -> /usr/share/examples/etc/make.conf

Note that make.conf(5) stores system-wide build settings that apply each time you run make(1). Used as reference /usr/share/examples/etc/make.conf, but your working copy should be placed in /etc. Copy example:

# cp /usr/share/examples/etc/make.conf /etc
 
The library will not exist until the port is installed.

Tnnuyt, you may be having punctuation problems. Look at post #8. That did not work because there was an extra colon character after ls.

I don't think you need /etc/make.conf, more likely you have just not properly built the PHP port.
 
That is very old and may be outdated. It also says to use
Code:
make BUILD_OPTIMIZED=yes BUILD_STATIC=yes
when building MySQL. Don't do that. Or rather, don't do that unless you can explain why it can be a problem.
 
wblock@ said:
That is very old and may be outdated. It also says to use
Code:
make BUILD_OPTIMIZED=yes BUILD_STATIC=yes
when build MySQL. Don't do that. Or rather, don't do that unless you can explain why it can be a problem.

I have not used this tutorial to install mysql

I tried to use this tutorial http://www.cyberciti.biz/faq/freebsd-apache22-fastcgi-php-configuration/
[CMD="Forbidden You don't have permission to access / on this server."][/CMD]
 
but I have another error Forbidden

Forbidden

You don't have permission to access / on this server.
 
Tnnuyt said:
but I have another error Forbidden

Forbidden

You don't have permission to access / on this server.

Check out pkg-message.mod, it appears when successfully install lang/php5:

# cat /usr/ports/lang/php5/pkg-message.mod

You need add these lines to your httpd.conf
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

EDIT

Please, show your /var/log/httpd-error.log. For long outputs uses some service like pastebin.com and post here the URL.
 
To solve 'PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings', add the date.timezone directive in your php.ini as following e.g.:
Code:
date.timezone = America/Vancouver
Or, you can also do it this way
Code:
date_default_timezone_set('America/Vancouver');

You can set it to other timezone. See List of Supported Timezones.

To don't see the warning '[warn] Init: Session Cache is not configured [hint: SSLSessionCache]', make sure that your /usr/local/etc/apache22/extra/httpd-ssl.conf gets loaded before your virtual host configuration file and contains a line that looks like:
Code:
SSLSessionCache        shmcb:/some/example/path/ssl_scache(512000)

Verify the OPENSSL is enabled in lang/php5-extensions using steps below:

# cd /usr/ports/lang/php5-extensions && make config && make deinstall clean reinstall clean

Edit your /etc/hosts, and add your hostname:
Code:
127.0.0.1		localhost localhost.my.domain [B]new.host.name[/B]

hostname(1) must be the same you putting in /etc/rc.conf:
Code:
hostname="new.host.name"

After taking a look at your configuration file, edit your httpd.conf:154 and do this change (uncomment & add):
Code:
ServerName new.host.name:80

Then you should restart apache:

# /usr/local/sbin/apachectl restart

PS second link shows 'Unknown Paste ID!', again copy the contents of your httpd.conf
 
I can not resolve this error! already searched in google, already did 20 times more d installation etc etc, do not know what I'm doing wrong, but it's always wrong, and I do not read my php, already put the time in php.ini :( !! know some tutorial?

http://pastebin.com/0BRZPQJX
httpd.conf
 
Tnnuyt said:
I can not resolve this error! already searched in google, already did 20 times more d installation etc etc, do not know what I'm doing wrong, but it's always wrong, and I do not read my php, already put the time in php.ini :( !! know some tutorial?

http://pastebin.com/0BRZPQJX
httpd.conf

Don't need to use XAMPP, when every part is fully supported via ports. Follow one of the many HOWTO guides for setting up Apache/PHP/MySQL for FreeBSD.

References:

[1] FreeBSD Handbook Chapter 30 Network Servers.
[2] Installing Apache Web Server on FreeBSD.
[3] How to Install Apache, MySQL, PHP, and phpMyAdmin on FreeBSD.
[4] How to build a FreeBSD server.
 
Tnnuyt said:
good night! Thank you for help .... I solved my problem with this tutorial
http://www.iceflatline.com/2011/11/how-to-install-apache-mysql-php-and-phpmyadmin-on-freebsd/

I can use a DNS created by me in freebsd "tnnuyt.lp" or must use the no-ip?

Install a DDNS client if the server will use a dynamic IP address and DDNS service, dns/noip DDNS client.
Code:
# cd /usr/ports/dns/noip
# make install clean

Follow instructions to create /usr/local/etc/no-ip2.conf and enable DDNS client by editing /etc/rc.conf

PS: I edited comment#20, please review it.
 
Back
Top