php-windows Digest 1 Apr 2003 04:58:12 -0000 Issue 1662
Topics (messages 19196 through 19217):
Download of GIF
19196 by: Rahul Jadhav
19197 by: Rahul Jadhav
19199 by: Anthony Ritter
Re: + character in a command line argument
19198 by: Sven Schnitzke
date() and mktime() functions: weeknumbers and months.
19200 by: Davy Obdam
Re: [PHP] date() and mktime() functions: weeknumbers and months.
19201 by: Marek Kilimajer
Re: [newbie] SSL on Win98
19202 by: Bobby Rahman
Go back function...
19203 by: Afan Pasalic
Sessions any use for this???
19204 by: Trystano.aol.com
Subscription Authentication with PHP
19205 by: Listuser
19217 by: olinux
Sending Mail with PHP
19206 by: Listuser
19207 by: Scott Carr
19210 by: Listuser
19211 by: Nick H. -- Level II Technical Support
19212 by: Listuser
Re: PHP as CSS Stylesheet - broken in IE6/PHP 4.3.x
19208 by: Isetro Savi
Connection on mysql.
19209 by: Arthur Franco
Redirect to Home Page
19213 by: Wade
19214 by: Mike Brum
19215 by: Wade
19216 by: Listuser
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 All
I am using PHP 4.3.1 on IE 5.5 SP2.
A script is written which downloads the file.
The headers are adjusted properly so that files are downloaded.
Here is the problem.
The HTML files are downloaded properly, but for GIF files, the file is downloaded but
can not be opened in browser.
The file SIZE / FORMAT is proper when the file is downloaded, but it is not opened. In
Photo Editor it says the format is not supported.
Can any one help / suggest what the problem is?
Best Regards
Rahul
--- End Message ---
--- Begin Message ---
When I double click the file it is opening in the Browser. But it is seen as broken
image like symbol.
When I move cursor on the gif file it shows type as .gif. Also my ststem is having
win2k pro OS, so it should support GIF files.
I am doubtfull if this is problem with header setting wherein the properties of gifs
are not set correctly.
Best Regards
Rahul
-----Original Message-----
From: Luis Moreira [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 4:11 PM
To: Rahul Jadhav
Subject: Re: [PHP-WIN] Download of GIF
I don't think this is a PHP problem, more that your system does not
recognize that MIME type (.gif)
Try to double-click the .GIF file you downloaded.
If the system opens a windows and asks you which program should be used to
open it, select the one you want as default.
Luis
----- Original Message -----
From: "Rahul Jadhav" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 31, 2003 11:31 AM
Subject: [PHP-WIN] Download of GIF
Hi All
I am using PHP 4.3.1 on IE 5.5 SP2.
A script is written which downloads the file.
The headers are adjusted properly so that files are downloaded.
Here is the problem.
The HTML files are downloaded properly, but for GIF files, the file is
downloaded but can not be opened in browser.
The file SIZE / FORMAT is proper when the file is downloaded, but it is not
opened. In Photo Editor it says the format is not supported.
Can any one help / suggest what the problem is?
Best Regards
Rahul
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Is it possible that .gifs are currently _not_ supported in php 4.2+ at
php_gd2.dll - however .png files would be due to copyright expiration of
.gif patent at Unisys?
TR
--- End Message ---
--- Begin Message ---
Hi,
"+" is special to DOS at least with the copy command in that
"copy a+b.txt" means:
take file "a" and file "b.txt" and concatenate them giving file a.
A file named "a+b.txt" is legal with windows but not with DOS.
By the way, the treatment of + in filenames has been changed
with PHP 4.3. Since then a+b.txt is one filename, quoted or not.
--
Sven Schnitzke
> -----Ursprüngliche Nachricht-----
> Von: mmy [SMTP:[EMAIL PROTECTED]
> Gesendet am: Sonntag, 30. März 2003 11:30
> An: [EMAIL PROTECTED]
> Betreff: [PHP-WIN] + character in a command line argument
>
> Hi!
>
> I'm using PHP 4.3.1, IE 5.5, Win ME
>
> I'm trying to use php through DOS command line.
>
> Running the very basic script
>
> $argv = $_SERVER['argv'];
> var_dump($argv);
>
> I noticed that the command line arguments are split at a + character, even
> if between double quotes.
>
> for instance
>
> php test.php a+b
>
> or
>
> php test.php "a+b"
>
> both return 3 arguments, "test.php", "a" and "b".
>
> I don't know if it is a DOS or php problem (though if you name a file
> a+b.txt, the DOS command type a+b.txt runs correctly, which seems to
> exonerate DOS...).
>
> My questions are more practical : does anybody knows how to pass a + in an
> argument?? Are there other characters that are special in addition to " and
> + ??
>
> Thanks in advance
>
>
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi people,
I would like to select news from my database bases on week/year and
month/year.
How can i do this.. I would like to pass two arguments in the query
string, like news.php?week=14&year=2003 or news.php?month=3&year=2003.
Can anybody help me.. Thanks in advance. I have been looking at the
date() and mktime() functions, but is there anyway to determine the date
from a weeknumber? I have been using this:
$yr="2003";
$mnth="03";
$dy="31";
echo "base date: ".$yr."-".$mnth."-".$dy."<br />";
echo "last sunday: ".date("Y-m-d",
mktime(0,0,0,$mnth,$dy-date("w",mktime(0,0,0,$mnth,$dy,$yr)),$yr))."<br
/>";
echo "next saturday: ".date("Y-m-d",
mktime(0,0,0,$mnth,$dy+6-date("w",mktime(0,0,0,$mnth,$dy,$yr)),$yr))."<b
r />";
$sql = "SELECT * FROM news WHERE date>='$last_sunday' AND
date<='$next_saturday').
But i would find it better to use a weeknumber instead
Best regards,
Davy Obdam - Networking4all
Webapplication developer
E-mail: [EMAIL PROTECTED]
Web: http://www.networking4all.com
Kijk ook eens op: http://www.verzamelgids.nl
--- End Message ---
--- Begin Message ---
Check out mysql manual, section 6.3.4 - Date and Time Functions, example
$condition='';
if($GET['week']) $condition .= "WEEK(date)='$_GET[week]' AND ";
if($GET['year']) $condition .= "YEAR(date)='$_GET[week]' AND ";
and so on
then use the condition:
$sql = "SELECT * FROM news WHERE $condition 1";
Davy Obdam wrote:
Hi people,
I would like to select news from my database bases on week/year and
month/year.
How can i do this.. I would like to pass two arguments in the query
string, like news.php?week=14&year=2003 or news.php?month=3&year=2003.
Can anybody help me.. Thanks in advance. I have been looking at the
date() and mktime() functions, but is there anyway to determine the date
from a weeknumber? I have been using this:
$yr="2003";
$mnth="03";
$dy="31";
echo "base date: ".$yr."-".$mnth."-".$dy."<br />";
echo "last sunday: ".date("Y-m-d",
mktime(0,0,0,$mnth,$dy-date("w",mktime(0,0,0,$mnth,$dy,$yr)),$yr))."<br
/>";
echo "next saturday: ".date("Y-m-d",
mktime(0,0,0,$mnth,$dy+6-date("w",mktime(0,0,0,$mnth,$dy,$yr)),$yr))."<b
r />";
$sql = "SELECT * FROM news WHERE date>='$last_sunday' AND
date<='$next_saturday').
But i would find it better to use a weeknumber instead
Best regards,
Davy Obdam - Networking4all
Webapplication developer
E-mail: [EMAIL PROTECTED]
Web: http://www.networking4all.com
Kijk ook eens op: http://www.verzamelgids.nl
--- End Message ---
--- Begin Message ---
Hiya
Can anyone point me in the direction of a dummies guide (idiot proof..)
to installing and configuring SSL for PHP4/Apache2.4.03/Win98. Had a little
look around on a few php websites but as usual im finding the windows stuff
a little lacking for me.
Thanks
Bob
_________________________________________________________________
Worried what your kids see online? Protect them better with MSN 8
http://join.msn.com/?page=features/parental&pgmarket=en-gb&XAPID=186&DI=1059
--- End Message ---
--- Begin Message ---
Hi,
I know there is sucha function, to send you back to last visited page but
can't find it. Help!
Afan
--- End Message ---
--- Begin Message ---
Hi, all, i'm relatively new to PHP, but am creating a website that has a
login screen as the first page within a website, and once a user has
authenticated themselves gain access to the remainder of the website to
perform actions specific to their details. (e.g. i'm creating an online
dental surgery for registered patients, and when each patient has been
authenticated on the website they can create an appointment, or update an
appointment relating to themselves)
Once the login page has been loaded, should I start a session depending on
the success of the login. e.g. register a session variable (the websites
user's ID that has been extracted from the users table) if the login was
successful, or destroy the session if unsuccessful?
If login is successful, should I then use this session variable (patients id)
with query strings to make actions to the database, such as create an
appointment etc?
Is this an efficient way of going about this method of carrying out actions
specific to authenticated users?? Or is there a better way?
Your help is much appreciated.
Tryst
--- End Message ---
--- Begin Message ---
I'm hoping someone can help me out here. I have a registration page where
users sign up for my site - I then want to be able to send them an email
with a link to click on to verify their registration. Is there any pre-made
scripts that anyone knows of that would do this, or can someone point me in
the right direction that would explain how to do this. One other note as
well. I am using sessions to hold the users information, I need to be able
to keep this information until the user returns. It will then be inputted
into a MySQL database.
Thanks
--- End Message ---
--- Begin Message ---
This should help you
A Complete, Secure User Login System
by Tim Perdue
http://phpbuilder.com/columns/tim20000505.php3
olinux
--- Listuser <[EMAIL PROTECTED]> wrote:
> I'm hoping someone can help me out here. I have a
> registration page where
> users sign up for my site - I then want to be able
> to send them an email
> with a link to click on to verify their
> registration. Is there any pre-made
> scripts that anyone knows of that would do this, or
> can someone point me in
> the right direction that would explain how to do
> this. One other note as
> well. I am using sessions to hold the users
> information, I need to be able
> to keep this information until the user returns. It
> will then be inputted
> into a MySQL database.
>
> Thanks
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://platinum.yahoo.com
--- End Message ---
--- Begin Message ---
My ISP requires email authentication when sending emails, is the a way to
set this up in PHP.
Thanks
--- End Message ---
--- Begin Message ---
What kind of Authentication do they require?
LOGIN, POP3 before SMTP, CRAM-MD5, etc?
--
Scott Carr
Documentation Maintainer
http://documentation.openoffice.org
OpenOffice.org
Quoting Listuser <[EMAIL PROTECTED]>:
> My ISP requires email authentication when sending emails, is the a way to
> set this up in PHP.
>
> Thanks
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
As stated, my ISP requires email authentication when sending emails. For
example - if you go to the mail settings in Outlook express and choose
servers - there is a check box there that says my "server requires
authentication" - this must be checked. If you click on advanced there is
another box that says "use same settings as my incoming mail server". So
whatever category this falls into, which may be POP3 before SMTP, but not
positive.
----- Original Message -----
From: "Scott Carr" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 31, 2003 1:27 PM
Subject: Re: [PHP-WIN] Sending Mail with PHP
> What kind of Authentication do they require?
>
> LOGIN, POP3 before SMTP, CRAM-MD5, etc?
> --
> Scott Carr
> Documentation Maintainer
> http://documentation.openoffice.org
> OpenOffice.org
>
>
> Quoting Listuser <[EMAIL PROTECTED]>:
>
> > My ISP requires email authentication when sending emails, is the a way
to
> > set this up in PHP.
> >
> > Thanks
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I work for a company that requires SMTP auth for users. You really
shouldn't need to specify a username and password for your script, as most
servers have it setup to the server will accept outgoing mail from itself.
For example, the server's IP block is: 10.0.1.0/24. Any mail outbound for
an IP on that server from a script on that server using that server as a
mail server should be allowed to go out. At least, that's the most logical
way of setting it up and that's pretty much how a lot of people have it
setup.
Regards,
Nick H.
[EMAIL PROTECTED]
----- Original Message -----
From: "ODCS" <[EMAIL PROTECTED]>
To: "Scott Carr" <[EMAIL PROTECTED]>
Cc: "PHP Windows" <[EMAIL PROTECTED]>
Sent: Monday, March 31, 2003 2:38 PM
Subject: Re: [PHP-WIN] Sending Mail with PHP
> As stated, my ISP requires email authentication when sending emails. For
> example - if you go to the mail settings in Outlook express and choose
> servers - there is a check box there that says my "server requires
> authentication" - this must be checked. If you click on advanced there is
> another box that says "use same settings as my incoming mail server". So
> whatever category this falls into, which may be POP3 before SMTP, but not
> positive.
>
> ----- Original Message -----
> From: "Scott Carr" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 31, 2003 1:27 PM
> Subject: Re: [PHP-WIN] Sending Mail with PHP
>
>
> > What kind of Authentication do they require?
> >
> > LOGIN, POP3 before SMTP, CRAM-MD5, etc?
> > --
> > Scott Carr
> > Documentation Maintainer
> > http://documentation.openoffice.org
> > OpenOffice.org
> >
> >
> > Quoting Listuser <[EMAIL PROTECTED]>:
> >
> > > My ISP requires email authentication when sending emails, is the a way
> to
> > > set this up in PHP.
> > >
> > > Thanks
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > -------------------------------------------------
> > This mail sent through IMP: http://horde.org/imp/
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Your assuming my ISP is normal. From the webpage:
SMTP Authentication Should be ON.
This will allow you to send mail. If you are asked to enter a username
and password, enter the same ones used to download mail.
----- Original Message -----
From: "Nick H. -- Level II Technical Support" <[EMAIL PROTECTED]>
To: "PHP Windows" <[EMAIL PROTECTED]>
Sent: Monday, March 31, 2003 3:54 PM
Subject: Re: [PHP-WIN] Sending Mail with PHP
> I work for a company that requires SMTP auth for users. You really
> shouldn't need to specify a username and password for your script, as most
> servers have it setup to the server will accept outgoing mail from itself.
> For example, the server's IP block is: 10.0.1.0/24. Any mail outbound
for
> an IP on that server from a script on that server using that server as a
> mail server should be allowed to go out. At least, that's the most
logical
> way of setting it up and that's pretty much how a lot of people have it
> setup.
>
>
>
> Regards,
> Nick H.
> [EMAIL PROTECTED]
>
>
> ----- Original Message -----
> From: "ODCS" <[EMAIL PROTECTED]>
> To: "Scott Carr" <[EMAIL PROTECTED]>
> Cc: "PHP Windows" <[EMAIL PROTECTED]>
> Sent: Monday, March 31, 2003 2:38 PM
> Subject: Re: [PHP-WIN] Sending Mail with PHP
>
>
> > As stated, my ISP requires email authentication when sending emails.
For
> > example - if you go to the mail settings in Outlook express and choose
> > servers - there is a check box there that says my "server requires
> > authentication" - this must be checked. If you click on advanced there
is
> > another box that says "use same settings as my incoming mail server". So
> > whatever category this falls into, which may be POP3 before SMTP, but
not
> > positive.
> >
> > ----- Original Message -----
> > From: "Scott Carr" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, March 31, 2003 1:27 PM
> > Subject: Re: [PHP-WIN] Sending Mail with PHP
> >
> >
> > > What kind of Authentication do they require?
> > >
> > > LOGIN, POP3 before SMTP, CRAM-MD5, etc?
> > > --
> > > Scott Carr
> > > Documentation Maintainer
> > > http://documentation.openoffice.org
> > > OpenOffice.org
> > >
> > >
> > > Quoting Listuser <[EMAIL PROTECTED]>:
> > >
> > > > My ISP requires email authentication when sending emails, is the a
way
> > to
> > > > set this up in PHP.
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> > >
> > > -------------------------------------------------
> > > This mail sent through IMP: http://horde.org/imp/
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On Fri, Mar 28, 2003 at 02:47:25PM +0100, Per Lundberg wrote:
> On Fri, 2003-03-28 at 13:15, Isetro Savi wrote:
> > On Fri, Mar 28, 2003 at 10:45:10AM +0100, Per Lundberg wrote:
> > > Do you have something like this in your PHP code?
> > >
> > > header("Content-type: text/css");
> >
> > I did not have that in the stylesheet, but putting it in did not help.
>
> Does the stylesheet validate? (http://validator.w3.org)
>
> I would guess this is a register_globals problem.
> --
> Best regards,
>
> Per Lundberg / Capio ApS
> Phone: +46-18-4186040
> Fax: +46-18-4186049
> Web: http://www.capio.com
>
The stylesheet validates. I've been trying to comment out some of the
database code (stylesheet colors stored in mysql db) to see if that
helps, but I've still had no luck. I'm not explicitly using any
globals, but I'll check through and see if I note anything.
Time to do some komodo debugging, I guess!
--- End Message ---
--- Begin Message ---
What is the safest way to make a connection with php to mysql?
I'm using an require 'DB_conn.php' file that make the connection and this
file is outside /var/www/. Someone including my original file "login.php"
and printing the variable $user for example can see the value of the
variable, that in this example is my user for connection on mysql.
Someone have a better way to hide mysql user and password in php files?
Arthur
--- End Message ---
--- Begin Message ---
03312003 1549 GMT-6
I saw this little script somewhere and now I cannot find it.
Im working on this site. If you happen to bounce into the site from
anywhere but the home page, you are automatically redirected back to the
home page. Can someone help me with this?
Wade
--- End Message ---
--- Begin Message ---
You can easily do that with JavaScript.
if (document.location.href != "index.html"){
document.location.href = "index.html";
}
My syntax might be screwy (haven't done JavaScript in a while) but you get
the idea.
-Mike
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 6:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirect to Home Page
03312003 1549 GMT-6
I saw this little script somewhere and now I cannot find it.
Im working on this site. If you happen to bounce into the site from
anywhere but the home page, you are automatically redirected back to the
home page. Can someone help me with this?
Wade
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
03312003 1604 GMT-6
Can I do this without javascript? I know for a fact that a lot of our
customers do not have JS enabled. I dont.
Wade
Mike Brum wrote:
You can easily do that with JavaScript.
if (document.location.href != "index.html"){
document.location.href = "index.html";
}
My syntax might be screwy (haven't done JavaScript in a while) but you get
the idea.
-Mike
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 6:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirect to Home Page
03312003 1549 GMT-6
I saw this little script somewhere and now I cannot find it.
Im working on this site. If you happen to bounce into the site from
anywhere but the home page, you are automatically redirected back to the
home page. Can someone help me with this?
Wade
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Try - header("Location: whatever.html"); Be aware though that nothing can
come before this in your file. No output of any kind.
----- Original Message -----
From: "Wade" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 31, 2003 6:51 PM
Subject: [PHP-WIN] Redirect to Home Page
> 03312003 1549 GMT-6
>
> I saw this little script somewhere and now I cannot find it.
>
> Im working on this site. If you happen to bounce into the site from
> anywhere but the home page, you are automatically redirected back to the
> home page. Can someone help me with this?
>
> Wade
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---