Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

install not working

Status
Not open for further replies.

YoungManRiver

IS-IT--Management
Feb 9, 2004
220
US
Apache config file reads
Code:
# Section 1: Global Environment

ServerRoot "D:/Program Files/Apache/Apache2"
PidFile logs/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<ifModule mpm_winnt.c>
   ThreadsPerChild 250
   MaxRequestsPerChild 0
</IfModule>
Listen 80

ServerName davisoftlocal:80
ServerAdmin admin@davisoftaec.com

# Section 2: 'Main' server configuration

DirectoryIndex index.htm index.html index.html.var index.shtml index.php index.phml index.cfm index.cfml

DocumentRoot "D:/Program Files/Apache/Apache2/htdocs"
<Directory />
   Options FollowSymLinks
   AllowOverride None
</Directory>

UserDir "E:/MyPath"
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule userdir_module modules/mod_userdir.so

HostnameLookups on
ErrorLog logs/error.log
LogLevel warn

ScriptAlias /cgi-bin/ "D:/Program Files/Apache/Apache2/cgi-bin/"
# ScriptAlias /php/ "D:/Program Files/PHP/"
<Directory "/">
   Options FollowSymLinks
   AllowOverride None
</Directory>

<Directory "D:/Program Files/Apache/Apache2/htdocs">
  Options FollowSymLinks Indexes
  Allow from all
  Order allow,deny
  AllowOverride None
</Directory>

<Directory "D:/Program Files/Apache/Apache2/cgi-bin">
  Options None
  Allow from all
  Order allow,deny
  AllowOverride None
</Directory>

<Directory "D:/Program Files/PHP">
  Options
  Allow from all
  Order allow,deny
  AllowOverride None
</Directory>


<Directory "E:/Nyles/HTML Files/New Home">
  Options All
  Allow from All
  Order Allow,Deny
</Directory>

<Directory "E:/MyPath">
  Options All
  Allow from All
  Order Allow,Deny
</Directory>


NameVirtualHost *:80

<VirtualHost *:80>
  ServerName davisoft.home.com
  DocumentRoot "E:\MyPath"
  <Directory "E:\MyPath\New Home">
   Order allow,deny
   allow from all
  </Directory>
  ServerAdmin "admin@davisoftaec.com"
  ErrorLog "logs/davisoft-error_log"
  CustomLog logs/davisoft-access_log common
</VirtualHost>
<IfModule mpm_winnt.c>
   ThreadsPerChild 250
  MaxRequestsPerChild 0
</IfModule>

<IfModule mod_ssl.c>
  #
  # Bring in additional module-specific configurations
  Include "conf/ssl.conf"
</IfModule>

LoadModule php5_module "D:/Program Files/PHP/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "D:/Program Files/PHP"

and PHP.ini reads:
Code:
[PHP]
engine = On

zend.ze1_compatibility_mode = Off
short_open_tag = On
output_buffering = 4096
zlib.output_compression = Off

implicit_flush = Off
serialize_precision = 100
allow_call_time_pass_reference = Off
safe_mode = Off
;open_basedir =
expose_php = On

max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60        ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

error_reporting  = E_ALL ; display all errors, warnings and notices
display_errors = On
display_startup_errors = Off

log_errors = On
log_errors_max_len = 1024

register_globals = Off

register_long_arrays = On
register_argc_argv = On
auto_globals_jit = On

; Maximum size of POST data that PHP will accept.
post_max_size = 8M

include_path = ".;D:\Program Files\PHP\includes"

doc_root = "D:/Program Files/Apache/Apache2/htdocs"
user_dir =

extension_dir = "./"

enable_dl = On

file_uploads = On

upload_max_filesize = 2M

allow_url_fopen = On

; Default timeout for socket based streams (seconds)
default_socket_timeout = 60

extension=ext/php_mysql.dll

What I'm getting is apache running and Firefox asking to save any .PHP file I try to invoke from the browser under localhost.

What do I need to change?

I noticed, when I download the 5.1.3 installer that it goes into the windows registry but tries to config for IIS, but the 5.1.4 is only a .zip file, which is a simple extract, but does not register the program with windows.

How do I correct this?

YMR
 
you don't need to "register the program with windows". you are using php as an apache module so it is called by apache.

there was an issue between apache and php in the php 5.1 code branch. i think this related to apache 2.2 code branch. if this is what you are using you need to upgrade your php installation to the 5.2 code branch. this is not yet released but is in the stable section of the daily snaphots.

in your php.ini file
Code:
extension=ext/php_mysql.dll
i don't believe the above works.
on the extension line JUST have extension=php_mysql.dll
then change your extensions directory directive to the relevant directory
Code:
extension_dir = "D:/Program Files/PHP/ext"
note that in the past i have struggled with this directive and directory names with spaces in them. if you have the same problem try this instead
Code:
extension_dir = "D:/progra~1/PHP/ext"
lastly none of this will work if mysql has not been properly installed. there is also the issue of ensuring that the mysql libraries are in the right place. the solution to this is to put libmysql.dll in the php directory (and the ext directory if you want) and then had the php directory to the windows path (right click on my computer, select properties, select advanced, select environment variables, and in the lower box, add the path to your php directory as an addendum to the path variable.

after setting an environment variable you need to reboot. this is ok as you need to restart your apache daemon after changing the php.ini file too.
 
come on! if you want help in this forum, spend the time giving us the info we need to help you. don't just cross-post!.

from the title of the url i suspect this is a known incompatibility between apache 2.2.2 and php 5.1.

this is fixed in the latest snapshot of php. you can download this at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top