php-windows Digest 4 Oct 2006 12:44:05 -0000 Issue 3050
Topics (messages 27203 through 27208):
SSIncludes in PHP
27203 by: Alf Stockton
Re: insert md5 password
27204 by: Alf Stockton
header()
27205 by: Alf Stockton
27206 by: Niel Archer
27208 by: Alf Stockton
Re: ImageCreate() function Problem
27207 by: Arief Kurniawan
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 am using $_SESSION["usrname"]=$_POST["username"] construct to set
$_SESSION variables.
My question re Apache is that the SSI variables are not getting
displayed in php scripts and the $_SESSION data is not appearing in shtml.
The $_SESSION data works fine in php scripts and the server side
includes(SSI) works fine in shtml.....:-(
What have I forgotten to do to get both php and shtml to work the way I
want?
--
Regards,
Alf Stockton www.stockton.co.za
You are scrupulously honest, frank, and straightforward. Therefore you
have few friends.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--- End Message ---
--- Begin Message ---
Bruce Cowin wrote:
> Strange. Do you know it's the password causing the problem? What if you
> pass an empty string for the password and see if the insert works?
>
>
Good suggestion Bruce, thank you. Did the blank password and still get
the same error therefore possibly I am misunderstanding the PHP Manual,
where it says:-
mixed *mssql_query* ( string query [, resource link_identifier [, int
batch_size]] )
Returns: A MS SQL result resource on success, *TRUE* if no rows were
returned, or *FALSE* on error.
and my code reads:-
$passwd = ""; // for debugging only
$insert = sprintf("INSERT INTO Users (FirstName, LastName, Usrname,
Passwrd, AccessLevel, last_login, UserID)
VALUES ('%s', '%s', '%s', '%s', '%d', '%s', '%d')",
$FirstName, $Surname, $uname, $passwd,
$accesslevel, $regdate, $_SESSION['UID']);
$Reply = mssql_query($insert, $link);
if ($Reply == FALSE)
{
$Message = sprintf("%s %d <br>Record not inserted. Please refer
problem to Admin.", __FILE__, __LINE__);
trigger_error($Message, E_USER_ERROR, $link);
exit;
}
Maybe on an insert, no rows would be returned and therefore I possibly
should be checking for something else?
--
Regards,
Alf Stockton www.stockton.co.za
Q: Why is it that Mexico isn't sending anyone to the '84 summer games?
A: Anyone in Mexico who can run, swim or jump is already in LA.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--- End Message ---
--- Begin Message ---
I have upgraded my Windows XP server with Apache 2.0.54 and PHP 5.0.3
and now find that I cannot get the php code:-
header("location: index.shtml");
to work.
What I want to do is to switch to another shtml on successful completion
of this script.
Is this the correct method to use in Windows?
--
Regards,
Alf Stockton www.stockton.co.za
You now have Asian Flu.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--- End Message ---
--- Begin Message ---
Hi Alf
> Is this the correct method to use in Windows?
No, it's not the correct method on ANY platform. Before asking a
question on these lists, it's wise to check the documentation first.
> Note: HTTP/1.1 requires an absolute URI as argument to Location: including
> the scheme, hostname and absolute path, but some clients accept relative URIs.
Niel
--- End Message ---
--- Begin Message ---
Niel Archer wrote:
> Hi Alf
>
>
>> Is this the correct method to use in Windows?
>>
>
> No, it's not the correct method on ANY platform. Before asking a
> question on these lists, it's wise to check the documentation first.
>
>
>> Note: HTTP/1.1 requires an absolute URI as argument to Location: including
>> the scheme, hostname and absolute path, but some clients accept relative
>> URIs.
>>
I have copied the code almost verbatim out of the manual and it still
does not work.
/* Redirect to a different page in the current directory that was
requested */
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'index.shtml';
$ReturnTo = sprintf("http://%s%s/%s", $host, $uri, $extra);
echo "<br>".$ReturnTo;
header("Location: $ReturnTo");
exit;
and when I cut and paste the line produced by the echo into the, can I
call it "go box", at the top of the screen and press enter it goes where
I want?
--
Regards,
Alf Stockton www.stockton.co.za
Your sister swims out to meet troop ships.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--- End Message ---
--- Begin Message ---
Dear All,
I'm using :
- Apache 2.2.3
- PHP 5.2
- On Windows XP SP2
Executing a simple code :
<?php
$myImage = imagecreate(200, 100);
$myGrey = imagecoloraallocate ($myImage, 204, 204, 204);
$myBlack = imagecolorallocate($myImage, 0, 0, 0);
imageline($myImage, 15, 35, 120, 60, $myBlack);
header("Content-type: image/png");
imagepng($myImage);
imagedestroy($myImage);
?>
On Execution I Got :
Fatal error: Call to undefined function imagecreate() ..........
In php.ini :
extension_dir = "c:\php\ext"
;php_gd2 extension uncommented
extension=php_gd2.dll
Restarted many times. Still the problem exist. Any suggestion please,
what should I do ?
Regards,
Arief K
--- End Message ---