Author |
|
KrisP
Joined: 03 May 2010 Posts: 10
|
Posted: Tue 04 May '10 6:04 Post subject: Httpd.conf!!!! cant configure. |
|
|
I know this is a noob question. But I have configured everything so far. My server is running but when I go to configure it for PHP it tells me to please check if the file is open in another location. When i do close everything and try and save the new settings It tells me Access denied!!!
Any help please
Thx |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 04 May '10 9:51 Post subject: |
|
|
How did you setup php? Please post that lines from your config. Not the whole config |
|
Back to top |
|
KrisP
Joined: 03 May 2010 Posts: 10
|
Posted: Tue 04 May '10 16:45 Post subject: |
|
|
Ok i added these 3 paths
LoadModule php5_module php5apache2_2.dll
AddType application/x-httpd-php .php
DirectoryIndex index.html index.html.var index.php
after that i renamed it httpd_conf cuz i couldnt save the origanal version.
After I added those lines, when i try to open a php file on my browser i just get the complete PHP code. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 05 May '10 11:35 Post subject: |
|
|
That won't work. The file has to have the name httpd.conf else it won't work. You have edit the original file. Why couldn't you save it has httpd.conf? |
|
Back to top |
|
KrisP
Joined: 03 May 2010 Posts: 10
|
Posted: Wed 05 May '10 16:35 Post subject: |
|
|
well just to update u i was able to update my httpd.conf file by saving it in another location and then putting it back in the apache conf folder.
Ill explain what I did and where I am having a problem.
1.installed Apache(tested after installation-works)
2.Installed PHP. get error message after installation(You need to configure apache youself)
3. copied 3 files to the root file of apache
php5ts.dll
php5apache2_2.dll
php.ini(configured doc_root)
Up to this point apache was still working.
4.Added these 3 lines in the httpd.conf file and saved.
LoadModule php5_module php5apache2_2.dll
AddType application/x-httpd-php .php
DirectoryIndex index.html index.php
after this I was supposed to test it but when i do I only get a screen on my web browser that shows all the code but not message I am supposed to get.
thx for the help. |
|
Back to top |
|
a_jtim
Joined: 05 May 2010 Posts: 8
|
Posted: Wed 05 May '10 19:51 Post subject: |
|
|
well, at least you know it's finding the file. Just checking the obvious, is the php file executable? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 05 May '10 21:19 Post subject: |
|
|
You have to fix the path to the php module.
e.g.
Code: |
LoadModule php5_module "c:/php5/php5apache2_2.dll"
|
Sorry, if overseen it this morning. |
|
Back to top |
|
KrisP
Joined: 03 May 2010 Posts: 10
|
Posted: Thu 06 May '10 0:12 Post subject: |
|
|
Hey guys. thx for all the great help but I was looking at th code u gave my to fix my PHP....
LoadModule php5_module "c:/php5/php5apache2_2.dll"
and I realized that when i added that line, that my php root folder is named c:/php/ and not as is in what you showed me c:/php5/. i think that might be my problem. thx again for the help I will post again oonce i have some results. |
|
Back to top |
|
KrisP
Joined: 03 May 2010 Posts: 10
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 06 May '10 11:31 Post subject: |
|
|
a) Did you restart apache?
b) anything in your error.log
c) What is the output from httpd -M is there php listed? [1]
d) Check for syntax errors with httpd -S
[1]
Code: |
C:\apache2\bin>httpd -M
Loaded Modules:
core_module (static)
win32_module (static)
mpm_winnt_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_default_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
expires_module (shared)
mime_module (shared)
headers_module (shared)
log_config_module (shared)
negotiation_module (shared)
rewrite_module (shared)
setenvif_module (shared)
status_module (shared)
vhost_alias_module (shared)
fcgid_module (shared)
php5_module (shared)
Syntax OK
C:\apache2\bin>
|
|
|
Back to top |
|
KrisP
Joined: 03 May 2010 Posts: 10
|
Posted: Thu 06 May '10 17:08 Post subject: |
|
|
hey yeah i did restart Apache a bunch of times.
I check the ouput with httpd -M and there was no PHP module listed. so i think i did something wrong then somewhere
Also checked for syntax errors. syntax was good
only error i ever gt in my error log
Could not reliably determine the server's fully qualified domain name using***.***.*.* for server name
Code: | c:\apache\bin\httpd -M
httpd: Could not reliably determine the server's fully qualified domain name using***.***.*.* for server name
Loaded Modules
core_module(static)
win32_module(static
mpm_winnt_module(static)
http_module(static)
so_module(static)
actions_module(shared)
alias_module(shared)
asis_module(shared)
auth_basic_module(shared)
authn_defualt_module(shared)
authn_file_module(shared)
authz_defualt_module(shared)
authz_groupfile_module(shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
dir_module (shared)
env_module (shared)
include_module (shared)
isapi_module (shared)
log_config_module (shared)
mime_module (shared)
negotiation_module (shared)
sentenvif_module (shared)
Syntax OK
c:\apache\bin\
|
|
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 06 May '10 21:28 Post subject: |
|
|
The 'when all else fails' approach
Move php.ini into c:\Windows (you can move it again later)
in httpd.conf
LoadModule php5_module c:\php\php5apache2_2.dll
AddType application/x-httpd-php .php
DirectoryIndex index.php index.html |
|
Back to top |
|
KrisP
Joined: 03 May 2010 Posts: 10
|
Posted: Fri 07 May '10 5:07 Post subject: |
|
|
Hey guys. I tried that and i Still get the same response when I try and test PHP on a browser window. I know that somwhere I am making a tiny mistake or forgetting something. not sure what.
Is it a good idea to just uninstall everything and try again??? this time i would use setting that I have gotten from you. |
|
Back to top |
|
KrisP
Joined: 03 May 2010 Posts: 10
|
Posted: Fri 07 May '10 17:48 Post subject: |
|
|
Well I have tried everything. I think maybe I will just completely reinstall my laptop. I need to clean it up a little anyways. then I will try and do this again.
And Mister Blond. I tried ur tutorial and for some reason it didnt work for me. I tried everything. Now gonna wipe the entire computer.
THx for all the help.
If i have any more questions I will be sure to ask you guys. |
|
Back to top |
|