php-general Digest 25 Apr 2010 12:36:41 -0000 Issue 6711

Topics (messages 304532 through 304545):

Re: PHP not being read?
        304532 by: Gary
        304533 by: Karl DeSaulniers
        304534 by: Gary
        304535 by: Karl DeSaulniers
        304536 by: Gary
        304537 by: Karl DeSaulniers
        304538 by: Peter Lind

Re: replying to list (I give up)
        304539 by: Per Jessen
        304542 by: Michiel Sikma
        304543 by: Michelle Konzack

Recommendation for online PHP editor please....
        304540 by: Angus Mann
        304541 by: Karl DeSaulniers
        304544 by: mrfroasty
        304545 by: Ashley Sheridan

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Michiel

Thank you for your reply, but that is not it.

I took it down to
<?php
$seconds=1;
echo $seconds;
?>

Total code, and got nothing, blank screen.  (this is just a silly exercise 
where I was going to input a date of birth and produce age in seconds) When 
I put the exact same code on my other machine, it showed numbers and 
calculations, most important, it showed something at all.

This is an issue with configuration or settings somewhere, or perhaps my 
XAMPP is corrupt.

Thank you for your reply.

Gary


"Michiel Sikma" <mich...@thingmajig.org> wrote in message 
news:y2s6cda1ded1004241703w90e8790ay46bb77c4e1162...@mail.gmail.com...
> On 25 April 2010 00:45, Gary <g...@paulgdesigns.com> wrote:
>
>> What would cause a machine not to read/process php?
>>
>> I have a laptop that I have been ever increasing using for php scripting.
>>  I decided to do a simple experiment, it started out something like:
>>
>> $seconds=1;
>> $minutes=$seconds*60;
>> $hours=$minutes*60;
>> $days="$hours*24;
>>
>> echo $seconds;
>> echo $minutes;
>> echo $hours;
>> echo $days;
>
> -snip-
>>
>>
>
> A text editor with syntax highlighting would certainly help. There's a
> double quote " right in front of the $hours variable on the fourth line.
> That's an unterminated string literal, a syntax error, which would cause 
> PHP
> to abort entirely. Your php's error log probably has a message in it to 
> this
> extent.
>
> The reason why you got a number of different results is probably because 
> you
> added another double quote further down in later versions.
>
> But if that's somehow not it, post the entire source code of your file on 
> a
> site like http://pastie.org/ so we can have a closer look.
>
> Michiel
>
>
>
> __________ Information from ESET Smart Security, version of virus 
> signature database 5057 (20100424) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
> 



__________ Information from ESET Smart Security, version of virus signature 
database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--- End Message ---
--- Begin Message ---
Hi Gary,
It is probably because you have the file named .html and not .php.

I took your code:

<?php
$seconds=1;
echo $seconds;
?>

and put it an a .html and .php file and put it on my server.
With the.php file, I got a result of 1
for the .html file I got a blank screen.

HTH,

Karl


On Apr 24, 2010, at 7:24 PM, Gary wrote:

Michiel

Thank you for your reply, but that is not it.

I took it down to
<?php
$seconds=1;
echo $seconds;
?>

Total code, and got nothing, blank screen. (this is just a silly exercise where I was going to input a date of birth and produce age in seconds) When
I put the exact same code on my other machine, it showed numbers and
calculations, most important, it showed something at all.

This is an issue with configuration or settings somewhere, or perhaps my
XAMPP is corrupt.

Thank you for your reply.

Gary


"Michiel Sikma" <mich...@thingmajig.org> wrote in message
news:y2s6cda1ded1004241703w90e8790ay46bb77c4e1162...@mail.gmail.com...
On 25 April 2010 00:45, Gary <g...@paulgdesigns.com> wrote:

What would cause a machine not to read/process php?

I have a laptop that I have been ever increasing using for php scripting.
 I decided to do a simple experiment, it started out something like:

$seconds=1;
$minutes=$seconds*60;
$hours=$minutes*60;
$days="$hours*24;

echo $seconds;
echo $minutes;
echo $hours;
echo $days;

-snip-



