Re: apache PHP suhosin load

2012-06-21 Thread Damien Fleuriot

On 21 Jun 2012, at 08:34, n dhert ndhert...@gmail.com wrote:

 On FreeBSD 8.3 I have apache22 web server with PHP. PHP is PHP52 for
 compatibility with existing applications, but the most recent version
 in the php52 branch
 $ php --version
 PHP 5.2.17 with Suhosin-Patch 0.9.7 (cli) (built: May  7 2012 08:45:58)
 
 From time to time, I notice in a top output, that a huge number of httpd
 daemons are being started, making the load rapidly increase to levels of
 5, 10, 15, ... and very slow interactive respons ...
 
 Stopping apache makes the load rapidly decrease to a normal level.
 
 I noticed at the console, at stopping apache, several messages such as
 
 Jun 14 09:12:20 macos kernel: Jun 14 09:12:20 macos suhosin[28824]: ALERT -
 canary mismatch on efree() - heap overflow detected (attacker 'REMOTE_ADDR
 not set', file
 '/home/wins/win/win/www/wiki/mediawiki-1.16.0/includes/AutoLoader.php',
 line 654)
 
 (the file value differs, but it's always suhosin .. canany mismatch
 - heap overflow detected)
 My PHP has following options set
 # cd /usr/ports/lang/php52
 
 My PHP has following options set
 # cd /usr/ports/lang/php52
 # make showconfig
 === The following configuration options are available for php52-5.2.17_8:
 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)
 FPM=off: Enable fastcgi process manager (CGI only)
 PATHINFO=on: Enable path-info-check support (CGI only)
 LINKTHR=off: Link thread lib (for threaded extensions)
 
 Is that heap overlow causing the trouble? Has suhosin to do something with
 it?
 How to solve?
 

For starters, I would suggest moving away from apace and towards nginx + 
fastcgi php.

A friend had a small dedicated server with a vbulletin forum overloaded with 
addons, and apache/php were bringing the server to high load levels, 10-20ish.

I've moved him to nginx and the server hardly ever goes above 1 now.

Additionally, nginx is immune to Slowloris attacks, while apache is not.



Only after migrating to nginx would I investigate of the suhosin problem still 
exists.___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: apache PHP suhosin load

2012-06-21 Thread Michael Powell
n dhert wrote:

 On FreeBSD 8.3 I have apache22 web server with PHP. PHP is PHP52 for
 compatibility with existing applications, but the most recent version
 in the php52 branch
 $ php --version
 PHP 5.2.17 with Suhosin-Patch 0.9.7 (cli) (built: May  7 2012 08:45:58)
 
From time to time, I notice in a top output, that a huge number of httpd
 daemons are being started, making the load rapidly increase to levels of
 5, 10, 15, ... and very slow interactive respons ...
 
 Stopping apache makes the load rapidly decrease to a normal level.
 
 I noticed at the console, at stopping apache, several messages such as
 
 Jun 14 09:12:20 macos kernel: Jun 14 09:12:20 macos suhosin[28824]: ALERT
 - canary mismatch on efree() - heap overflow detected (attacker
 'REMOTE_ADDR not set', file
 '/home/wins/win/win/www/wiki/mediawiki-1.16.0/includes/AutoLoader.php',
 line 654)
 
 (the file value differs, but it's always suhosin .. canany mismatch
 - heap overflow detected)
 My PHP has following options set
 # cd /usr/ports/lang/php52
 
 My PHP has following options set
 # cd /usr/ports/lang/php52
 # make showconfig
 === The following configuration options are available for php52-5.2.17_8:
  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)
  FPM=off: Enable fastcgi process manager (CGI only)
  PATHINFO=on: Enable path-info-check support (CGI only)
  LINKTHR=off: Link thread lib (for threaded extensions)
 
 Is that heap overlow causing the trouble? Has suhosin to do something with
 it?

Most likely - yes. I noticed in your config above you built and installed the 
Apache PHP module in addition to CGI/FastCGI. If you are running Apache in a 
FastCGI mode you should check and make sure the following is indeed 
commented out like below:  

#LoadModule php5_modulelibexec/apache22/libphp5.so

The general purpose meaning of this error is that PHP has detected some form 
of memory corruption. But as to why/what exactly it doesn't help much.

The general way I used to look at Apache and PHP problems was to isolate 
pieces. Like only loading the core PHP and no extensions by renaming the 
extensions.ini to extensions.ini.bak. This is bound to cause problems as 
most PHP apps today require a certain basic number of modules enabled in 
order to work. 

2 things to troubleshoot looking for a bad module: comment each out one at a 
time and restart. When you comment out the bad one you will no longer see 
the error. Another second item to be aware of is sometimes certain module 
combinations need to be loaded in extensions.ini in a specific order. 
Figuring out this order can be nightmarish, should it ever actaully be found 
to be a problem. Long time ago someone wrote a script to automate this.

I seem to have a distant memory that back in early PHP 5.2.x days I had a 
problem with the mcrypt module. Maybe try commenting that one out first. If 
you don't need it leave it that way.  I also seem to have experienced this 
error a second time, and it was from a bad interaction between Suhosin patch 
and two other build options being enabled, one was the Mailhead and I don't 
remember what the other one was(maybe it was IPv6). I found when I disabled 
these 2 things I could build with the Suhosin patch and stuff ran correctly. 

-Mike




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: APACHE/PHP/MYSQL Password Hash

2009-10-30 Thread Matthew Seaman

Monty Pyth wrote:

I have inherited a website to work on that users authenticate to
using a login and password from a login page. The server is FreeBSD
6.2 running APACHE/PHP/MYSQL. There is a MYSQL table that maintains
all of the users. The table has a users name and password. The
password is hashed and some examples are:

02SvtVJnRLzuQ
42jhVP6kxUBX6

Can anyone tell me what file I would look at to see what hash
algorithm is being used to store the passwords in the table? Any help
would be great.


If this is using Apache basic auth (mod_authn_dbd) then the passwords
will be stored using the old-style DES password hash.  If the passwords
are managed from PHP, then it is anyone's guess as to how they are
stored.

The samples do provided look like old-style DES password hashes, but it's
not possible to be certain that's what they are just by looking at them.
See crypt(3) for the OS interface for generating password hashes.  There
is an equivalent PHP function:

  http://uk.php.net/manual/en/function.crypt.php

or you can play with perl to learn how it works:

  %  perl -le 'print crypt(password, aa);' 
  aajfMKNH1hTm2


The 2nd argument is the salt, a randomly generated value used to ensure
that the same password encrypts to different hashes if used in different
accounts.

It's the same basic API that is used in the system password file,
but nowadays the salt is 6 characters rather than two, and there is
a choice of hashing function -- this uses MD5:

  % perl -le 'print crypt(password, q{$1$aa$});'
  $1$aa$FuYJ957Lgsw.eVsENqOok1

Cheers,

Matthew

PS. 42jhVP6kxUBX6 is a Googlewhack, or it was until I sent this message.
However one way of quickly decoding a password has is just to Google
for the crypt text -- no guarantees but surprisingly often you'll find
the answer for the old style DES hashes...

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: APACHE/PHP/MYSQL Password Hash

2009-10-29 Thread Olivier Nicole
Hi,

 The password is hashed and some examples are:
 
 02SvtVJnRLzuQ
 42jhVP6kxUBX6
 
 Can anyone tell me what file I would look at to see what hash
 algorithm is being used to store the passwords in the table? Any
 help would be great.

As a hint, to help make it easier to reply, where are the password
stored? Where did you get the example above?

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: APACHE/PHP/MYSQL Password Hash

