Author |
|
baijumehta
Joined: 22 Jun 2006 Posts: 4
|
Posted: Fri 23 Jun '06 14:36 Post subject: PHP 5.1.4 and Apache 2.2.2 on Win2000 |
|
|
Hello,
Firstly let me thanks the people that run this site. It helped me start Apache 2.2.2 and PHP 5.1.4 on XP with service pack2.
Now the problem is with Win2000 --
I've installed apache 2.2.2 and php 5.1.4 on win2000 prof. and followed all the instructions carefully and doubled checked the conf file of apache and ini of php. Have also update windows path to include the php folder.
Have downloaded the files (httpd.exe.manifest;php5apache2.dll) from this site and copied it in right folders. Also installed the C++ executable that was informed on these site.
The server runs perfectly and also displays in the bar below apache/2.2.2(Win32)PHP/5.1.4. But phpinfo.php does not work.
What could be the problem? Please help.
Thanking you all in advance.
Baiju |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 23 Jun '06 19:52 Post subject: |
|
|
How do you load PHP in the httpd.conf? |
|
Back to top |
|
baijumehta
Joined: 22 Jun 2006 Posts: 4
|
Posted: Sat 24 Jun '06 7:10 Post subject: |
|
|
James Blond wrote: | How do you load PHP in the httpd.conf? |
----
James, Thanks for the response. I've made following entry in the httpd.conf file
LoadModule php5_module "d:/php/php5apache2.dll"
# configure the path to php.ini
PHPIniDir "d:/php"
DocumentRoot "D:/Apache2.2/htdocs"
AddType application/x-httpd-php .php
----
Well....what do you think.
The same setting in conf file work on XP.
Awaiting your solution.
Thanks,
Baiju |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Sat 24 Jun '06 16:18 Post subject: |
|
|
Solution? When can I come to you? (joke)
Is there any errormessage in the error log about PHP? Is there a warning message from Apache that it can't load PHP module?
I never installed that on 2000. I just copied the working solution (all files) from my XP PC to the 2000 PC and changed the pathes. Works!
is there any error from Apache or PHP in the Windows eventlog?
Without more information I can only guess! |
|
Back to top |
|
OldManRiver
Joined: 21 Jun 2006 Posts: 21
|
Posted: Sat 24 Jun '06 20:37 Post subject: Following Along |
|
|
Have been following this solution. My Logs show:
server - - [24/Jun/2006:12:50:15 -0500] "GET /Test%20files/TestAP.php HTTP/1.1" 200 128
server - - [24/Jun/2006:12:50:38 -0500] "GET /Test%20files/TestAP.html HTTP/1.1" 200 120
server - - [24/Jun/2006:12:51:10 -0500] "GET /Test%20files/findinfo.php HTTP/1.1" 200 20
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?
OMR
james: removed unneeded stuff |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sat 24 Jun '06 21:00 Post subject: |
|
|
OldManRiver:
You made a record, the biggest post ever on this forum.
It is not common to paste you whole configuration, use a pastbin like http://rafb.net/paste/ , see the Forum Rules.
I is not that problem, but it takes a lot bandwidth and with searching, there are too many pointers to your config text.
Steffen |
|
Back to top |
|
OldManRiver
Joined: 21 Jun 2006 Posts: 21
|
Posted: Sun 25 Jun '06 0:33 Post subject: Looked |
|
|
Steffen,
Most boards have an option to upload a .zip of your files. I looked and found nothing here. It would be a nice addition. You do use PHPbb and I believe there is an upgrade with it in a contribution/package.
I run the e-worldpeace.com board with PHPbb and think I have it installed there, but will check to make sure. Just brought it up Tuesday for customer.
OMR
Mod: Please stay on topic! for phpBB things look at phpBB.com, not here |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sun 25 Jun '06 17:19 Post subject: |
|
|
I saw in your httpd.conf:
#---> AddType directives <---#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#AddType text/html .shtml .htm .dhtm .dhtml .asp .aspx
AddType text/html .shtml .htm .dhtm .dhtml .asp .aspx .php .php3 .phml .cfml
And:
#---> AddHandler directives <---#
AddHandler cgi-script .cgi
AddHandler php-script .php .php3 .phml
AddHandler php .php .php3 .phml
AddHandler type-map var
And:
LoadModule php5_module "D:/Program Files/PHP/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "D:/Program Files/PHP
Only use the last block and remove .php from the other two.
Steffen |
|
Back to top |
|