A text editor with syntax highlighting would certainly help. There's a double quote " right in front of the $hours variable on the fourth line. That's an unterminated string literal, a syntax error, which would cause
PHP
to abort entirely. Your php's error log probably has a message in it to
this
extent.

The reason why you got a number of different results is probably because
you
added another double quote further down in later versions.

But if that's somehow not it, post the entire source code of your file on
a
site like http://pastie.org/ so we can have a closer look.

Michiel



__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Karl DeSaulniers
Design Drumm
http://designdrumm.com


--- End Message ---
--- Begin Message ---
Karl

Thanks for your reply....that wasnt it.  File was originated as a php file.

So I have been playing with the experiment, and this is now the total code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<style type="text/css">


body {
 font-size:20px;
 }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Time Experiment</title>
</head>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
I am <input name="age" type="text" /> years old.<br /><br />
<input name="submit" type="submit" value="submit" /><br /><br />
</form>
<body>

<?php
$age=$_POST['age'];

$seconds=1;
$minutes=($seconds*60);//60
$hours=$minutes*60;//3600
$days=$hours*24;//86,400
//$days=$days;
$months=$days*30;//2,592,000

$years=$months*12;
$seconds_old=$years*$age;
$seconds_old=number_format($seconds_old,0,'.',',');
$years=number_format($years,0,'.',',');
$days=number_format($days,0,'.',',');
$months=number_format($months,0,'.',',');

/*Interesting, when I had the number_format of days before the months, the 
math was wrong, it returned 2,592
 turns out you must reverse the order of the second var for number_format*/
echo "There is $seconds in a second";
echo "<p>There are $minutes seconds in a minute.</p>";
echo "<p>There are $hours seconds in an hour.</p>";
echo "<p>There are $days seconds in a day.</p>";
echo "<p>There are $months seconds in a month.</p>";
echo "<p>There are $years seconds in a year.</p>";
echo "<p>You have lived about $seconds_old Seconds in your life</p>";

?>
</body>
</html>

And this code produces, on the good machine, the tower, this:

I am  years old.




There is 1 in a second
There are 60 seconds in a minute.

There are 3600 seconds in an hour.

There are 86,400 seconds in a day.

There are 2,592,000 seconds in a month.

There are 31,104,000 seconds in a year.

You have lived about 0 Seconds in your life



Same exact code that I just now sent over to the original "bad" machine, 
produces this:




I am  years old.




There are $minutes seconds in a minute."; echo "

There are $hours seconds in an hour.

"; echo "

There are $days seconds in a day.

"; echo "

There are $months seconds in a month.

"; echo "

There are $years seconds in a year.

"; echo "

You have lived about $seconds_old Seconds in your life

"; ?>



Same code, different machines, different results.  Notice the closing ?> php 
tag is printed.

Like I said, I dont know where to start to look.

Thanks for your reply.



Gary



