Re: php failing to produce phpinfo()

2007-09-30 Thread eoghan

bob wrote:
My business has been using PHP for years.  Mysql outputs to my browser, 
where I can print invoices, bills and any business statitic.


Suddenly, my browser started acting funny.  I don't know how to use the 
repair disk to fix a problem, so I reinstalled FreeBSD-6.1.  It still 
works the same except I can't get phpinfo() to display in the browser.  
I can do php -i, which displays several pages of PHP code.  That means 
PHP is working.  I don't use CGI or PHP scripts.  If phpinfo() doesn't 
show up in my browser, I can't do anything.


The following is in /usr/local/etc/apache/httpd.conf:

LoadModule php5_module
AddModule mod_php5.c
DirectoryIndex index.php index.html
DirectoryIndex index.html
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

The httpd.error.log doesn't show any problems.  Thre are 35 modules in 
/usr/local/libexec/apache including libphp5.so and httpd.exp.  Php.ini 
is installed at /usr/local/lib


This time I installed mysql-5.1, apache-1.3 and PHP-5.1.  I used 
pkg_add -r to install apache and mysql.  Apache and mysql work 
excellent.  I installed PHP from www.php.net. Both PHP4 and PHP5 would 
fail to load the phpinfo() file. I installed PHP-5.1 from the ports 
directory.  Same problem.   I ordered FreeBSD-6.1, before it was 
available.  The FreeBSD Mall had it, but wasn't promoting it yet.



About 2 years ago when I first installed FreeBSD-6.1, I installed 
mysql-4.0, PHP-4 and apache-1.3 on FreeBSD-6.1.  I used pkg_add -r to 
install apache and mysql and I downloaded PHP-4 from www.php.net.  
Everything worked, including PHP.  Two years ago, www.php.net was 
supplying any version of PHP including older versions of PHP-4.  I 
installed  older versions because they worked.

Now www.php.net only supplies the latest version.

thanks for any help,
bob


Hi
Not sure but whats your php info page look like? Think short tags are 
either off or on by default... do you have ?php .. ? ?


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


Re: php failing to produce phpinfo()

2007-09-30 Thread Miguel Segura

bob wrote:
My business has been using PHP for years.  Mysql outputs to my 
browser, where I can print invoices, bills and any business statitic.


Suddenly, my browser started acting funny.  I don't know how to use 
the repair disk to fix a problem, so I reinstalled FreeBSD-6.1.  It 
still works the same except I can't get phpinfo() to display in the 
browser.  I can do php -i, which displays several pages of PHP code.  
That means PHP is working.  I don't use CGI or PHP scripts.  If 
phpinfo() doesn't show up in my browser, I can't do anything.


The following is in /usr/local/etc/apache/httpd.conf:

LoadModule php5_module
AddModule mod_php5.c
DirectoryIndex index.php index.html
DirectoryIndex index.html
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

The httpd.error.log doesn't show any problems.  Thre are 35 modules in 
/usr/local/libexec/apache including libphp5.so and httpd.exp.  Php.ini 
is installed at /usr/local/lib


This time I installed mysql-5.1, apache-1.3 and PHP-5.1.  I used 
pkg_add -r to install apache and mysql.  Apache and mysql work 
excellent.  I installed PHP from www.php.net. Both PHP4 and PHP5 would 
fail to load the phpinfo() file. I installed PHP-5.1 from the ports 
directory.  Same problem.   I ordered FreeBSD-6.1, before it was 
available.  The FreeBSD Mall had it, but wasn't promoting it yet.



About 2 years ago when I first installed FreeBSD-6.1, I installed 
mysql-4.0, PHP-4 and apache-1.3 on FreeBSD-6.1.  I used pkg_add -r 
to install apache and mysql and I downloaded PHP-4 from www.php.net.  
Everything worked, including PHP.  Two years ago, www.php.net was 
supplying any version of PHP including older versions of PHP-4.  I 
installed  older versions because they worked.

Now www.php.net only supplies the latest version.

thanks for any help,
bob




--- 

