php-windows Digest 6 Mar 2002 17:34:43 -0000 Issue 1032

Topics (messages 12479 through 12490):

Re: Help me pleaase !!!!
        12479 by: alain samoun

How can I use & install IMP in windows???
        12480 by: hei

Re: mail() function EXTREMELY slow
        12481 by: DL Neil
        12487 by: James Fullerton

Re: File corruption during HTTP Upload
        12482 by: Stevens, Julian C
        12484 by: Ryan Marrs

MySQL auto_increment ??
        12483 by: Sviss Cobazor

mail() and no internet connection
        12485 by: Kenneth Brill
        12486 by: DL Neil

Re: Mail with php and w2k
        12488 by: J Wynia

fasttemplates parsing
        12489 by: Wolfgang Schneider
        12490 by: Nicole Amashta

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 ---
Athar:
I have the same problem apparently with my ISP server Linux+Apache after
'upgrading to 4.12'
Suddenly all my include statements don't work. This is what I find out so
far:
1) The  directory of my include statement seems to need the $DOCUMENT_ROOT
in order to work.
2) The $DOCUMENT_ROOT seems to change alternatively to:
        /nfs/www/WWW-data
and     /usr/local/lib/WWW-data
3) Note that the WWW-data should actually be :WWW_pages/usr/
4) My provisionally fix is to get and format correctly the document root as:
        $DOCUMENT_ROOT= substr($DOCUMENT_ROOT,0,-5)."_pages/my_file_path";
        and add that to the previous include directory as:
        include "$DOCUMENT_ROOT/includes/my_include_file.inc";
Now a question for you: Do you use the same php.ini with PHP4.12 as you had
with the previous version? This is important to me because I'm not sure that
the php.ini is the same as the previous one in my ISP (something I do not
control).
If your php.ini was the same then it seems that will point to a bug in php
4.12.
Please let me know.
Thanks.
A+
Alain

-----Original Message-----
From: Athar Hameed [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 8:44 PM
To: Collins, Robert; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Help me pleaase !!!!


But everything was working fine. What has gone wrong now.

----- Original Message -----
From: "Collins, Robert" <[EMAIL PROTECTED]>
To: "'Athar Hameed'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, March 06, 2002 2:29 AM
Subject: RE: [PHP-WIN] Help me pleaase !!!!


> it is possible you are doing multiple requires for the same file try
> require_once ("dbconnect.inc");
>
> Robert W. Collins II
> Webmaster
> New Orleans Regional Transit Authority
> Phone : (504) 248-3826
> Email : [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Athar Hameed [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 2:54 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Help me pleaase !!!!
>
>
> Greetings,
>
> Can anyone please help me. I am having this weird problem. I am using PHP
> 4.1.1 on windows as an apache module (sapi). Everything was working
> perfectly, until today. I dint even do anything and things stopped
working.
> I built this database application. I connect to the database using the
file
> dbconnect.inc. But when i use
>
> require ("dbconnect.inc");
>
> it doesnt work and i get this error message:
>
> Fatal error: Failed opening required '1' (include_path='') in
> c:\apache\htdocs\jokes\submit_joke.php on line 3
>
> I am not doing anything wrong, because the application was working
> absolutely fine until today. There are no typos and no other silly
mistakes.
>
> Take for example this file, index.php
>
> <?php
>
>  require ("dbconnect.inc") or die();
>
>  echo "<form method=\"post\" action=\"submit_joke.php\">\n";
>
> .
> .
> .
> ?>
>
> Here the require works fine. The values are read from the database and
> inserted into the form at proper places. But when form is submitted
> (submit_joke.php) I get the above mentioned error. Its happening in all my
> applications which were all working fine.
>
> submit_joke.php is as follows:
>
> <?php
>
>  require ("dbconnect.inc") or die("require failed!");
>
>  // or die ("require failed.");
>
>  $joke_date = date ("Y-m-d");
>
>  echo $joke_text . "<br>";
>  echo $joke_date . "<br>";
>  echo $joke_category_id . "<br>";
>
>  $query = "INSERT INTO new_jokes VALUES
> ('','$joke_text','$joke_date','$joke_category_id')";
>
>  $result = mysql_query ($query) or die ("mysql_query failed.");
>
> ?>
>
>
>
> --
> 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 ---
How can I use & install IMP in windows???


--- End Message ---
--- Begin Message ---
James,

> I personally found that messages were slow on my machine (going to an
> external mail server) and I discovered that if you can use the
built-in IIS
> (Windows) SMTP mail server you'll have no more problems.  The built-in
IIS
> SMTP server was easily 1000 times faster in my case.  Of course, if
you
> don't have it installed, you may have to install and configure it, but
it's
> very simple.  Start menu - settings - control panel - add/remove
programs -
> add windows components - Internet - default SMTP server - check the
box.
> (Basically)

What you say makes perfect sense, but my experience under NT (and as for
others) has been the exact opposite - that the IIS SMTP stub is more
trouble than it's worth. Obviously you're a better man than I, Gunga
Din!

Would you please share some more detail about your set up?
- anything notable about the h/w
- which vn of Windows and which IIS
- I assume you're web/PHP serving through IIS
- is the IIS on the same box as you are using as client/IE?

On the basis of your experience, I wonder if I should schedule some
'play time' on a Win2000/IIS/PHP box I've just put together (while I
still can/before it is moved into 'production')?

> Be sure you don't allow external access (preferably block all inbound
> connections at your firewall) or use an IP address restriction of
127.0.0.1
> to prevent relaying.

Imperative, not advice!

Please advise,
=dn

--- End Message ---
--- Begin Message ---
Hi DL,

The hardware is so "un-notable" it's not even funny.  I'm running a Gigabyte
6VMML motherboard (consumer PC!) with a Celeron 800/100, 512mb RAM, and
using the built-in 10/100 NIC.  It's got a Western Digital (or Seagate, I
can't remember) 18gb 7,200 RPM ATA-100 HDD.  This is basically your everyday
desktop computer!  It cost me something like $400, so it's not high-end by
any means.  But it works!  :)  My firewall allows port 25 outbound from this
box, but not inbound, so external users can't get to it at all.