"Karl DeSaulniers" <k...@designdrumm.com> wrote in message 
news:5aedfbf6-577b-44d8-9771-3ca1f7971...@designdrumm.com...
> Hi Gary,
> It is probably because you have the file named .html and not .php.
>
> I took your code:
>
> <?php
> $seconds=1;
> echo $seconds;
> ?>
>
> and put it an a .html and .php file and put it on my server.
> With the.php file, I got a result of 1
> for the .html file I got a blank screen.
>
> HTH,
>
> Karl
>
>
> On Apr 24, 2010, at 7:24 PM, Gary wrote:
>
>> Michiel
>>
>> Thank you for your reply, but that is not it.
>>
>> I took it down to
>> <?php
>> $seconds=1;
>> echo $seconds;
>> ?>
>>
>> Total code, and got nothing, blank screen.  (this is just a silly 
>> exercise
>> where I was going to input a date of birth and produce age in  seconds) 
>> When
>> I put the exact same code on my other machine, it showed numbers and
>> calculations, most important, it showed something at all.
>>
>> This is an issue with configuration or settings somewhere, or  perhaps my
>> XAMPP is corrupt.
>>
>> Thank you for your reply.
>>
>> Gary
>>
>>
>> "Michiel Sikma" <mich...@thingmajig.org> wrote in message
>> news:y2s6cda1ded1004241703w90e8790ay46bb77c4e1162...@mail.gmail.com...
>>> On 25 April 2010 00:45, Gary <g...@paulgdesigns.com> wrote:
>>>
>>>> What would cause a machine not to read/process php?
>>>>
>>>> I have a laptop that I have been ever increasing using for php 
>>>> scripting.
>>>>  I decided to do a simple experiment, it started out something like:
>>>>
>>>> $seconds=1;
>>>> $minutes=$seconds*60;
>>>> $hours=$minutes*60;
>>>> $days="$hours*24;
>>>>
>>>> echo $seconds;
>>>> echo $minutes;
>>>> echo $hours;
>>>> echo $days;
>>>
>>> -snip-
>>>>
>>>>
>>>
>>> A text editor with syntax highlighting would certainly help.  There's a
>>> double quote " right in front of the $hours variable on the fourth 
>>> line.
>>> That's an unterminated string literal, a syntax error, which would 
>>> cause
>>> PHP
>>> to abort entirely. Your php's error log probably has a message in  it to
>>> this
>>> extent.
>>>
>>> The reason why you got a number of different results is probably 
>>> because
>>> you
>>> added another double quote further down in later versions.
>>>
>>> But if that's somehow not it, post the entire source code of your  file 
>>> on
>>> a
>>> site like http://pastie.org/ so we can have a closer look.
>>>
>>> Michiel
>>>
>>>
>>>
>>> __________ Information from ESET Smart Security, version of virus
>>> signature database 5057 (20100424) __________
>>>
>>> The message was checked by ESET Smart Security.
>>>
>>> http://www.eset.com
>>>
>>>
>>
>>
>>
>> __________ Information from ESET Smart Security, version of virus 
>> signature database 5057 (20100424) __________
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>
>>
>>
>>
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>
>
> __________ Information from ESET Smart Security, version of virus 
> signature database 5057 (20100424) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 



__________ Information from ESET Smart Security, version of virus signature 
database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--- End Message ---
--- Begin Message ---
What is the browser and browser version your using on the bad computer?
What OS?

Are you previewing the file on the computer or from a server?

Karl


On Apr 24, 2010, at 8:30 PM, Gary wrote:

Karl

Thanks for your reply....that wasnt it. File was originated as a php file.

So I have been playing with the experiment, and this is now the total code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<style type="text/css">


body {
 font-size:20px;
 }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Time Experiment</title>
</head>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
I am <input name="age" type="text" /> years old.<br /><br />
<input name="submit" type="submit" value="submit" /><br /><br />
</form>
<body>

<?php
$age=$_POST['age'];

$seconds=1;
$minutes=($seconds*60);//60
$hours=$minutes*60;//3600
$days=$hours*24;//86,400
//$days=$days;
$months=$days*30;//2,592,000

$years=$months*12;
$seconds_old=$years*$age;
$seconds_old=number_format($seconds_old,0,'.',',');
$years=number_format($years,0,'.',',');
$days=number_format($days,0,'.',',');
$months=number_format($months,0,'.',',');

/*Interesting, when I had the number_format of days before the months, the
math was wrong, it returned 2,592
turns out you must reverse the order of the second var for number_format*/
echo "There is $seconds in a second";
echo "<p>There are $minutes seconds in a minute.</p>";
echo "<p>There are $hours seconds in an hour.</p>";
echo "<p>There are $days seconds in a day.</p>";
echo "<p>There are $months seconds in a month.</p>";
echo "<p>There are $years seconds in a year.</p>";
echo "<p>You have lived about $seconds_old Seconds in your life</p>";

?>
</body>
</html>

And this code produces, on the good machine, the tower, this:

I am  years old.




There is 1 in a second
There are 60 seconds in a minute.

There are 3600 seconds in an hour.

There are 86,400 seconds in a day.

There are 2,592,000 seconds in a month.

There are 31,104,000 seconds in a year.

You have lived about 0 Seconds in your life



Same exact code that I just now sent over to the original "bad" machine,
produces this:




I am  years old.




There are $minutes seconds in a minute."; echo "

There are $hours seconds in an hour.

"; echo "

There are $days seconds in a day.

"; echo "

There are $months seconds in a month.

"; echo "

There are $years seconds in a year.

"; echo "

You have lived about $seconds_old Seconds in your life

"; ?>



Same code, different machines, different results. Notice the closing ?> php
tag is printed.

Like I said, I dont know where to start to look.

Thanks for your reply.



Gary



"Karl DeSaulniers" <k...@designdrumm.com> wrote in message
news:5aedfbf6-577b-44d8-9771-3ca1f7971...@designdrumm.com...
Hi Gary,
It is probably because you have the file named .html and not .php.

I took your code:

<?php
$seconds=1;
echo $seconds;
?>

and put it an a .html and .php file and put it on my server.
With the.php file, I got a result of 1
for the .html file I got a blank screen.

HTH,

Karl


On Apr 24, 2010, at 7:24 PM, Gary wrote:

Michiel

Thank you for your reply, but that is not it.

I took it down to
<?php
$seconds=1;
echo $seconds;
?>

Total code, and got nothing, blank screen.  (this is just a silly
exercise
where I was going to input a date of birth and produce age in seconds)
When
I put the exact same code on my other machine, it showed numbers and
calculations, most important, it showed something at all.

This is an issue with configuration or settings somewhere, or perhaps my
XAMPP is corrupt.

Thank you for your reply.

Gary


"Michiel Sikma" <mich...@thingmajig.org> wrote in message
news:y2s6cda1ded1004241703w90e8790ay46bb77c4e1162...@mail.gmail.com. ..
On 25 April 2010 00:45, Gary <g...@paulgdesigns.com> wrote:

What would cause a machine not to read/process php?

I have a laptop that I have been ever increasing using for php
scripting.
I decided to do a simple experiment, it started out something like:

$seconds=1;
$minutes=$seconds*60;
$hours=$minutes*60;
$days="$hours*24;

echo $seconds;
echo $minutes;
echo $hours;
echo $days;

-snip-



A text editor with syntax highlighting would certainly help. There's a
double quote " right in front of the $hours variable on the fourth
line.
That's an unterminated string literal, a syntax error, which would
cause
PHP
to abort entirely. Your php's error log probably has a message in it to
this
extent.

The reason why you got a number of different results is probably
because
you
added another double quote further down in later versions.

But if that's somehow not it, post the entire source code of your file
on
a
site like http://pastie.org/ so we can have a closer look.

Michiel



__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Karl DeSaulniers
Design Drumm
http://designdrumm.com


__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com






__________ Information from ESET Smart Security, version of virus signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Karl DeSaulniers
Design Drumm
http://designdrumm.com


--- End Message ---
--- Begin Message ---
Karl

On the laptop, the original machine, it has Vista, Firefox 3.6.3. Previewing on testing server Apache (XAMPP )on the computer, not network

On the tower, it is running XP Pro, Firefox 3.6.3. Previewing on local testing server.


"Karl DeSaulniers" <k...@designdrumm.com> wrote in message news:c06c982a-1734-4249-9bf7-7bf33bfc4...@designdrumm.com...
What is the browser and browser version your using on the bad computer?
What OS?

Are you previewing the file on the computer or from a server?

Karl


On Apr 24, 2010, at 8:30 PM, Gary wrote:

Karl

Thanks for your reply....that wasnt it. File was originated as a php file.

So I have been playing with the experiment, and this is now the total code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<style type="text/css">


body {
 font-size:20px;
 }
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Time Experiment</title>
</head>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
I am <input name="age" type="text" /> years old.<br /><br />
<input name="submit" type="submit" value="submit" /><br /><br />
</form>
<body>

<?php
$age=$_POST['age'];

$seconds=1;
$minutes=($seconds*60);//60
$hours=$minutes*60;//3600
$days=$hours*24;//86,400
//$days=$days;
$months=$days*30;//2,592,000

$years=$months*12;
$seconds_old=$years*$age;
$seconds_old=number_format($seconds_old,0,'.',',');
$years=number_format($years,0,'.',',');
$days=number_format($days,0,'.',',');
$months=number_format($months,0,'.',',');

/*Interesting, when I had the number_format of days before the months, the
math was wrong, it returned 2,592
turns out you must reverse the order of the second var for number_format*/
echo "There is $seconds in a second";
echo "<p>There are $minutes seconds in a minute.</p>";
echo "<p>There are $hours seconds in an hour.</p>";
echo "<p>There are $days seconds in a day.</p>";
echo "<p>There are $months seconds in a month.</p>";
echo "<p>There are $years seconds in a year.</p>";
echo "<p>You have lived about $seconds_old Seconds in your life</p>";

?>
</body>
</html>

And this code produces, on the good machine, the tower, this:

I am  years old.




There is 1 in a second
There are 60 seconds in a minute.

There are 3600 seconds in an hour.

There are 86,400 seconds in a day.

There are 2,592,000 seconds in a month.

There are 31,104,000 seconds in a year.

You have lived about 0 Seconds in your life



Same exact code that I just now sent over to the original "bad"  machine,
produces this:




I am  years old.




There are $minutes seconds in a minute."; echo "

There are $hours seconds in an hour.

"; echo "

There are $days seconds in a day.

"; echo "

There are $months seconds in a month.

"; echo "

There are $years seconds in a year.

"; echo "

You have lived about $seconds_old Seconds in your life

"; ?>



Same code, different machines, different results. Notice the closing ?> php
tag is printed.

Like I said, I dont know where to start to look.

Thanks for your reply.



Gary



"Karl DeSaulniers" <k...@designdrumm.com> wrote in message
news:5aedfbf6-577b-44d8-9771-3ca1f7971...@designdrumm.com...
Hi Gary,
It is probably because you have the file named .html and not .php.

I took your code:

<?php
$seconds=1;
echo $seconds;
?>

and put it an a .html and .php file and put it on my server.
With the.php file, I got a result of 1
for the .html file I got a blank screen.

HTH,

Karl


On Apr 24, 2010, at 7:24 PM, Gary wrote:

Michiel

Thank you for your reply, but that is not it.

I took it down to
<?php
$seconds=1;
echo $seconds;
?>

Total code, and got nothing, blank screen.  (this is just a silly
exercise
where I was going to input a date of birth and produce age in seconds)
When
I put the exact same code on my other machine, it showed numbers and
calculations, most important, it showed something at all.

This is an issue with configuration or settings somewhere, or perhaps my
XAMPP is corrupt.

Thank you for your reply.

Gary


"Michiel Sikma" <mich...@thingmajig.org> wrote in message
news:y2s6cda1ded1004241703w90e8790ay46bb77c4e1162...@mail.gmail.com. ..
On 25 April 2010 00:45, Gary <g...@paulgdesigns.com> wrote:

What would cause a machine not to read/process php?

I have a laptop that I have been ever increasing using for php
scripting.
 I decided to do a simple experiment, it started out something  like:

$seconds=1;
$minutes=$seconds*60;
$hours=$minutes*60;
$days="$hours*24;

echo $seconds;
echo $minutes;
echo $hours;
echo $days;

-snip-



A text editor with syntax highlighting would certainly help. There's a
double quote " right in front of the $hours variable on the fourth
line.
That's an unterminated string literal, a syntax error, which would
cause
PHP
to abort entirely. Your php's error log probably has a message in it to
this
extent.

The reason why you got a number of different results is probably
because
you
added another double quote further down in later versions.

But if that's somehow not it, post the entire source code of your file
on
a
site like http://pastie.org/ so we can have a closer look.

Michiel



__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Karl DeSaulniers
Design Drumm
http://designdrumm.com


__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com






__________ Information from ESET Smart Security, version of virus signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Karl DeSaulniers
Design Drumm
http://designdrumm.com


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5057 (20100424) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com





__________ Information from ESET NOD32 Antivirus, version of virus signature 
database 5057 (20100424) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




--- End Message ---
--- Begin Message --- If you put the php file on a live server, does the bad computer still not display?

Just narrowing down. :)

Karl

Sent from losPhone

On Apr 24, 2010, at 10:00 PM, "Gary" <g...@paulgdesigns.com> wrote:

Karl

On the laptop, the original machine, it has Vista, Firefox 3.6.3. Previewing on testing server Apache (XAMPP )on the computer, not network

