connectivity problem

Reply

Join Date: Oct 2007
Posts: 78
Reputation: navi17 is an unknown quantity at this point 
Solved Threads: 5
navi17 navi17 is offline Offline
Junior Poster in Training

connectivity problem

 
0
  #1
Dec 28th, 2008
hi friends....
i m new to php....

i have installed apachie 2.0,php 5.2,mysql5.1...
everything is going welll....
bt dere is problem using d following code,,
  1. <php
  2. mysql_connect("localhost", "root", "mars11") or die(mysql_error());
  3. echo "Connected to MySQL<br />";
  4. </php>

i hv save it in the htdocs folder under apachie...filename is test.php
bt when i run it nothing is displayed...
wats going on pls solve my problem....
Last edited by peter_budo; Dec 29th, 2008 at 5:49 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: connectivity problem

 
0
  #2
Dec 28th, 2008
For starters, <php is not a valid delimiter. Use <?php to start the code and ?> to end it. Is Apache and php configured correctly? Have you tried a simple <?php echo "It works.";?> type script to test the server?
Lost time is never found again.
- Benjamin Franklin
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 78
Reputation: navi17 is an unknown quantity at this point 
Solved Threads: 5
navi17 navi17 is offline Offline
Junior Poster in Training

Re: connectivity problem

 
0
  #3
Dec 29th, 2008
yes... php,apachie and mysql are configured correctly...

yes scripts are running.............
everything is going well..
i hv also tried
<?php
>?
bt again d proble is same while running dis script.
  1. <?php
  2. mysql_connect("localhost", "root", "mars11") or die(mysql_error());
  3. echo "Connected to MySQL<br />";
  4. >?

wat should i do???
Last edited by peter_budo; Dec 29th, 2008 at 5:50 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC