Forum Moderators: coopster

Message Too Old, No Replies

PHP/Apache not talking!

Newbie would be a generous description

         

SaminOz

12:36 pm on Apr 14, 2009 (gmt 0)

10+ Year Member



I'm just working through a Wrox book to gain an understanding of PHP/Apache/MySQL working together. Apache working ok on port 8080 as port 80 busy (with something?).

PHP 5.29 Installed. Cannot understand why the Wrox book calls itself PHP6 and even has you edit the Apache configuration files with "LoadModule php6_module "C:\PHP\php6apache2_2.dll" - but by changing the 6's to 5's Apache is happy - e.g. boots again.

I've checked the Apache error logs and quote:

[Tue Apr 14 22:18:30 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.9-2 configured -- resuming normal operations

If I type in [localhost:8080...] I get "It works!" so the localhost set up with apache seems to be good.

I have added a test.php file to \htdocs but cannot get the browser to see this document!

Any ideas - I'm so new to this it's not easy to know where to start - having to change php6 to php5 really freaked me out for starters - since it doesn't even seem to exist yet? these guys at Wrox would appear to be a little ahead of themselves - or have I really missed something here?

Any help gratefully received.

Sam.

eelixduppy

1:31 pm on Apr 14, 2009 (gmt 0)



Are you putting test.php in the correct directory? If you cannot see the file at all that means you are not putting it where you are looking for it. Even if PHP was not installed correctly you'd still be able to see the file, just the PHP code wouldn't be parsed. If you check your Apache configuration file (httpd.conf) you should be able to locate the web directory's path.

SaminOz

1:57 pm on Apr 14, 2009 (gmt 0)

10+ Year Member



DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

That's the path I have in httpd.conf and it corresponds with the path of the doc.

eelixduppy

4:16 pm on Apr 14, 2009 (gmt 0)



What's the URI you are using to view the page in the browser? Are you still including the port number in there? It should be http://localhost:8080/path/to/test.php

Also, what sort of error are you getting from viewing the page? Is it just a 404?

SaminOz

11:43 pm on Apr 14, 2009 (gmt 0)

10+ Year Member



That was it - so always append :8080 - should have thought.
Thanks so much :)

(yes it was 404)

SaminOz

11:47 pm on Apr 14, 2009 (gmt 0)

10+ Year Member



btw - I found php6 but it's not for production. I'm not sure whether to plug away at the book using 5 in place of 6 or create in php6 and not have it usable? Does anyone have an idea on what differences there are between the environments and what issues that might raise in my learning etc.