On the tower, it is running XP Pro, Firefox 3.6.3. Previewing on local testing server.


"Karl DeSaulniers" <k...@designdrumm.com> wrote in message news:c06c982a-1734-4249-9bf7-7bf33bfc4...@designdrumm.com...
What is the browser and browser version your using on the bad computer?
What OS?

Are you previewing the file on the computer or from a server?

Karl


On Apr 24, 2010, at 8:30 PM, Gary wrote:

Karl

Thanks for your reply....that wasnt it. File was originated as a php file.

So I have been playing with the experiment, and this is now the total code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<style type="text/css">


body {
font-size:20px;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Time Experiment</title>
</head>
<form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
I am <input name="age" type="text" /> years old.<br /><br />
<input name="submit" type="submit" value="submit" /><br /><br />
</form>
<body>

<?php
$age=$_POST['age'];

$seconds=1;
$minutes=($seconds*60);//60
$hours=$minutes*60;//3600
$days=$hours*24;//86,400
//$days=$days;
$months=$days*30;//2,592,000

$years=$months*12;
$seconds_old=$years*$age;
$seconds_old=number_format($seconds_old,0,'.',',');
$years=number_format($years,0,'.',',');
$days=number_format($days,0,'.',',');
$months=number_format($months,0,'.',',');

/*Interesting, when I had the number_format of days before the months, the
math was wrong, it returned 2,592
turns out you must reverse the order of the second var for number_format*/
echo "There is $seconds in a second";
echo "<p>There are $minutes seconds in a minute.</p>";
echo "<p>There are $hours seconds in an hour.</p>";
echo "<p>There are $days seconds in a day.</p>";
echo "<p>There are $months seconds in a month.</p>";
echo "<p>There are $years seconds in a year.</p>";
echo "<p>You have lived about $seconds_old Seconds in your life</ p>";

?>
</body>
</html>

And this code produces, on the good machine, the tower, this:

I am  years old.




There is 1 in a second
There are 60 seconds in a minute.

There are 3600 seconds in an hour.

There are 86,400 seconds in a day.

There are 2,592,000 seconds in a month.

There are 31,104,000 seconds in a year.

You have lived about 0 Seconds in your life



Same exact code that I just now sent over to the original "bad" machine,
produces this:




I am  years old.




There are $minutes seconds in a minute."; echo "

There are $hours seconds in an hour.

"; echo "

There are $days seconds in a day.

"; echo "

There are $months seconds in a month.

"; echo "

There are $years seconds in a year.

"; echo "

You have lived about $seconds_old Seconds in your life

"; ?>



Same code, different machines, different results. Notice the closing ?> php
tag is printed.

Like I said, I dont know where to start to look.

Thanks for your reply.



Gary



"Karl DeSaulniers" <k...@designdrumm.com> wrote in message
news:5aedfbf6-577b-44d8-9771-3ca1f7971...@designdrumm.com...
Hi Gary,
It is probably because you have the file named .html and not .php.

I took your code:

<?php
$seconds=1;
echo $seconds;
?>

and put it an a .html and .php file and put it on my server.
With the.php file, I got a result of 1
for the .html file I got a blank screen.

HTH,

Karl


On Apr 24, 2010, at 7:24 PM, Gary wrote:

Michiel

Thank you for your reply, but that is not it.

I took it down to
<?php
$seconds=1;
echo $seconds;
?>

Total code, and got nothing, blank screen.  (this is just a silly
exercise
where I was going to input a date of birth and produce age in seconds)
When
I put the exact same code on my other machine, it showed numbers and
calculations, most important, it showed something at all.

This is an issue with configuration or settings somewhere, or perhaps my
XAMPP is corrupt.

Thank you for your reply.

Gary


"Michiel Sikma" <mich...@thingmajig.org> wrote in message
news:y2s6cda1ded1004241703w90e8790ay46bb77c4e1162be1@ mail.gmail.com. ..
On 25 April 2010 00:45, Gary <g...@paulgdesigns.com> wrote:

What would cause a machine not to read/process php?

I have a laptop that I have been ever increasing using for php
scripting.
I decided to do a simple experiment, it started out something like:

$seconds=1;
$minutes=$seconds*60;
$hours=$minutes*60;
$days="$hours*24;

echo $seconds;
echo $minutes;
echo $hours;
echo $days;

-snip-



A text editor with syntax highlighting would certainly help. There's a double quote " right in front of the $hours variable on the fourth
line.
That's an unterminated string literal, a syntax error, which would
cause
PHP
to abort entirely. Your php's error log probably has a message in it to
this
extent.

The reason why you got a number of different results is probably
because
you
added another double quote further down in later versions.

But if that's somehow not it, post the entire source code of your file
on
a
site like http://pastie.org/ so we can have a closer look.

Michiel



__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Karl DeSaulniers
Design Drumm
http://designdrumm.com


__________ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com






__________ Information from ESET Smart Security, version of virus signature database 5057 (20100424) __________

The message was checked by ESET Smart Security.

http://www.eset.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Karl DeSaulniers
Design Drumm
http://designdrumm.com


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5057 (20100424) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




__________ Information from ESET NOD32 Antivirus, version of virus signature database 5057 (20100424) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
On 25 April 2010 05:00, Gary <g...@paulgdesigns.com> wrote:
> Karl
>
> On the laptop, the original machine, it has Vista, Firefox 3.6.3. Previewing
> on testing server Apache (XAMPP )on the computer, not network
>
> On the tower, it is running XP Pro, Firefox 3.6.3. Previewing on local
> testing server.
>
>

Check that the php module is loaded by Apache on the 'bad' machine and
that the proper handler is set. Should be a line like:
AddHandler application/x-httpd-php .php .phtml .php3

in the php5.conf file (look in mods-enabled, if you're running Apache2
- I'm hoping the setup is the same under Vista as *nix)

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype>

--- End Message ---
--- Begin Message ---
Michiel Sikma wrote:

> On 24 April 2010 16:14, Per Jessen <p...@computer.org> wrote:
> 
>> Ashley Sheridan wrote:
>>
>> >>
>> >> Is there an actual WoW client for Linux or you run in Wine like
>> >> environment?
>> >>
>> >> Thanks,
>> >> Tommy
>> >>
>> >
>> > I run it under Wine. Wine has come a long way since my first
>> > encounters with it a few years back and run a surprising amount of
>> > Windows-based software.
>>
>> Doesn't WoW need DirectX and all that?  I have some old Windows games
>> (Diablo, Alpha Centauri, Railroad Tycoon, Wolfenstein) I'd love to
>> play under Wine, but so far I've not managed to make them work.
>>
>>
> The best way to run old games is via DOSBox. http://www.dosbox.com/ 

Yes, I do use that too, but will it also run Windows games?? 



-- 
Per Jessen, Zürich (13.1°C)


--- End Message ---
--- Begin Message ---
On 25 April 2010 09:31, Per Jessen <p...@computer.org> wrote:

>
> >> Doesn't WoW need DirectX and all that?  I have some old Windows games
> >> (Diablo, Alpha Centauri, Railroad Tycoon, Wolfenstein) I'd love to
> >> play under Wine, but so far I've not managed to make them work.
> >>
> >>
> > The best way to run old games is via DOSBox. http://www.dosbox.com/
>
> Yes, I do use that too, but will it also run Windows games??
>
>
>
Ah, you're right, I misread. But I believe all of those games except Diablo
will run under DOS as well. DOSBox can also run up to Windows 3.11.

Michiel

--- End Message ---
--- Begin Message ---
Hello Michiel Sikma,

Am 2010-04-25 12:21:40, hacktest Du folgendes herunter:
> Ah, you're right, I misread. But I believe all of those games except Diablo
> will run under DOS as well. DOSBox can also run up to Windows 3.11.

WfW 3.11 in fullscreen?   Hahaha!   LOL!

I can imagine, my AMD Phenom Quad-Core with 16 GByte of memory and  then
WfW 3.11 in fullscreen in DOSBox.  Would be the fastest WfW 3.11 on  our
shady planet...

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsyst...@tdnet France           itsyst...@tdnet UG (haftungsbeschränkt)
Gesch. Michelle Konzack          Gesch. Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz               Kinzigstraße 17
67100 Strasbourg/France         77694 Kehl/Germany
Tel: +33-6-61925193 mobil       Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber linux4miche...@jabber.ccc.de
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
HI all. I'm looking for a recommendation for an online PHP editor.

Here's what I mean....

I mean a PHP program I can install on my web-server, then log in and use it to 
browse and edit other PHP files on the server.

The idea is that I could make changes and bugfixes to a web app while I'm away 
from home/office.

Ideally it would be more than just a text editor, but also have syntax 
highlighting and formatting for PHP built in.

Any recommendations would be much appreciated.

Thanks,
Angus


--- End Message ---
--- Begin Message --- Here you go. This is labeled a html editor, but thinking you can edit php files with it as well.
HTH,

http://phphtmledit.com/

Karl


On Apr 25, 2010, at 3:01 AM, Angus Mann wrote:

HI all. I'm looking for a recommendation for an online PHP editor.

Here's what I mean....

I mean a PHP program I can install on my web-server, then log in and use it to browse and edit other PHP files on the server.

The idea is that I could make changes and bugfixes to a web app while I'm away from home/office.

Ideally it would be more than just a text editor, but also have syntax highlighting and formatting for PHP built in.

Any recommendations would be much appreciated.

Thanks,
Angus


Karl DeSaulniers
Design Drumm
http://designdrumm.com


--- End Message ---
--- Begin Message ---
SSH + MC i.e http://www.midnight-commander.org, you will get syntax high
lights.

P:S
**Any CLI program will do the job.





On 04/25/2010 10:01 AM, Angus Mann wrote:
> HI all. I'm looking for a recommendation for an online PHP editor.
>
> Here's what I mean....
>
> I mean a PHP program I can install on my web-server, then log in and use it 
> to browse and edit other PHP files on the server.
>
> The idea is that I could make changes and bugfixes to a web app while I'm 
> away from home/office.
>
> Ideally it would be more than just a text editor, but also have syntax 
> highlighting and formatting for PHP built in.
>
> Any recommendations would be much appreciated.
>
> Thanks,
> Angus
>
>
>   


-- 
Extra details:
OSS:Gentoo Linux
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash,PHP,SQL,HTML,CSS
Typo:40WPM
url:http://www.mzalendo.net
url:http://www.zanbytes.com




--- End Message ---
--- Begin Message ---
On Sun, 2010-04-25 at 13:46 +0200, mrfroasty wrote:

> SSH + MC i.e http://www.midnight-commander.org, you will get syntax high
> lights.
> 
> P:S
> **Any CLI program will do the job.
> 
> 
> 
> 
> 
> On 04/25/2010 10:01 AM, Angus Mann wrote:
> > HI all. I'm looking for a recommendation for an online PHP editor.
> >
> > Here's what I mean....
> >
> > I mean a PHP program I can install on my web-server, then log in and use it 
> > to browse and edit other PHP files on the server.
> >
> > The idea is that I could make changes and bugfixes to a web app while I'm 
> > away from home/office.
> >
> > Ideally it would be more than just a text editor, but also have syntax 
> > highlighting and formatting for PHP built in.
> >
> > Any recommendations would be much appreciated.
> >
> > Thanks,
> > Angus
> >
> >
> >   
> 
> 
> -- 
> Extra details:
> OSS:Gentoo Linux
> profile:x86
> Hardware:msi geforce 8600GT asus p5k-se
> location:/home/muhsin
> language(s):C/C++,VB,VHDL,bash,PHP,SQL,HTML,CSS
> Typo:40WPM
> url:http://www.mzalendo.net
> url:http://www.zanbytes.com
> 
> 
> 
> 


I wouldn't recommend editing files actually on the server. I used to do
that, until my hosting changed its cPanel setup in a way that caused
havoc with the KIOslaves in KDE. I tried to save a file, got back an
error that said the file couldn't save. So I closed the editor only to
find that the file I was editing had just been zeroed. I lost a lot of
work that day because I didn't have a backup. It's far safer to edit
local files and FTP them in, even if you just use a web-based FTP system
(and mosting hosting control panels will have one)

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---

Reply via email to