php-windows Digest 25 Jan 2003 05:47:16 -0000 Issue 1554

Topics (messages 18079 through 18094):

Re: newbie form question..
        18079 by: Asendorf, John
        18080 by: Rich Gray
        18082 by: paradiddles
        18083 by: Warren Vail
        18084 by: Rich Gray
        18085 by: paradiddles

Re: Configuring a web server I haven't written yet...
        18081 by: Brian 'Bex' Huff

Multitier applications using XML as an output format
        18086 by: Davy Obdam

Computer Problems
        18087 by: Trystano.aol.com
        18088 by: Nick H. -- Technical Support Engineer

Newbie email question
        18089 by: Alex Davis
        18093 by: Dash McElroy
        18094 by: Alex Davis

parse error, unexpected $end
        18090 by: Octavio Herrera
        18091 by: Octavio Herrera
        18092 by: Jim Hunter

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I doubt that it's a globals problem since it doesn't look like you're even
checking any php variables.

Perhaps try <?PHP instead oft he shortcut <?



---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: paradiddles [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 12:26 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] newbie form question..
> 
> 
> 
> I just created a simple html form and a .php file as a test 
> to be sure php is working right. All I want the form to do is 
> test the echo construct (which prints the text between the 
> opening and closing php tags) to be sure my php interpreter 
> is working right. 
> 
> The line in my html form used to identify the method looks like this:
> 
> <form action="processorder.php" method=post>
> 
> The line in my html form used to trigger the submit button 
> looks like this:
> 
> <input type=submit value="Submit Order">
> 
> The code in my php file called processorder.php looks like this:
> 
> <html>
> <head>
>    <title>Seans Designs - Order Results</title>
> </head>
> <body>
> <h1>Seans products</h1>
> <h2>Order Results</h2>
> <?
>    echo "<p>Order processed.";
> ?>
> 
> 
> </body>
> </html>
> 
> The problem is when I hit the submit button on my form, I see 
> all the text accept for the text Order processed which is 
> contained in the php tag. In other words, its as if the echo 
> construct is being completely ignored. I think the problem 
> has something to do with the register_globals=on or off 
> thing. So, I changed the setting from off (which was the 
> default setting) to on and restarted apache. No joy!
> 
> Is there something in the code that I need to change?
> 
> thanks
> 
> 
> 
> ----------------
> "forget your lust for the rich man's gold. All that you need, 
> is in your soul. You can do this if you try. All that I want 
> for you my son, is to be satisfied"
> 
>   ~ Lynard Skynard
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> 
--- End Message ---
--- Begin Message ---
you are not echoing a variable so register_globals set to On will have no
effect in this case (I would switch it back Off as it will be more secure
and you should get used to coding that way)... Do you see any errors in the
server log? Does it work if you use <?php instead of <? as your opening tag?
When you view the source of the resulting page do you see your code in the
html?

Rich
-----Original Message-----
From: paradiddles [mailto:[EMAIL PROTECTED]]
Sent: 24 January 2003 17:26
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] newbie form question..



I just created a simple html form and a .php file as a test to be sure php
is working right. All I want the form to do is test the echo construct
(which prints the text between the opening and closing php tags) to be sure
my php interpreter is working right.

The line in my html form used to identify the method looks like this:

<form action="processorder.php" method=post>

The line in my html form used to trigger the submit button looks like this:

<input type=submit value="Submit Order">

The code in my php file called processorder.php looks like this:

<html>
<head>
   <title>Seans Designs - Order Results</title>
</head>
<body>
<h1>Seans products</h1>
<h2>Order Results</h2>
<?
   echo "<p>Order processed.";
?>


</body>
</html>

The problem is when I hit the submit button on my form, I see all the text
accept for the text Order processed which is contained in the php tag. In
other words, its as if the echo construct is being completely ignored. I
think the problem has something to do with the register_globals=on or off
thing. So, I changed the setting from off (which was the default setting) to
on and restarted apache. No joy!

Is there something in the code that I need to change?

thanks

--- End Message ---
--- Begin Message ---
Rich,

thanks for your response. I've tried using the <?php tag- no joy and I can view the 
code in my php file. Also, you mentioned that I should take a look at the server log. 
Where would I find that?

 

thanks-

Patrick



----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. You can 
do this if you try. All that I want for you my son, is to be satisfied"

  ~ Lynard Skynard



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--- End Message ---
--- Begin Message ---
One rather key question, are you invoking your form through your web server?
or are you accessing the file directly?

