I have bought this book about 8 months ago and this week I started focus study it.
I have a very simple problem but have no :rolleyes: skills yet to get along.
:lol:I installed: MySql, Apache and then Php
When loading the local page http://localhost/ I do see the It works! page just fine.
At this point I believe everything was properly installed.:D
After I wrote my first .Php file and called from the severside it's show the code instead "Today's date!"... However, after upload the same file in my web-host the server date showed just fine as you can see @ http://www.allaboutlawncare.net/today.php
:rolleyes:My question will be: Why I see the .Php code instead the date from my local server?
I'm a new .Php user... I have a few a little bit of knowledge on .Php but would like to improve with this book as well MySql skills.
Much appreciate any help.
Hi rcbarros. Welcome to the forums.
What actual URL are you using on your local machine? If you look at page 51, it notes a few things about the localhost URL:
type http://localhost/today.php or http://localhost:port/today.php if Apache is confugured to run on a port other than the default of 80
It sounds like you havent configured apache to interpret .php files with the PHP engine....
You should never see the plaintext PHP code when visiting a page.
I open my browse and type: http://localhost:8080/today.php and automatically show the script code instead today's date.
The It works! page it's working just fine because its clear there are not .php code into it plus it's a .html file
I have follow all the steps exactly as show in the book with especial attention in forward slashes.
StarLion says "It sounds like you havent configured apache to interpret .php files"
How to ensure I have done this properly? Is there any other steps not noted in the book?
Means while thanks for your help guys... I just want to make work in my local machine... I'm pretty sure will be a better understand for the future.
I just figure out the solution
The book page 18-19 says "... All you need to do is add the following lines to the very end of the file"
This is not right... Those lines can not be enter in the very end of the file but in different part of the file such as:
LoadModule ... after the last line of the loadmodule section
AddType ... before the closing </IfModule> for mime_module
If following the book... the Apache will never interpret .php files.
Another major point that the book didn't make any comment was about copy all .dll files at the root of your php directory into your system32 directory except those that is using php5*.dll
I hope this threads be alive for a while... Pretty sure will help others.
Thanks guys for your help!
Glad you found a solution! Thanks for reporting it back. I'm sure the thread will help others.
This topic is now closed. New replies are no longer allowed.