Cannot display phpinfo();
Posted by: jeff964 (---.singnet.com.sg)
Date: June 11, 2012 03:45AM

hello I am new in this software, I just intall wamp server with apache and mysql.
When I want to test my set up using the simple php command, it won't display.
I tried to download diff version but always the same
Thank you very much

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: stevenmartin99 (Moderator)
Date: June 11, 2012 05:51AM

are you using

<?


try <?php

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: jeff964 (---.singnet.com.sg)
Date: June 11, 2012 06:06AM

yeah I'm using <?php

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: stevenmartin99 (Moderator)
Date: June 11, 2012 06:12AM

How are u opening the file?

Putting the file with .php Extension into c:\wamp\www

And opening browser using http ://localhost/FILEMAME.php

If ur doing all this what error are u getting?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: jeff964 (---.singnet.com.sg)
Date: June 11, 2012 06:58AM

I think I saw the problem but I don't know how to solve it.
Every time I open the file it doesn't use the localhost as the directory rather it uses
f:\wamp\www.
I don't know how to direct it to use localhost

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: stevenmartin99 (Moderator)
Date: June 11, 2012 09:00AM

U can't open the file like this

You must use the broswer


Or put ur files in a folder in the www

Then use the wamp menu to open localhost

Then Goto projects

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: jeff964 (---.singnet.com.sg)
Date: June 11, 2012 10:00AM

I actually save it as .php and use firefox to open the file. Although I can access phpmyadmin using wamp server shortcut and phpinfo using the shortcut in phpmyadmin page. It seems the php file are not being interpreted because the html file encounter no problem.

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: stevenmartin99 (Moderator)
Date: June 11, 2012 10:20AM

Please listen

Your not explaining the error you are getting

If you navigate to the file in the broswer using localhost you must get the page or an error

You MUST use localhost in the URL


secondly maybe ur file is called .php.txt which is wrong.
Windows by default hides the extension on files so check the TYPE column

It should say PHP FILE and not TEXT FILE

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: jeff964 (---.singnet.com.sg)
Date: June 11, 2012 11:03AM

I'm really using php file. the problem is that the php file never display any output.

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: stevenmartin99 (Moderator)
Date: June 11, 2012 10:54PM

can i take a look to show you the error using teamviewer

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: stevenmartin99 (Moderator)
Date: June 11, 2012 10:54PM

can i take a look to show you the error using teamviewer

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: jeff964 (---.singnet.com.sg)
Date: June 12, 2012 01:47AM

Sorry just woke up. Pmed u my user and pass.

thks

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: RiggsFolly (---.as13285.net)
Date: June 12, 2012 10:19AM

Jeff,

I am guessing that you are using Explorer ( File Manager ) and double clicking on the xxx.php file.

You cannot do it this way. You must open the page via the Apache web server that came with WAMP. It is only apache that will do the correct things with PHP code in your file.

Open your browser, one of ( IE/Firefox/etc ) and in the address bar keyin
[localhost]

Options: ReplyQuote
Re: Cannot display phpinfo();
Posted by: jeff964 (---.singnet.com.sg)
Date: June 12, 2012 03:10PM

Yeah my bad i think you're right. I thought i can run php if I right click and openwith a browser command.

Thank you very much for all the help.

Its really hard to be a newbie..

Options: ReplyQuote


Sorry, only registered users may post in this forum.