One way to access the file directly (which you don't want to do) is to use a
file reference to browse and find the file on your C: drive.

You should be accessing the first file through your browser with a URL like
http://localhost/firstfile.php

You can get the symptoms you describe by not invoking the file through your
web server.

Warren Vail
[EMAIL PROTECTED]


-----Original Message-----
From: paradiddles [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 9:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] newbie form question..



I just created a simple html form and a .php file as a test to be sure php
is working right. All I want the form to do is test the echo construct
(which prints the text between the opening and closing php tags) to be sure
my php interpreter is working right.

The line in my html form used to identify the method looks like this:

<form action="processorder.php" method=post>

The line in my html form used to trigger the submit button looks like this:

<input type=submit value="Submit Order">

The code in my php file called processorder.php looks like this:

<html>
<head>
   <title>Seans Designs - Order Results</title>
</head>
<body>
<h1>Seans products</h1>
<h2>Order Results</h2>
<?
   echo "<p>Order processed.";
?>


</body>
</html>

The problem is when I hit the submit button on my form, I see all the text
accept for the text Order processed which is contained in the php tag. In
other words, its as if the echo construct is being completely ignored. I
think the problem has something to do with the register_globals=on or off
thing. So, I changed the setting from off (which was the default setting) to
on and restarted apache. No joy!

Is there something in the code that I need to change?

thanks



----------------
"forget your lust for the rich man's gold. All that you need, is in your
soul. You can do this if you try. All that I want for you my son, is to be
satisfied"

  ~ Lynard Skynard



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

--- End Message ---
--- Begin Message ---
Apache error.log is usually in C:\Program Files\Apache Group\Apache\logs  -
your installation drive/directory maybe different ... if you can see your
code in the html then apache is not configured correctly and is not invoking
php to process your code... check the php installation instructions for
details on how to configure apache on win32...

Rich
-----Original Message-----
From: paradiddles [mailto:[EMAIL PROTECTED]]
Sent: 24 January 2003 12:31
To: Rich Gray
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] newbie form question..



Rich,

thanks for your response. I've tried using the <?php tag- no joy and I can
view the code in my php file. Also, you mentioned that I should take a look
at the server log. Where would I find that?



thanks-

Patrick

--- End Message ---
--- Begin Message ---
Warren,

that was it! I wasn't envoking the form from the 'local host'. Instead I was browsing 
the c drive. Now I can see the text w/in the php echo tag.

Thanks again for the help guys-

Patrick



----------------
"forget your lust for the rich man's gold. All that you need, is in your soul. You can 
do this if you try. All that I want for you my son, is to be satisfied"

  ~ Lynard Skynard



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--- End Message ---
--- Begin Message ---
You should check out the CGI spec:

http://hoohoo.ncsa.uiuc.edu/cgi/overview.html
http://hoohoo.ncsa.uiuc.edu/cgi/interface.html

Basicly, you have to have the web server create a process, and then all those CGI values (REQUEST_METHOD, QUERY_STRING, REMOTE_HOST, REMOTE_USER) are first set as environment variables for the process. Then you execute the file with php.exe.

You do not need to intialize the superglobals yourself... PHP will do that for you, according to the environment values you set.

--

Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424

Hi guys,

I'm writing a web server for Windows. I want to know how to make it support
PHP.

Here's the easy bit (which I know how to do)...
1) A client requests a web page called "anything.php"
2) The server notices the extension ".php", looks this up in the server's
configuration settings, and says "Aha - this is a PHP script".
3) The server runs the PHP script, and sends the output stream back to the
client.

Here's the bit I _DON'T_ know how to do...

How the hell can my server INITIALISE the superglobal variables $_GET,
$_POST, $_SERVER, $_SESSION, etc. in preparation for running the script?

... I mean, it's an easy enough matter to call:

        system("php something.php")

to run a PHP script ... but that won't initialise the superglobal variables.
There doesn't appear to be a command line parameter to php.exe that lets you
specify this information. So how's it done? How do other web servers do it?

Any suggestion would be appreciated.

Jill



--- End Message ---
--- Begin Message --- Hello people,

I have a question about developing Multi Tier applications using PHP. I wanna use XML as an output format, and then use XSL to transform this to whatever format, like HTML. However i am quite new to Object Orientated Programming and i am now wondering how-to do this. I have build a database abstraction class, as i will have to get the data from a MySQL database. This is the content layer. Now i understand how that works, what i am wondering about is what the business layer should do and how it should acces this data. Should the bussines layer generate XML? and the presentation Layer using XSL to transform this into XHTML.? I am just wondering how this all works together...?

