php5 not working
Posted by: gohhs (---.net.my)
Date: January 12, 2007 03:55AM

after I have installed the wampserver. when i just doing a simpe display on the image,
everything is not working,
eg :
<?php
echo "<p>Hello World, How Are You Today?</p>";
?>

nothing display...

<?php
$a="hello";
$b="world";
echo "a","b";
print "a","b";
?>

nothing display....

but when i connect to mysql database, no problem...
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');

$dbname = 'gohhs';
mysql_select_db($dbname);
$sql = "SELECT * FROM product";
$sql_result = mysql_query($sql,$conn) or die(mysql_error());
while ($row = mysql_fetch_array($sql_result)) {
print_r($row) . ", ";
}
?>

browser display 1 row inserted.

so, i wonder what is the problem, please help me,... did php5 installed correctly ?

Options: ReplyQuote
Re: php5 not working
Posted by: yfastud (---.mia.bellsouth.net)
Date: January 12, 2007 05:50AM

Where did you save the file and how did you run it? I hope you should save your_file.php in C:/wamp/www/your_folder and access it like this

[localhost]

Have fun

[www.jlbn.com] (testing web server)
[test.jlbn.com] (testing codes)
[forum.jlbn.com] (testing phpBB2)
[forums.jlbn.com] (testing phpBB3)
[mail.jlbn.com] (testing mailserver)
[ftp.jlbn.com] (testing ftp server)
[www.jlbn.com] (testing flashes)
[www.jlbn.com] (testing images)
[joomla.jlbn.com] (testing Joomla 1.0.10)
[fusion.jlbn.com] (testing phpFusion 6.01.6)
[nuke.jlbn.com] (testing phpNuke 7.9)
[nukep.jlbn.com] (testing phpNuke Platinum 7.6.b.4v2)
[pnuke.jlbn.com] (testing PostNuke 0.800-MS2)
[nukevo.jlbn.com] (testing phpNuke Evolution 2.0.1)

Options: ReplyQuote
Re: php5 not working
Posted by: gohhs (---.net.my)
Date: January 12, 2007 08:06AM

i save the file as info.php into c:\wamp\www\info.php
in the browser , access as [localhost]

anything i have done it wrong ?

the php file for connection to database also in www directory, but still working.
do i need to create folder in www ?
so many question, many appreciate for your reply....

Options: ReplyQuote
Re: php5 not working
Posted by: yfastud (---.ny-newyorkc0.sa.earthlink.net)
Date: January 13, 2007 01:31AM

Quote

i save the file as info.php into c:\wamp\www\info.php
in the browser , access as [localhost]
If you access it through localhost, it should be fine and you only see blank page when using short tag <? instead <?php
So do you sure to use full tag in info.php?
Quote

the php file for connection to database also in www directory, but still working.
do i need to create folder in www ?
Every time you have new project, you're better have it in new folder, so they don't conflict each other, and when you access [localhost] it will show all your projects there.

Options: ReplyQuote
Re: php5 not working
Posted by: gohhs (---.net.my)
Date: January 15, 2007 03:07AM

Quote:
So do you sure to use full tag in info.php?

Yes, double check, info.php,
it was <?php instead of <?
any duggestion or solution for me to counter thix problem ?

many appreciate for your response

Options: ReplyQuote
Re: php5 not working
Posted by: yfastud (---.cable.mindspring.com)
Date: January 15, 2007 03:19AM

Before install this wamp package, did you ever have any other wamp package? If yes, search and delete all old mysql.ini and php.ini in /windows and in registry.

Have fun

[www.jlbn.com] (testing web server)
[test.jlbn.com] (testing codes)
[forum.jlbn.com] (testing phpBB2)
[forums.jlbn.com] (testing phpBB3)
[mail.jlbn.com] (testing mailserver)
[ftp.jlbn.com] (testing ftp server)
[www.jlbn.com] (testing flashes)
[www.jlbn.com] (testing images)
[joomla.jlbn.com] (testing Joomla 1.0.10)
[fusion.jlbn.com] (testing phpFusion 6.01.6)
[nuke.jlbn.com] (testing phpNuke 7.9)
[nukep.jlbn.com] (testing phpNuke Platinum 7.6.b.4v2)
[pnuke.jlbn.com] (testing PostNuke 0.800-MS2)
[nukevo.jlbn.com] (testing phpNuke Evolution 2.0.1)

Options: ReplyQuote
Re: php5 not working
Posted by: gohhs (---.net.my)
Date: January 15, 2007 09:41AM

This is the first and ever wamp package that i have installed, I never try the old one, is there any way for me to troubleshoot what is going wrong ?

Options: ReplyQuote
Re: php5 not working
Posted by: yfastud (72.236.169.---)
Date: January 15, 2007 01:24PM

I meant that have you ever have apache, mysql, and/or php in your box before? If yes, backup your data, uninstall wampserver, clean all related files includinng registry, then reinstall wampserver, suggest to use v1.6.5 because it's more steady, at least to me.

Have fun

[www.jlbn.com] (testing web server)
[test.jlbn.com] (testing codes)
[forum.jlbn.com] (testing phpBB2)
[forums.jlbn.com] (testing phpBB3)
[mail.jlbn.com] (testing mailserver)
[ftp.jlbn.com] (testing ftp server)
[www.jlbn.com] (testing flashes)
[www.jlbn.com] (testing images)
[joomla.jlbn.com] (testing Joomla 1.0.10)
[fusion.jlbn.com] (testing phpFusion 6.01.6)
[nuke.jlbn.com] (testing phpNuke 7.9)
[nukep.jlbn.com] (testing phpNuke Platinum 7.6.b.4v2)
[pnuke.jlbn.com] (testing PostNuke 0.800-MS2)
[nukevo.jlbn.com] (testing phpNuke Evolution 2.0.1)

Options: ReplyQuote


Sorry, only registered users may post in this forum.