2009-10-29 Thread APseudoUtopia
On Thu, Oct 29, 2009 at 8:52 PM, Monty Pyth freebsdn...@yahoo.com wrote:
 I have inherited a website to work on that users authenticate to using a 
 login and password from a login page. The server is FreeBSD 6.2 running 
 APACHE/PHP/MYSQL. There is a MYSQL table that maintains all of the users. The 
 table has a users name and password. The password is hashed and some examples 
 are:

 02SvtVJnRLzuQ
 42jhVP6kxUBX6

 Can anyone tell me what file I would look at to see what hash algorithm is 
 being used to store the passwords in the table? Any help would be great.




Looking in the website file that processes the login page.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Apache/php

2009-02-12 Thread Lars Eighner


On Thu, 12 Feb 2009, Fbsd1 wrote:


I have php code on home page to count how many times it is accessed from
the internet.  Problem is pages deeper in website can jump back direct to
home page and this again gets counted.


This is one of many ways that counters can be wildly inaccurate and is among
the reasons that mature web sites don't use counters (or at least don't
display them).

Is there any way to give the php counter routine intelligent so it will 
bypass bumping the counter on accesses coming from pages in the site?


Sure.  You can just not bump the counter when HTTP_REFERER is a page at your
site.  There are increasingly more complex ways to eliminate *some* other
sources of inaccuracy, but you get nearer to redesigning the site to suit
the counter, which is silly in most cases.  Analysis of server logs is the
real way to go about serious statistics, although there still are sources of
inaccuracies which cannot be reduced.

--
Lars Eighner
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Apache/php

2009-02-12 Thread Michael Powell
Fbsd1 wrote:

 I have php code on home page to count how many times it is accessed from
 the internet. Problem is pages deeper in website can jump back direct to
 home page and this again gets counted.
 
 Is there any way to give the php counter routine intelligent so it will
 bypass bumping the counter on accesses coming from pages in the site?
 
[snip]

Just a very generic suggestion: Use session. If a session has not been 
established count the visit, set a session cookie and then whenever a 
jumpback happens check for session cookie. If there is a session cookie then 
don't increment. 

This is a portion of how most simple login pages function. Plenty of code 
samples and examples around the net that you can lift and get ideas. Just 
look for PHP Login pages.

Probably better and easier ways, but this is what jumps out first. 

-Mike




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Apache, php?

2007-06-21 Thread Jack Barnett
Eric Crist wrote:
 On Jun 20, 2007, at 8:56 PMJun 20, 2007, Jack Barnett wrote:

 Ivan Carey wrote:

 I don't have libphp5.so anywhere in /usr/local (did a find for it).
 the php5 port is broken? Or do I have to reinstall apache after php5?


 You need to enable build of the php5 apache extension when you build
 the port - it's not enabled by default.

 HTH

 Eric Crist

thanks.

do you know how to do that off hand? :) :)


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-21 Thread Jack Barnett

Jack Barnett wrote:

Eric Crist wrote:
  

On Jun 20, 2007, at 8:56 PMJun 20, 2007, Jack Barnett wrote:



Ivan Carey wrote:
  
I don't have libphp5.so anywhere in /usr/local (did a find for it).

the php5 port is broken? Or do I have to reinstall apache after php5?

  

You need to enable build of the php5 apache extension when you build
the port - it's not enabled by default.

HTH

Eric Crist



thanks.

do you know how to do that off hand? :) :)



  


disregarding... rebuilding now, I edited the Makefile

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-21 Thread [LoN]Kamikaze
Jack Barnett wrote:
 Jack Barnett wrote:
 Eric Crist wrote:
  
 On Jun 20, 2007, at 8:56 PMJun 20, 2007, Jack Barnett wrote:


 Ivan Carey wrote:
   I don't have libphp5.so anywhere in /usr/local (did a find for
 it).
 the php5 port is broken? Or do I have to reinstall apache after php5?

   
 You need to enable build of the php5 apache extension when you build
 the port - it's not enabled by default.

 HTH

 Eric Crist
 

 thanks.

 do you know how to do that off hand? :) :)



   
 
 disregarding... rebuilding now, I edited the Makefile

Ouch.

Just for the record:
# cd /usr/ports/lang/php5
# make config
Select the APACHE option.
# make build deinstall reinstall clean
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-21 Thread Ivan Carey

Jack Barnett wrote:

Ivan Carey wrote:

Jack Barnett wrote:

FreeBSD 6.2
Apache 1.3.37 (from ports)
php 5.2.3 (from ports)

on the command line doing `php index.php` works.
But if I use it though a web browser it just displays the php code.

I installed it like this (extensions to)
http://www.mydigitallife.info/2006/04/14/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-5/ 



The only difference is that I'm using 1.3 and not 2.x of Apache.

Apache config below
Installing 2.x isn't an option yet (test server, still need 1.3)

   fire2# grep -i php *
   httpd.conf:AddType application/x-httpd-php .php
   httpd.conf:AddType application/x-httpd-php-source .phps
   httpd.conf:IfModule mod_php3.c
   httpd.conf:IfModule mod_php4.c
   httpd.conf:DirectoryIndex index.php index.php3 
index.html

   httpd.conf:IfModule !mod_php4.c
   httpd.conf:DirectoryIndex index.php3 index.html
   httpd.conf:IfModule !mod_php3.c
   httpd.conf:IfModule mod_php4.c
   httpd.conf:DirectoryIndex index.php index.html
   httpd.conf:IfModule !mod_php4.c
   httpd.conf:IfModule mod_php3.c
   httpd.conf: AddType application/x-httpd-php3 .php3
   httpd.conf: AddType application/x-httpd-php3-source .php3s
   httpd.conf:IfModule mod_php4.c
   httpd.conf: AddType application/x-httpd-php .php
   httpd.conf: AddType application/x-httpd-php-source .phps
   httpd.conf: AddType application/x-httpd-php .php
   httpd.conf: AddType application/x-httpd-php-source .phps






___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]


.


Hello Jack,
I have 2 servers running one with php4 and one with php5

In the php4 httpd.conf I have:
LoadModule php4_modulelibexec/apache/libphp4.so
AddModule mod_php4.c

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
IfModule mod_dir.c
   IfModule mod_php3.c
   IfModule mod_php4.c
   DirectoryIndex index.php index.php3 index.html
   /IfModule
   IfModule !mod_php4.c
   DirectoryIndex index.php3 index.html
   /IfModule
   /IfModule
   IfModule !mod_php3.c
   IfModule mod_php4.c
   DirectoryIndex index.php index.html
   /IfModule
   IfModule !mod_php4.c
   DirectoryIndex index.html
   /IfModule
   /IfModule
/IfModule

# LanguagePriority allows you to give precedence to some languages
   # in case of a tie during content negotiation.
   #
   # Just list the languages in decreasing order of preference. We have
   # more or less alphabetized them here. You probably want to change 
this.

   #
   IfModule mod_negotiation.c
   LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br 
ru ltz ca es sv tw

   /IfModule

   IfModule mod_php3.c
   AddType application/x-httpd-php3 .php3
   AddType application/x-httpd-php3-source .php3s
   /IfModule
   IfModule mod_php4.c
   AddType application/x-httpd-php .php
   AddType application/x-httpd-php-source .phps
   /IfModule


In the Apache2 using php5 I have in the httpd.conf
LoadModule php5_module libexec/apache2/libphp5.so

# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

I hope this helps you with your configuration,
Regards,
Ivan


I don't have libphp5.so anywhere in /usr/local (did a find for it).
the php5 port is broken?  Or do I have to reinstall apache after php5?



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]


.


Jack,
When I want a system with Apache PHP and MySQL.
I install them in the following order.

1. Install Apache
2. Install PHP via /usr/lang/php5-extensions (select the extensions you 
want, this will install php5 and add the required lines to the httpd.conf)

3. Install MySQL

Regards,
Ivan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-21 Thread Jack Barnett