This method of working seperates content from design, and should make the project more extensible, but is it slower the procedural code? Can anyone give me some pointers in the right direction here;-). Does anyone know some good tutorials about OOP and more specificly Multi Tier applications in PHP? Any thought and help is appreciated. Thanks for your time..

Best regards,

Davy Obdam
mailto:[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
Can anyone help. 

I can't seem to access/run any of my programs from the start menu. I can run 
a program such as Microsoft Word when I open a file associated with it, but I 
can't get a program to run from the start men u options. I think I might have 
a virus, 'cause I can access any system settings from control panel either.

Again, can anyone help??

Tryst
--- End Message ---
--- Begin Message ---
Sorry, but this is a PHP Windows mailing list, not a general Windows mailing
list.



Regards,
Nick H.
[EMAIL PROTECTED]



----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 24, 2003 5:30 PM
Subject: [PHP-WIN] Computer Problems


> Can anyone help.
>
> I can't seem to access/run any of my programs from the start menu. I can
run
> a program such as Microsoft Word when I open a file associated with it,
but I
> can't get a program to run from the start men u options. I think I might
have
> a virus, 'cause I can access any system settings from control panel
either.
>
> Again, can anyone help??
>
> Tryst
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
I followed the instructions in a php manual to write a script that will send
emails using mail() function.  Only one problem, where is my sendmail
program on windows XP. Or what do i need to configure in the php.ini file?


--- End Message ---
--- Begin Message ---
Alex,

You have to point it at your ISP's SMTP server (assuming this is for
home). Check your mail program for your SMTP server. Sendmail is a unix
thing, although there are similar programs available for Windows, your
best bet is to use an existing server. Mail from unknown sources is likely
to be rejected or declared "spam". Your PHP.INI file holds the key. Change
it (and the mail from value) and restart your web server.

-Dash

A physicist is an atom's way of knowing about atoms.
                -- George Wald

On Fri, 24 Jan 2003, Alex Davis wrote:

> I followed the instructions in a php manual to write a script that will send
> emails using mail() function.  Only one problem, where is my sendmail
> program on windows XP. Or what do i need to configure in the php.ini file?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
is there a way to debug on a remote server?

"Dash McElroy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Alex,
>
> You have to point it at your ISP's SMTP server (assuming this is for
> home). Check your mail program for your SMTP server. Sendmail is a unix
> thing, although there are similar programs available for Windows, your
> best bet is to use an existing server. Mail from unknown sources is likely
> to be rejected or declared "spam". Your PHP.INI file holds the key. Change
> it (and the mail from value) and restart your web server.
>
> -Dash
>
> A physicist is an atom's way of knowing about atoms.
> -- George Wald
>
> On Fri, 24 Jan 2003, Alex Davis wrote:
>
> > I followed the instructions in a php manual to write a script that will
send
> > emails using mail() function.  Only one problem, where is my sendmail
> > program on windows XP. Or what do i need to configure in the php.ini
file?
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>


--- End Message ---
--- Begin Message ---
Hello,
my name is octavio, Im new to this news group,
I have a problem, Im getting the following error message:

Parse error: parse error, unexpected $end in
c:\appserv\www\octavio\user_data.php on line 63

What is this? I have looked all the source code and at the end of file there
is nothing wrong, what is going on?
thank you





--- End Message ---
--- Begin Message ---
This is the source Code...
<?
include("includes/encabezado_xml.php");
include("includes/conexion.php");

mysql_select_db("latinencounters");

$u_login="";
$u_pwd="";
if(isset($url_login)){
 $u_login=$url_login;  // parametro login del usuario
}
if(isset($url_pwd)){
 $u_pwd=$url_pwd;      // parametro password del usuario
}


$query="select * from usuarios_ws where login='$u_login' and
pwd=password('$u_pwd')";
$rs=mysql_query($query,$enlace);
$filas=mysql_num_rows($rs);

