php-windows Digest 6 Mar 2003 18:50:55 -0000 Issue 1621
Topics (messages 18868 through 18877):
Session handling for windows - new sessionid generated everytime I run session_start()
18868 by: Hector Lumang
Re: $_Post doesn´t work
18869 by: Aidal
MySQL Table Locks
18870 by: fran.thomas.barclays.co.uk
Re: Mail Function Problem
18871 by: Sven Schnitzke
Unusual problem with mail() function (PHP4.3.1(as ISAPI) - IIS 5 - Win2K)
18872 by: Vlad
The page cannot be displayed
18873 by: Thomas
18875 by: Ben O'Neill
com_load_typelib()
18874 by: Mark Hammond
18876 by: Sven Schnitzke
Disappearing names
18877 by: rotsky
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 ---
good afternoon,
I am new with php and session handling - I am currently working working on a
site which requires sessions. However, whenever I execute session_start(),
a new session ID is generated. Is this correct/normal? The following is my
current setup:
Windows XP
PHP 4.3.1
MySQL 3.23.55-nt
Thanks in advance,
Hector
--- End Message ---
--- Begin Message ---
1. I would put an url in the action in you form, for example "$PHPSELF" aka
the same side sending the form.
2. A form field is global on the site receiving the form and can be accessed
like any global variabel.
3. Be aware that the form you wrote doesn't send any value field, it only
has a send button.
example: (sends a hidden field named MyVar)
--------------------------------------------------
<form method=\"post\" action=\"$PHPSELF\">
<input type=hidden name=MyVar value=\"som_value\">
<input type=submit value=\"Daten eintragen\">
</form>
--------------------------------------------------
This sends the value of MyVar to the page itself.
This means that you can do your check like this:
if (isset($MyVar)) {
echo "Daten wurden eingetragen";
}
Accessing post_vars on the receiving site is like accessing any global
variabel in your script.
You can print it with "echo $MyVar;" or "print($MyVar);" at any given point
on the receiving site.
Hope that helps...
/Aidal
"Oliver Steimer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there ,
>
> I´m trying PHP and have a problem with with the superglobals.
>
> I use Apache 1.3.27 and php 4.3.1
>
> this is my script:
>
>
> <html>
> <body>
> <?php
>
> if ($_Post['submit'] {
>
> echo (" Daten wurden eingetragen");
>
> }
>
> <form action="" method="post">
> <input type="submit" name="submit" value="Daten eintragen">
> </form>
>
> </body>
> </html>
>
> but my script won´t do anything !!
>
> Any one who can help ?
>
> regards
> Oliver
>
>
--- End Message ---
--- Begin Message ---
Anyone any idea how to check whether a table is locked? In particular I use
FLUSH TABLES WITH READ LOCK before backup starts and want to know whether
this has happened.
Thanks in advance,
. : Fran Thomas
Internet communications are not secure and therefore the Barclays Group
does not accept legal responsibility for the contents of this message.
Although the Barclays Group operates anti-virus programmes, it does not
accept responsibility for any damage whatsoever that is caused by
viruses being passed. Any views or opinions presented are solely those
of the author and do not necessarily represent those of the Barclays
Group. Replies to this email may be monitored by the Barclays Group
for operational or business reasons.
--- End Message ---
--- Begin Message ---
Hi Jason,
this is not a PHP problem. As the message states: The
intranet SMTP server you are addressing does not support
"proxy function" and refuses to forward your mail to e.g.
hotmail. OTOH if you want to send directly you have to
do
ini_set("SMTP", "SMTP_server_you_want_to_drop_your_mail_at")
just before calling mail();
--
Sven
> -----Ursprüngliche Nachricht-----
> Von: Jason Hawkins [SMTP:[EMAIL PROTECTED]
> Gesendet am: Donnerstag, 6. März 2003 03:07
> An: [EMAIL PROTECTED]
> Betreff: [PHP-WIN] Mail Function Problem
>
> Hi, can anyone help??
> I am trying to use the mail() function. It works for addresses that are
internal on the intranet - but as soon as I try sending to an external
address such as [EMAIL PROTECTED] I have problems with the folllowing error
message:
> SMTP server response: 550 Relaying denied
>
> here is the portion code:
>
> $firstName = $data["FirstName"];
> $emailAddress = $data["EmailAddress"];
>
> $mail_to = $emailAddress;
> $mail_subject = "RE: NEWS SUBSCRIPTION";
> $mail_body = "Dear " .$firstName . "My Message";
>
> $myname = "BGGS WebMaster";
> $myemail = "[EMAIL PROTECTED]";
> $contactname = $firstName;
> $contactemail = $mail_to;
> $message = $mail_body;
> $subject = $mail_subject;
>
> $headers = "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> $headers .= "From: ".$myname." <".$myemail.">\r\n";
> $headers .= "To: ".$contactname." <".$contactemail.">\r\n";
> $headers .= "Reply-To: ".$myname." <$myemail>\r\n";
> $headers .= "X-Priority: 1\r\n";
> $headers .= "X-MSMail-Priority: High\r\n";
> $headers .= "X-Mailer: Just My Server";
>
> if(mail($contactemail, $subject, $message, $headers)){
> echo "Refusal email has been sent";
> }else {
> echo "Failed to send the message";
> }
>
> Thanks - if someone could help - I'm using WIN2K, PHP4.3
>
> Jason
> This email (including attachments) is intended for the addressee(s) n
amed above. No part of it should be reproduced, adapted or transmitted
without the sender's consent. It is confidential, subject to copyright and
may be subject to legal or other privilege. None of these rights, or any
other rights, are waived if you have received this email in error or
without permission. If you have received this email in error, please let
the sender know by reply email, delete it from your system, destroy all
copies and do not disclose, use or forward this email. Unless explicitly
attributed, the opinions expressed in this message do not represent the
official position or opinions of Brisbane Girls Grammar School and should
not be relied upon. Whilst this email has been scanned by an up to date
virus scanner and all care has been taken, recipients should check this
email and any attachments for the presence of viruses. Brisbane Girls
Grammar School disclaims all liability for loss or damage caused by viruses
transmitted by this email.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
When I use mail() function fom my php script (PHP4.3.1(as ISAPI) - IIS 5 -
Win2K) some times, randomly, (not always!) I'm getting error: "SMTP error
550 5.7.1. Unable to relay to <destination_email_address>". I don't think
that this is problem with my SMTP server - to prove this I'm sending emails
with the same parameters from PERL script during the same time - works 100%
fine. Did anyone have the same problem? Any ideas??
Thanks in advance,
Vlad
--- End Message ---
--- Begin Message ---
i have just installed
php-4.3.1-Win32
mysql-3.23.55-win
apache_2.0.44-win32-x86-no_ssl.msi
following the stadard procedure using the standard httpd.conf and php.ini
(editing only where neccesary)
on my windows XP pro server at home.
locally everything works fine (in my http://localhost/beinspired) but
externally ther are problems.
apache seems to be always working (all non php pages work fine)
sometimes all the php etc works fine (http://www.beinspired.biz, the news
column on the right is php and MySQL)
sometimes it doesnt (http://www.beinspired.biz/support/ &
http://www.beinspired.biz/phpinfo.html)
when it does not work it flashes the page very briefly and then displays a
"The page cannot be displayed" error in Internet Explorer (the titlebar says
"Cannot find server").
i have only been able to test it with internet explorer but this shouldnt be
the error as php is serverside altho netscape might display more usefull
error messages.
any help apreciated
thanks
Thomas
--- End Message ---
--- Begin Message ---
Goto IE, Tools, Advanced, and un-check using friendly error mesasges. That
should give a move helpful error message.
--
Ben O'Neill
"Thomas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> i have just installed
> php-4.3.1-Win32
> mysql-3.23.55-win
> apache_2.0.44-win32-x86-no_ssl.msi
> following the stadard procedure using the standard httpd.conf and php.ini
> (editing only where neccesary)
> on my windows XP pro server at home.
>
> locally everything works fine (in my http://localhost/beinspired) but
> externally ther are problems.
>
> apache seems to be always working (all non php pages work fine)
> sometimes all the php etc works fine (http://www.beinspired.biz, the news
> column on the right is php and MySQL)
> sometimes it doesnt (http://www.beinspired.biz/support/ &
> http://www.beinspired.biz/phpinfo.html)
>
> when it does not work it flashes the page very briefly and then displays a
> "The page cannot be displayed" error in Internet Explorer (the titlebar
says
> "Cannot find server").
> i have only been able to test it with internet explorer but this shouldnt
be
> the error as php is serverside altho netscape might display more usefull
> error messages.
>
> any help apreciated
> thanks
> Thomas
>
>
>
>
>
--- End Message ---
--- Begin Message ---
How does one kill the process created by com_load_typelib()?
com_load_typelib('Word.Application');
The above code creates an instance of winword.exe on the server, and leaves it running
indefinately. How does one kill this process when the code is done executing?
___________________________________________
Mark Hammond [EMAIL PROTECTED]
Information Service Coordinator
Collingwood Utility Services
Phone: 705-445-1800 ext: 247
Mobile: 705-441-4209
--- End Message ---
--- Begin Message ---
What do you need the typelib for ? I suggest you try
the example in the doc of com_load_typelib, just
comment out the call to this particular function and smile.
(Background: com_load_typelib apparently does not
attach to a running instance, so you get orphans en masse.)
Generally you have to quit COM server objects with its
respective method. For MS Word this is Application.Quit
($word->Quit in PHP when the instance was created using
$word = new COM('Word.Application');
But for just using a COM object with the known vocabulary
you never need to call com_load_typelib. This call is used
by IDEs to show the interface to the user so (s)he can
learn the possibilities (Object browser or similar).
--
Sven
> -----Ursprüngliche Nachricht-----
> Von: Mark Hammond [SMTP:[EMAIL PROTECTED]
> Gesendet am: Donnerstag, 6. März 2003 15:13
> An: [EMAIL PROTECTED]
> Betreff: [PHP-WIN] com_load_typelib()
>
> How does one kill the process created by com_load_typelib()?
>
>
> com_load_typelib('Word.Application');
>
>
> The above code creates an instance of winword.exe on the server, and
leaves it running indefinately. How does one kill this process when the
code is done executing?
>
> ___________________________________________
>
> Mark Hammond [EMAIL PROTECTED]
> Information Service Coordinator
> Collingwood Utility Services
>
> Phone: 705-445-1800 ext: 247
> Mobile: 705-441-4209
>
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I've got the following routine in a login page. What happens is that the
first time the user goes to the page, a form is shown. The user enters ID &
password and clicks a button. This calls the same page again but with a
POSTed variable 'mode' set to "checklog" so that this is what the user gets
the second time.
Now, it works fine on my local system. When I upload it to my hosting
service, it works in as much as if the user enters the wrong details (ie,
that aren't in the user database) they get the "we can't find your details
message". If they enter the correct details, it accepts them, and prints '1'
for the $dbidrows variable. But here's the rub:
* on my local machine, the page prints the 'welcome' message with the
person's first and last name, looked up from the database, with no trouble.
* on the hosting service's server, it prints 'Welcome .' - the names are
missing.
Both I and the hosting service are running the same version of MySQL.
They're running PHP 4.1 as CGI - I'm running 4.3 as an Apache module. I'd
appreciate any thoughts on what's happening here.
CASE ("checklog"):
// CHECK LOGIN DETAILS TO SEE IF USER REGISTERED
extract($_POST); // creates $user_id, $password
// Connecting, selecting database */
include('db1conn.inc'); // these contains the mysql_connect() and
mysql_select_db() routines.
/* Performing SQL query */
$dbquery = "SELECT * FROM users WHERE user_id = '".$user_id."' AND password
= '".$password."'";
// the $user_id and $password variables were extracted from $_POST
$dbfindid = mysql_query($dbquery) or die("Query failed");
$dbidrows = mysql_num_rows($dbfindid);
echo "dbidrows: ",$dbidrows; // this does indeed return '1' if the person
entered the correct details
/* displaying results */
if ($dbidrows == 0) {
// entered id & password not found in database
echo "No matches found...We can't find your details in our user
database.";
}
else {
// user found in database
$userdetails = mysql_fetch_assoc($dbfindid);
echo "<h6>Login succeeded...</h6>";
echo "Welcome ",$userdetails['firstname'],"
",$userdetails['lastname'],"."; // *** THIS IS WHERE THE PROBLEM COMES ***
}
/* Closing connection */
include('dbclose.inc');
break;
--- End Message ---