I've got W2K installed (clean, BTW, not upgraded from NT or anything), all
the patches, and IIS 5.0.  I am running PHP 4.06 (or whatever the most
recent binary version is for Windows) and have vBulletin (discussion board
software www.vBulletin.com) sitting on top of it.  This is all on the same
box.  I get lots of traffic - roughly 10,000 to 20,000 hits a day and it
barely breaks a sweat.  Since the ISAPI module for PHP is not stable on
Windows (I tried putting it into production and it craaaaaaaaashed hard) I
am running just the standard PHP.exe file.  I am also running MySql for the
backend.

I originally started having problems on one of my threads where a large
number of people had "subscribed" and when a post was added, they would all
be emailed.  Well, after about 30 seconds my script would time out.  I was
sending the email messages to a second box - running Argosoft mail server -
via a 10/100 connection - and the mail server was sloooooow, which was
causing the problems.  I could sit and watch the mail server try and send
the messages out one at a time.  Well, it would send about one per second,
and did not appear to be storing the incoming ones in a buffer of any type.
So they would obviously overwhelm my crappy mail server software (it cost
like $40.)

As an emergency measure, I purchased the "full version" of the program and
got ready to upgrade the mail server software.  While I was preparing to do
that, I temporarily set up the Windows SMTP mail server so my board would
not completely go down (at this time only one thread was having problems.)
When I did that, I tested the board to be sure it worked, and I decided to
test that thread, and - get this - the problems ceased.  So I watched and
tested it for a while and found that where the Argosoft mail server had been
causing the scripts to time out after 30 seconds (and, coincidentally, the
users had to wait on a page that said "Thanks for posting, please wait while
you are taken back to the thread" which was really a cover for "Hold on
while I email everybody!") the IIS server was done in less than a second.
So suddenly users no longer had to wait more than a fraction of a second
between posting and being returned to the thread.  Previously it had been
anywhere from 3 to 30 seconds of waiting.  So that was a phenomenal
improvement.

I never bothered to do anything with the Argosoft server, I just kept using
the IIS SMTP server, and to this day I have no problems.  I probably get
upwards of 500 - 750 posts per day, and each of those *probably* has
anywhere from 10-200 people "subscribed."

----------

Here's the steps I took to install the SMTP server:

Start Menu - Settings - Control Panel - Add/Remove Programs - Add/Remove
Windows Components - Click Internet Information Services so it's
highlighted, then click the Details button - Check SMTP service - click
okay.

After it does it's thing, then I opened the Internet Services Manager (Start
Menu - Programs - Administrative Tools - Internet Services Manager) and
configured the SMTP server as follows (roughly, you'll probably be slightly
different depending on your setup)

Right-click the "Default SMTP server" and select Properties - then in the
following tabs the following settings were selected:

GENERAL:
Connection - I un-checked the incoming connection limit
Enabled logging (I log everything)

ACCESS:
Connection: Only the list below - 127.0.0.1 and 10.0.0.2 (basically, just
the localhost)
Relay - only the list below - 127.0.0.1 and 10.0.0.2

MESSAGES:
No Limits
Copy messages to me

DELIVERY:
Advanced -
    Masquerade domain = mail.rs25.com
    Fully qualified domain name = rs25.com
    (I may have these backwards, I am looking at a different server right
now, so you might have to "flip" these)

A word of caution - in the ISM you'll be able to view the "domains"
associated with the mail server.  Don't change them!  I found that when I
was playing around and modified one, or added one, SMTP stopped working.  I
have no idea why, so I put everything back and deleted my additions.