[LoN]Kamikaze wrote:

Jack Barnett wrote:
  

Jack Barnett wrote:


Eric Crist wrote:
 
  

On Jun 20, 2007, at 8:56 PMJun 20, 2007, Jack Barnett wrote:

   


Ivan Carey wrote:
  I don't have libphp5.so anywhere in /usr/local (did a find for
it).
the php5 port is broken? Or do I have to reinstall apache after php5?

  
  

You need to enable build of the php5 apache extension when you build
the port - it's not enabled by default.

HTH

Eric Crist



thanks.

do you know how to do that off hand? :) :)



  
  

disregarding... rebuilding now, I edited the Makefile



Ouch.

Just for the record:
# cd /usr/ports/lang/php5
# make config
Select the APACHE option.
# make build deinstall reinstall clean
  


Yea, for some reason it's not giving me that menu... to configure it.

Most ports used to have any option... to configure stuff... in that nice 
text based interface.


I got BATCH=YES in make.conf so that's probably why!

Anyways, I manually edited the Makefile and recompiled.  That is WORKING :)

Manually fooling around with that file will probably bust something up 
down the road if I have to reinstall, but for now I'm happy.  It's all 
working.


Thanks everyone for your help.







___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-21 Thread Ivan Carey

Jack Barnett wrote:

[LoN]Kamikaze wrote:

Jack Barnett wrote:
 

Jack Barnett wrote:
   

Eric Crist wrote:
 
 

On Jun 20, 2007, at 8:56 PMJun 20, 2007, Jack Barnett wrote:

  

Ivan Carey wrote:
  I don't have libphp5.so anywhere in /usr/local (did a find for
it).
the php5 port is broken? Or do I have to reinstall apache after 
php5?




You need to enable build of the php5 apache extension when you build
the port - it's not enabled by default.

HTH

Eric Crist


thanks.

do you know how to do that off hand? :) :)





disregarding... rebuilding now, I edited the Makefile



Ouch.

Just for the record:
# cd /usr/ports/lang/php5
# make config
Select the APACHE option.
# make build deinstall reinstall clean
  


Yea, for some reason it's not giving me that menu... to configure it.

Most ports used to have any option... to configure stuff... in that 
nice text based interface.


I got BATCH=YES in make.conf so that's probably why!

Anyways, I manually edited the Makefile and recompiled.  That is 
WORKING :)


Manually fooling around with that file will probably bust something up 
down the road if I have to reinstall, but for now I'm happy.  It's all 
working.


Thanks everyone for your help.







___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]


.


Jack,
When I want a system with Apache PHP and MySQL.
I install them in the following order.

1. Install Apache
2. Install PHP via /usr/lang/php5-extensions (select the extensions you 
want, this will install php5 and add the required lines to the httpd.conf)

3. Install MySQL

Regards,
Ivan
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-21 Thread doug

On Wed, 20 Jun 2007, Jack Barnett wrote:


doug wrote:

On Tue, 19 Jun 2007, Jack Barnett wrote:


FreeBSD 6.2
Apache 1.3.37 (from ports)
php 5.2.3 (from ports)

on the command line doing `php index.php` works.
But if I use it though a web browser it just displays the php code.

I installed it like this (extensions to)
http://www.mydigitallife.info/2006/04/14/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-5/ 


The only difference is that I'm using 1.3 and not 2.x of Apache.

Apache config below
Installing 2.x isn't an option yet (test server, still need 1.3)

  fire2# grep -i php *
  httpd.conf:AddType application/x-httpd-php .php
  httpd.conf:AddType application/x-httpd-php-source .phps
  httpd.conf:IfModule mod_php3.c
  httpd.conf:IfModule mod_php4.c
  httpd.conf:DirectoryIndex index.php index.php3 index.html
  httpd.conf:IfModule !mod_php4.c
  httpd.conf:DirectoryIndex index.php3 index.html
  httpd.conf:IfModule !mod_php3.c
  httpd.conf:IfModule mod_php4.c
  httpd.conf:DirectoryIndex index.php index.html
  httpd.conf:IfModule !mod_php4.c
  httpd.conf:IfModule mod_php3.c
  httpd.conf: AddType application/x-httpd-php3 .php3
  httpd.conf: AddType application/x-httpd-php3-source .php3s
  httpd.conf:IfModule mod_php4.c
  httpd.conf: AddType application/x-httpd-php .php
  httpd.conf: AddType application/x-httpd-php-source .phps
  httpd.conf: AddType application/x-httpd-php .php
  httpd.conf: AddType application/x-httpd-php-source .phps

I just installed this combination, among the changes to httpd.conf I change 
pph4--php5 (see below). You are not getting an index file. If you have 
'Options +Indexes' browsing will get you an index listing but will not run 
index.php.



 #
 # This may also be None, All, or any combination of Indexes,
@@ -452,18 +454,18 @@
 #
 IfModule mod_dir.c
 IfModule mod_php3.c
-IfModule mod_php4.c
+IfModule mod_php5.c
 DirectoryIndex index.php index.php3 index.html
 /IfModule
-IfModule !mod_php4.c
+IfModule !mod_php5.c
 DirectoryIndex index.php3 index.html
 /IfModule
 /IfModule
 IfModule !mod_php3.c
-IfModule mod_php4.c
+IfModule mod_php5.c
 DirectoryIndex index.php index.html
 /IfModule
-IfModule !mod_php4.c
+IfModule !mod_php5.c
 DirectoryIndex index.html
 /IfModule
 /IfModule



hrm... no I don't think that's it.
I put this in:
  DirectoryIndex index.php index.html

I have php5 install

I created this file:
test.php
  ?php print (Hello WorldBR\n); ?
But that doesn't work either.

Is mod_layout screwing it up?

I don't understand what is wrong with it?
`php test.php` works fine.

Also there is no Module Load/Add in the httpd.conf for php.  I can't even 
find the libraries!


But /usr/local/bin/ has php and php-cgi (both executables).

Do I need to tell apache how to execute .php files?

Not sure you may also be missing the additions to the load and add modules 
sections.


This setup was specifically to run SquirrelMail. I had a working test install 
and I wanted to add SSL. My first shot was to just reinstall apache-modssl. This 
required recompiling a single php module. I never got that done so I removed 
apache, php and squirrel mail and installed (order is important):


apache-modssl
squirrelmail

and let the build for squirrelmail pull in php. In this order I got all the 
necessary mods to httpd.conf and the php module I needed was rebuilt. If you are 
facile with make all this can be skipped but I found it quicker to do it this 
way.



Here are the php relate directive in my httpd.conf:

:
LoadModule php5_modulelibexec/apache/libphp5.so
:
AddModule mod_php5.c
:
IfModule mod_php3.c
IfModule mod_php5.c
DirectoryIndex index.php index.php3 index.html
/IfModule
IfModule !mod_php5.c
DirectoryIndex index.php3 index.html
/IfModule
/IfModule
IfModule !mod_php3.c
IfModule mod_php5.c
DirectoryIndex index.php index.html
/IfModule
IfModule !mod_php5.c
DirectoryIndex index.html
/IfModule
/IfModule
/IfModule
:
IfModule mod_php5.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
/IfModule
:
#SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
Files ~ \.(cgi|shtml|phtml|php3?)$
SSLOptions +StdEnvVars
/Files

This last one only if you have SSL (of course).

_
Douglas Denault
http://www.safeport.com
[EMAIL PROTECTED]
Voice: 301-469-8766
  Fax: 301-469-0601
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-20 Thread doug

On Tue, 19 Jun 2007, Jack Barnett wrote:


FreeBSD 6.2
Apache 1.3.37 (from ports)
php 5.2.3 (from ports)

on the command line doing `php index.php` works.
But if I use it though a web browser it just displays the php code.

