PHP interpreter didn't work?
Posted by: smurugan_tn (124.124.202.---)
Date: January 02, 2010 01:37PM

recently i had downloaded the WAMP server from the french web site anaska.com,installed and tested it.And the server ran just well when i typed [localhost] on the internet explorer.But after ensuring that the server is running, i typed in some PHP code on the Notepad and saved in the document root folder www at the WAMP server folder and tried to run it.But it showed the 'the page cannot be displayed page.I treid many other PHP codes.nothing worked.this happened in my laptop and also in my desktop.
So,i had decided to redownload the package from other location.This time i got the 'WAMPserver2.0i'.after installing this also i got the same problem as above.What at all is happening. can anyone please help me out?. I am so desperate.

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: January 02, 2010 02:06PM

Open Windows Explorer and go to C:/wamp/www

For now rename index.php to _index.php

Now go to [localhost] you should see a directory listing of all files/folders in C:/wamp/www. What files are listed? If see your files listed as filename.php.txt. Then you have not saved your files properly in Notepad.

When you save files in Notepad make sure you set the file type to All Files. Otherwiser Notepad will append the .txt file extension.

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: January 02, 2010 02:06PM

save the file as filenanme.php

most likely notepad is saving filename.php.txt and then windows is hiding the .txt as its a "known file type"


you can turn off "hide file extention for known file types " in wondows

when saving file in notepad use

Filename = filename.php
File Type = ALL

OR use a different editor such as NOTEPAD++



also make sure u put ur php file into the www folder and are using ht tp:/localhost/filename.php

and make sure u have used <?php and not <?

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

Options: ReplyQuote
Same issue: PHP interpreter not working?
Posted by: batman2009 (41.223.17.---)
Date: January 05, 2010 08:17AM

Hi Steven,

I have same PROBLEM, I use VISTA Home Basic. My Wamp Server is running well. All services are also running well. My PHP website is in c:/wamp/www/desidesigner. when I type [127.0.0.1] , I can see my homepage but with its weird, means I do not see Preview. Check this Screen Shot here & index.php file of my website so you can check file & let me know.

[rapidshare.com]
[rapidshare.com]

Is it because of its XHTML coding inside Php script? Pls guide.
You can see original site at www.desidesigners.in
Your help in this regard will highy appreciable.

Thank

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: January 05, 2010 05:45PM

add me to msn if u want me to look at it

stevenmartin99@hotmail.com

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

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: smurugan_tn (59.99.176.---)
Date: January 06, 2010 02:11PM

Thank you both c2dan and Steven for responding.And yes the Notepad didn't save it as a PHP file.Instead it saved the PHP file as text file.
after changing the file type to All Files it worked.Yes.Thank you both again...
(i do not have a personal net connection.And that's why it took this long to reply.OK.)

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: fg (---.64.89-79.rev.gaoland.net)
Date: January 12, 2010 01:18AM

I have the same problem, but the file is of the correct extension .php. When I try to load using: [localhost]
the variable 'saisie' is not intialized and I get the following error:
Notice: Undefined variable: saisie in C:\wamp\www\FG_www\suitepage1.php on line 2

What I am doing wrong?
A .php page without parameters work just fine.

Thanks,
Francois

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: yfastud (Moderator)
Date: January 12, 2010 04:01AM

Open file php.ini through wamp tray icon and

Find

error_reporting = E_ALL

Replace w/

error_reporting = E_ALL & ~E_NOTICE

Then save file and restart wamp

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: fg (---.64.89-79.rev.gaoland.net)
Date: January 12, 2010 10:07AM

Thanks - the issue is not the 'notice' message, but the fact that the variable is not defined. I found a way to make it work using $_POST or $_GET. Is it mandatory to use these function now.
I found in a book (PHP 4.1) that you could refer directly to variables ( $saisie in my case) and that it contains the parameter passed by the ?saisie=xxx so I was trying to echo the variable $saisie and was getting the Notice, and the variable did not echo anything.

Your change suppress the Notice, but the content of the variable still does not show up. Did it use to work in an earlier version of PHP ? is it illegal now ? am I doing something wrong ?

Thanks for your help,
Francois

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: January 12, 2010 06:30PM

That book you are reading is outdated and teaching you old insecure methods.

The because your code does not work no more is because a setting called register_globals is now disabled by default (since PHP4.2) and is soon to be removed completely.

You now need to use the new superglobal variables, the most common used are:
$_GET - used to grab variables from the url
$_POST - used to get the value of form fields (only if the form method is set to post)
$_COOKIE - used for cookies. See [php.net]
$_SESSION - used for session variables
$_SERVER - used for server side variables

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: fg (---.64.89-79.rev.gaoland.net)
Date: January 12, 2010 11:57PM

OK, great! thank you so much for the clarification.
My problem is completly solved and fully understood.

Your product works great!
Thanks.
Francois

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: spiderman (194.5.134.---)
Date: January 29, 2010 08:30AM

i got wamp homwpage ..and it is running fine. any body gude me to work with it..

Options: ReplyQuote
Re: PHP interpreter didn't work?
Posted by: yfastud (Moderator)
Date: January 29, 2010 11:31PM

to setup backup, follow this
[blog.jlbn.net]

to setup basic website, follow this
[blog.jlbn.net]

to setup db, follow this
[blog.jlbn.net]

to setup access, follow this
[blog.jlbn.net]

to setup dns, follow this
[blog.jlbn.net]

to setup vh, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.