CMS or PHP/MySQL?

Hi Walter,

I discovered something. I ended up opening the httpd.conf file and saw something odd-I was using TextWrangler and had turned on line numbers and saved it with numbers turned on. I feel stupid! I turned them off and then went back to my page and it works as far as Apache is concerned. It is still showing the variable names. I did copy the page code and used Pastie. I hope I did it right. The link is:

http://pastie.caboo.se/192663

I also found out that there’s an original httpd.conf file in etc/apache2/originals. I have not edited anything. I had thought of copying that and redoing it according to your instructions. I remember when I first started this, it did not have a line about PHP5-I had to add:

LoadModule php5_module libexec/apache2/libphp5.so

Is there an easy way to make a page with Freeway to check the PHP and MySQL? I assume it is connecting just fine. I am understanding this all more and more thanks to your patient help!

Thanks!
Brian


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This could all be a storm in a teakettle – we’re
running in circles trying to “fix” PHP, when the page has a syntax
error or something…

Oh cool! I tried another Freeway tutorial. It’s one by Mike Brackenridge just called mysql_dynamic. It included a mysql dump file. I got it to work! Obviously there’s a syntax error on my other file. I’ll have to fully look at it and absorb it when I’m not so tired!

One last question: I noticed when I look at the source code of the Axiom site (when the page is displayed in the browser), it is all html. Am I correct in thinking that the PHP code is executed first and then the page created is HTML that used PHP to create the code?

Thanks again for all your help. You have been incredibly patient and nice to work with. BTW, I looked at your own site. Nice work-on your own and on your client’s.

Thanks again!

Brian


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The line numbers are never made a part of the resulting file. They
appear on your screen only. If you want to confirm this, please try
the following (in your /etc/apache2/ folder)

pico -w httpd.conf

Do this before and after saving the file with line numbers on.

Walter

On May 6, 2008, at 5:56 PM, Brisprad wrote:

something odd-I was using TextWrangler and had turned on line
numbers and saved it with numbers turned on. I feel stupid!


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s the very point of PHP – the code part is executed on the
server, and its output is served along with the static HTML back to
the browser. None of your code ever leaks out to the visitor (unless
you make a grisly mistake, like leaving off the <?php ?> delimiters).

Note that if you preview PHP locally using Freeway’s “Preview in
Browser” function, you will see the code; but that’s because the
browser is simply opening the file as a text file. The PHP
interpreter is not getting invoked.

Walter

On May 7, 2008, at 3:48 AM, Brisprad wrote:

One last question: I noticed when I look at the source code of the
Axiom site (when the page is displayed in the browser), it is all
html. Am I correct in thinking that the PHP code is executed first
and then the page created is HTML that used PHP to create the code?


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you for the kind words!

Walter

On May 7, 2008, at 3:48 AM, Brisprad wrote:

Thanks again for all your help. You have been incredibly patient
and nice to work with. BTW, I looked at your own site. Nice work-on
your own and on your client’s.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I have read this thread and finally found the right question to ask.

Walter, you said the PHP interpreter is not getting invoked.

How do I do that?

I have MAMP running complete nice. OK with the infophp(), – but when I try a ordinary .php page in the browser it is not recognized. Firefox ask if it should be saved and Safari displays the code. Isn’t that funny??

I have changed the httpd.conf file uncommenting LoadModule php4_module libexec/httpd/libphp4.so and AddModule mod_php4.

I also managed to get php pages running by putting them in the folder Applications/MAMP/bin/mamp/ but only direct there, not in folders. Is that the only way? I would like to have all my sites in web pages folder as the OSX standard is.

Sorry for putting such a simple question, but


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Are you viewing MAMP from the right location?

Publish your Freeway site files into the htdocs folder (which is inside the MAMP application folder), maybe create a folder for each site you produce.

Then view in any browser using the MAMP URL http://localhost:8888/

(e.g, open the MAMP start page, and remove “MAMP/?language=English”)

David

On 27 Aug 2008, at 15:01, ulfr wrote:

I have MAMP running complete nice. OK with the infophp(), – but when I try a ordinary .php page in the browser it is not recognized. Firefox ask if it should be saved and Safari displays the code. Isn’t that funny??

David Owen
Freeway Friendly Web hosting and Domains ::
(Test Drive a web hosting account for Free)

http://www.ineedwebhosting.co.uk

http://www.printlineadvertising.co.uk/freeway

Printing:: (leaflets, letterheads, cards etc)
http://www.printlineadvertising.co.uk/print.html

yes , wow finally :slight_smile: I wont be able to sleep tonight, thank you, David, thank you. I have been struggeling with this for three days.

Now I will go on with MySql. MAMP seems to be very user friedly, once you get it running.

Ulf


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Actually I had the folder right, htdocs but not Localhost:8888/, consequenly I like to put another novice question:

How does Localhost:8888 work, besides linking to htdocs, it only works when MAMP is running?

Thanks

Ulf


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

When MAMP is running, it causes an instance of Apache + PHP to
“listen” at port 8888 for any requests that get sent to it. When you
type that URL into your browser, your browser sends a request to the
server named ‘localhost’, which is a fancy name for your own
computer, at that TCP/IP port. Because MAMP’s server is listening for
requests on that port, it responds to that request with whatever
specific resource was requested.

In simpler terms, you are temporarily running an entire Web server on
your local computer, and interacting with it as if it was
www.apple.com or similar.

Walter

On Aug 28, 2008, at 9:21 AM, ulfr wrote:

Actually I had the folder right, htdocs but not Localhost:8888/,
consequenly I like to put another novice question:

How does Localhost:8888 work, besides linking to htdocs, it only
works when MAMP is running?

Thanks

Ulf


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter, great clarifying!

What would one do without FreewayTalk? Digging an whole in the ground or something.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options