So, yes, I would recommend you play with that W2K/PHP/IIS box.  If it's a
clean install, I can't see why you'd have any problems.  Everything worked
smoothly for me - in fact it was beyond smooth.  Of course, I am not
actually doing any programming with PHP (I just bought the software) but
from my research on vBulletin.com they are using the mail() function, as I
was not the only person having problems.

Hope that helps.  Let me know if you have any other questions.

Thanks,


James F

----- Original Message -----
From: "DL Neil" <[EMAIL PROTECTED]>
To: "James F" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 06, 2002 4:08 AM
Subject: Re: [PHP-WIN] mail() function EXTREMELY slow


> James,
>
> > I personally found that messages were slow on my machine (going to an
> > external mail server) and I discovered that if you can use the
> built-in IIS
> > (Windows) SMTP mail server you'll have no more problems.  The built-in
> IIS
> > SMTP server was easily 1000 times faster in my case.  Of course, if
> you
> > don't have it installed, you may have to install and configure it, but
> it's
> > very simple.  Start menu - settings - control panel - add/remove
> programs -
> > add windows components - Internet - default SMTP server - check the
> box.
> > (Basically)
>
> What you say makes perfect sense, but my experience under NT (and as for
> others) has been the exact opposite - that the IIS SMTP stub is more
> trouble than it's worth. Obviously you're a better man than I, Gunga
> Din!
>
> Would you please share some more detail about your set up?
> - anything notable about the h/w
> - which vn of Windows and which IIS
> - I assume you're web/PHP serving through IIS
> - is the IIS on the same box as you are using as client/IE?
>
> On the basis of your experience, I wonder if I should schedule some
> 'play time' on a Win2000/IIS/PHP box I've just put together (while I
> still can/before it is moved into 'production')?
>
> > Be sure you don't allow external access (preferably block all inbound
> > connections at your firewall) or use an IP address restriction of
> 127.0.0.1
> > to prevent relaying.
>
> Imperative, not advice!
>
> Please advise,
> =dn
>
>


