Advertisement
Guest User

Untitled

a guest
Jul 12th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. My LAMP Stack consists of the following - Apache v2.4.4, PHP v5.5.0, MySQL v5.6.12.
  2.  
  3. I have successfully compiled suPHP v0.7.2 after making following changes in it's source code
  4. File => configure.ac
  5. Line 69 => if test "$major_version" = "2.0" -o "$major_version" = "2.2" -o "$major_version" = "2.4"; then
  6.  
  7. File => src/apache2/mod_suphp.c
  8. Line 114 => #define SUPHP_PATH_TO_SUPHP "/usr/local/sbin/suphp"
  9.  
  10.  
  11. My installation commands
  12. --------------------------
  13. autoreconf -ifv -W all
  14. ./configure --sysconfdir=/etc --with-apr=/usr/local/apache2/bin/apr-1-config --with-apxs=/usr/local/apache2/bin/apxs
  15. make
  16. make install
  17.  
  18.  
  19. /etc/suphp.conf file
  20. --------------------------
  21. [global]
  22. logfile=/usr/local/apache2/logs/suphp.log
  23. webserver_user=apache
  24. docroot=/var/www:${HOME}/public_html
  25. umask=0077
  26. min_uid=100
  27. min_gid=100
  28. [handlers]
  29. application/x-httpd-php="php:/usr/local/bin/php-cgi"
  30. x-suphp-cgi="execute:!self"
  31.  
  32.  
  33. Main httpd.conf file contains
  34. --------------------------
  35. #LoadModule php5_module modules/libphp5.so
  36. LoadModule suphp_module modules/mod_suphp.so
  37. suPHP_Engine on
  38. suPHP_AddHandler x-httpd-php
  39. AddType application/x-httpd-php .php
  40.  
  41.  
  42. VirtualHost entry contains
  43. ---------------------------
  44. suPHP_UserGroup apache apache
  45.  
  46.  
  47.  
  48. I am trying to access my PHP file in /var/www/htdocs via http://localhost/index.php
  49.  
  50. Apache HTTPD runs as 'apache:apache'. Has UID/GID above 100. The file/folder permission are 600/700. There is no suPHP error log created. Apache access log shows the access entires with successful return codes. There are no errors in Apache log files.
  51.  
  52. The scripts that work with mod_php doesn't work with mod_suphp. With mod_suphp, the PHP code is webpage is shown as it is.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement