Page 1 of 1

Basic PHP instructions not working. Please help a newbie...

Posted: Sat Mar 08, 2008 6:16 am
by Jerute
Hi all and tx in advance. I'm fairly new to PHP and have looked for the answer to this question but to no avail...

I am running WAMPSERVER 2.0 on Windows XP Professional SP2. I'm having trouble with a couple of PHP instructions.

I know some of them are working fine because I have a contact form using PHP to send the mail and this works fine:

Code: Select all

<?php
$conname = $_POST['conname'];
$conmail = $_POST['conmail'];
$conphone = $_POST['conphone'];
$conmessage = $_POST['conmessage'];
 
if(!$conmail == "" && (!strstr($conmail,"@") || !strstr($conmail,".")))
{
echo "Please enter a valid email address.\n";
die ("Try again.");
}
 
if (eregi('http:', $conmessage)) {
die ("You may not post links in the message section.");
}
 
if(empty($conname) || empty($conmail) || empty($conmessage )) {
echo "All fields must be completed.\n";
die ("Try again.");
}
 
$conmessage = stripcslashes($conmessage);
$subject = "Enquiry form completed";
$from = "From: $conmail\r\n";
$message = "Phone: $conphone \n
$conmessage \n";
mail("my address@wherever.co.uk", $subject, $message, $from);
?>
 
However...

I'm trying simple instructions that aren't working, like this...

<?php

phpinfo();

?>

...and this doesn't work. I just get a blank screen. I've also found that the print() instruction doesn't work.

Am I being blonde? Can anybody out there help me please?

Yours, confused.

Re: Basic PHP instructions not working. Please help a newbie...

Posted: Sat Mar 08, 2008 6:25 am
by bertfour
Look in your php.ini maybe functions are disabled?

"disable_functions"

Re: Basic PHP instructions not working. Please help a newbie...

Posted: Sat Mar 08, 2008 6:36 am
by Jerute
Hi and tx for answering. Found the line in the php.ini file but it just says

disable_functions =

which I assume means that none are disabled...

Re: Basic PHP instructions not working. Please help a newbie...

Posted: Sat Mar 08, 2008 6:46 am
by bertfour
Don't know....

Can't you get anything an screen?

Better ask here maybe:

http://www.wampserver.com/phorum/list.php?2