/    Sign up×
Community /Pin to ProfileBookmark

First-time PHP user having difficulty getting PHP to work

Hi all

I have never used PHP before, and I am having a problem following the instructions set by php.net.

the code I have inserted:

[code=php]
<HTML>
<head>
</head>
<body>
<p>this is php</p>
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>
</body>
</HTML>
[/code]

I shows the line “this is php” but nothing else.

I have just installed the Internet Information Service off windows 2000 CD then Installed the PHP using the installer with IIS 4 or higher option.

It then asked to have read/write permissions for the C:PHPsessiondata

and

C:PHPuploadtemp

and execute permissions for php.exe in C:PHP
see the attachment for how I have done the permissions.

I also added “;C:PHP” (without the quotes) as described by:

Quote from website [url]http://au2.php.net/manual/en/faq.installation.php#faq.installation.blankscreen[/url]

[quote]

14. How do I add my PHP directory to the PATH on Windows?

On Windows NT, 2000, XP and 2003:

Go to Control Panel and open the System icon (Start -> Settings -> Control Panel -> System, or just Start -> Control Panel -> System for Windows XP/2003)

Go to the Advanced tab

Click on the ‘Environment Variables’ button

Look into the ‘System Variables’ pane

Find the Path entry (you may need to scroll to find it)

Double click on the Path entry

Enter your PHP directory ant the end, including ‘;’ before (e.g. ;C:php)

Press OK and restart your computer

[/quote]

Is there something I have missed?

Thanks in addvance for any help offered.

[upl-file uuid=beb95fed-e402-4b20-a806-f1133e7533f0 size=36kB]sharing folders.gif[/upl-file]

to post a comment
PHP

8 Comments(s)

Copy linkTweet thisAlerts:
@ShrineDesignsJan 11.2005 — phpinfo() outputs a complete html page, so you only need to put:[code=php]<?php phpinfo(); ?>[/code]
Copy linkTweet thisAlerts:
@smercerauthorJan 11.2005 — I did try that, but it did not work (Got a blank page) so I put in some extra HTML just to check.

thanks so much for helping.
Copy linkTweet thisAlerts:
@CassiusJan 11.2005 — are you sure that your web server is installed correctly. you said that you have IIS, do you manage to run asp pages for example ?
Copy linkTweet thisAlerts:
@scragarJan 11.2005 — try veiwing the souce of the page using the IE veiw=>source, I think it's just returning your PHP, try opening a new page in your browser and typing in it's location like: "localhost/index.php".
Copy linkTweet thisAlerts:
@smercerauthorJan 13.2005 — [i]Originally posted by Cassius [/i]

[B]are you sure that your web server is installed correctly. [/B][/QUOTE]


This would be my first time actully setting up a web server, so I cannot be sure.
[i]Originally posted by Cassius [/i]

[B]you said that you have IIS, do you manage to run asp pages for example ? [/B][/QUOTE]


you might be on to something there. Previously I have been trying to use a asp page (for the same page I am going to convert to PHP), and I have installed ASP .Net for it, but did not get any where with it. now I have given up on ASP because of costs microsoft wants us to pay up.
[i]Originally posted by scragar[/i]

[B]

try veiwing the souce of the page using the IE veiw=>source, I think it's just returning your PHP, try opening a new page in your browser and typing in it's location like: "localhost/index.php".[/B]
[/QUOTE]


thanks I will try that when I get back to work tommorrow (I work two days per week which is why I have not responded for a while).

Thanks you guys for helping.
Copy linkTweet thisAlerts:
@smercerauthorJan 14.2005 — Hi all

I have just found this site and followed the instructions:

http://www.iis-resources.com/modules/AMS/article.php?storyid=4

but there may be something I have overlooked or I may need an expert to physicaly look at the settings on this machine.

At the moment, I am trying to get it to work on a local machine, but when the site is finished I am planing on moving it to a server.

Thanks for the help.
Copy linkTweet thisAlerts:
@porcoJan 14.2005 — http://www.wampserver.com/en/index.php is cool for this.

Its an ancient thread but often asked so I thought it might be useful to some. Simple download, double click, installs and configures Apache, Mysql, PHP, PHPmyadmin and Mysqlitemanager.
Copy linkTweet thisAlerts:
@smercerauthorJan 14.2005 — [i]Originally posted by porco [/i]

[B]http://www.wampserver.com/en/index.php is cool for this.



Its an ancient thread but often asked so I thought it might be useful to some. Simple download, double click, installs and configures Apache, Mysql, PHP, PHPmyadmin and Mysqlitemanager. [/B]
[/QUOTE]


1) I hear that the programs that installs the works (MySQL, PHP etc), have all the defaults set have and are large security flaws and the performance is very slow.

2) I have installed MySQL and I have a small database, If I install this, would I loose the database, myODBC, the links I have in the Ms Access database, plus all the other stuff that took me ages to work it out?

Thanks for your suggestion
×

Success!

Help @smercer spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...