--- End Message ---
--- Begin Message ---
Thanks for the advice.
I did have magic_quotes_gpc on, but turning it off hasn't fixed the problem.
:-(


I have actually found that corruption showed up when magic_quates_gpc was
turned on.

I would check that if I were you.


Ryan

"Julian C Stevens" <[EMAIL PROTECTED]> wrote in message
news:"DSLEXXCH3-020305122516Z-36776*/PRMD=BAEDSL/ADMD=GOLD 400/C=GB/"@MHS...
> I am running PHP 4.1.1 with Apache 1.3.20 on Windows NT, and have recently
> started observing a bizarre file corruption effect.
> I first noticed this when transferring an RTF file with an embedded image.
On
> arriving at the web server, the image disappeared and, after examining the
> file I found 4 very small differences - the file size was not altered at
all.
>
> Now I have found that zip files are becoming corrupted in transit. A
perfectly
> good zip file appears on the webserver with various CRC errors!
>
> I'm using a simple http form to upload the files, and the problem only
seems
> to occurr if the files are fairly large (typically 2Mb or more).
> However, I need to be able to transfer much larger files than these
(intranet
> only).
>
> Please can anyone suggest where this apparent corruption could be coming
from.
>
> Thanks,
>
> Julian Stevens
> --




********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
--- End Message ---
--- Begin Message ---
Hrrm, maybe magic_quotes_runtime has something to do with it also.  I
remember having this problem, and if you open the file with vedit, it will
show a ton of \0\1\x and things like that.  Per chance can you send me the
script and I will test it and see what I can make of it?

Ryan

-----Original Message-----
From: Stevens, Julian C [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 06, 2002 4:23 AM
To: 'Ryan Marrs'; 'php-windows(a)lists.php.net(p)INTERNET'
Subject: RE: [PHP-WIN] Re: File corruption during HTTP Upload

Thanks for the advice.
I did have magic_quotes_gpc on, but turning it off hasn't fixed the problem.
:-(


I have actually found that corruption showed up when magic_quates_gpc was
turned on.

I would check that if I were you.


Ryan

"Julian C Stevens" <[EMAIL PROTECTED]> wrote in message
news:"DSLEXXCH3-020305122516Z-36776*/PRMD=BAEDSL/ADMD=GOLD 400/C=GB/"@MHS...
> I am running PHP 4.1.1 with Apache 1.3.20 on Windows NT, and have recently
> started observing a bizarre file corruption effect.
> I first noticed this when transferring an RTF file with an embedded image.
On
> arriving at the web server, the image disappeared and, after examining the
> file I found 4 very small differences - the file size was not altered at
all.
>
> Now I have found that zip files are becoming corrupted in transit. A
perfectly
> good zip file appears on the webserver with various CRC errors!
>
> I'm using a simple http form to upload the files, and the problem only
seems
> to occurr if the files are fairly large (typically 2Mb or more).
> However, I need to be able to transfer much larger files than these
(intranet
> only).
>
> Please can anyone suggest where this apparent corruption could be coming
from.
>
> Thanks,
>
> Julian Stevens
> --




********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
--- End Message ---
--- Begin Message ---
Hi NG.

Now I've read page up and page down in the MySQL online manual about how to
use the auto_increment. But I didn't find anywhere how to reuse a deleted id
created by auto_increment.

Say I have a table [users] with 4 columns:

| ID | name | username | password |

ID is an auto_increment value.
If I insert 3 users they will get ID = 1, 2 and 3 assignet.
Now I want to delete user with ID = 2.
Now I create a new user, he will get ID = 4.

How can i reuse the ID 2 for creation of new users?

Another thing:
If ID is INT(3), what will happen when I insert user no. 1000?


--- End Message ---
--- Begin Message ---
If I issue a mail() command but there is no live internet connection, what
happens?  Will the mail be sent when there is a connection?

Thanks

[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
> If I issue a mail() command but there is no live internet connection,
what
> happens?  Will the mail be sent when there is a connection?

That is the principle of SMTP (store and forward).
I didn't find anything about this situation in the manual though.

Please tell us what happens when you try it,
=dn

--- End Message ---
--- Begin Message ---
I've got an article up on setting up Hermes as a local SMTP server for PHP
scripts on Windows.

http://www.phpgeek.com/modules.php?op=modload&name=News&file=article&sid=8&m
ode=nested&order=2&thold=-1


"Mike Schmid" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi NG
>
> how you have configured your php.ini (mail point) and your windws to mail?
>
> Thanks
>
>


--- End Message ---
--- Begin Message ---
Hello,

I am encountering a problem with a php "application" which uses
"fasttemplates" ... 
Everything works nicely when I use a straight html file as a template
(using the extension .tpl).  

For certain functions and a better incorporation into the existing
website (which is written in php throughout) I have tried to set up
the same info plus some php "include" calls into a php file and use
that as a template .... the result is that none of the "include" nor
any other php functions are recognized, they are just passed over and
those parts are apparently ignored and not displayed ... (such as
header section from "header.php" is not included, a function to
display the date is not displayed, etc ...

Does anyone have an idea why this is happening? I do not understand
much about fasttemplates either ... so it is hard for me to
determine, if something can be changed in that file to parse php
templates properly ...  Normally, nested php commands are recognized
when a php file is called, or am I mistaken?

Any helpful input is much appreciated ...

God bless you with His grace and peace 
Wolfgang 

Looking for Biblical information? COME AND SEE! 
-- ONLINE Courses: http://classes.bibelcenter.de ... NEW!
-- BibelCenter: http://www.bibelcenter.de 
-- Bookstore: http://www.worthy.net/BibelCenter/ 



--- End Message ---
--- Begin Message ---
OK, I am not one-on-one familiar with fasttemplates; however, I do use
PHPLib's template class. If this fasttemplates is anything like PHPLib's
template, then, the template only parses the template file as HTML. So, if
you have any PHP code, it will not work (eg. includes, etc.)  It will not
take the PHP code and interpret it as PHP. Only the php in the phpscript
that *uses* the template ( not *is* the template) will be interpreted as
PHP. Does this make sense to you?

If you need more help or insight with templates, I can help you some what.
But again, I am only familiar with PHPLib's template class.

-Nicole
www.aeontrek.com

"Wolfgang Schneider" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I am encountering a problem with a php "application" which uses
> "fasttemplates" ...
> Everything works nicely when I use a straight html file as a template
> (using the extension .tpl).
>
> For certain functions and a better incorporation into the existing
> website (which is written in php throughout) I have tried to set up
> the same info plus some php "include" calls into a php file and use
> that as a template .... the result is that none of the "include" nor
> any other php functions are recognized, they are just passed over and
> those parts are apparently ignored and not displayed ... (such as
> header section from "header.php" is not included, a function to
> display the date is not displayed, etc ...
>
> Does anyone have an idea why this is happening? I do not understand
> much about fasttemplates either ... so it is hard for me to
> determine, if something can be changed in that file to parse php
> templates properly ...  Normally, nested php commands are recognized
> when a php file is called, or am I mistaken?
>
> Any helpful input is much appreciated ...
>
> God bless you with His grace and peace
> Wolfgang
>
> Looking for Biblical information? COME AND SEE!
> -- ONLINE Courses: http://classes.bibelcenter.de ... NEW!
> -- BibelCenter: http://www.bibelcenter.de
> -- Bookstore: http://www.worthy.net/BibelCenter/
>
>
>


--- End Message ---

Reply via email to