Graeme Thank you for the advice. This at least got me to the point where I can start Apache and attempt to load a PHP page. However, I still can't get any output. Using the same web page:
<html> <head><title>PHP Test</title></head> <body> <p>If nothing follows this paragraph, PHP is not enabled.</p> <?php phpinfo() ?> </body> </html> With permission 644 loaded from my home directory, I get a 500 error with the following entry in my suphp.log: [Mon Apr 13 22:27:33 2009] [info] Executing "/home/bu/jsantana/htdocs/phpinfo.php" as UID 29944, GID 10 Both UID and GID are correct. Nothing logged to the Apache error_log. Can anyone out there offer me some more advice? Jesse Jesse Santana Project Lead - Enterprise Services Group Information Technology Services California State University, Long Beach 1250 Bellflower Blvd. Long Beach, CA 90840 Office: (562)985-8511 Fax: (562)985-8855 suphp-requ...@lists.marsching.biz Sent by: suphp-boun...@lists.marsching.biz 04/09/2009 03:00 AM Please respond to suphp@lists.marsching.biz To suphp@lists.marsching.biz cc Subject suPHP Digest, Vol 61, Issue 2 Send suPHP mailing list submissions to suphp@lists.marsching.biz To subscribe or unsubscribe via the World Wide Web, visit http://lists.marsching.com/mailman/listinfo/suphp or, via email, send a message with subject or body 'help' to suphp-requ...@lists.marsching.biz You can reach the person managing the list at suphp-ow...@lists.marsching.biz When replying, please edit your Subject line so it is more specific than "Re: Contents of suPHP digest..." Today's Topics: 1. Handler not found in configuration (Jesse Santana) 2. Re: Handler not found in configuration (Graeme Fowler) ---------------------------------------------------------------------- Message: 1 Date: Wed, 8 Apr 2009 11:37:00 -0700 From: Jesse Santana <jsant...@csulb.edu> Subject: [suPHP] Handler not found in configuration To: suphp@lists.marsching.biz Message-ID: <of87bfc06b.d586ca85-on88257592.0064caab-88257592.00664...@notesmail.csulb.edu> Content-Type: text/plain; charset="us-ascii" I am testing suPHP version 0.7.1 on a system running Solaris 10 x86 and Apache 2.0.63. I compiled the software using: ./configure \ --prefix=/usr/local/suphp --with-apxs=/usr/local/apache2/bin/apxs \ --with-apache-user=nobody \ --with-logfile=/usr/local/apache2/logs/suphp_log --with-setid-mode=owner I then ran make and make install without any problems. I now see the file mod_suphp.so in my modules directory: ls -l /usr/local/apache2/modules/ total 50 -rw-r--r-- 1 root root 8504 May 29 2008 httpd.exp -rwxr-xr-x 1 root root 41568 Apr 8 08:44 mod_suphp.so* I then modified my httpd.conf file and added the following: LoadModule suphp_module modules/mod_suphp.so AddType application/x-httpd-php .php suPHP_AddHandler application/x-httpd-php Everything checks out when I run httpd -t. I then created the following suphp.conf file: [global] ;Path to logfile ;logfile=/var/log/suphp.log logfile=/usr/local/apache2/conf/suphp.log ;Loglevel loglevel=info ;User Apache is running as ;webserver_user=wwwrun webserver_user=nobody ;Path all scripts have to be in ;docroot=/var/www:${HOME}/public_html docroot=${HOME}/htdocs ;Path to chroot() to before executing script ;chroot=/mychroot ; Security options allow_file_group_writeable=false allow_file_others_writeable=false allow_directory_group_writeable=false allow_directory_others_writeable=false ;Check wheter script is within DOCUMENT_ROOT ;check_vhost_docroot=true check_vhost_docroot=false ;Send minor error messages to browser ;errors_to_browser=false errors_to_browser=true ;PATH environment variable env_path=/bin:/usr/bin ;Umask to set, specify in octal notation umask=0077 ; Minimum UID min_uid=100 ; Minimum GID ;min_gid=100 min_gid=10 [handlers] ;Handler for php-scripts ;x-httpd-php="php:/usr/bin/php" x-httpd-php="php:/usr/local/php5/bin/php" ;Handler for CGI-scripts x-suphp-cgi="execute:!self" After restarting Apache successfully, I tried loading the following PHP script from a web browser: <html> <head><title>PHP Test</title></head> <body> <p>If nothing follows this paragraph, PHP is not enabled.</p> <?php phpinfo() ?> </body> </html> Which results in an internal server error and the following in my error log: [Wed Apr 08 11:36:01 2009] [error] [client 134.139.1.176] SecurityException in Application.cpp:496: Handler not found in configuration [Wed Apr 08 11:36:01 2009] [error] [client 134.139.1.176] Caused by KeyNotFoundException in Configuration.cpp:234: Handler "application/x-httpd-php" not found [Wed Apr 08 11:36:01 2009] [error] [client 134.139.1.176] Premature end of script headers: phpinfo.php What am I missing here? Thanks in advance, Jesse Jesse Santana Project Lead - Enterprise Services Group Information Technology Services California State University, Long Beach 1250 Bellflower Blvd. Long Beach, CA 90840 Office: (562)985-8511 Fax: (562)985-8855 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.marsching.com/pipermail/suphp/attachments/20090408/7875fd17/attachment.html ------------------------------ Message: 2 Date: Wed, 08 Apr 2009 21:10:31 +0100 From: Graeme Fowler <gra...@graemef.net> Subject: Re: [suPHP] Handler not found in configuration To: suphp@lists.marsching.biz Message-ID: <1239221431.2009.2.ca...@ernie.internal.graemef.net> Content-Type: text/plain Jesse On Wed, 2009-04-08 at 11:37 -0700, Jesse Santana wrote: <snip> > I then modified my httpd.conf file and added the following: > > LoadModule suphp_module modules/mod_suphp.so > AddType application/x-httpd-php .php > suPHP_AddHandler application/x-httpd-php ^^^^^^^^^^^^^^^^^^^^^^^ key part here in full <snip more> > [handlers] > ;Handler for php-scripts > ;x-httpd-php="php:/usr/bin/php" > x-httpd-php="php:/usr/local/php5/bin/php" ^^^^^^^^^^^ Spot the difference - you need the full declaration, not just the bit after "application/". HTH, HAND Graeme ------------------------------ _______________________________________________ suPHP mailing list suPHP@lists.marsching.biz http://lists.marsching.com/mailman/listinfo/suphp End of suPHP Digest, Vol 61, Issue 2 ************************************
_______________________________________________ suPHP mailing list suPHP@lists.marsching.biz http://lists.marsching.com/mailman/listinfo/suphp