I installed it like this (extensions to)
http://www.mydigitallife.info/2006/04/14/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-5/

The only difference is that I'm using 1.3 and not 2.x of Apache.

Apache config below
Installing 2.x isn't an option yet (test server, still need 1.3)

  fire2# grep -i php *
  httpd.conf:AddType application/x-httpd-php .php
  httpd.conf:AddType application/x-httpd-php-source .phps
  httpd.conf:IfModule mod_php3.c
  httpd.conf:IfModule mod_php4.c
  httpd.conf:DirectoryIndex index.php index.php3 index.html
  httpd.conf:IfModule !mod_php4.c
  httpd.conf:DirectoryIndex index.php3 index.html
  httpd.conf:IfModule !mod_php3.c
  httpd.conf:IfModule mod_php4.c
  httpd.conf:DirectoryIndex index.php index.html
  httpd.conf:IfModule !mod_php4.c
  httpd.conf:IfModule mod_php3.c
  httpd.conf: AddType application/x-httpd-php3 .php3
  httpd.conf: AddType application/x-httpd-php3-source .php3s
  httpd.conf:IfModule mod_php4.c
  httpd.conf: AddType application/x-httpd-php .php
  httpd.conf: AddType application/x-httpd-php-source .phps
  httpd.conf: AddType application/x-httpd-php .php
  httpd.conf: AddType application/x-httpd-php-source .phps

I just installed this combination, among the changes to httpd.conf I change 
pph4--php5 (see below). You are not getting an index file. If you have 'Options 
+Indexes' browsing will get you an index listing but will not run index.php.



 #
 # This may also be None, All, or any combination of Indexes,
@@ -452,18 +454,18 @@
 #
 IfModule mod_dir.c
 IfModule mod_php3.c
-IfModule mod_php4.c
+IfModule mod_php5.c
 DirectoryIndex index.php index.php3 index.html
 /IfModule
-IfModule !mod_php4.c
+IfModule !mod_php5.c
 DirectoryIndex index.php3 index.html
 /IfModule
 /IfModule
 IfModule !mod_php3.c
-IfModule mod_php4.c
+IfModule mod_php5.c
 DirectoryIndex index.php index.html
 /IfModule
-IfModule !mod_php4.c
+IfModule !mod_php5.c
 DirectoryIndex index.html
 /IfModule
 /IfModule

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-20 Thread Jack Barnett

doug wrote:

On Tue, 19 Jun 2007, Jack Barnett wrote:


FreeBSD 6.2
Apache 1.3.37 (from ports)
php 5.2.3 (from ports)

on the command line doing `php index.php` works.
But if I use it though a web browser it just displays the php code.

I installed it like this (extensions to)
http://www.mydigitallife.info/2006/04/14/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-5/ 



The only difference is that I'm using 1.3 and not 2.x of Apache.

Apache config below
Installing 2.x isn't an option yet (test server, still need 1.3)

  fire2# grep -i php *
  httpd.conf:AddType application/x-httpd-php .php
  httpd.conf:AddType application/x-httpd-php-source .phps
  httpd.conf:IfModule mod_php3.c
  httpd.conf:IfModule mod_php4.c
  httpd.conf:DirectoryIndex index.php index.php3 index.html
  httpd.conf:IfModule !mod_php4.c
  httpd.conf:DirectoryIndex index.php3 index.html
  httpd.conf:IfModule !mod_php3.c
  httpd.conf:IfModule mod_php4.c
  httpd.conf:DirectoryIndex index.php index.html
  httpd.conf:IfModule !mod_php4.c
  httpd.conf:IfModule mod_php3.c
  httpd.conf: AddType application/x-httpd-php3 .php3
  httpd.conf: AddType application/x-httpd-php3-source .php3s
  httpd.conf:IfModule mod_php4.c
  httpd.conf: AddType application/x-httpd-php .php
  httpd.conf: AddType application/x-httpd-php-source .phps
  httpd.conf: AddType application/x-httpd-php .php
  httpd.conf: AddType application/x-httpd-php-source .phps

I just installed this combination, among the changes to httpd.conf I 
change pph4--php5 (see below). You are not getting an index file. If 
you have 'Options +Indexes' browsing will get you an index listing but 
will not run index.php.



 #
 # This may also be None, All, or any combination of Indexes,
@@ -452,18 +454,18 @@
 #
 IfModule mod_dir.c
 IfModule mod_php3.c
-IfModule mod_php4.c
+IfModule mod_php5.c
 DirectoryIndex index.php index.php3 index.html
 /IfModule
-IfModule !mod_php4.c
+IfModule !mod_php5.c
 DirectoryIndex index.php3 index.html
 /IfModule
 /IfModule
 IfModule !mod_php3.c
-IfModule mod_php4.c
+IfModule mod_php5.c
 DirectoryIndex index.php index.html
 /IfModule
-IfModule !mod_php4.c
+IfModule !mod_php5.c
 DirectoryIndex index.html
 /IfModule
 /IfModule



hrm... no I don't think that's it.
I put this in:
   DirectoryIndex index.php index.html

I have php5 install

I created this file:
test.php
   ?php print (Hello WorldBR\n); ?
But that doesn't work either.

Is mod_layout screwing it up?

I don't understand what is wrong with it?
`php test.php` works fine.

Also there is no Module Load/Add in the httpd.conf for php.  I can't 
even find the libraries!


But /usr/local/bin/ has php and php-cgi (both executables).

Do I need to tell apache how to execute .php files?















___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-20 Thread Jack Barnett

Ivan Carey wrote:

Jack Barnett wrote:

FreeBSD 6.2
Apache 1.3.37 (from ports)
php 5.2.3 (from ports)

on the command line doing `php index.php` works.
But if I use it though a web browser it just displays the php code.

I installed it like this (extensions to)
http://www.mydigitallife.info/2006/04/14/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-5/ 



The only difference is that I'm using 1.3 and not 2.x of Apache.

Apache config below
Installing 2.x isn't an option yet (test server, still need 1.3)

   fire2# grep -i php *
   httpd.conf:AddType application/x-httpd-php .php
   httpd.conf:AddType application/x-httpd-php-source .phps
   httpd.conf:IfModule mod_php3.c
   httpd.conf:IfModule mod_php4.c
   httpd.conf:DirectoryIndex index.php index.php3 index.html
   httpd.conf:IfModule !mod_php4.c
   httpd.conf:DirectoryIndex index.php3 index.html
   httpd.conf:IfModule !mod_php3.c
   httpd.conf:IfModule mod_php4.c
   httpd.conf:DirectoryIndex index.php index.html
   httpd.conf:IfModule !mod_php4.c
   httpd.conf:IfModule mod_php3.c
   httpd.conf: AddType application/x-httpd-php3 .php3
   httpd.conf: AddType application/x-httpd-php3-source .php3s
   httpd.conf:IfModule mod_php4.c
   httpd.conf: AddType application/x-httpd-php .php
   httpd.conf: AddType application/x-httpd-php-source .phps
   httpd.conf: AddType application/x-httpd-php .php
   httpd.conf: AddType application/x-httpd-php-source .phps






___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]


.


Hello Jack,
I have 2 servers running one with php4 and one with php5

In the php4 httpd.conf I have:
LoadModule php4_modulelibexec/apache/libphp4.so
AddModule mod_php4.c

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
IfModule mod_dir.c
   IfModule mod_php3.c
   IfModule mod_php4.c
   DirectoryIndex index.php index.php3 index.html
   /IfModule
   IfModule !mod_php4.c
   DirectoryIndex index.php3 index.html
   /IfModule
   /IfModule
   IfModule !mod_php3.c
   IfModule mod_php4.c
   DirectoryIndex index.php index.html
   /IfModule
   IfModule !mod_php4.c
   DirectoryIndex index.html
   /IfModule
   /IfModule
