Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

2006-08-22 Thread Ivan Levchenko

i think that you should be able to porce the installation of the
package of php5 with the -f command, after it finished, run pkgdb -F
to fix the dependency of php5 for apacha13 to apache22.


On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:

Hi,
(Please include me in the reply as I am not subscribed to this list.)

I am trying to use Ports to install php5 on top of Apache 2.2. However, when

I do pkg_add, it says that the prereq Apache 1.3 is not installed. I also
tried forcing it (using -f), but even then it did not seem to have installed

Php5 properly.

I tried this:
cd /usr/ports/lang/php5
pkg_add php5

That did not work.

Then I ftp-ed to  ftp://ftp.freebsd.org ftp.freebsd.org and downloaded the
tbz file from the same
location (/ports/lang/php5) and did pkg_add with that file name as
parameter. Is that the right thing to do?

After I did that, I got the error that I explained above (i.e. Apache 1.3
not installed)

As you might imagine, I am pretty new to FreeBSD.

Thanks,
Omer


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




--
Best Regards,

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


RE: Installing Php5 on Apache2.2 (Freebsd 6.1)

2006-08-22 Thread Muhammad Omer Iqbal
Thanks for the advice. The way I got it to work was by actually making the
package on the local box and it installed fine. In the past, when I tried
it, I was not connected to the Internet and the build failed. I did not
realize that my system must be connected as it needs to fetch some data from
the Internet. Today, I tried it again with Internet connected (I figured
that out today as I carefully read through the error messages), and it built
fine and apparently got installed.