uname -a says: FreeBSD localhost 6.1-RELEASE FreeBSD 6.1-RELEASE #0: 
SUN MAY 7 04:32:43 UTC 20 06 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC i386


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



Did you stop and start apache ?

apachectl stop
apachectl start


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


Re: php failing to produce phpinfo()

2007-09-30 Thread Ian Smith
On Sun, 30 Sep 2007 13:52:58 -0600 bob [EMAIL PROTECTED] wrote:
  My business has been using PHP for years.  Mysql outputs to my browser, 
  where I can print invoices, bills and any business statitic.
  
  Suddenly, my browser started acting funny.  I don't know how to use the 
  repair disk to fix a problem, so I reinstalled FreeBSD-6.1.  It still 
  works the same except I can't get phpinfo() to display in the browser.  
  I can do php -i, which displays several pages of PHP code.  That means 
  PHP is working.  I don't use CGI or PHP scripts.  If phpinfo() doesn't 
  show up in my browser, I can't do anything.
  
  The following is in /usr/local/etc/apache/httpd.conf:
  
   LoadModule php5_module

LoadModule php5_modulelibexec/apache/libphp5.so

   AddModule mod_php5.c
   DirectoryIndex index.php index.html
   DirectoryIndex index.html

Last match wins: remove latter DirectoryIndex to have index.php work.

   AddType application/x-httpd-php .php
   AddType application/x-httpd-php-source .phps
  
  The httpd.error.log doesn't show any problems.  Thre are 35 modules in 
  /usr/local/libexec/apache including libphp5.so and httpd.exp.  Php.ini 
  is installed at /usr/local/lib

php.ini (from the default php5 port) installs in /usr/local/etc:

paqi% ll -rt /usr/local/etc/|grep php
-r--r--r--  1 root   wheel   39243 May  5  2006 php.ini.php4.05May06
drwxr-xr-x  2 root   wheel 512 Dec 17  2006 php
-rw-r--r--  1 root   wheel   27669 Dec 17  2006 diff_php.ini.4vs5rec
-r--r--r--  1 root   wheel   46221 Dec 18  2006 php.ini-recommended
-r--r--r--  1 root   wheel   42919 Dec 18  2006 php.ini-dist
-r--r--r--  1 root   wheel  49 Dec 18  2006 php.conf
-r--r--r--  1 root   wheel   43278 Dec 19  2006 php.ini

  This time I installed mysql-5.1, apache-1.3 and PHP-5.1.  I used 
  pkg_add -r to install apache and mysql.  Apache and mysql work 
  excellent.  I installed PHP from www.php.net. Both PHP4 and PHP5 would 
  fail to load the phpinfo() file. I installed PHP-5.1 from the ports 
  directory.  Same problem.   I ordered FreeBSD-6.1, before it was 
  available.  The FreeBSD Mall had it, but wasn't promoting it yet.
  
  About 2 years ago when I first installed FreeBSD-6.1, I installed 
  mysql-4.0, PHP-4 and apache-1.3 on FreeBSD-6.1.  I used pkg_add -r to 
  install apache and mysql and I downloaded PHP-4 from www.php.net.  
  Everything worked, including PHP.  Two years ago, www.php.net was 
  supplying any version of PHP including older versions of PHP-4.  I 
  installed  older versions because they worked.
  Now www.php.net only supplies the latest version.

The php5 port applies heaps of patches to the php.net sources; I think
you'll save yourself lots of grief by using the port.

I suggest (saving configs and) uninstalling php, then install it from
lang/php5.  Assuming your ports tree is up to date - and it had probably
better be regarding dependencies - then install php5 (5.2.something).

Make sure to set the apache module on (it's turned off by default, for
some bizarre reason, so pkg_add -r php5* is broken), by running make
config first, though the options screen should come up on the initial
install anyway.  You may want to install lang/php5-extensions too .. 

Cheers, Ian

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


Re: php failing

2007-09-19 Thread Kevin Kinsey

[EMAIL PROTECTED] wrote:

