image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Design & Media

Reply
 
Thread Tools
  #1  
Old December 12th, 2002, 12:23 PM
desi9ner
 
Join Date: Dec 2002
Location: Hollywood, ca. USA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
othoap is on a distinguished road
Question test my PHP from browser

should this tell me if my PHP is running on 10.2.2

from a browser I type - http://localhost/test_php/test.php
the file is:

<html>
<head>
<title>PHP Test</title>
</head>

<body>
<?php phpinfo ()
?>

</body>
</html>

I should see a status page - right?
Reply With Quote
  #2  
Old December 12th, 2002, 02:09 PM
Gnomo's Avatar
Proud Member
 
Join Date: Oct 2002
Location: Neither Here nor There
Posts: 280
Thanks: 0
Thanked 0 Times in 0 Posts
Gnomo is on a distinguished road
Assuming that apache is running and that test_php is a folder in the document root of your webserver (/Library/Webserver/Documents)...yes that should work.

However, if you just put test_php in your sites folder you will need to type in 127.0.0.1/~username/test_php/test.php

Also, You don't really need to up all the HTML in the php page. You can just have <? phpinfo(); ?> in the file. I don't think you would get any errors, but if you do have the html, you might have multiple tags when the page is created.

If the page returns nothing (or in your case a page that says "<?php phpinfo() ?>" Php hasn't been turned on in Apache. If that is the case go to http://entropy.ch and read their directions on how to activate php.
__________________
"Your computer has too much computer in it, and not enough typewriter."

GCS/IT$ d- s+: a--? C++ U* !P L++ E---- W+++ !N o? !K-? !w O? M++ V? !PS !PE Y+ PGP t++ !5 X+ R+ tv+ b+ DI+ D- G+ e(++) h* r+++ y?
Reply With Quote
  #3  
Old December 12th, 2002, 02:17 PM
twister's Avatar
Howdy
 
Join Date: Oct 2000
Location: Minneapolis MN
Posts: 2,517
Thanks: 0
Thanked 1 Time in 1 Post
twister is on a distinguished road
you did install PHP right?

just wondering

Twister
__________________
:: TwisterMc ::
:: Wrestling Gear : iPox Firefox Skin ::
Reply With Quote
  #4  
Old December 12th, 2002, 02:27 PM
desi9ner
 
Join Date: Dec 2002
Location: Hollywood, ca. USA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
othoap is on a distinguished road
Yes I have installed mysql and darwin said it's alive

I'm wondering when I "GRANT all privileages" the IP address I used was 192.168.0.2 this is from my router. Should I use 10.0.0.1 or what?

thanks twister
Reply With Quote
  #5  
Old December 12th, 2002, 05:31 PM
michaelsanford's Avatar
Psycholinguist
 
Join Date: Oct 2002
Location: Ottawa/Montréal
Posts: 2,175
Thanks: 0
Thanked 1 Time in 1 Post
michaelsanford is on a distinguished road
It doesn't matter if MySQL is alive

In a word: semicolon phpinfo(); not phpinfo() I forgot that the first time I made a PHP script and it bugged me for hours until I finally caught on

Unless of course you see what someone mentioned above: the PHP code itself, which means php isn't parsing it when it serves it from Apache. If you're seeing the code displayed, check httpd.conf.
__________________
michaelsanford.comBlogTwitterTumblrLinkedIn
• iMac Aluminum 24" |
MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD
• iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD
• AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2•120 GB RAID 1, 2•500 GB RAID 0
Reply With Quote
  #6  
Old December 12th, 2002, 06:18 PM
desi9ner
 
Join Date: Dec 2002
Location: Hollywood, ca. USA
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
othoap is on a distinguished road
Thanks – With twister advice I reinstalled PHP and know the browser resolves the PHP info page. THANK YOU –

Now on to Dreamweaver MX connection scripts.

I’m on OS 10.2.2 running DMX / mysql / PHP, all of my mysql and PHP check out fine. The DB I’m trying to connect to is in Library/WebServer/Documents/antiques_php there is a _mmServerScripts director present.

I think this is my problem I have tried many variation of the MySQL Server: address with no luck.

“localhost”
“localhost/~g4”
“127.0.0.1”
“192.168.0.2”

DMX error read “there is no test server on this machine”

Any Ideas michaelsanford

Tanks - hanks
Reply With Quote
  #7  
Old December 13th, 2002, 02:14 PM
twister's Avatar
Howdy
 
Join Date: Oct 2000
Location: Minneapolis MN
Posts: 2,517
Thanks: 0
Thanked 1 Time in 1 Post
twister is on a distinguished road
I would use your coputers IP for any configuring. As far as getting into the library, i have no idea.

Twister
__________________
:: TwisterMc ::
:: Wrestling Gear : iPox Firefox Skin ::
Reply With Quote
  #8  
Old December 13th, 2002, 03:20 PM
holmBrew's Avatar
Official Volunteer
 
Join Date: May 2001
Location: Utah, USA
Posts: 309
Thanks: 0
Thanked 0 Times in 0 Posts
holmBrew is on a distinguished road
PHP comes with 10.2.x...

...and it just takes a little tweaking to the apache config to get it working. MySQL is not necessary ot get phpinfo(); to render.

Follow the instructions on this page from Apple:
http://developer.apple.com/internet/macosx/php.html

Also, you don't need all the opening and closing html junk in your test.php. It can be simplified to just:

<?php phpinfo(); ?>

I would also suggest viewing all the pages you wish to test in the Apache/PHP/MySQL environment and leaving Dreamweaver MX out of the picture. It _may_ be an OK development tool, but it will not be a good gauge of how you page will really perform on a real web server.
__________________
holmBrew

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Great Web Hosting: www.elfon.com
PowerBook(Prismo) 400Mhz G3
266Mhz G3 MT Gossamar
400Mhz G3 Yosemite
800Mhz G4 Quicksilver (my work box)
All running Mac OS X 10.2.4
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Last edited by holmBrew; December 14th, 2002 at 09:21 AM.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[HOWTO] - Setup PHP & MySQL yoshi HOWTO & FAQs 225 January 2nd, 2005 01:39 AM
Thank God the Witch Is Dead Veljo Mac OS X System & Mac Software 2 June 27th, 2003 06:51 PM
Enabling PHP in 10.2 Client sixthring Mac OS X System & Mac Software 2 October 28th, 2002 01:48 PM


All times are GMT -5. The time now is 07:09 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.