logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Httpd.conf!!!! cant configure.
Author
KrisP



Joined: 03 May 2010
Posts: 10

PostPosted: Tue 04 May '10 6:04    Post subject: Httpd.conf!!!! cant configure. Reply with quote

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

PostPosted: Tue 04 May '10 9:51    Post subject: Reply with quote

How did you setup php? Please post that lines from your config. Not the whole config Wink
Back to top
KrisP



Joined: 03 May 2010
Posts: 10

PostPosted: Tue 04 May '10 16:45    Post subject: Reply with quote

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

PostPosted: Wed 05 May '10 11:35    Post subject: Reply with quote

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

PostPosted: Wed 05 May '10 16:35    Post subject: Reply with quote

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

PostPosted: Wed 05 May '10 19:51    Post subject: Reply with quote

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

PostPosted: Wed 05 May '10 21:19    Post subject: Reply with quote

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

PostPosted: Thu 06 May '10 0:12    Post subject: Reply with quote

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

PostPosted: Thu 06 May '10 5:07    Post subject: Reply with quote

http://www.flickr.com/photos/natienusa/4582600881/sizes/o/

hey guys my idea didnt work. i didnt have that bad spelling. this is a img of what it looks like. I modified the file u told me and still nada. Now i am lost again.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 06 May '10 11:31    Post subject: Reply with quote

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

PostPosted: Thu 06 May '10 17:08    Post subject: Reply with quote

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

PostPosted: Thu 06 May '10 21:28    Post subject: Reply with quote

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

PostPosted: Fri 07 May '10 5:07    Post subject: Reply with quote

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

PostPosted: Fri 07 May '10 17:48    Post subject: Reply with quote

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


Reply to topic   Topic: Httpd.conf!!!! cant configure. View previous topic :: View next topic
Post new topic   Forum Index -> Apache