/IfModule

# LanguagePriority allows you to give precedence to some languages
   # in case of a tie during content negotiation.
   #
   # Just list the languages in decreasing order of preference. We have
   # more or less alphabetized them here. You probably want to change 
this.

   #
   IfModule mod_negotiation.c
   LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br 
ru ltz ca es sv tw

   /IfModule

   IfModule mod_php3.c
   AddType application/x-httpd-php3 .php3
   AddType application/x-httpd-php3-source .php3s
   /IfModule
   IfModule mod_php4.c
   AddType application/x-httpd-php .php
   AddType application/x-httpd-php-source .phps
   /IfModule


In the Apache2 using php5 I have in the httpd.conf
LoadModule php5_module libexec/apache2/libphp5.so

# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

I hope this helps you with your configuration,
Regards,
Ivan


I don't have libphp5.so anywhere in /usr/local (did a find for it).
the php5 port is broken?  Or do I have to reinstall apache after php5?



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-20 Thread Eric Crist

On Jun 20, 2007, at 8:56 PMJun 20, 2007, Jack Barnett wrote:


Ivan Carey wrote:



I don't have libphp5.so anywhere in /usr/local (did a find for it).
the php5 port is broken?  Or do I have to reinstall apache after php5?



You need to enable build of the php5 apache extension when you build  
the port - it's not enabled by default.


HTH

Eric Crist
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-19 Thread Norberto Meijome
On Tue, 19 Jun 2007 00:04:03 -0500
Jack Barnett [EMAIL PROTECTED] wrote:

 on the command line doing `php index.php` works.
 But if I use it though a web browser it just displays the php code.

enable mod_status and/or mod_info in Apache and double check that the php
module is loaded, and what its name is. I recall there beeing a version where
it wasn't mod_php4, so the IfModule directives wouldn't match and not load the
right configuration.

once you have the correct module name, change the ifModule lines accordingly
and reload apache.

_
{Beto|Norberto|Numard} Meijome

Without vision you may find that you make your way through life by bumping into
things.

I speak for myself, not my employer. Contents may be hot. Slippery when wet.
Reading disclaimers makes you go blind. Writing them is worse. You have been
Warned.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, php?

2007-06-19 Thread Ivan Carey

Jack Barnett wrote:

FreeBSD 6.2
Apache 1.3.37 (from ports)
php 5.2.3 (from ports)

on the command line doing `php index.php` works.
But if I use it though a web browser it just displays the php code.

I installed it like this (extensions to)
http://www.mydigitallife.info/2006/04/14/installing-web-server-in-freebsd-60-with-apache-22-mysql-50-and-php-5-part-5/ 



The only difference is that I'm using 1.3 and not 2.x of Apache.

Apache config below
Installing 2.x isn't an option yet (test server, still need 1.3)

   fire2# grep -i php *
   httpd.conf:AddType application/x-httpd-php .php
   httpd.conf:AddType application/x-httpd-php-source .phps
   httpd.conf:IfModule mod_php3.c
   httpd.conf:IfModule mod_php4.c
   httpd.conf:DirectoryIndex index.php index.php3 index.html
   httpd.conf:IfModule !mod_php4.c
   httpd.conf:DirectoryIndex index.php3 index.html
   httpd.conf:IfModule !mod_php3.c
   httpd.conf:IfModule mod_php4.c
   httpd.conf:DirectoryIndex index.php index.html
   httpd.conf:IfModule !mod_php4.c
   httpd.conf:IfModule mod_php3.c
   httpd.conf: AddType application/x-httpd-php3 .php3
   httpd.conf: AddType application/x-httpd-php3-source .php3s
   httpd.conf:IfModule mod_php4.c
   httpd.conf: AddType application/x-httpd-php .php
   httpd.conf: AddType application/x-httpd-php-source .phps
   httpd.conf: AddType application/x-httpd-php .php
   httpd.conf: AddType application/x-httpd-php-source .phps






___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]


.


Hello Jack,
I have 2 servers running one with php4 and one with php5

In the php4 httpd.conf I have:
LoadModule php4_modulelibexec/apache/libphp4.so
AddModule mod_php4.c

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.
#
IfModule mod_dir.c
   IfModule mod_php3.c
   IfModule mod_php4.c
   DirectoryIndex index.php index.php3 index.html
   /IfModule
   IfModule !mod_php4.c
   DirectoryIndex index.php3 index.html
   /IfModule
   /IfModule
   IfModule !mod_php3.c
   IfModule mod_php4.c
   DirectoryIndex index.php index.html
   /IfModule
   IfModule !mod_php4.c
   DirectoryIndex index.html
   /IfModule
   /IfModule
/IfModule

# LanguagePriority allows you to give precedence to some languages
   # in case of a tie during content negotiation.
   #
   # Just list the languages in decreasing order of preference. We have
   # more or less alphabetized them here. You probably want to change this.
   #
   IfModule mod_negotiation.c
   LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru 
ltz ca es sv tw

   /IfModule

   IfModule mod_php3.c
   AddType application/x-httpd-php3 .php3
   AddType application/x-httpd-php3-source .php3s
   /IfModule
   IfModule mod_php4.c
   AddType application/x-httpd-php .php
   AddType application/x-httpd-php-source .phps
   /IfModule


In the Apache2 using php5 I have in the httpd.conf
LoadModule php5_module libexec/apache2/libphp5.so

# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

I hope this helps you with your configuration,
Regards,
Ivan

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache php mysql

2004-05-27 Thread Nathan Kinkade
On Thu, May 27, 2004 at 03:28:31PM +0200, RazorOnFreeBSD wrote:
 Hi everyone,
 
 I'd need some ressources to be sure how to install apache, php, mysql
 on my FreeBSD box.  This is the first time I do it, so I don't really
 know how to configure the thing.  I followed instructions from apache
 and php to install those but it's not really easy for me to understand
 how to install MySQL server from their website  Apache and php
 installations seemed to worked out fine but I surely have files to
 configure now, but I don't know which ones...  It would be great if
 someone knows any ressource about all this setup online?  For
 information I have FreeBSD 4.9-STABLE, Apache 2.0.49, PHP 4.3.6, MySQL
 4.0.20.
 
 Thanks.
 razor.

Installing MySQL should be as easy:

# cd /usr/ports/database/mysql40-server/
# make install

This should automatically install the mysql-client as a dependency.

There are lots of tutorials online about configuring Apache to work with
PHP.  Just do a few web searches for something like apache php
configure, or apache php setup, or even just apache php.  Quickly,
you'll need to add some lines like these to you httpd.conf file:

LoadModule php4_module  libexec/apache/libphp4.so
AddType application/x-httpd-php .php

These lines may not be exact for your setup.  To test whether PHP is
working create a file in your webroot (probably /usr/local/www/data)
with only this in it:

?php
phpinfo();
?

If PHP is working you'll get a pretty page back with a lot of
information about PHP.

Nathan


pgplMePoECceH.pgp
Description: PGP signature


Re: apache+php

2004-01-06 Thread Kevin D. Kinsey, DaleCo, S.P.
[EMAIL PROTECTED] wrote:

GASPOFWIPV6LAB# uname -a
FreeBSD GASPOFWIPV6LAB 4.9-RELEASE FreeBSD 4.9-RELEASE #0: Thu Jan  1 08:04:10
CET 2004 [EMAIL PROTECTED]:/usr/src/sys/compile/GASPO  i386
i have install from pkg_add the packages:
apache-1.3.28
mysql-client-4.0.15
PHP
---error--
when i do :
apachectl start
usr/local/sbin/apachectl start: httpd could not be started
--
so,i have test also to compile httpd on my fbsd from apache.org,
and if i compile it without modules apache start,if i compile with all modules
like php cgi,apache cannot be start,the only error is:(var log)
[Tue Jan  6 20:25:56 2004] [alert] mod_unique_id: unable to gethostbyname(GASPOFWIPV6LAB)
any suggest?
 

