php-windows Digest 5 Feb 2002 06:17:21 -0000 Issue 986
Topics (messages 11834 through 11843):
Re: wildcards
11834 by: Nicole Amashta
Re: ISAPI/NSAPI FastCGI implementations available
11835 by: Shane Caraveo
Re: Why parse error?
11836 by: Nicole Amashta
11838 by: Nicole Amashta
Re: Re:[PHP-WIN] and now?
11837 by: Bram Somers
THANK YOU!
11839 by: Travis Wyatt
Re: Can't pass variables to PHP scripts?! Please help.
11840 by: Robin Bolton
11842 by: Ross Fleming
query_session fault in PHP4.0.3pl1?
11841 by: Neil Harrison
Re: installing and running php
11843 by: Peter Run
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 ---
you could use a loop and do something like
1. read a directory getting all the files that have that name.
2. loop through and delete off each file that has any given extension or
selected extensions, or all with that file name ... example:
=================================
if ( $dir = opendir($path) )
{
while ($file = readdir($dir))
{
if ( !eregi( "^thefilename", $file ) ) continue; ##use regex to
check for files with the specified "$filename"; if file not w/ this name,
skip it
if ( is_file( $file ) && $file != "." && $file != ".." && $file !=
"" )
unlink( $file ); ## this will delete off the file
}
}
}
closedir($dir);
=================================
*You should look into regular expressions to help you parse out bits from a
string ( If you aren't already familiar with regex's ).
Good luck!
Nicole Amashta
www.aeontrek.com
======================
"Symeon Charalabides" <[EMAIL PROTECTED]> wrote in message
3C4B0279.16592.F5B4B70@localhost">news:3C4B0279.16592.F5B4B70@localhost...
> I must be missing something here...
> I've got these 3 lines of code:
>
> if (file_exists('dir/'.$filename.'.gif'))
> unlink('dir/'.$filename.'.gif');
> if (file_exists('dir/'.$filename.'.jpg'))
> unlink('dir/'.$filename.'.jpg');
> if (file_exists('dir/'.$filename.'.png'))
> unlink('dir/'.$filename.'.png');
>
> ...and I'm sure they can be turned into one using some kind of wildcard,
only I
> can't figure out how. In fact, I don't mind erasing files of a certain
filename
> with ANY extension at all. I just know, in this case, that it can only be
one of
> those three.
> Any advice, people?
> Symeon Charalabides (cosmopolitan trainee)
> ------------------------------------------
> http://www.webmate.gr
>
--- End Message ---
--- Begin Message ---
Yes, you can get it at www.caraveo.com/fastcgi/phpfcgi.zip
This is built on 4.1.1 sources, and is only the phpfcgi.exe stub, you need
binaries for the rest of php available from php.net.
Shane
----- Original Message -----
From: "Glenn Pickett" <[EMAIL PROTECTED]>
To: "Shane Caraveo" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 8:26 AM
Subject: Re: ISAPI/NSAPI FastCGI implementations available
> Shane,
>
> I would like to try your implementation of FastCGI for PHP. I have
> downloaded your files, but do not have phpfcgi.exe. Can you furnish that
> file or tell me where to find it?
>
> Glenn Pickett
>
> ----- Original Message -----
> From: "Shane Caraveo" <[EMAIL PROTECTED]>
> Newsgroups: php.windows
> To: <[EMAIL PROTECTED]>
> Cc: "php-dev mailinglist" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 30, 2002 11:21
> Subject: ISAPI/NSAPI FastCGI implementations available
>
>
> > Hello everyone,
> > Over the past few months I've slowly worked on implementing ISAPI and
> NSAPI
> > modules for FastCGI. I've got everything done and working now in
probably
> > what I would call a late alpha or early beta release, though I haven't
> > versioned it at this time.
> >
> > I wrote these modules to provide a super stable way to run PHP on
Windows,
> > without having to resort to CGI. For those who don't know much about
> > FastCGI...using the FastCGI module for PHP, there are no threading
issues
> > since any one executable will only handle one request at a time, but you
> > gain the performance increase of having persistent executables in
memory.
> > This allows for persistent database connections, etc. Since PHP is also
> run
> > out-of-process, there is no way PHP can crash a web server (unless there
> is
> > a bug in my modules :). In my own tests using MS Web Stress
Application,
> I
> > got performance improvements ranging from 4x to 8x the speed of CGI.
The
> > downside to FastCGI is that it will require more memory than a
> multithreaded
> > sapi module.
> >
> > Ultimately, I don't think FastCGI can achieve the same performance as
and
> > built in web server module (ISAPI, etc.), but it is a good alternative,
> > especially if you use modules that crash PHP under ISAPI, and is much
more
> > suited to production systems than CGI.
> >
> > While this should be perfectly usable with something other than PHP, I
> have
> > not tested anything but PHP with it.
> >
> > You will need phpfcgi.exe also, which I am not sure if that is
distributed
> > in the binary distributions on php.net. If not, I'll make one available
> > this weekend (if someone doesn't beat me to it).
> >
> > I'll probably be combining this source code with the fastcgi libraries
at
> > fastcgi.com in the next month or so. There is still work to be done on
> this
> > implementation, some stuff is not yet supported (such as
authentication),
> > and the process manager is a bit kludgy but works. A port to unix will
> > hopefully happen eventualy. I also implemented a small version of the
> SAPI
> > layer so that server modules can be added easily.
> >
> > You can download at:
> > binaries: www.caraveo.com/fastcgi/fastcgi.zip
> > source: www.caraveo.com/fastcgi/fastcgi.src.zip
> >
> > Regards,
> > Shane Caraveo
> >
> >
> >
>
--- End Message ---
--- Begin Message ---
You have to remember this is PHP and not Perl. You do not need to use the
ampersand in front of arrays. You always use the $ for variables, including
arrays and hashes.
Replace that & with a $, and you should be fine.
Good luck ! :)
Nicole Amashta
www.aeontrek.com
"Andrew Ziem" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I am trying to retreive stored data, and I can't figure out why I
> receive this PHP error--even after reading PHP documentation and looking
> at examples--
>
> "Parse error: parse error in c:\vol\php\e.php on line 10"
>
> The following is my simplified code:
>
> <?php
>
> mysql_connect("localhost", "root");
>
> mysql_select_db("volunteers");
>
> $result = mysql_query("SELECT * FROM names WHERE id=$id");
>
> &line = mysql_fetch_row(&result);
>
> $first = $line["first"];
> $middle = $line["middle"];
> $last = $line["last"];
>
> $street = $line["street"];
> $city = $line["city"];
> $zip = $line["zip"];
>
> ?>
>
>
>
> --
> Andy Ziem
> Is Jesus Your Answer?
> http://www.ChristianAnswers.net/gospel
>
>
>
>
>
--- End Message ---
--- Begin Message ---
Pardon my error ... I didn't mean that you use & for arrays ... doeth! But
it reminded me of Perl, nonetheless. @ for arrays, % for hashes, & to call
functions ... anyway .... moving along.
Switch out the & for $ and should be fine.
=]
nicole 'doeth!' amashta
www.aeontrek.com
"Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You have to remember this is PHP and not Perl. You do not need to use the
> ampersand in front of arrays. You always use the $ for variables,
including
> arrays and hashes.
>
> Replace that & with a $, and you should be fine.
>
> Good luck ! :)
>
> Nicole Amashta
> www.aeontrek.com
>
>
> "Andrew Ziem" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > I am trying to retreive stored data, and I can't figure out why I
> > receive this PHP error--even after reading PHP documentation and looking
> > at examples--
> >
> > "Parse error: parse error in c:\vol\php\e.php on line 10"
> >
> > The following is my simplified code:
> >
> > <?php
> >
> > mysql_connect("localhost", "root");
> >
> > mysql_select_db("volunteers");
> >
> > $result = mysql_query("SELECT * FROM names WHERE id=$id");
> >
> > &line = mysql_fetch_row(&result);
> >
> > $first = $line["first"];
> > $middle = $line["middle"];
> > $last = $line["last"];
> >
> > $street = $line["street"];
> > $city = $line["city"];
> > $zip = $line["zip"];
> >
> > ?>
> >
> >
> >
> > --
> > Andy Ziem
> > Is Jesus Your Answer?
> > http://www.ChristianAnswers.net/gospel
> >
> >
> >
> >
> >
>
>
--- End Message ---
--- Begin Message ---
I have read your message, and I replied to you!
Makes one wonder if you do read your messages???
Check your mails first! Before you say anything, thanks
BS
----- Original Message -----
From: "Bram Somers" <[EMAIL PROTECTED]>
To: "Michel Laine" <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 6:43 PM
Subject: Re: [PHP-WIN] Re:[PHP-WIN] need help with configuration
> hi,
> I'm using windows xp
> with php 4.1.1 from the php.net site
> I do not have a webserver, do you know which one I should use?
> And yes I followed the installation instructions in the install.txt folder
>
> BS
> ps thanks that you wanna help me!
> ----- Original Message -----
> From: "Michel Laine" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 31, 2002 6:30 PM
> Subject: [PHP-WIN] Re:[PHP-WIN] need help with configuration
>
>
> > First of all i have some questions you must answer so we know how to
help
> you:
> >
> > Which operating system do you use?
> > Which version of PHP are you using?
> > Do you use any special preconfigured installer kit or just the plain PHP
> from PHP.net?
> > Which webserver do you use? To be able to run PHP you need a webserver
> too.
> > Have you followed the PHP installation instructions (install.txt which
is
> located in the PHP installation folder -
> > usually c:\php) for your webserver?
--- End Message ---
--- Begin Message ---
Yeah, problem solved. Heh, I haven't coded in PHP for some time, so I was not used to
global variables being disabled. Now I understand whats going on. Thanks for the
help.
--- End Message ---
--- Begin Message ---
Well actually the credit for underlining links goes much further back, to
Tim Berners-Lee - at least as far as WWW goes, and even further if you look
at the predecessor(s) to HTML (i.e. SGML).
One of the reasons for this is to give visual clues to those that are less
technically (or just mentally) skilled. Having done IT work full-time for
the last two years I can attest to the requirement of such visual clues.
While someone who has been using the internet for a fair amount of time
doesn't require those clues. We have to remember that there are a LOT of
complete morons out there who couldn't find their own arses with two hands
and a mirror.
Admittedly the whole thing with underscores and underlines overlapping is a
pain in the ass, but then again so are newbie documents with titles such as
"Costing Report for the 26th of January 1998 for Joseph McPherson .htm"
(I've seen this kind of thing many times).
Sorry if this sounds like a rant, it's Monday and I'd rather be coding, but
I'm stuck with IT. However, I don't make any apologies if I've offended
anyone <grin>
-----Original Message-----
From: Ross Fleming [mailto:[EMAIL PROTECTED]]
Sent: 4-Feb-02 03:00
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Can't pass variables to PHP scripts?! Please
help.
Indeed you are right, my apologies.
My thanks go to Mr Gates and his pointless ambiguous underlining of URLs. :)
Ross
-----Original Message-----
From: Mike Maltese [mailto:[EMAIL PROTECTED]]
Sent: 04 February 2002 09:12
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Can't pass variables to PHP scripts?! Please
help.
The space is an underscore.
----- Original Message -----
From: "Ross Fleming" <[EMAIL PROTECTED]>
To: "Travis Wyatt" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 1:01 AM
Subject: RE: [PHP-WIN] Can't pass variables to PHP scripts?! Please help.
> Also, just another point:
> http://www.socopc.com/test.php?testvar=hello_world will not work (at least
> it shouldn't), you can't have a space in a URL. It should be URL encoded
to
> :
> http://www.socopc.com/test.php?testvar=hello%20world
>
> Ross
>
> -----Original Message-----
> From: Travis Wyatt [mailto:[EMAIL PROTECTED]]
> Sent: 04 February 2002 06:51
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Can't pass variables to PHP scripts?! Please help.
>
>
> Here is my situation...I can't seem to get variables to pass from a
> GET or POST method to a PHP script. To see for yourself go to:
> http://www.socopc.com/test.php?testvar=hello_world
>
> The source of "test.php" is...
> <html>
> <? for ($x=0;$x<5;$x++) { echo $x; } ?>
> <br><? print "testvar=\"".$testvar."\""; ?>
> <br><br><br><? phpinfo(); ?>
> </html>
>
>
> And as you will see, I get the error.
> Warning: Undefined variable: testvar in
> c:\root\domains\socopc.com\test.php on line 3
> testvar=""
>
> Indicating that the variable is empty and has not been passed?!
> I'm running Win2k Server w/ Apache and PHP 4.1.1.
>
> If someone could look at that page (included are most of my
> settings). And help me fix my PHP configuration? Thanks!
> ~ Travis
>
>
>
> --
> 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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Wow! Someone needs caffeine!! :)
Having just recently done a huuuge essay on TBL, I'd just like to say gah!
:)
-----Original Message-----
From: Robin Bolton [mailto:[EMAIL PROTECTED]]
Sent: 04 February 2002 20:21
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Can't pass variables to PHP scripts?! Please
help.
Well actually the credit for underlining links goes much further back, to
Tim Berners-Lee - at least as far as WWW goes, and even further if you look
at the predecessor(s) to HTML (i.e. SGML).
One of the reasons for this is to give visual clues to those that are less
technically (or just mentally) skilled. Having done IT work full-time for
the last two years I can attest to the requirement of such visual clues.
While someone who has been using the internet for a fair amount of time
doesn't require those clues. We have to remember that there are a LOT of
complete morons out there who couldn't find their own arses with two hands
and a mirror.
Admittedly the whole thing with underscores and underlines overlapping is a
pain in the ass, but then again so are newbie documents with titles such as
"Costing Report for the 26th of January 1998 for Joseph McPherson .htm"
(I've seen this kind of thing many times).
Sorry if this sounds like a rant, it's Monday and I'd rather be coding, but
I'm stuck with IT. However, I don't make any apologies if I've offended
anyone <grin>
-----Original Message-----
From: Ross Fleming [mailto:[EMAIL PROTECTED]]
Sent: 4-Feb-02 03:00
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Can't pass variables to PHP scripts?! Please
help.
Indeed you are right, my apologies.
My thanks go to Mr Gates and his pointless ambiguous underlining of URLs. :)
Ross
-----Original Message-----
From: Mike Maltese [mailto:[EMAIL PROTECTED]]
Sent: 04 February 2002 09:12
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Can't pass variables to PHP scripts?! Please
help.
The space is an underscore.
----- Original Message -----
From: "Ross Fleming" <[EMAIL PROTECTED]>
To: "Travis Wyatt" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 1:01 AM
Subject: RE: [PHP-WIN] Can't pass variables to PHP scripts?! Please help.
> Also, just another point:
> http://www.socopc.com/test.php?testvar=hello_world will not work (at least
> it shouldn't), you can't have a space in a URL. It should be URL encoded
to
> :
> http://www.socopc.com/test.php?testvar=hello%20world
>
> Ross
>
> -----Original Message-----
> From: Travis Wyatt [mailto:[EMAIL PROTECTED]]
> Sent: 04 February 2002 06:51
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Can't pass variables to PHP scripts?! Please help.
>
>
> Here is my situation...I can't seem to get variables to pass from a
> GET or POST method to a PHP script. To see for yourself go to:
> http://www.socopc.com/test.php?testvar=hello_world
>
> The source of "test.php" is...
> <html>
> <? for ($x=0;$x<5;$x++) { echo $x; } ?>
> <br><? print "testvar=\"".$testvar."\""; ?>
> <br><br><br><? phpinfo(); ?>
> </html>
>
>
> And as you will see, I get the error.
> Warning: Undefined variable: testvar in
> c:\root\domains\socopc.com\test.php on line 3
> testvar=""
>
> Indicating that the variable is empty and has not been passed?!
> I'm running Win2k Server w/ Apache and PHP 4.1.1.
>
> If someone could look at that page (included are most of my
> settings). And help me fix my PHP configuration? Thanks!
> ~ Travis
>
>
>
> --
> 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
--
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 ---
A big HELLO to php-windows,
I'm experiencing a problem with PHP4.0.3.pl1 and the query_string function.
This only happens using Microsoft IE 4.01.
I have a link which has several query parameters, however this is not being
passed/received correctly.
Example:
Link = http://xxx/xxx.php?db=yha-men-2001§ion=Men&season=2001-2002
in xxx.php, getenv("QUERY_STRING") returns
db=yha-men-2001ion=Men&season=2001-2002
Notice that "§" is missing from the middle of the string.
Don't know if this happens all the time or is intermittent - I don't have IE4
and don't know if any visitors are OK as I'm only reporting errors (details
e-mailed to me).
Anybody got any ideas? Not found anything in the bug list.
--
Cheers,
Neil
--- End Message ---
--- Begin Message ---
Brian,
Go and get PHPTriad. That setups up Apache/PHP/MySQL for you. It's very
starightforward and you don't have to mess around with any settings at all.
Hope this help.
-Peter
"Brian" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello everyone,
>
> A small question:
> I have installed Apache (that works)
> I have installed php 4 and it gives the text of the
scriptfile(phpinfo.php)
> on the screen of IE
> I have changed the conf. in the apache conf map.
> I have changed the php.ini in the win map
> But made a misstake somewhere.
>
>
--- End Message ---