However, what I am seeing now is that I have index.php, but it is not
automatically returned by Apache to browser when it goes to that url. And
when I put index.php manually in the browser (lets say
http://localhost/index.php), php is not parsed, and the file is just treated
as a .html file.

When I do make install, it says that php5 is already installed. I already
installed a few php5-extensions, but I think this should be working without
the extensions. I tried mod_php5, but since that component is installed by
php5 itself, I get precisely the message that it cannot be installed because
the location is the same, so I assume php5 actually did install Apache
module too.

Any help would be greatly appreciated.

Thanks,
Omer

-Original Message-
From: Ivan Levchenko [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 22, 2006 4:43 AM
To: Muhammad Omer Iqbal; freebsd-questions@freebsd.org
Subject: Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

i think that you should be able to porce the installation of the package of
php5 with the -f command, after it finished, run pkgdb -F to fix the
dependency of php5 for apacha13 to apache22.


On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:
 Hi,
 (Please include me in the reply as I am not subscribed to this list.)

 I am trying to use Ports to install php5 on top of Apache 2.2. 
 However, when

 I do pkg_add, it says that the prereq Apache 1.3 is not installed. I 
 also tried forcing it (using -f), but even then it did not seem to 
 have installed

 Php5 properly.

 I tried this:
 cd /usr/ports/lang/php5
 pkg_add php5

 That did not work.

 Then I ftp-ed to  ftp://ftp.freebsd.org ftp.freebsd.org and 
 downloaded the tbz file from the same location (/ports/lang/php5) and 
 did pkg_add with that file name as parameter. Is that the right thing 
 to do?

 After I did that, I got the error that I explained above (i.e. Apache 
 1.3 not installed)

 As you might imagine, I am pretty new to FreeBSD.

 Thanks,
 Omer


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



--
Best Regards,

Ivan Levchenko
[EMAIL PROTECTED]

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


Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

2006-08-22 Thread Ivan Levchenko

i'm no apache guru, but you need to have something like the following
in httpd.conf:

LoadModule php5_modulelibexec/apache22/libphp5.so #in the
modules section
DirectoryIndex index.html index.php index.phtm #so that it gets those
php index files
#File types for php files, so it knows it is supposed to put them
through php and not just give back plain text.
   AddType application/x-httpd-php .php
   AddType application/x-httpd-php-source .phps

On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:

Thanks for the advice. The way I got it to work was by actually making the
package on the local box and it installed fine. In the past, when I tried
it, I was not connected to the Internet and the build failed. I did not
realize that my system must be connected as it needs to fetch some data from
the Internet. Today, I tried it again with Internet connected (I figured
that out today as I carefully read through the error messages), and it built
fine and apparently got installed.

However, what I am seeing now is that I have index.php, but it is not
automatically returned by Apache to browser when it goes to that url. And
when I put index.php manually in the browser (lets say
http://localhost/index.php), php is not parsed, and the file is just treated
as a .html file.

When I do make install, it says that php5 is already installed. I already
installed a few php5-extensions, but I think this should be working without
the extensions. I tried mod_php5, but since that component is installed by
php5 itself, I get precisely the message that it cannot be installed because
the location is the same, so I assume php5 actually did install Apache
module too.

Any help would be greatly appreciated.

Thanks,
Omer

-Original Message-
From: Ivan Levchenko [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 22, 2006 4:43 AM
To: Muhammad Omer Iqbal; freebsd-questions@freebsd.org
Subject: Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

i think that you should be able to porce the installation of the package of
php5 with the -f command, after it finished, run pkgdb -F to fix the
dependency of php5 for apacha13 to apache22.


On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:
 Hi,
 (Please include me in the reply as I am not subscribed to this list.)

 I am trying to use Ports to install php5 on top of Apache 2.2.
 However, when

 I do pkg_add, it says that the prereq Apache 1.3 is not installed. I
 also tried forcing it (using -f), but even then it did not seem to
 have installed

 Php5 properly.

 I tried this:
 cd /usr/ports/lang/php5
 pkg_add php5

 That did not work.

 Then I ftp-ed to  ftp://ftp.freebsd.org ftp.freebsd.org and
 downloaded the tbz file from the same location (/ports/lang/php5) and
 did pkg_add with that file name as parameter. Is that the right thing
 to do?

 After I did that, I got the error that I explained above (i.e. Apache
 1.3 not installed)

 As you might imagine, I am pretty new to FreeBSD.

 Thanks,
 Omer


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



--
Best Regards,

Ivan Levchenko
[EMAIL PROTECTED]





--
Best Regards,

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


Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

2006-08-22 Thread lveax

On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:

Thanks. I tried precisely this, and it worked fine. However, what I am
seeing now is that I have index.php, but it is not automatically rendered by
Apache. And when I put it in browser (lets say http://localhost/index.php),
php is not understood, and it is just parsed as a .html file.


you need add the 2 lines below into the httpd.conf:

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

p.s.(by default httpd.conf is in
/usr/local/etc/apache22/httpd.conf)




Just letting you know the status. I will be sending this to the questions
mailing list.

Best Wishes,
Omer


-Original Message-
From: lveax [mailto:[EMAIL PROTECTED]
Sent: Monday, August 21, 2006 11:55 PM
To: Muhammad Omer Iqbal
Subject: Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:
 Hi,
 (Please include me in the reply as I am not subscribed to this list.)

 I am trying to use Ports to install php5 on top of Apache 2.2.
 However, when

 I do pkg_add, it says that the prereq Apache 1.3 is not installed. I
 also tried forcing it (using -f), but even then it did not seem to
 have installed

 Php5 properly.

 I tried this:
 cd /usr/ports/lang/php5
 pkg_add php5

 That did not work.

to install a port you need to use:
#make
#make install

you may need to read the handbook:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html


 Then I ftp-ed to  ftp://ftp.freebsd.org ftp.freebsd.org and
 downloaded the tbz file from the same location (/ports/lang/php5) and
 did pkg_add with that file name as parameter. Is that the right thing
 to do?

 After I did that, I got the error that I explained above (i.e. Apache
 1.3 not installed)

 As you might imagine, I am pretty new to FreeBSD.

 Thanks,
 Omer


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




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


RE: Installing Php5 on Apache2.2 (Freebsd 6.1)

2006-08-22 Thread Muhammad Omer Iqbal
I have already done that. By doing that, the only difference is that when I
put index.php in the browser, it asks me to download those files instead of
automatically parsing them. However, when I remove those lines, I get them
as .html files. 

-Original Message-
From: lveax [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 22, 2006 6:46 AM
To: Muhammad Omer Iqbal
Cc: [EMAIL PROTECTED]
Subject: Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:
 Thanks. I tried precisely this, and it worked fine. However, what I am 
 seeing now is that I have index.php, but it is not automatically 
 rendered by Apache. And when I put it in browser (lets say 
 http://localhost/index.php), php is not understood, and it is just parsed
as a .html file.

you need add the 2 lines below into the httpd.conf:

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

p.s.(by default httpd.conf is in
/usr/local/etc/apache22/httpd.conf)



 Just letting you know the status. I will be sending this to the 
 questions mailing list.

 Best Wishes,
 Omer


 -Original Message-
 From: lveax [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 21, 2006 11:55 PM
 To: Muhammad Omer Iqbal
 Subject: Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

 On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:
  Hi,
  (Please include me in the reply as I am not subscribed to this 
  list.)
 
  I am trying to use Ports to install php5 on top of Apache 2.2.
  However, when
 
  I do pkg_add, it says that the prereq Apache 1.3 is not installed. I 
  also tried forcing it (using -f), but even then it did not seem to 
  have installed
 
  Php5 properly.
 
  I tried this:
  cd /usr/ports/lang/php5
  pkg_add php5
 
  That did not work.

 to install a port you need to use:
 #make
 #make install

 you may need to read the handbook:
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.
 html

 
  Then I ftp-ed to  ftp://ftp.freebsd.org ftp.freebsd.org and 
  downloaded the tbz file from the same location (/ports/lang/php5) 
  and did pkg_add with that file name as parameter. Is that the right 
  thing to do?
 
  After I did that, I got the error that I explained above (i.e. 
  Apache
  1.3 not installed)
 
  As you might imagine, I am pretty new to FreeBSD.
 
  Thanks,
  Omer
 
 
  ___
  freebsd-questions@freebsd.org mailing list 
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
 [EMAIL PROTECTED]
 



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


Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

2006-08-22 Thread Gerard Seibert
On Tuesday 22 August 2006 10:21, Muhammad Omer Iqbal wrote:
 you need add the 2 lines below into the httpd.conf:

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

 p.s.(by default httpd.conf is in
 /usr/local/etc/apache22/httpd.conf)

You also need to restart apache.

httpd -k restart


-- 
Gerard Seibert
[EMAIL PROTECTED]

As the poet said, Only God can make a tree -- probably
because it's so hard to figure out how to get the bark on.

Woody Allen


pgpBZ8QLy5PcZ.pgp
Description: PGP signature


RE: Installing Php5 on Apache2.2 (Freebsd 6.1)

2006-08-22 Thread Muhammad Omer Iqbal
It solved the problem. Actually, I was not able to find libphp5.so anywhere
on my file system. I remember that when I initially installed php, I was
supposed to do make and then make install. When I had done make install, it
had returned me with an error that php was already installed. That, to me,
sounded fishy already and came back to my mind.

So, I went to the php directory again, did make deinstall, make reinstall,
restarted apache and it worked. I had already manually added these lines in
the httpd.conf, so not sure if reinstall would have done it automatically or
not.

However, initially, I was having trouble. For instance, index.php would show
just fine one time, but the second time, server would stop responding (which
can most probably be understood as Apache or Php module not responding.) So
I restarted the server and now it is working like a charm.

Thanks a lot, you really made my day :-)

Take care,
Omer

-Original Message-
From: Ivan Levchenko [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 22, 2006 6:44 AM
To: Muhammad Omer Iqbal
Cc: freebsd-questions@freebsd.org
Subject: Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

i'm no apache guru, but you need to have something like the following in
httpd.conf:

LoadModule php5_modulelibexec/apache22/libphp5.so #in the
modules section
DirectoryIndex index.html index.php index.phtm #so that it gets those php
index files #File types for php files, so it knows it is supposed to put
them through php and not just give back plain text.
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:
 Thanks for the advice. The way I got it to work was by actually making 
 the package on the local box and it installed fine. In the past, when 
 I tried it, I was not connected to the Internet and the build failed. 
 I did not realize that my system must be connected as it needs to 
 fetch some data from the Internet. Today, I tried it again with 
 Internet connected (I figured that out today as I carefully read 
 through the error messages), and it built fine and apparently got
installed.

 However, what I am seeing now is that I have index.php, but it is not 
 automatically returned by Apache to browser when it goes to that url. 
 And when I put index.php manually in the browser (lets say 
 http://localhost/index.php), php is not parsed, and the file is just 
 treated as a .html file.

 When I do make install, it says that php5 is already installed. I 
 already installed a few php5-extensions, but I think this should be 
 working without the extensions. I tried mod_php5, but since that 
 component is installed by
 php5 itself, I get precisely the message that it cannot be installed 
 because the location is the same, so I assume php5 actually did 
 install Apache module too.

 Any help would be greatly appreciated.

 Thanks,
 Omer

 -Original Message-
 From: Ivan Levchenko [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 22, 2006 4:43 AM
 To: Muhammad Omer Iqbal; freebsd-questions@freebsd.org
 Subject: Re: Installing Php5 on Apache2.2 (Freebsd 6.1)

 i think that you should be able to porce the installation of the 
 package of
 php5 with the -f command, after it finished, run pkgdb -F to fix the 
 dependency of php5 for apacha13 to apache22.


 On 8/22/06, Muhammad Omer Iqbal [EMAIL PROTECTED] wrote:
  Hi,
  (Please include me in the reply as I am not subscribed to this 
  list.)
 
  I am trying to use Ports to install php5 on top of Apache 2.2.
  However, when
 
  I do pkg_add, it says that the prereq Apache 1.3 is not installed. I 
  also tried forcing it (using -f), but even then it did not seem to 
  have installed
 
  Php5 properly.
 
  I tried this:
  cd /usr/ports/lang/php5
  pkg_add php5
 
  That did not work.
 
  Then I ftp-ed to  ftp://ftp.freebsd.org ftp.freebsd.org and 
  downloaded the tbz file from the same location (/ports/lang/php5) 
  and did pkg_add with that file name as parameter. Is that the right 
  thing to do?
 
  After I did that, I got the error that I explained above (i.e. 
  Apache
  1.3 not installed)
 
  As you might imagine, I am pretty new to FreeBSD.
 
  Thanks,
  Omer
 
 
  ___
  freebsd-questions@freebsd.org mailing list 
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
 [EMAIL PROTECTED]
 


 --
 Best Regards,

 Ivan Levchenko
 [EMAIL PROTECTED]




--
Best Regards,

Ivan Levchenko
[EMAIL PROTECTED]

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