php-windows Digest 26 Jun 2002 08:06:47 -0000 Issue 1211
Topics (messages 14397 through 14417):
Sendmail not working need help
14397 by: Patanjali Telang
how to install pear package in Windows
14398 by: Yang
14399 by: Martin Mørup
14400 by: Yang
14401 by: Martin Mørup
case-sensitive
14402 by: Chris Schmidt
14405 by: Stuart Dallas
14407 by: Chris Schmidt
14408 by: Peter
isset
14403 by: Jan - CWIZO
14406 by: Peter
14409 by: Ross Fleming
HTTP Upload of large files
14404 by: Daniel Berwig
14410 by: Dash McElroy
Re: Using Bzip2 to create an archive... SECOND REQUEST
14411 by: Mikey
14412 by: Dash McElroy
php Expanding Menu System Wanted
14413 by: James Mansfield
14414 by: Matthew Hillebrand
using gd library
14415 by: Tracker 1
14416 by: Stuart Dallas
Re: Get/Post and Security Issues [UPDATE]
14417 by: Brian Graham
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 ---
Hello All,
I am new to sendmail. I am using php+apcahe+linux
environment. When I use sendmail() to send my email
the email is not sent. It stays in the queue with a
timeout message.
What all precaution should I take just to make sure
that my program works.
Thanks in advance.
Sincerely,
Patanjali Telang
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--- End Message ---
--- Begin Message ---
Hi;
Does any body know hot to install a pear package in Windows environment?
Thanks,
Yang
--- End Message ---
--- Begin Message ---
I have just installed it on my machine and it seems to be workin fine.
What i did was:
- Download the pear-0.90.tgz file and extract it.
- Run the pear.bat in scripts
- Copy the pear dirrectory from c:\php to the web root
- Change the paths in the needed scripts ex. from require_once
"pear.php" to require_once "pear/pear.php"
I'm not sure yet if everything works this way.
Does anyone know a better way to do this? Did i miss something?
Martin Mørup
Yang wrote:
>Hi;
>
>Does any body know hot to install a pear package in Windows environment?
>
>Thanks,
>
>
>Yang
>
>
>
--- End Message ---
--- Begin Message ---
Hi Martin;
Thanks for your information. I installed PHP 4.2.1 on my Win2K machine. It
seems pear is there. What I need is install a pear package Imagick. There
seems no information about how to install a pear package in Windows. I
flowed the step on the web, but it doesn't work. Did have some experience of
installing a pear package?
Regards,
Yang
"Martin Mørup" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have just installed it on my machine and it seems to be workin fine.
> What i did was:
>
> - Download the pear-0.90.tgz file and extract it.
>
> - Run the pear.bat in scripts
>
> - Copy the pear dirrectory from c:\php to the web root
>
> - Change the paths in the needed scripts ex. from require_once
> "pear.php" to require_once "pear/pear.php"
>
> I'm not sure yet if everything works this way.
> Does anyone know a better way to do this? Did i miss something?
>
> Martin Mørup
>
>
> Yang wrote:
>
> >Hi;
> >
> >Does any body know hot to install a pear package in Windows environment?
> >
> >Thanks,
> >
> >
> >Yang
> >
> >
> >
>
>
>
>
--- End Message ---
--- Begin Message ---
Hi Yang
Yes i did. I installed the Auth package.
To do this i just unpacked the content of the package to
<pear_installdir>/auth
I hope you get i up and runnig!
Martin Mørup
Yang wrote:
>Hi Martin;
>
>Thanks for your information. I installed PHP 4.2.1 on my Win2K machine. It
>seems pear is there. What I need is install a pear package Imagick. There
>seems no information about how to install a pear package in Windows. I
>flowed the step on the web, but it doesn't work. Did have some experience of
>installing a pear package?
>
>Regards,
>
>Yang
>
>"Martin Mørup" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>>I have just installed it on my machine and it seems to be workin fine.
>>What i did was:
>>
>>- Download the pear-0.90.tgz file and extract it.
>>
>>- Run the pear.bat in scripts
>>
>>- Copy the pear dirrectory from c:\php to the web root
>>
>>- Change the paths in the needed scripts ex. from require_once
>>"pear.php" to require_once "pear/pear.php"
>>
>>I'm not sure yet if everything works this way.
>>Does anyone know a better way to do this? Did i miss something?
>>
>>Martin Mørup
>>
>>
>>Yang wrote:
>>
>>>Hi;
>>>
>>>Does any body know hot to install a pear package in Windows environment?
>>>
>>>Thanks,
>>>
>>>
>>>Yang
>>>
>>>
>>>
>>
>>
>>
>
>
>
--- End Message ---
--- Begin Message ---
Why on windows is PHP not case-sensitive but on Unix it is? And can this be
configured
--- End Message ---
--- Begin Message ---
On Tuesday, June 25, 2002 at 9:27:42 PM, "Chris Schmidt" wrote:
> Why on windows is PHP not case-sensitive but on Unix it is? And can this be
> configured
If you mean filenames, this is a choice the filesystem designers made and there
is no way to change it. If this is not what you mean, please be more specific.
--
Stuart
--- End Message ---
--- Begin Message ---
Sorry.
I have an Windows 2000 box running PHP as CGI
I use this
$includePath ="../";
include($includepath."config.php");
Works on my Windows 2000
not on unix.
I change $includePath to $includepath and it works on both.
"Stuart Dallas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Tuesday, June 25, 2002 at 9:27:42 PM, "Chris Schmidt" wrote:
>
> > Why on windows is PHP not case-sensitive but on Unix it is? And can
this be
> > configured
>
> If you mean filenames, this is a choice the filesystem designers made and
there
> is no way to change it. If this is not what you mean, please be more
specific.
>
> --
> Stuart
>
--- End Message ---
--- Begin Message ---
PHP variable names are case sensitive aren't they?
It might just be that config.php can be found by Win2000 without the
$includepath-as if you were typing include("config.php");
"Chris Schmidt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Sorry.
>
> I have an Windows 2000 box running PHP as CGI
>
> I use this
> $includePath ="../";
> include($includepath."config.php");
>
> Works on my Windows 2000
>
> not on unix.
>
> I change $includePath to $includepath and it works on both.
>
> "Stuart Dallas" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Tuesday, June 25, 2002 at 9:27:42 PM, "Chris Schmidt" wrote:
> >
> > > Why on windows is PHP not case-sensitive but on Unix it is? And can
> this be
> > > configured
> >
> > If you mean filenames, this is a choice the filesystem designers made
and
> there
> > is no way to change it. If this is not what you mean, please be more
> specific.
> >
> > --
> > Stuart
> >
>
>
--- End Message ---
--- Begin Message ---
Hi
I am a building a guestbook as a course of my learning of PHP.
I have a page, on wich theree are some input boxes, on th enext page the
data typet in those boxes is putet in to a database.
I would like to check if there are nay empty input boxes, and if there are
the user would get the sam form back and on the top it would say : Please
fill the empty text boxes, and in the boxes would be the data that he has
puet in.
And I dount know how to include that in to this code :
<?
include ("../head.php");
MYSQL_CONNECT("localhost", "user", "password" ) or
die(MYSQL_ERROR() . "napaka1");
MYSQL_SELECT_DB("knjiga") or
die(MYSQL_ERROR() . "napaka2");
$ime = strip_tags($_POST[ime]);
$naslov = strip_tags($_POST[naslov]);
$email = strip_tags($_POST[email]);
$url = strip_tags($_POST[url]);
$kom = strip_tags($_POST[kom]);
if ($_POST["submit"])
{
$query = "insert into knjiga
(ime, naslov, email, url, komentarji) values
('$ime','$naslov','$email','$url','$kom')"
;
MYSQL_QUERY($query) or
die(MYSQL_ERROR() . "napaka3");
?>
<h2>Thanx</h2>
<h2><a href="poglej.php">Poglej knjigo gostov!</a>
<?
}
else
{
include("index.php");
}
?>
Help would be weary helpfull !
PS : Sorry for my spelling, English is not my native langugae !!
LP
JaN
www.3delavnica.com
--- End Message ---
--- Begin Message ---
You can do
if(!isset($_POST['email'])) {
go_back();
} else {
print "Thanx";
}
or
if($_POST['email'] == "") {
go_back();
} else {
print "Thanx";
}
"Jan - Cwizo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
>
> I am a building a guestbook as a course of my learning of PHP.
>
> I have a page, on wich theree are some input boxes, on th enext page the
> data typet in those boxes is putet in to a database.
>
> I would like to check if there are nay empty input boxes, and if there are
> the user would get the sam form back and on the top it would say : Please
> fill the empty text boxes, and in the boxes would be the data that he has
> puet in.
>
> And I dount know how to include that in to this code :
>
>
> <?
>
> include ("../head.php");
> MYSQL_CONNECT("localhost", "user", "password" ) or
> die(MYSQL_ERROR() . "napaka1");
>
> MYSQL_SELECT_DB("knjiga") or
> die(MYSQL_ERROR() . "napaka2");
>
>
> $ime = strip_tags($_POST[ime]);
> $naslov = strip_tags($_POST[naslov]);
> $email = strip_tags($_POST[email]);
> $url = strip_tags($_POST[url]);
> $kom = strip_tags($_POST[kom]);
>
>
> if ($_POST["submit"])
> {
>
> $query = "insert into knjiga
> (ime, naslov, email, url, komentarji) values
> ('$ime','$naslov','$email','$url','$kom')"
> ;
>
> MYSQL_QUERY($query) or
> die(MYSQL_ERROR() . "napaka3");
>
>
>
> ?>
>
> <h2>Thanx</h2>
> <h2><a href="poglej.php">Poglej knjigo gostov!</a>
>
> <?
> }
> else
> {
> include("index.php");
> }
> ?>
>
>
> Help would be weary helpfull !
>
> PS : Sorry for my spelling, English is not my native langugae !!
>
>
>
> LP
> JaN
> www.3delavnica.com
>
--- End Message ---
--- Begin Message ---
One of the first things I ever did in PHP was something similar. Feel free
to play about with these. They can probably be merged into one php file,
but I never bothered.
Please be kind if the code is laughable, I just know it works. :D
Ross
> -----Original Message-----
> From: Jan - CWIZO [mailto:[EMAIL PROTECTED]]
> Sent: 25 June 2002 21:49
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] isset
>
>
> Hi
>
> I am a building a guestbook as a course of my learning of PHP.
>
> I have a page, on wich theree are some input boxes, on th enext page the
> data typet in those boxes is putet in to a database.
>
> I would like to check if there are nay empty input boxes, and if
> there are
> the user would get the sam form back and on the top it would say : Please
> fill the empty text boxes, and in the boxes would be the data that he has
> puet in.
>
> And I dount know how to include that in to this code :
>
>
> <?
>
> include ("../head.php");
> MYSQL_CONNECT("localhost", "user", "password" ) or
> die(MYSQL_ERROR() . "napaka1");
>
> MYSQL_SELECT_DB("knjiga") or
> die(MYSQL_ERROR() . "napaka2");
>
>
> $ime = strip_tags($_POST[ime]);
> $naslov = strip_tags($_POST[naslov]);
> $email = strip_tags($_POST[email]);
> $url = strip_tags($_POST[url]);
> $kom = strip_tags($_POST[kom]);
>
>
> if ($_POST["submit"])
> {
>
> $query = "insert into knjiga
> (ime, naslov, email, url, komentarji) values
> ('$ime','$naslov','$email','$url','$kom')"
> ;
>
> MYSQL_QUERY($query) or
> die(MYSQL_ERROR() . "napaka3");
>
>
>
> ?>
>
> <h2>Thanx</h2>
> <h2><a href="poglej.php">Poglej knjigo gostov!</a>
>
> <?
> }
> else
> {
> include("index.php");
> }
> ?>
>
>
> Help would be weary helpfull !
>
> PS : Sorry for my spelling, English is not my native langugae !!
>
>
>
> LP
> JaN
> www.3delavnica.com
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
I'm trying to make a page for file uploads. For small files, everything
goes ok, but doesn't work when I try to upload large files.
The limit size for uploading is suposed to be 100Mb. I've set up my
php.ini with this config:
post_max_size = 100M
memory_limit = 128M
upload_max_filesize = 100M
When I access through http://localhost/upload.htm, and post a large
file, Ok. But if I access the page remotely, or even locally, but using
my LAN IP Address (http://192.168.0.15/upload.htm) and post a large
file, either browser stays as is (hangs) or, most commonly, the browser
shows a "server not found"/"page cannot be displayed" page, instantly.
But, as I sad, this problem occurs only when posting large files.
Additional config:
Browsers: Internet Explorer 6 and Netscape 7 (netscape pops a "document
contained no data" message)
Server API: CGI
PHP Version: 4.2.1
Server Software: Microsoft-IIS/5.0
Here goes the scripts:
// ----- upload.htm ------ //
<form action="upload.php" method="post" enctype="multipart/form-data"
name="form1">
<p> <input type="hidden" name="MAX_FILE_SIZE" value="102400000">
<input name="file_name" type="file" id="file_name">
</p>
<p>
<input type="submit" name="Submit" value="Send">
</p>
</form>
// ----- upload.php ------ //
<?php
$temp_file_name = $HTTP_POST_FILES['file_name']['tmp_name'];
$original_file_name = $HTTP_POST_FILES['file_name']['name'];
move_uploaded_file($temp_file_name, $original_file_name);
?>
--- End Message ---
--- Begin Message ---
Perhaps the time limit of PHP is not long enough for your LAN link to upload
100 meg files? You can use max_execution_time = <blah> in your php.ini, as
well as set_time_limit(<seconds>).
It would be safer to set the set_time_limit(x) on that specific page.
Of course, it may not be related to this at all... good luck!
-Dash
-----Original Message-----
From: Daniel Berwig [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 2:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] HTTP Upload of large files
I'm trying to make a page for file uploads. For small files, everything
goes ok, but doesn't work when I try to upload large files.
The limit size for uploading is suposed to be 100Mb. I've set up my
php.ini with this config:
post_max_size = 100M
memory_limit = 128M
upload_max_filesize = 100M
When I access through http://localhost/upload.htm, and post a large
file, Ok. But if I access the page remotely, or even locally, but using
my LAN IP Address (http://192.168.0.15/upload.htm) and post a large
file, either browser stays as is (hangs) or, most commonly, the browser
shows a "server not found"/"page cannot be displayed" page, instantly.
But, as I sad, this problem occurs only when posting large files.
Additional config:
Browsers: Internet Explorer 6 and Netscape 7 (netscape pops a "document
contained no data" message)
Server API: CGI
PHP Version: 4.2.1
Server Software: Microsoft-IIS/5.0
Here goes the scripts:
// ----- upload.htm ------ //
<form action="upload.php" method="post" enctype="multipart/form-data"
name="form1">
<p> <input type="hidden" name="MAX_FILE_SIZE" value="102400000">
<input name="file_name" type="file" id="file_name">
</p>
<p>
<input type="submit" name="Submit" value="Send">
</p>
</form>
// ----- upload.php ------ //
<?php
$temp_file_name = $HTTP_POST_FILES['file_name']['tmp_name'];
$original_file_name = $HTTP_POST_FILES['file_name']['name'];
move_uploaded_file($temp_file_name, $original_file_name);
?>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Mikey [mailto:[EMAIL PROTECTED]]
> Sent: 24 June 2002 18:42
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Using Bzip2 to create an archive...
>
>
> Hi there!
>
> I was wondering if anyone here had used the bzip functions to create an
> archive? The documentation shows only how to compress strings, yet I want
> to create an archive similar to the HTML documentation available from
> php.net
>
> TIA,
>
> mikey
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
http://www.php.net/manual/en/ref.bzip2.php
In particular, look at bzopen() and bzclose(), as well as bzread().
-Dash
-----Original Message-----
From: Mikey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 3:23 PM
To: [EMAIL PROTECTED]
Subject: FW: [PHP-WIN] Using Bzip2 to create an archive... SECOND REQUEST
> -----Original Message-----
> From: Mikey [mailto:[EMAIL PROTECTED]]
> Sent: 24 June 2002 18:42
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Using Bzip2 to create an archive...
>
>
> Hi there!
>
> I was wondering if anyone here had used the bzip functions to create an
> archive? The documentation shows only how to compress strings, yet I want
> to create an archive similar to the HTML documentation available from
> php.net
>
> TIA,
>
> mikey
>
>
> --
> 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 ---
Hi there
I want to create a very basic menu system in php that I can include on all
pages of my site and by changing one external file be able to change the
navigation on all pages. The navigation will only have two levels. There
should be an easy way for the navigation to know what page it is on and be
expanded to the relevant section (ie every page has a unique name in it that
the menu retrieves??). The navigation will use images and I want it to be
able to highlight (image swap) the current page in the navigation. Every
click will take a user somwhere...ie in the nav below if I click nav item
two it will take me to that page and the sub nav of this section will be
open.
nav item one
subnav1
*subnav2*
subnav3
nav item two
nav item three
I do not need or want to use frames if you need to know that.
I am sure there are probably lots of these menu systems out there but as I
do not reall y know where to look your input would be very
grateful....thanks in advance...James
--- End Message ---
--- Begin Message ---
Check out http://www.brainjar.com. Another DHTML menu I have used is
http://www.milonic.com/menu/. DHTML doesn't have much to do with PHP or
server-side scripting, but you can dynamically generate the javascript
with PHP so that it does what you want.
Matt
|-----Original Message-----
|From: James Mansfield [mailto:[EMAIL PROTECTED]]
|Sent: Tuesday, June 25, 2002 3:53 PM
|To: [EMAIL PROTECTED]
|Subject: [PHP-WIN] php Expanding Menu System Wanted
|
|
|Hi there
|
|I want to create a very basic menu system in php that I can
|include on all pages of my site and by changing one external
|file be able to change the navigation on all pages. The
|navigation will only have two levels. There should be an easy
|way for the navigation to know what page it is on and be
|expanded to the relevant section (ie every page has a unique
|name in it that the menu retrieves??). The navigation will use
|images and I want it to be able to highlight (image swap) the
|current page in the navigation. Every click will take a user
|somwhere...ie in the nav below if I click nav item two it will
|take me to that page and the sub nav of this section will be open.
|
|nav item one
| subnav1
| *subnav2*
| subnav3
|nav item two
|nav item three
|
|I do not need or want to use frames if you need to know that.
|
|I am sure there are probably lots of these menu systems out
|there but as I do not reall y know where to look your input
|would be very grateful....thanks in advance...James
|
|
|
|--
|PHP Windows Mailing List (http://www.php.net/)
|To unsubscribe, visit: http://www.php.net/unsub.php
|
|
--- End Message ---
--- Begin Message ---
is a line in the php.ini file with...
extension=php_gd2.dll
enough to use the "Image" objects and methods in windows? or is there
some other trick? I would like to be able to create images/thumbnails
on the fly.
--
=======================================================================
Michael J. Ryan - tracker1[*at*]theroughnecks.com
Roughneck BBS: http://www.theroughnecks.net telnet://theroughnecks.net
=======================================================================
Y!: aztracker1 - aim: azTracker1 - icq: 4935386 - msn: see email
One program for aim/icq/yahoo/msn/irc - http://www.trillian.cc/
--- End Message ---
--- Begin Message ---
On Wednesday, June 26, 2002 at 12:15:55 AM, "Tracker 1" wrote:
> is a line in the php.ini file with...
> extension=php_gd2.dll
> enough to use the "Image" objects and methods in windows? or is there
> some other trick? I would like to be able to create images/thumbnails
> on the fly.
You need the file gds32.dll in your path for it to work (you can find it in the
dlls folder in your PHP folder. That should be all you need.
--
Stuart
--- End Message ---
--- Begin Message ---
I've solved the problem.
url_rewriter.tags = ""
Once I uncommented this and emptied the string out, everything worked fine.
"Brian Graham" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Apache 1.3.26
> PHP 4.2.1
>
> When I enter username and password information onto a page, it uses Get
and
> puts the session ID along with the username and the password into the URL,
> despite my saying "method=post" in the form attributes.
>
> This seems like it would be a common problem, but my research isn't
bringing
> up anything even remotely about it.
>
> I've done very, very little tweaking to my php.ini and httpd.conf to give
> you an idea of what defaults are in place still. Here is the function
code:
>
> function user_login() {
> global $usern;
> global $userp;
> global $feedback;
> global $loginswitch;
> if (!isSet($usern) && !isSet($userp))
> return FALSE;
> if ($usern == '' or $userp == '') {
> $loginswitch = FALSE;
> $feedback = "Username and/or password is missing.";
> return FALSE;
> }
> $uname = strtolower($usern);
> $query = "SELECT user_name, user_pass, user_isconfirmed
> FROM user
> WHERE user_name = '$usern'
> AND user_pass = '$userp'";
> $results = mysql_query($query) or die(mysql_error());
> $row = mysql_fetch_row($results);
> if ($usern == $row[0] && $userp == $row[1]) {
> $_SESSION['loginswitch'] = TRUE;
> $_SESSION['username'] = $usern;
> $feedback = "You are now logged in.";
> return TRUE;
> }
> else {
> $_SESSION['loginswitch'] = FALSE;
> $feedback = "Username of password are incorrect.";
> return FALSE;
> }
> }
>
>
>
>
>
>
--- End Message ---