Well, that is a DNS type issue.  Give your host a
name either in DNS or /etc/resolv.conf, and try
again.  Or, disable mod_unique_id.
I would hesitate in saying that this will fix your problem,
though; that's just an alert.  Perhaps something else is
wrong as well.
I generally prefer to install apache/PHP/MySQL from
the ports tree, SQL first, PHP last.  Works pretty well;
haven't had many issues since I started doing it
that way.
HTH,

Kevin Kinsey

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, PHP, and SquirrelMail

2003-11-05 Thread Neil Hawkins
Thanks for the Help!  What I did was a deinstall on SquirrelMail and 
installed it through the ports.  Everything appears to be working fine now.  
The only other question I have at the moment is how do I get Squirrel mail 
to read Qmail?  Can't I setup VADMIN for virtual domain and user setup?




From: Robin Schoonover [EMAIL PROTECTED]
To: Neil Hawkins [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: Apache, PHP, and SquirrelMail
Date: Tue, 4 Nov 2003 20:55:10 -0700
On Wed, 05 Nov 2003 03:44:04 +, Neil Hawkins
[EMAIL PROTECTED] wrote:
 I am new to FreeBSD and am trying to figure a few things out.  I have
 installed QMAIL, APACHE, PHP4, and SquirrelMail.  Apache seems to be
 working fine because I can browse the directory lising for
 /usr/local/www/data folders.  However, when I try to browse the
 SquirrelMail folder, it just displays the text code of the index.php
 file.  I am assuming that PHP4 is either not installed correctly, not
 running, or not configured appropriately.  Can someone help me out here?

You need to tell apache about mod_php4.  In apache2, I have these extra
lines in the configuration file.
LoadModule php4_modulelibexec/apache2/libphp4.so

DirectoryIndex index.html index.html.var index.php

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
You don't want to have 'AddHandler php .php' in httpd.conf  In an earlier
version of php4, I did have that and it worked fine, but when I upgraded
php4 it stopped working (showed code only like it is for you), so I had to
take out that line.
--
Robin Schoonover (aka End)
#
# Actual newspaper headline:
# Something Went Wrong in Jet Crash, Expert Says
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]
_
Is your computer infected with a virus?  Find out with a FREE computer virus 
scan from McAfee.  Take the FreeScan now! 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, PHP, and SquirrelMail

2003-11-04 Thread Robin Schoonover
On Wed, 05 Nov 2003 03:44:04 +, Neil Hawkins
[EMAIL PROTECTED] wrote:
 I am new to FreeBSD and am trying to figure a few things out.  I have 
 installed QMAIL, APACHE, PHP4, and SquirrelMail.  Apache seems to be
 working fine because I can browse the directory lising for
 /usr/local/www/data folders.  However, when I try to browse the
 SquirrelMail folder, it just displays the text code of the index.php
 file.  I am assuming that PHP4 is either not installed correctly, not
 running, or not configured appropriately.  Can someone help me out here?
 

You need to tell apache about mod_php4.  In apache2, I have these extra
lines in the configuration file.

LoadModule php4_modulelibexec/apache2/libphp4.so

DirectoryIndex index.html index.html.var index.php

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

You don't want to have 'AddHandler php .php' in httpd.conf  In an earlier
version of php4, I did have that and it worked fine, but when I upgraded
php4 it stopped working (showed code only like it is for you), so I had to
take out that line.

-- 
Robin Schoonover (aka End)
#
# Actual newspaper headline:
# Something Went Wrong in Jet Crash, Expert Says
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache, PHP, and SquirrelMail

2003-11-04 Thread Neil Hawkins
I looked at the files you had mentioned and noticed that all of those 
changes are already there.  Do you think I should upgrade to apache2 and see 
what happens, or deinstall and reinstall php4?


From: Robin Schoonover [EMAIL PROTECTED]
To: Neil Hawkins [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: Apache, PHP, and SquirrelMail
Date: Tue, 4 Nov 2003 20:55:10 -0700
On Wed, 05 Nov 2003 03:44:04 +, Neil Hawkins
[EMAIL PROTECTED] wrote:
 I am new to FreeBSD and am trying to figure a few things out.  I have
 installed QMAIL, APACHE, PHP4, and SquirrelMail.  Apache seems to be
 working fine because I can browse the directory lising for
 /usr/local/www/data folders.  However, when I try to browse the
 SquirrelMail folder, it just displays the text code of the index.php
 file.  I am assuming that PHP4 is either not installed correctly, not
 running, or not configured appropriately.  Can someone help me out here?

You need to tell apache about mod_php4.  In apache2, I have these extra
lines in the configuration file.
LoadModule php4_modulelibexec/apache2/libphp4.so

DirectoryIndex index.html index.html.var index.php

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
You don't want to have 'AddHandler php .php' in httpd.conf  In an earlier
version of php4, I did have that and it worked fine, but when I upgraded
php4 it stopped working (showed code only like it is for you), so I had to
take out that line.
--
Robin Schoonover (aka End)
#
# Actual newspaper headline:
# Something Went Wrong in Jet Crash, Expert Says
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]
_
Great deals on high-speed Internet access as low as $26.95.  
https://broadband.msn.com (Prices may vary by service area.)

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: apache / php problem

2003-09-22 Thread Kevin D. Kinsey, DaleCo, S.P.
H. Bartel wrote:

Hi all,

Since I do have php4 running and phpinfo() tells me that it does, Sites that I put into my root dir of Apache are not parsing their variables. The index pages are displayed properly, since they don't require any vars to be passed, but every other sub-pages (e.g. index.php?sub=2) don't do anything, the normal index.php is displayed.

The path to php.ini reads /usr/local/etc/php.ini , if I understand correct it gets read then. I couldn't find any other reason for this to not work.

Thanks for any help,
Holger
If you have just updated to PHP4 from 3, be advised
that the register_globals handle in php.ini is now OFF
by default, and therefore any code of the type
include $sub;

should now read

include $_GET['sub'];

This might be the problem.  See the FAQ's
at www.php.net or www.phpbuilder.com/board
for details.
HTH,

Kevin Kinsey

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: apache / php problem

2003-09-22 Thread H. Bartel
On 09/22/2003 11:26 AM [EMAIL PROTECTED] (Kevin D. Kinsey, DaleCo, S.P.) wrote:

If you have just updated to PHP4 from 3, be advised
that the register_globals handle in php.ini is now OFF
by default, and therefore any code of the type

include $sub;

should now read

include $_GET['sub'];

I thought about this before, but it works on my apache set up on the mac. I now 
changed the php-code and it works perfectly again.

I'll keep Johns tip of reinstalling the modules one after one in mind though - I'll 
probably run in new problems sometime soon... ;)

Thanks, Holger
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Apache + PHP Issue

2003-06-26 Thread Timms, Simon
did you put 

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

in the httpd.conf file as it tells you to at the end of the php port
install?  Did you restart apache?

