php-windows Digest 23 Sep 2002 07:18:56 -0000 Issue 1352
Topics (messages 15936 through 15951):
Create Thumbnails from image
15936 by: Kjell Hansen
15939 by: Olivier Hubert
PHP-NUKE
15937 by: Matt Babineau
Re: Subject: ENCTYPE
15938 by: neil smith
Mail tag?
15940 by: Codejay
15949 by: H Marc Bower
15950 by: H Marc Bower
open_basedir question
15941 by: Dash McElroy
Re: open_basedir question (solved)
15942 by: Dash McElroy
Test
15943 by: +Alibi_
15944 by: +Alibi_
15945 by: +Alibi_
15946 by: +Alibi_
15947 by: +Alibi_
Re: using apache on a network
15948 by: M.B.
Cookies do not work
15951 by: Sjaak
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 ---
Hi,
I'm using a Win2k with php4.1 and I'd like to make some thumbnails from
pictures on my disk.
I've gotten the impression that it's possible, but I havent' found out
just how.
I've stumbled across the ImageCopyResized function but it requires a
imagehandle(?) to the file copied from. How do I get that? Is it the
right way to do this?
I guess I could use some picture manipulating program to do this, but
doing it the PHP way is nicer :)
TIA
Kjell
--- End Message ---
--- Begin Message ---
Hi,
Read up on the image manipulation functions of PHP at
http://www.php.net/manual/en/ref.image.php
You will need to install the GD library if it's not already installed and
once you do you will have access to all the functions described, including
the ImageCopyResized function. To read the image from disk, you will
probably have to use ImageCreateFromGif or ImageCreateFromJpeg and to
create the destination image you will need to use CreateImage. You can then
save the resulting thumbnail using ImageGif, ImageJpeg or anything you like.
Just as a side note, you should probably use ImageCopyResampled which uses
interpolation to resize the image, thus creating a thumbnail of much better
quality.
HTH
Olivier
PS: to get the image's height and width, use ImagesY and ImagesX
respectively, once you have opened/created the image.
At 18:09 2002-09-22 +0300, Kjell Hansen wrote:
>Hi,
>I'm using a Win2k with php4.1 and I'd like to make some thumbnails from
>pictures on my disk.
>I've gotten the impression that it's possible, but I havent' found out
>just how.
>
>I've stumbled across the ImageCopyResized function but it requires a
>imagehandle(?) to the file copied from. How do I get that? Is it the
>right way to do this?
>I guess I could use some picture manipulating program to do this, but
>doing it the PHP way is nicer :)
>
>TIA
>Kjell
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Can anyone point me to some good overview technical docs about PHP nuke,
or could someone email me offlist if you know a lot about PHP-Nuke, I
have a few questions to ask. I looked at the PHP nuke site and it was
very confusing.
Thanks!
--- End Message ---
--- Begin Message ---
Hi -
I dont know if this wil help but I found I had to specify the maximum
allowable file size as a hidden variable MAX_FILE_SIZE like this :
<input type="hidden" name="MAX_FILE_SIZE" value="64000">
or whatever the biggest file you are prepared to accept is.
Are you sure your web server is not configured to accept only GET requests
for that directory in a .htaccess file or global configuration?
Cheers,
Neil Smith
At 15:00 22/09/2002 +0000, you wrote:
>From: "Kit Kerbel" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Date: Sat, 21 Sep 2002 22:48:48 -0500
>Mime-Version: 1.0
>Content-Type: text/plain; format=flowed
>Message-ID: <[EMAIL PROTECTED]>
>Subject: ENCTYPE
>
>Hi all...My post variables are not acting properly when I add
>enctype="multipart/form-data" to the form tag. is this a bug in the
>current version of php? has anyone experienced this?
>
>If I take the enctype declaration out, it works fine (except for the file
>uploading, which is crucial). I can work around this by making two
>separate forms, but I would rather just have the one.
>
>Thanx in advance,
>Kit
__________________________________________________________
VideoChat with friends online, get Freshly Toasted every day at
http://www.fresh-toast.net : NetMeeting solutions for a connected world.
--- End Message ---
--- Begin Message ---
Has anyone experienced a problem with the mail tag after upgrading? My
php.ini still has the same path to sendmail and I can't send mail through
php anymore. None of my sendmail configuration has changed at all. any
ideas?
--- End Message ---
--- Begin Message ---
I haven't noticed this myself, but I believe I read another post about
this - it's something to do with XP (or 2000... don't remember which the
poster was commenting on) not having a proper mapping of the sendmail to
localhost. I don't remember what he did to solve it, but I'm sure you could
find it in the archives... if there are any. :) I will check the old
messages I have stored, and repost if I can find it.
(V)
----- Original Message -----
From: "Codejay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 22, 2002 1:23 PM
Subject: [PHP-WIN] Mail tag?
> Has anyone experienced a problem with the mail tag after upgrading? My
> php.ini still has the same path to sendmail and I can't send mail through
> php anymore. None of my sendmail configuration has changed at all. any
> ideas?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Here it is... it was from Court Shrock. Not sure if this is the same
situation you're in or not, but it might help.
Sorry to bother everyone...found the cause....SMTP on IIS5 doesn't bind
to 127.0.0.1 by default. Changed php.ini to use the ip address of its
interface and the everything worked. Found this out by putting the same
script on a different server, but pointing smtp to the original server.
On Mon, 2002-09-09 at 12:43, Court Shrock wrote:
> When trying to (and nothing more):
>
> <?php
> mail('[EMAIL PROTECTED]', 'Subject', 'Body');
> ?>
>
> getting the message "Failed to receive: in path_the_file_being_run".
>
>
> Tried php v4.1.2 and 4.2.3 with the same results.
>
>
> The box is Win2k server and IIS5. A SMTP relay is listening on
> localhost. The php.ini settings are set to point to 'localhost' (a
> valid email address is set in sendmail_from). Testing the MTA by itself
> works properly.
>
> http://bugs.php.net hint that is was fixed in CVS back in 2000. Any
> ideas?
>
----- Original Message -----
From: "Codejay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 22, 2002 1:23 PM
Subject: [PHP-WIN] Mail tag?
> Has anyone experienced a problem with the mail tag after upgrading? My
> php.ini still has the same path to sendmail and I can't send mail through
> php anymore. None of my sendmail configuration has changed at all. any
> ideas?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hello there,
I have what should be a simple question: How can I get a script to fail
(terminate or exit, whatever) on a failed open_basedir restriction? In
other words, if I try to open a file outside of the open_basedir
restriction, how do I get the script to stop?
This should be simple and I must be missing something...
Thanks in advance,
-Dash
As long as the answer is right, who cares if the question is wrong?
--- End Message ---
--- Begin Message ---
I feel like a dingbat. The "or die("error message") works fine on the call
that flails on the open_basedir restriction. I also put an "@" in front of
the failed open_basedir call so the page doesn't have an error message
besides what's in my die("blah") call.
If there's a better or cleaner way, let me know.
-Dash
"They told me I was gullible ... and I believed them!"
On Sun, 22 Sep 2002, Dash McElroy wrote:
> Hello there,
>
> I have what should be a simple question: How can I get a script to fail
> (terminate or exit, whatever) on a failed open_basedir restriction? In
> other words, if I try to open a file outside of the open_basedir
> restriction, how do I get the script to stop?
>
> This should be simple and I must be missing something...
>
> Thanks in advance,
>
> -Dash
>
> As long as the answer is right, who cares if the question is wrong?
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Testing - Sorry!
__________________________________________________________________ anthony
Shapley ICQ#: 167013817 Current ICQ status: + More ways to contact me
__________________________________________________________________
--- End Message ---
--- Begin Message ---
Testing 3..
"+Alibi_" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Testing..
> __________________________________________________________________ anthony
> Shapley ICQ#: 167013817 Current ICQ status: + More ways to contact me
> __________________________________________________________________
>
>
--- End Message ---
--- Begin Message ---
test 4
testing..
"+Alibi_" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Testing..
> __________________________________________________________________ anthony
> Shapley ICQ#: 167013817 Current ICQ status: + More ways to contact me
> __________________________________________________________________
>
>
--- End Message ---
--- Begin Message ---
It's right I can stop replying now :D
"+Alibi_" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> test 4
>
>
> testing..
>
>
> "+Alibi_" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Testing..
> > __________________________________________________________________
anthony
> > Shapley ICQ#: 167013817 Current ICQ status: + More ways to contact me
> > __________________________________________________________________
> >
> >
>
>
--- End Message ---
--- Begin Message ---
Oh what the hell one more!
------------------------------------------------
Anthony Shapley
www.ants-resource.com
ICQ: 167013817
Yahoo: the_php_coder
Msn: [EMAIL PROTECTED]
Aim: AntsResource
"+Alibi_" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Testing..
> __________________________________________________________________ anthony
> Shapley ICQ#: 167013817 Current ICQ status: + More ways to contact me
> __________________________________________________________________
>
>
--- End Message ---
--- Begin Message ---
OK, first of all thank you for explaining me.
I have one porblem and that is:
if I give input the IP of my servercomputer net-card at the "Listen"-option,
the apache server closes imidiately after starting up.
So I don't knwo what I'm doing wrong, but I can't type that.
And if I type the one of one of my clients, it does start. (Yes, I have
non-dynamic IP-addresses)
So I'm really sorry but, I can't understand what is wrong so far.
Does anybody knows what's wrong?
M.B.
"Constantin Baciu" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]...
> First of all... Listen <IP of another computer...> is WRONG.... This
> directive is there to use in case of multiple net-cards installed on the
> computer... Every card installed has it's own IP address... So you SHOULD
> HAVE Listen <IP of one net-card installed on the computer (the one with
> the server....)>
>
> Second: Bind is used if you want to have multiple Virtual Hosts on the
same
> server...
> I.E... you Bind www.host1.com to IP1 and www.host2.com to IP2....
>
> I hope that you get it...
>
>
> "M.B." <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > I don't understand you fully, but one thing is clear: I don't whant to
use
> a
> > DNS server (yet).
> > When I refer to the IP of the computer with apache on it, I still have
to
> > make an internetconnection.
> > maby that I didn't set my file write, but maby this will help you to
help
> me
> > further.
> > This are some parts of my httpd.conf-file:
> >
> > ### Section 1: Global Environment
> > #
> > # The directives in this section affect the overall operation of Apache,
> > # such as the number of concurrent requests it can handle or where it
> > # can find its configuration files.
> > #
> >
> > #
> > # ServerType is either inetd, or standalone. Inetd mode is only
supported
> > on
> > # Unix platforms.
> > #
> > ServerType standalone
> >
> > ---------------------------------------
> > #
> > # Listen: Allows you to bind Apache to specific IP addresses and/or
> > # ports, in addition to the default. See also the <VirtualHost>
> > # directive.
> > #
> > Listen <THE IP of anouther computer in the network>
> > Listen <a speciall port> (works)
> > -------------------------------------
> > #
> > # BindAddress: You can support virtual hosts with this option. This
> > directive
> > # is used to tell the server which IP address to listen to. It can
either
> > # contain "*", an IP address, or a fully qualified Internet domain name.
> > # See also the <VirtualHost> and Listen directives.
> > #
> > BindAddress *
> > -----------------------------
> > ServerName Localhost
> > ------------------------------
> >
> >
> > (PS. I do not made a VirtualHost)
> > Maby now you now what the problem is or what goes wrong.
> >
> > M.B.
> >
> >
> > "Constantin Baciu" <[EMAIL PROTECTED]> schreef in bericht
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > No...
> > >
> > > What I mean is:
> > > 1. Either you setup a DNS server on the computer that you run apache
on.
> > If
> > > you do that, you have to set the
> > > DNS on the computer that are on the local network. Then, in the
> browsers,
> > > you refer by server-name.....
> > >
> > > 2. You do not set any DNS server, and you refer to the site (in the
> > > browsers) by the IP of the computer with apache....
> > >
> > > Hope that you understand and hope that helps...
> > >
> > > Best...
> > >
> > > "M.B." <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > So you mean by listening to the IP (in the httd.conf-file)?
> > > > I already done that, but then I typed the IP of my server in my
> browser
> > > > (wich can't be written in the httd.conf-file because it crahsses
then)
> > and
> > > > then my computer needs an internetconnection.
> > > > But that is the thing I do not want to use.
> > > > How do I get to the pages to see on my ather computers in the
network,
> > > what
> > > > do I have to type in my browser, when I'm listening to the IP from
> that
> > > > computer so that I don't have to make an internetconnection? (I
> already
> > > > tried listening to a port, and then giving an IP to, but that
> didn'help.
> > > > So what is it that I do wrong?
> > > >
> > > > M.B.
> > > >
> > > >
> > > > "Constantin Baciu" <[EMAIL PROTECTED]> schreef in bericht
> > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > For the second question:
> > > > >
> > > > > try connecting through the IP (not the server name.....)
> > > > >
> > > > >
> > > > > "M.B." <[EMAIL PROTECTED]> wrote in message
> > > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > > Hi, I have installed PHPTraid so, that went OK.
> > > > > > But I have a network and I would like to see the pages on the
> > > computers
> > > > > that
> > > > > > are connected to the servercomputer. (win ME)
> > > > > > I tried a lot of things already and I have one problem:
> > > > > > when I type in that he must Listen to <IP computer> then
everytime
> > I'm
> > > > not
> > > > > > connected to to the network, my computer with the apache server
> > can't
> > > > > run.
> > > > > > And anouther problemm that I have is: that when I try to go to
the
> > > site
> > > > on
> > > > > > one of the connected computers in my network, I have to have an
> > > > > > internetconnection to view the pages (I also use a port to
listen
> to
> > > in
> > > > > the
> > > > > > file) but when I have my internetconnection it isn't used only
the
> > > > network
> > > > > > is used, how can I make it work without the use of an
> > > > internetconnection?
> > > > > >
> > > > > > M.B.
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
--- End Message ---
--- Begin Message ---
Dear all,
I have a Windows2000 server with PHP & IIS5
My customer has written the following script:
<?php
//Verbinding maken met de database
include("db/beheer/dbconnect.php");
setcookie('test','Dit komt uit een cookie!!',time(0)+3600,'/','',0);
echo "<br><table align='center'><tr><td><font
size='+1'><b>Openingstijden:</b></font></td></tr></table><br>";
$query = mysql_query ("SELECT * from openingstijden");
echo "<table align='center' border='1'>";
echo
"<tr><td><b>Nr.</b></td><td><b>Vestiging</b></td><td><b>Maandag</b></td><td>
</td></tr>";
//$teller = 1;
while ($row = mysql_fetch_array ($query))
{
echo "<tr><td>".$teller."</td>";
echo "<td>";
if ($row['vestigingid'] == 1)
{
echo "Trio woonplaza / Profijtmeubel";
}
if ($row['vestigingid'] == 2)
{
echo "Trendhopper Druten";
}
if ($row['vestigingid'] == 3)
{
echo "Trendhopper Arnhem";
}
echo "</td>";
echo "<td>van ".$row['maandagopen']." tot ".$row['maandagsluiten']."</td>";
$teller = $teller+1;
echo "</tr>";
}
echo "</table>";
if (empty($HTTP_COOKIE_VARS))
{
echo "<br><center><b>KAN GEEN COOKIE VINDEN :-(</b></center>";
}
else
{
$cookie = $HTTP_COOKIE_VARS["test"];
echo "<br><center><b>COOKIE GEVONDEN!! inhoud = ".$cookie."</b></center>";
}
?>
But when displaying we cannot get the cookie been displayed. Also after
refresh the browser.
Does anyone has an idea? Setting in my PHP.INI?
Please help me!
Cheers,
Jacco
--- End Message ---