if($filas==0){
 echo "<error><mensaje>Your Login or Password is
Incorrect</mensaje></error>";
}else{

echo "<usuarios_ws>\n";

for($a=0;$a<$filas;$a++){
 $fila=mysql_fetch_array($rs);
 echo " <usuario>\n";
 echo "   <id>".$fila["id"]."</id>\n";
 echo "   <name>".$fila["name"]."</name>\n";
 echo "   <born>".$fila["born"]."</born>\n";
 echo "   <occupation>".$fila["occupation"]."</occupation>\n";
 echo "   <country>".$fila["country"]."</country>\n";
 echo "   <city>".$fila["city"]."</city>\n";
 echo "   <description>".$fila["description"]."</description>\n";
 echo "   <login>".$fila["login"]."</login>\n";
 echo " </usuario>\n";
}

$query="select * from perfil";
$rs=mysql_query($query,$enlace);
$filas=mysql_num_rows($rs);

$dominio="http://www.latinencounters.com/";;
for($a=0;$a<$filas;$a++){
 $fila=mysql_fetch_array($rs);
 echo "<girl>\n";
 echo " <Codigo>".$fila["Codigo"]."</Codigo>";
 echo " <FirstName>".$fila["FirstName"]."</FirstName>";
 echo " <LastName>".$fila["LastName"]."</LastName>";
 echo " <Height>".$fila["Height"]."</Height>";
 echo " <Weight>".$fila["Weight"]."</Weight>";
 echo " <Photo2>$dominio".$fila["Photo2"]."</Photo2>";
 echo " <Photo3>$dominio".$fila["Photo3"]."</Photo3>";
 echo " <Photo4>$dominio".$fila["Photo4"]."</Photo4>";
 echo " <Photo5>$dominio".$fila["Photo5"]."</Photo5>";
 echo "</girl>\n";
}

echo "</usuarios_ws>\n";
mysql_close($enlace);
?>


--- End Message ---
--- Begin Message ---
You have a mis-match with your brackets. Count your { and } to see if you
have the correct number. You will find that you are missing a }. Give your
code another once over, make the change and you should see better results.
You might find that if you indent your sections you will find it easier to
spot these sort of errors IE:

if (blah == blah)
{
   var $somevar;
   var $anothervar;
   if ($somevar == $anothervar)
   {
      echo "it worked";
   };
}

It's much easier to see if you have matched up your brackets this way.

Jim Hunter 
 
-------Original Message-------
 
From: Octavio Herrera
Date: Friday, January 24, 2003 04:42:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: parse error, unexpected $end
 
This is the source Code...
<?
include("includes/encabezado_xml.php");
include("includes/conexion.php");

mysql_select_db("latinencounters");

$u_login="";
$u_pwd="";
if(isset($url_login)){
$u_login=$url_login; // parametro login del usuario
}
if(isset($url_pwd)){
$u_pwd=$url_pwd; // parametro password del usuario
}


$query="select * from usuarios_ws where login='$u_login' and
pwd=password('$u_pwd')";
$rs=mysql_query($query,$enlace);
$filas=mysql_num_rows($rs);

if($filas==0){
echo "<error><mensaje>Your Login or Password is
Incorrect</mensaje></error>";
}else{

echo "<usuarios_ws>\n";

for($a=0;$a<$filas;$a++){
$fila=mysql_fetch_array($rs);
echo " <usuario>\n";
echo " <id>".$fila["id"]."</id>\n";
echo " <name>".$fila["name"]."</name>\n";
echo " <born>".$fila["born"]."</born>\n";
echo " <occupation>".$fila["occupation"]."</occupation>\n";
echo " <country>".$fila["country"]."</country>\n";
echo " <city>".$fila["city"]."</city>\n";
echo " <description>".$fila["description"]."</description>\n";
echo " <login>".$fila["login"]."</login>\n";
echo " </usuario>\n";
}

$query="select * from perfil";
$rs=mysql_query($query,$enlace);
$filas=mysql_num_rows($rs);

$dominio="http://www.latinencounters.com/";;
for($a=0;$a<$filas;$a++){
$fila=mysql_fetch_array($rs);
echo "<girl>\n";
echo " <Codigo>".$fila["Codigo"]."</Codigo>";
echo " <FirstName>".$fila["FirstName"]."</FirstName>";
echo " <LastName>".$fila["LastName"]."</LastName>";
echo " <Height>".$fila["Height"]."</Height>";
echo " <Weight>".$fila["Weight"]."</Weight>";
echo " <Photo2>$dominio".$fila["Photo2"]."</Photo2>";
echo " <Photo3>$dominio".$fila["Photo3"]."</Photo3>";
echo " <Photo4>$dominio".$fila["Photo4"]."</Photo4>";
echo " <Photo5>$dominio".$fila["Photo5"]."</Photo5>";
echo "</girl>\n";
}

echo "</usuarios_ws>\n";
mysql_close($enlace);
?>



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

. 
--- End Message ---

Reply via email to