Answer: Because it makes conversations flow in a nonsensical order.
Question: Why is top-posting wrong?


[EMAIL PROTECTED] wrote:


snip

I have been using apache, PHP and mysql for years with no problems.  
I just suffered a computer crash and my backup failed, so I had to 
reinstall.  However, now I have a problem.  I tried pkg_add -r php5 
and the latest PHP5 from www.php.net(www.php.net used to work, but 
that was before php5 existed). 



Kevin Kinsey wrote:


The first thing to note is that PHP can install three different 
executables:
a CLI (command line interface) executable at /usr/local/bin/php, a CGI 
(common gateway interface) at /usr/local/bin/php-cgi, and an Apache SO 
(shared object) at /usr/local/libexec/apache/libphp5.so.


So, first question, which of the above files exist?  When you run
`php -i` in a shell, you are accessing the CLI, most likely (running
`which php` should tell you), and IIRC the package doesn't build
the Apache SO, so the problem may be in your Apache configuration
(is it configured to properly use the CGI executable?), or the 
complete lack of a CGI in the location shown above.


[EMAIL PROTECTED] wrote:

 If I access phpinfo() with my browser, it fails. When I try to 
run a PHP script, I get the error:


 cgi error:
  The following CGI application misbehaved by not
  returning a complete set of HTTP headers.
  The headers it did not return are:
 
   This error message means PHP failed to output anything at all.  To
   get to a sensible error message,  change to the PHP executable   
directory and run PHP -i.  If php has any problems running, then a 
suitable  error message will be displayed which will give a clue 
as to what needs to be done next.  If you get a screen full of HTML codes, 
then PHP is working.

 
   Once PHP is working on the command line, try accessing the script 
once again.  If it still fails then it could be one of the following:

 
*The file permissions on your script, php.ini, or any extensions 
  you are trying to load are such that the anonymous internet user

 ISUR_machinename cannot access them.


Kevin Kinsey wrote:


This might indicate that you have the CGI *only*.

Verify that the Apache daemon user (www? nobody?) has access to the files
as mentioned above.  And, likely, the same user should be able to run the
CGI


[EMAIL PROTECTED] wrote:


*The script file does not exit (or possible isn't where you think
 it is relative to your web root directory).  If the script does 
not

 exit then the server will return a 404 error instead.
  I didn't get the 404 error, so I think my script exits.  When I   
typed PHP -i, I received 4 pages of HTML code.  This means PHP 
works.  I tried   phpinfo() from my browser and still nothing.  I 
have been fighting this for 3 weeks and
  reinstalled many times.  I tried this on FreeBSD-5.4, 6.1 and 
6.2.  All   three operating systems produce the same result.   I 
found out that apache runs in a jail and uses chroot.  I added the   
directory it says and still nothing.


This is where I get stuck.  Thanks in advance for any help.


Kevin Kinsey wrote:

The apache log (maybe /var/log/httpd.error.log?) should have some 
information, perhaps in addition to what you have seen.  I don't know 
much about running Apache in a jail; you'll need to keep in contact 
with the list and hope that someone with a clue notices your problem.


Since the question is really about PHP instead of FreeBSD, you might
try some PHP forums/mail lists as well.


[EMAIL PROTECTED] wrote:

I am using PHP/Mysql to manage my business database.  I have a database 
that contains my orders.  I use my browser to print these orders.  I 
think it's the Apache SO version.  /usr/local/bin/php and 
/usr/local/libexec/apache/libphp5.so are there.  I just reinstalled it 
twice today with the exact same result.  I reinstalled according to the 
tip another guy sent me.  I can use the php CLI,  thats how I get 4 
pages of HTML code.  But 'phpinfo()' still doesn't display in my 
browser.  Which files should i check permissions on to see if the groups 
'www' and 'nobody'?

I did check the  '/var/log/httpd.error.log'.  It says:

  Wed Sep 19 10:42:56 2007] [notice] Apache/1.3.37 (Unix) PHP/5.1.6 