-Original Message-
From: bryan cassidy [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 9:40 AM
To: [EMAIL PROTECTED]
Subject: Apache + PHP Issue


Hello, I just installed the mod_php4  + apache ports
and when I create a .php file in a directory say
called test it doesn't ever want to load the script it
wants me to save it on the computer.
http://bsdsys.dyndns.org/test/ when you click on
test.php it wants to Save it not load it. Whats
goin on here? 



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


 

This email communication is intended as a private communication for the sole
use of the primary addressee and those individuals listed for copies in the
original message. The information contained in this email is private and
confidential and if you are not an intended recipient you are hereby
notified that copying, forwarding or other dissemination or distribution of
this communication by any means is prohibited.  If you are not specifically
authorized to receive this email and if you believe that you received it in
error please notify the original sender immediately.  We honour similar
requests relating to the privacy of email communications.

Cette communication par courrier électronique est une communication privée à
l'usage exclusif du destinataire principal ainsi que des personnes dont les
noms figurent en copie.  Les renseignements contenus dans ce courriel sont
confidentiels et si vous n'êtes pas le destinataire prévu, vous êtes avisé,
par les présentes que toute reproduction, tout transfert ou toute autre
forme de diffusion de cette communication par quelque moyen que ce soit est
interdit.  Si vous n'êtes pas spécifiquement autorisé à recevoir ce courriel
ou si vous croyez l'avoir reçu par erreur, veuillez en aviser l'expéditeur
original immédiatement.  Nous respectons les demandes similaires qui
touchent la confidentialité des communications par courrier électronique.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache + PHP Issue

2003-06-26 Thread Sunil Sunder Raj
Hi,
Did you add these lines in the httpd.conf file.
   IfModule mod_php4.c
 AddType application/x-httpd-php .php .php3 .php4
 AddType application/x-httpd-php-source .phps .php3s .php4s
   /IfModule
Regards
SSR

From: bryan cassidy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Apache + PHP Issue
Date: Thu, 26 Jun 2003 08:39:54 -0700 (PDT)
Hello, I just installed the mod_php4  + apache ports
and when I create a .php file in a directory say
called test it doesn't ever want to load the script it
wants me to save it on the computer.
http://bsdsys.dyndns.org/test/ when you click on
test.php it wants to Save it not load it. Whats
goin on here?


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
[EMAIL PROTECTED]
_
Attention NRIs! Send money home in a jiffy. 
http://server1.msn.co.in/msnleads/citibankrca/citibankrca2.asp

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: apache - php problem

2003-02-27 Thread Toomas Aas
Hi!

 My apache and php has been working fine for some time.
 All of a sudden it gives me this error in the log;
 
 [Wed Feb 26 16:56:07 2003] [notice] Accept mutex: flock (Default: flock)
 
 and php scripts will not execute.

Whatever the problem is, this is not it. Starting with I-dont-remember-exactly-which
version of Apache it always gives this message. All my Apache 1.3.27 servers do it
and PHP works just fine.
--
Toomas Aas | [EMAIL PROTECTED] | http://www.raad.tartu.ee/~toomas/
* This would easier understand fewer had omitted.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Apache,PHP and FreeBSD

2002-11-01 Thread david
On Friday 01 November 2002 15:32, Bryan Cassidy wrote:
 Hello everyone. I have been messing around with html lately and think its
 pretty cool. I want to start using PHP with apache and buy my own domain.
 My question is this: What is a good site to get domains from that has a
 reasonable amount of space and doesnt cost too much? Does anyone know of

I'm confused, are you wishing to buy a webhosting account or run it yourself?

 any good tutorials online for PHP,Apache and FreeBSD? Of course I will be
 using this on my freebsd machine so docs or tutorials about this related to
 freebsd would be nice. I am going to start working on this tomorrow s
 ometime so I would appreciate some info. thanks

Setting it up? It's fairly straight forwarding installing from ports and 
configuring httpd.conf and php.ini to your likeing. 



 ---
 E-Mail: Bryan Cassidy [EMAIL PROTECTED]
 Operating System: FreeBSD 4.6.2
 Gaim: bsdsys
 Yahoo Messenger: bsdsys

 Please do not simply Reply-To: Bryan Cassidy
 [EMAIL PROTECTED] It is OK to Cc: me as long as you send the
 Reply back To: the original mailing lists. I have put alot of time in
 setting up filters so please don't simply reply to me unless I tell
 you to or send you one directly.

_     

   |  ___| __ ___  ___| __ ) ___||  _ \
   |
   | |_ | '__/ _ \/ _ \  _ \___ \| | | |
   |
   |  _|| | |  __/  __/ |_) |__) | |_| |
   |_|  |_|  \___|\___|//|/

 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Apache,PHP and FreeBSD

2002-11-01 Thread Mike Hogsett

/usr/ports/www/mod_php4/

 I want to host (or whatever) the site myself. I think it would be a
 good learning experience for me. I know where apache is in the ports
 but where is php?
 
 On Fri, 1 Nov 2002 17:48:17 -0500
 david [EMAIL PROTECTED] wrote:
 
  On Friday 01 November 2002 15:32, Bryan Cassidy wrote:
   Hello everyone. I have been messing around with html lately and think its
   pretty cool. I want to start using PHP with apache and buy my own domain.
   My question is this: What is a good site to get domains from that has a
   reasonable amount of space and doesnt cost too much? Does anyone know of
  
  I'm confused, are you wishing to buy a webhosting account or run it yoursel
 f?
  
   any good tutorials online for PHP,Apache and FreeBSD? Of course I will be
   using this on my freebsd machine so docs or tutorials about this related 
 to
   freebsd would be nice. I am going to start working on this tomorrow s
   ometime so I would appreciate some info. thanks
  
  Setting it up? It's fairly straight forwarding installing from ports and 
  configuring httpd.conf and php.ini to your likeing. 
  
  
  
   -
 --
   E-Mail: Bryan Cassidy [EMAIL PROTECTED]
   Operating System: FreeBSD 4.6.2
   Gaim: bsdsys
   Yahoo Messenger: bsdsys
  
   Please do not simply Reply-To: Bryan Cassidy
   [EMAIL PROTECTED] It is OK to Cc: me as long as you send the
   Reply back To: the original mailing lists. I have put alot of time in
   setting up filters so please don't simply reply to me unless I tell
   you to or send you one directly.
  
  _     
  
 |  ___| __ ___  ___| __ ) ___||  _ \
 |
 | |_ | '__/ _ \/ _ \  _ \___ \| | | |
 |
 |  _|| | |  __/  __/ |_) |__) | |_| |
 |_|  |_|  \___|\___|//|/
  
   To Unsubscribe: send mail to [EMAIL PROTECTED]
   with unsubscribe freebsd-questions in the body of the message
  
  
  
  To Unsubscribe: send mail to [EMAIL PROTECTED]
  with unsubscribe freebsd-questions in the body of the message
 
 
 -
 --
 E-Mail: Bryan Cassidy [EMAIL PROTECTED]
 Operating System: FreeBSD 4.6.2
 Gaim: bsdsys
 Yahoo Messenger: bsdsys
 
 Please do not simply Reply-To: Bryan Cassidy
 [EMAIL PROTECTED] It is OK to Cc: me as long as you send the
 Reply back To: the original mailing lists. I have put alot of time in
 setting up filters so please don't simply reply to me unless I tell
 you to or send you one directly.
 
_      
   |  ___| __ ___  ___| __ ) ___||  _ \  
   | |_ | '__/ _ \/ _ \  _ \___ \| | | |
   |  _|| | |  __/  __/ |_) |__) | |_| | 
   |_|  |_|  \___|\___|//|/ 
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Apache,PHP and FreeBSD

2002-11-01 Thread DaleCo Help Desk
And, while we're on that subject:

To find something in the ports collection,
do this:

$cd /usr/ports
$make search key=(keyword)

...in your case, 'php' or 'mod_php'
should have done the trick.

Kevin Kinsey
DaleCo, S.P.

