Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed incorrect detection of the Apache MPM on Ubuntu 13.10.

  • Loading branch information...
commit 6f5af46de7cb80dd88ef3b35c7c5c4bfbfa0cfd3 1 parent 406e2ed
@FooBarWidget FooBarWidget authored
View
1  NEWS
@@ -19,6 +19,7 @@ Release 4.0.34
now leaves less garbage Meteor processes behind.
* It is now possible to disable the usage of the Ruby native extension by setting
the environment variable `PASSENGER_USE_RUBY_NATIVE_SUPPORT=0`.
+ * Fixed incorrect detection of the Apache MPM on Ubuntu 13.10.
* When using RVM, if you set PassengerRuby/passenger_ruby to the raw Ruby binary
instead of the wrapper script, Phusion Passenger will now print an error.
* Added support for RVM >= 1.25 wrapper scripts.
View
2  bin/passenger-install-apache2-module
@@ -239,7 +239,7 @@ private
# ...
# Server compiled with....
# -D APACHE_MPM_DIR="server/mpm/prefork"
- output = `#{PlatformInfo.httpd} -V`
+ output = PlatformInfo.httpd_V
output =~ /^Server MPM: +(.*)$/
if $1
mpm = $1.downcase
View
45 lib/phusion_passenger/platform_info/apache.rb
@@ -101,6 +101,27 @@ def self.httpd_version(options = nil)
end
memoize :httpd_version
+ # Run `httpd -V` and return its output. On some systems, such as Ubuntu 13.10,
+ # `httpd -V` fails without the environment variables defined in various scripts.
+ # Here we take care of evaluating those scripts before running `httpd -V`.
+ def self.httpd_V(options = nil)
+ if options
+ httpd = options[:httpd] || self.httpd(options)
+ else
+ httpd = self.httpd
+ end
+ if httpd
+ command = "#{httpd} -V"
+ if envvars_file = httpd_envvars_file(options)
+ command = ". '#{envvars_file}' && #{command}"
+ end
+ return `#{command}`
+ else
+ return nil
+ end
+ end
+ memoize :httpd_V
+
# The Apache executable's architectural bits. Returns 32 or 64,
# or nil if unable to detect.
def self.httpd_architecture_bits(options = nil)
@@ -652,26 +673,6 @@ def self.determine_apu_info
memoize :determine_apu_info, true
private_class_method :determine_apu_info
- # Run `httpd -V` and return its output. On some systems, such as Ubuntu 13.10,
- # `httpd -V` fails without the environment variables defined in various scripts.
- # Here we take care of evaluating those scripts before running `httpd -V`.
- def self.httpd_V(options = nil)
- if options
- httpd = options[:httpd] || self.httpd(options)
- else
- httpd = self.httpd
- end
- if httpd
- command = "#{httpd} -V"
- if envvars_file = httpd_envvars_file(options)
- command = ". '#{envvars_file}' && #{command}"
- end
- return `#{command}`
- else
- return nil
- end
- end
-
def self.scan_for_included_apache2_config_files(config_file, state, options = nil)
begin
config = File.open(config_file, "rb") do |f|
@@ -704,6 +705,7 @@ def self.scan_for_included_apache2_config_files(config_file, state, options = ni
end
end
end
+ private_class_method :scan_for_included_apache2_config_files
def self.expand_apache2_glob(glob)
if File.directory?(glob)
@@ -724,6 +726,7 @@ def self.expand_apache2_glob(glob)
end
return result
end
+ private_class_method :expand_apache2_glob
def self.unescape_apache_config_value(value, options = nil)
if value =~ /^"(.*)"$/
@@ -750,6 +753,7 @@ def self.unescape_apache_config_value(value, options = nil)
return value
end
end
+ private_class_method :unescape_apache_config_value
def self.unescape_c_string(s)
state = 0
@@ -773,6 +777,7 @@ def self.unescape_c_string(s)
end
return res
end
+ private_class_method :unescape_c_string
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.