with Suhosin-patch configured -- resuming normal operations

  [Wed Sep 19 10:42:56 2007] [notice] Accept mutex: flock (Default: flock)
  [Wed Sep 19 10:43:56 2007] [error] [client 127.0.0.1] File does not 
exist: /usr/

  local/www/data/favicon.ico

I did install the file 'favicon.ico' and that solved the problem, the 
'/var/log/httpd.error.log' is now OK.

I already tried sending this problem to the PHP forms without any luck.


Please carbon-copy the freebsd-questions list to make sure your
mail isn't lost here.

If Apache is running PHP as an SO, they you should have something like
the following in /usr/local/etc/apache/httpd.conf:

LoadModule php5_modulelibexec/apache/libphp5.so
AddModule mod_php5.c

Re: php failing

2007-09-18 Thread Kevin Kinsey

[EMAIL PROTECTED] wrote:

uname -a
localhost 6.2-RELEASE FreeBSD 6.2-RELEASE#0:  Thu Aug 30
13:20:27 UTC 2007  root@:/usr/src/sys/i386/compile/VIL i386

I have been using apache, PHP and mysql for years with no problems.  I 
just suffered a computer crash and my backup failed, so I had to 
reinstall.  However, now I have a problem.  I tried pkg_add -r php5 
and the latest PHP5 from www.php.net(www.php.net used to work, but that 
was before php5 existed). 


The first thing to note is that PHP can install three different executables:
a CLI (command line interface) executable at /usr/local/bin/php, a CGI 
(common gateway interface) at /usr/local/bin/php-cgi, and an Apache SO (shared

object) at /usr/local/libexec/apache/libphp5.so.

So, first question, which of the above files exist?  When you run
`php -i` in a shell, you are accessing the CLI, most likely (running
`which php` should tell you), and IIRC the package doesn't build
the Apache SO, so the problem may be in your Apache configuration
(is it configured to properly use the CGI executable?), or the 
complete lack of a CGI in the location shown above.


  If I access phpinfo() with my browser, it 
  fails. When I try to run a PHP script, I get the error:


 cgi error:
  The following CGI application misbehaved by not
  returning a complete set of HTTP headers.
  The headers it did not return are:
 
   This error message means PHP failed to output anything at all.  To
   get to a sensible error message,  change to the PHP executable 
  directory and run PHP -i.  If php has any problems running, then a suitgable 
  error message will be displayed which will give a clue as to what needs to be
   done next.  If you get a screen full of HTML codes, then PHP is 
  working.

 
   Once PHP is working on the command line, try accessing the script once
   again.  If it still fails then it could be one of the following:
 
*The file permissions on your script, php.ini, or any extensions 
  you are trying to load are such that the anonymous internet user

 ISUR_machinename cannot access them.


This might indicate that you have the CGI *only*.

Verify that the Apache daemon user (www? nobody?) has access to the files
as mentioned above.  And, likely, the same user should be able to run the
CGI


*The script file does not exit (or possible isn't where you think
 it is relative to your web root directory).  If the script does not
 exit then the server will return a 404 error instead.
  I didn't get the 404 error, so I think my script exits.  When I 
  typed PHP -i, I received 4 pages of HTML code.  This means PHP works.  I tried 
  phpinfo() from my browser and still nothing.  I have been fighting this for 3 weeks and
  reinstalled many times.  I tried this on FreeBSD-5.4, 6.1 and 6.2.  All 
  three operating systems produce the same result. 
  I found out that apache runs in a jail and uses chroot.  I added the 
  directory it says and still nothing.


This is where I get stuck.  Thanks in advance for any help.


The apache log (maybe /var/log/httpd.error.log?) should have some information, 
perhaps in addition to what you have seen.  I don't know much about running 
Apache in a jail; you'll need to keep in contact with the list and hope that 
someone with a clue notices your problem.


Since the question is really about PHP instead of FreeBSD, you might
try some PHP forums/mail lists as well.

Kevin Kinsey
--
If Love Were Oil, I'd Be About A Quart Low
-- Book title by Lewis Grizzard
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]