- Original Message -
From: Mike Hogsett [EMAIL PROTECTED]
To: Bryan Cassidy [EMAIL PROTECTED]
Cc: david [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, November 01, 2002 5:07 PM
Subject: Re: Apache,PHP and FreeBSD



 /usr/ports/www/mod_php4/

  I want to host (or whatever) the site myself. I think it would be
a
  good learning experience for me. I know where apache is in the
ports
  but where is php?
 
  On Fri, 1 Nov 2002 17:48:17 -0500
  david [EMAIL PROTECTED] wrote:
 
   On Friday 01 November 2002 15:32, Bryan Cassidy wrote:
Hello everyone. I have been messing around with html lately
and think its
pretty cool. I want to start using PHP with apache and buy my
own domain.
My question is this: What is a good site to get domains from
that has a
reasonable amount of space and doesnt cost too much? Does
anyone know of
  
   I'm confused, are you wishing to buy a webhosting account or
run it yoursel
  f?
  
any good tutorials online for PHP,Apache and FreeBSD? Of
course I will be
using this on my freebsd machine so docs or tutorials about
this related
  to
freebsd would be nice. I am going to start working on this
tomorrow s
ometime so I would appreciate some info. thanks
  
   Setting it up? It's fairly straight forwarding installing from
ports and
   configuring httpd.conf and php.ini to your likeing.
  
  
   
  
 ---
--
  --
    E-Mail: Bryan Cassidy [EMAIL PROTECTED]
Operating System: FreeBSD 4.6.2
Gaim: bsdsys
Yahoo Messenger: bsdsys
   
Please do not simply Reply-To: Bryan Cassidy
[EMAIL PROTECTED] It is OK to Cc: me as long as you
send the
Reply back To: the original mailing lists. I have put alot of
time in
setting up filters so please don't simply reply to me unless
I tell
you to or send you one directly.
   
_     
   
|  ___| __ ___  ___| __ ) ___||  _ \
|
| |_ | '__/ _ \/ _ \  _ \___ \| | | |
|
|  _|| | |  __/  __/ |_) |__) | |_| |
|_|  |_|  \___|\___|//|/
   
To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the
message
  
  
  
   To Unsubscribe: send mail to [EMAIL PROTECTED]
   with unsubscribe freebsd-questions in the body of the message
 
 

 ---
--
  --
  E-Mail: Bryan Cassidy [EMAIL PROTECTED]
  Operating System: FreeBSD 4.6.2
  Gaim: bsdsys
  Yahoo Messenger: bsdsys
 
  Please do not simply Reply-To: Bryan Cassidy
  [EMAIL PROTECTED] It is OK to Cc: me as long as you send
the
  Reply back To: the original mailing lists. I have put alot of
time in
  setting up filters so please don't simply reply to me unless I
tell
  you to or send you one directly.
 
  _     
  |  ___| __ ___  ___| __ ) ___||  _ \
  | |_ | '__/ _ \/ _ \  _ \___ \| | | |
  |  _|| | |  __/  __/ |_) |__) | |_| |
  |_|  |_|  \___|\___|//|/
 
 
  To Unsubscribe: send mail to [EMAIL PROTECTED]
  with unsubscribe freebsd-questions in the body of the message

 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Apache,PHP and FreeBSD

2002-11-01 Thread Mike Hogsett

 To find something in the ports collection,
 do this:
 
 $cd /usr/ports
 $make search key=(keyword)
 
 ...in your case, 'php' or 'mod_php'
 should have done the trick.

Although in cases of libraries (or similar ports) where many other ports
depend on it this can return way too many results.  In these cases

   $make search name=(name)

may workbetter.

 - Mike


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Apache,PHP and FreeBSD

2002-11-01 Thread Adam Weinberger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 (11.01.2002 @ 1539 PST): DaleCo Help Desk said, in 3.9K: 
 And, while we're on that subject:
 
 To find something in the ports collection,
 do this:
 
 $cd /usr/ports
 $make search key=(keyword)
 
 ...in your case, 'php' or 'mod_php'
 should have done the trick.
 end of Re: Apache,PHP and FreeBSD from DaleCo Help Desk 

Mr. Desk -

You may be interested in a really neat port search tool that exists but
isn't well marketed. check out /usr/ports/Tools/scripts/portsearch and
its documentation at /usr/ports/Tools/scripts/README.portsearch.

- -Adam


- --
Adam Weinberger
[EMAIL PROTECTED]
[EMAIL PROTECTED]

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE9wxRao8KM2ULHQ/0RAh8TAJ9wtA5DJHMsVvaEjVPotAmQ1a5nGQCgs4KP
Xy0W5ZFD09kO1l2n0Y7UqWk=
=mSO6
-END PGP SIGNATURE-

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Apache,PHP and FreeBSD

2002-11-01 Thread Philip Hallstrom
In addition to the other comments, it would be worth your time to browse
the following sites (some PHP, some general freebsd tutorials that have
apache/php stuff on them)

www.freebsddiary.org
www.zend.com
www.php.net
www.phpbuilder.com

have fun!

On Fri, 1 Nov 2002, Bryan Cassidy wrote:

 Hello everyone. I have been messing around with html lately and think its pretty 
cool. I want to start using PHP with apache and buy my own domain. My question is 
this: What is a good site to get domains from that has a reasonable amount of space 
and doesnt cost too much? Does anyone know of any good tutorials online for 
PHP,Apache and FreeBSD? Of course I will be using this on my freebsd machine so docs 
or tutorials about this related to freebsd would be nice. I am going to start working 
on this tomorrow sometime so I would appreciate some info. thanks

 ---
 E-Mail: Bryan Cassidy [EMAIL PROTECTED]
 Operating System: FreeBSD 4.6.2
 Gaim: bsdsys
 Yahoo Messenger: bsdsys

 Please do not simply Reply-To: Bryan Cassidy
 [EMAIL PROTECTED] It is OK to Cc: me as long as you send the
 Reply back To: the original mailing lists. I have put alot of time in
 setting up filters so please don't simply reply to me unless I tell
 you to or send you one directly.

_     
   |  ___| __ ___  ___| __ ) ___||  _ \
   | |_ | '__/ _ \/ _ \  _ \___ \| | | |
   |  _|| | |  __/  __/ |_) |__) | |_| |
   |_|  |_|  \___|\___|//|/


 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Apache,PHP and FreeBSD

2002-11-01 Thread Lefteris Tsintjelis
Adam Weinberger wrote:
 
 You may be interested in a really neat port search tool that exists but
 isn't well marketed. check out /usr/ports/Tools/scripts/portsearch and
 its documentation at /usr/ports/Tools/scripts/README.portsearch.

Very nice tools indeed and not just the portsearch one! Thats the kind I
have been looking for. How come they are no references anywhere though?
consistency check for example is a very good one but that's another
topic anyway, thanks.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Apache,PHP and FreeBSD

2002-11-01 Thread Bryan Cassidy
Well, lol. I didn't think I would get such quick responses from
people. I am checking into everything everyones told me. Thanks for
all the quick info on this. I really appreciate it.

On Fri, 1 Nov 2002 16:45:23 -0800 (PST)
Philip Hallstrom [EMAIL PROTECTED] wrote:

 In addition to the other comments, it would be worth your time to browse
 the following sites (some PHP, some general freebsd tutorials that have
 apache/php stuff on them)
 
 www.freebsddiary.org
 www.zend.com
 www.php.net
 www.phpbuilder.com
 
 have fun!

---
E-Mail: Bryan Cassidy [EMAIL PROTECTED]
Operating System: FreeBSD 4.6.2
Gaim: bsdsys
Yahoo Messenger: bsdsys

Please do not simply Reply-To: Bryan Cassidy
[EMAIL PROTECTED] It is OK to Cc: me as long as you send the
Reply back To: the original mailing lists. I have put alot of time in
setting up filters so please don't simply reply to me unless I tell
you to or send you one directly.

 _      
|  ___| __ ___  ___| __ ) ___||  _ \  
| |_ | '__/ _ \/ _ \  _ \___ \| | | |
|  _|| | |  __/  __/ |_) |__) | |_| | 
|_|  |_|  \___|\___|//|/ 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message