unable to make a per site php configuration Hi there, I am new to IspConfig I recently installed IspConfig on fedora core 5 (32-bit), admitedly I used the 64-bit perfect instalation guide and it went smoothly : ) (with one tweak where I had to edit a file in some xx directory as aposed to xx64 directory) I have a problem with enabling PHP though. when I remove the coment out hence reenabling lines AddHandler php5-script .php AddType text/html .php then everything runs fine and my php is interpreted globally as expected : ), at least I know my php is set up correctly. Also I used update and installed phpMyadmin and that works fine more evidence that the php is operating however when I create a site and enable php and test this site with ##AddHandler php5-script .php #AddType text/html .php# commented out as it should be ,I get the php source code printed out : (, so I cant do a per site php enable I had a look at the Vhosts_config.conf and it looks fine with all php related stuff include on the sites I have chosen to enable php. below I have attached all the key info other than this everything seems to be working 100% : ) need some help to get my installation perfect here is my Vhosts_config.conf.conf file Code: ################################### # # ISPConfig vHost Configuration File # Version 1.0 # ################################### # NameVirtualHost 192.177.7.177:80 <VirtualHost 192.177.7.177:80> ServerName localhost ServerAdmin root@localhost DocumentRoot /var/www/sharedip </VirtualHost> # # ###################################### # Vhost: www.anneWork.com:80 ###################################### # # <VirtualHost 192.177.7.177:80> ServerName www.anneWork.com:80 ServerAdmin [email protected] DocumentRoot /var/www/web12/web DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm ErrorLog /var/www/web12/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 <Files *.php> SetOutputFilter PHP SetInputFilter PHP </Files> <Files *.php3> SetOutputFilter PHP SetInputFilter PHP </Files> <Files *.php4> SetOutputFilter PHP SetInputFilter PHP </Files> <Files *.php5> SetOutputFilter PHP SetInputFilter PHP </Files> php_admin_flag safe_mode On php_admin_value open_basedir /var/www/web12/ php_admin_value file_uploads 1 php_admin_value upload_tmp_dir /var/www/web12/phptmp/ php_admin_value session.save_path /var/www/web12/phptmp/ Alias /error/ "/var/www/web12/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web12/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web12/user/$1/web/$3 </VirtualHost> # # # Here is the bottom part of my httpd.conf Code: <Directory /var/www/sharedip> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> ###############ispconfig_log############### LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig <Directory /var/www/*/web> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> <Directory /var/www/*/user/*/web> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> <Directory /var/www/*/cgi-bin> Options ExecCGI -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf and the Include at the end of the httpd.con seems syntactically correct. and here is my php.conf Code: # # PHP is an HTML-embedded scripting language which attempts to make it # easy for developers to write dynamically generated webpages. # #<IfDefine HAVE_PHP5> LoadModule php5_module modules/libphp5.so #</IfDefine> # # Cause the PHP interpreter to handle files with a .php extension. # # (eeimphs) need to comment thes lines out to give Isp config control # but left them uncommented because it was disabling php #<IfDefine HAVE_PHP> #AddHandler php5-script .php #AddType text/html .php #</IfDefine> # # Add index.php to the list of files that will be served as directory # indexes. # DirectoryIndex index.php # # # Uncomment the following line to allow PHP to pretty-print .phps # files as PHP source code: # #AddType application/x-httpd-php-source .phps cheers Mic
Please try to set the variable $go_info["server"]["apache2_php"] from both to addhandler in the file /home/admispconfig/ispconfig/lib/config.inc.php and then edit / change a website setting in the interface and click on save.
edits to config.inc.php to enable php Hi there tried out your suggestion but no dice : ( here is my config.inc.php Code: $go_info["server"]["apache2_php"] = 'addhandler'; // 'filter' = set PHP filters, 'addtype' = Set PHP addtype or 'both' = Set Filter + Addtype, suphp = SuPHP wrapper enabled, 'addhandler' = Set PHP AddHandler (nescessary for SuSE 10.2) really getting desperate for a solution, anybody with any oter tips cheers
Hi there, Ya I did, configured various check boxes on the site configuration I changed amount of space etc etc ten clicked save, and in some cases I even restarted my apache server. Another bit of information to help ye help me, is I did not set up a host name or static IP address. ceers
Can you go to the directory where Vhosts_ispconfig.conf is located and check if there are other files there that begin with Vhosts_ispconfig.conf and end with a date? If so, try this: http://www.howtoforge.com/forums/showthread.php?t=7719