[PHP-WIN] MSSQL HELP

2003-07-02 Thread disko_kex
In MySQL is easy to page with LIMIT but it doesnt work with MSSQL. So
how do I make it page in MSSQL?
 


[PHP-WIN] Store array in mysql?

2003-08-21 Thread Disko_kex
If I have a normal array like "Array ( [0] => 1 [1] => 3 [2] => 82 )" ,
and want to store the array in a mysql table and then want to use it.
How can I do?
 
// jocke


[PHP-WIN] Array question

2003-08-25 Thread Disko_kex
If I have an array like this > [0] => 1 [1] => 2 [2] => 3 ... [99] =>
100
 
If I want to select [50] => 51 and store the value that's 2 positions
before and 1 position after, how can I do?
 
If I want to know what position value 71 have?
 
 
I have search the PHP-manual and found some functions as prev, next, pos
etc. But with these commands I have to loop thru the array every time to
reach the the values and positions. It has to be an easier way to do it.
 
// jocke


RE: [PHP-WIN] Array question

2003-08-25 Thread Disko_kex
Well its not exactly what I was looking for but you gave me some ideas,
but still got this small problem:

If I know the value in the array, say for example 49. Then I want to
store the previous and next value in the array? I know the other way
when I have the position, just use pos($dataarray) then like you sad
$dataarray($key+1), that's easy. But the other way


-Original Message-
From: Warren Vail [mailto:[EMAIL PROTECTED] 
Sent: den 25 augusti 2003 09:33
To: Disko_kex; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Array question

in my experience, using numeric indices to your array, you can deposit
and
reference occurances as follows;  however your reference is not a valid
array definition;

[0] => 1 [1] => 2 [2] => 3 ... [99] => 100  (I don't believe these are
valid
as a definition)

numeric indices would be defined as follows;

array(0 => 1, 1 => 2, 2 => 3    99 => 100);

$x = $dataarray[50];

$dataarray[50 - 2] = $x;
$dataarray[50 + 1] = $x;

if($dataarray[71] == 74) do this

On the other hand, if the indices is alpha-numeric string
representations of
numbers,

array("0" => 1, "1" => 2, "2" => 3 ... "99" => 100)

you will need to use some other tricks to access them.

hope this is what you are looking for, you used several terms like
"select"
and "know the value" of that are somewhat ambiguous ;-)

Warren Vail
[EMAIL PROTECTED]


-Original Message-
From: Disko_kex [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 24, 2003 11:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Array question


If I have an array like this > [0] => 1 [1] => 2 [2] => 3 ... [99] =>
100

If I want to select [50] => 51 and store the value that's 2 positions
before and 1 position after, how can I do?

If I want to know what position value 71 have?


I have search the PHP-manual and found some functions as prev, next, pos
etc. But with these commands I have to loop thru the array every time to
reach the the values and positions. It has to be an easier way to do it.

// jocke

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-WIN] Session Vars

2003-08-25 Thread Disko_kex
Try this instead:

Session_start();
$_SESSION["id"] = $PHPSESSID;
$_SESSION["user_name"] = $form_username;
$_SESSION["user_pass"] = $form_pass;


print "$_SESSION[id], $_SESSION[user_name], $_SESSION[user_pass]";

// jocke


-Original Message-
From: Dean Hayes [mailto:[EMAIL PROTECTED] 
Sent: den 25 augusti 2003 09:23
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session Vars


Hey,

I have a script that needs to save the session id and username but when
i 
use the following code it will not save anything to the session file,
can 
anyone help out here? The same script use to work when i ran it under
Win 98 
and Mandrake Linux but since i have installed WinXP it stops working



Thanks

Dean "The Insane Guy" Hayes
Mystical Web Designs
http://www.mystical-sector.com

<-- I design and i redesign but still i never designed true beauty like
you 
-->

_
ninemsn Extra Storage comes with McAfee Virus Scanning - to keep your 
Hotmail account and PC safe. Click here  http://join.msn.com/

-- 
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-WIN] Date question?

2003-09-12 Thread Disko_kex
Hi

If I have a date (2003-04-02) and want to select 9 months later, how to
do?

Thanks.

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-WIN] set_time_limit

2003-09-19 Thread Disko_kex








Is there a way to set the
timelimit to infinte? I tried to set_time_limit(3600)
but after 300sec its terminates.

 

 

 

Med vänliga hälsningar 

Joakim Ling 


Masking 5, 417 64 Göteborg. 
Växel 031-23 71 00, Fax 031-23 71 15 
E-post   [EMAIL PROTECTED] 
www.lokalguiden.se


 








[PHP-WIN] MySQL question

2003-09-22 Thread Disko_kex
Hi
 
SELECT RegDate FROM table WHERE month(RegDate) = ’10’  // this is
working
 
SELECT RegDate FROM table WHERE day(RegDate) = ’2’  // why isn´t this
working?


[PHP-WIN] Send Email with an attachment

2003-10-02 Thread Disko_kex
Hi,

How can I send an email with an attachment? In this case a .pdf file.

I found this in the php-manual.

mail("[EMAIL PROTECTED]", "the subject", $message,
 "From: xxx\r\n"
."Reply-To: xxx\r\n"
."X-Mailer: PHP/" . phpversion());

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-WIN] Send Email with an attachment - SOLVED

2003-10-03 Thread Disko_kex
I found an example on the web.

The file was successfully sent!";

} else { 
die("Sorry but the email could not be sent. Please go back and try
again!"); 
} 
?> 





-Original Message-----
From: Disko_kex [mailto:[EMAIL PROTECTED] 
Sent: den 2 oktober 2003 16:33
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Send Email with an attachment

Hi,

How can I send an email with an attachment? In this case a .pdf file.

I found this in the php-manual.

mail("[EMAIL PROTECTED]", "the subject", $message,
 "From: xxx\r\n"
."Reply-To: xxx\r\n"
."X-Mailer: PHP/" . phpversion());

-- 
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-WIN] Session Problem

2003-10-05 Thread Disko_kex
Hi,
 
How can I save a session value? I tried:
 

 
but I get this warnings and its not working at all. What should I do?
 
Warning: session_start():
open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea, O_RDWR) failed: No such
file or directory (2) in c:\inetpub\wwwroot\session.php on line 7

Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7

Warning: Unknown(): open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify
that the current setting of session.save_path is correct (/tmp) in
Unknown on line 0


RE: [PHP-WIN] Session Problem

2003-10-05 Thread Disko_kex
>Disko_kex wrote:
>> but I get this warnings and its not working at all. What should I do?
>>  
>> Warning: session_start():
>> open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea, O_RDWR) failed: No
such
>> file or directory (2) in c:\inetpub\wwwroot\session.php on line 7
>> 
>> Warning: session_start(): Cannot send session cookie - headers
already
>> sent by (output started at c:\inetpub\wwwroot\session.php:7) in
>> c:\inetpub\wwwroot\session.php on line 7
>> 
>> Warning: session_start(): Cannot send session cache limiter - headers
>> already sent (output started at c:\inetpub\wwwroot\session.php:7) in
>> c:\inetpub\wwwroot\session.php on line 7
>> 
>> Warning: Unknown(): open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
>> O_RDWR) failed: No such file or directory (2) in Unknown on line 0
>> 
>> Warning: Unknown(): Failed to write session data (files). Please
verify
>> that the current setting of session.save_path is correct (/tmp) in
>> Unknown on line 0
>> 
>>
>Do you have set the right directory for your temp-files in the php.ini?
>(-> Does this directory /tmp exists?)
>

I made some changes, no warnings or errors. But the session still not
working.

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-WIN] Session prob

2003-10-05 Thread Disko_kex

 
 
Why isn´t this working? Is there something I done wrong during the
installation or what?


RE: [PHP-WIN] Session prob

2003-10-05 Thread Disko_kex
Still not working? 


-Original Message-
From: Mike Brum [mailto:[EMAIL PROTECTED] 
Sent: den 5 oktober 2003 19:12
To: 'Disko_kex'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Session prob

You need to start the session.

sesstion_start();

Read up - http://us3.php.net/manual/en/function.session-start.php

-Original Message-----
From: Disko_kex [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 05, 2003 12:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session prob



 
 
Why isn´t this working? Is there something I done wrong during the
installation or what?

-- 
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



RE: [PHP-WIN] Session Problem

2003-10-05 Thread Disko_kex
I've done that. Still not working.


-Original Message-
From: Mike Brum [mailto:[EMAIL PROTECTED] 
Sent: den 5 oktober 2003 19:25
To: 'Disko_kex'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Session Problem

Assuming this is tied into your other problem (which I read first), then
the
problem here is that it appears you're on a Windows machine and you
don't
have php.ini set up correctly.

You need to set the session.save_path in php.ini to point to a directory
that exists. Mine, for example is this:

session.save_path = "C:\PHP\temp_dir"

Just make sure that the dir exists and point it there. That will clear
up
the first error message and then the other ones will go away after that
one's gone.

-M

-----Original Message-
From: Disko_kex [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 05, 2003 10:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session Problem


Hi,
 
How can I save a session value? I tried:
 

 
but I get this warnings and its not working at all. What should I do?
 
Warning: session_start():
open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
O_RDWR) failed: No such file or directory (2) in
c:\inetpub\wwwroot\session.php on line 7

Warning: session_start(): Cannot send session cookie - headers already
sent
by (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7

Warning: Unknown(): open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify
that
the current setting of session.save_path is correct (/tmp) in Unknown on
line 0

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-WIN] Characters missingin mail source???

2003-10-06 Thread Disko_kex
Hi again.

I've got this annoying problem. I made a program that sends mail to my
customers, like a newsletter. The mail is in HTML and each mail is about
2000 chars, depends on the customers info. The problem I have is that
there is a lot of characters missing in the mail source when the mail is
delivered.

Ex:
"2003-03-03"

shows like this in the email source "tr>203-03-03"   there
is no logical structure for which characters is missing, it's different
everytime. Im running apache 1.3.28 and PHP 4.3.3, I tried IIS with PHP
4 and 5 with the same result.

The source for the mail is stored in a normal $message = array(); where
$message[$id]; is the mail source for the specific customer. If I print
$message[$id] from the program everything show correctly.

mail($mail_to, $subject, $message_head.$message[$key].$message_foot,
 "From: Redaktionen
<[EMAIL PROTECTED]>\r\n"
."MIME-Version: 1.0\r\n"
."Content-type: text/html;
charset=iso-8859-1\r\n"
."Reply-To: [EMAIL PROTECTED]"
."X-Mailer: PHP/" . phpversion());  
Should I change something?


Any idea what I should do??

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-WIN] Every 1008th character is missing???

2003-10-06 Thread Disko_kex
Why is every 1008th character missing when Im tring to send an email?
 
mail("[EMAIL PROTECTED]", "test","
123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890123456789012345678901234567890123456789123456789012345
678901234567890123456789012345678901234567890123456789012345678901234567
890123456789012345678901234567890123456789123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890123456789123456789012345678901234567890123456789012345
678901234567890123456789012345678901234567890123456789012345678901234567
890123456789123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789123
456789012345678901234567890123456789012345678901234567890123456789012345
678901234567890123456789012345678901234567890123456789123456789012345678
901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789123456789012345678901234567890123
456789012345678901234567890123456789012345678901234567890123456789012345
", "From: Redaktionen <[EMAIL PROTECTED]>\r\n"
."MIME-Version: 1.0\r\n"
."Content-type: text/html; charset=iso-8859-1\r\n"
."Reply-To: [EMAIL PROTECTED]"
."X-Mailer: PHP/" . phpversion());
 
 
The last "5" is missing. Im tring to send newletters to my customers
thru HTML formated emils, and because 1008th character is missing the
source gets pretty fuckt up.
 
Anyone got any ideas what I should do??


RE: [PHP-WIN] Every 1008th character is missing???

2003-10-06 Thread Disko_kex
I just changed to Apache 2 from Apace 1.3, but I still don't get the
last "5". Could it be my mail server?


-Original Message-
From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
Sent: den 6 oktober 2003 15:56
To: Disko_kex; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Every 1008th character is missing???

I just tried it on my server with both PHP 4.3.2 and 4.3.3 and I got the
last 5.  The only thing I changed was the email address to send to.

Charles

-Original Message-
From: Disko_kex [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 06, 2003 8:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Every 1008th character is missing???


Why is every 1008th character missing when Im tring to send an email?
 
mail("[EMAIL PROTECTED]", "test","
123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890123456789012345678901234567890123456789123456789012345
678901234567890123456789012345678901234567890123456789012345678901234567
890123456789012345678901234567890123456789123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890123456789123456789012345678901234567890123456789012345
678901234567890123456789012345678901234567890123456789012345678901234567
890123456789123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789123
456789012345678901234567890123456789012345678901234567890123456789012345
678901234567890123456789012345678901234567890123456789123456789012345678
901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789123456789012345678901234567890123
456789012345678901234567890123456789012345678901234567890123456789012345
", "From: Redaktionen <[EMAIL PROTECTED]>\r\n"
."MIME-Version: 1.0\r\n"
."Content-type: text/html; charset=iso-8859-1\r\n"
."Reply-To: [EMAIL PROTECTED]"
."X-Mailer: PHP/" . phpversion());
 
 
The last "5" is missing. Im tring to send newletters to my customers
thru HTML formated emils, and because 1008th character is missing the
source gets pretty fuckt up.
 
Anyone got any ideas what I should do??

-- 
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



RE: [PHP-WIN] Every 1008th character is missing???

2003-10-07 Thread Disko_kex
I tried with 4.3.2 and 4.3.3 and its not working, but with php 5 is
working, but then I cant get my mysql to work with php 5.  What server
are you using? And ideas why some characters is missing?



-Original Message-
From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
Sent: den 6 oktober 2003 15:56
To: Disko_kex; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Every 1008th character is missing???

I just tried it on my server with both PHP 4.3.2 and 4.3.3 and I got the
last 5.  The only thing I changed was the email address to send to.

Charles

-Original Message-
From: Disko_kex [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 06, 2003 8:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Every 1008th character is missing???


Why is every 1008th character missing when Im tring to send an email?
 
mail("[EMAIL PROTECTED]", "test","
123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890123456789012345678901234567890123456789123456789012345
678901234567890123456789012345678901234567890123456789012345678901234567
890123456789012345678901234567890123456789123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789012
345678901234567890123456789123456789012345678901234567890123456789012345
678901234567890123456789012345678901234567890123456789012345678901234567
890123456789123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789012345678901234567890123456789123
456789012345678901234567890123456789012345678901234567890123456789012345
678901234567890123456789012345678901234567890123456789123456789012345678
901234567890123456789012345678901234567890123456789012345678901234567890
123456789012345678901234567890123456789123456789012345678901234567890123
456789012345678901234567890123456789012345678901234567890123456789012345
", "From: Redaktionen <[EMAIL PROTECTED]>\r\n"
."MIME-Version: 1.0\r\n"
."Content-type: text/html; charset=iso-8859-1\r\n"
."Reply-To: [EMAIL PROTECTED]"
."X-Mailer: PHP/" . phpversion());
 
 
The last "5" is missing. Im tring to send newletters to my customers
thru HTML formated emils, and because 1008th character is missing the
source gets pretty fuckt up.
 
Anyone got any ideas what I should do??

-- 
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



RE: [PHP-WIN] Every 1008th character is missing???

2003-10-07 Thread Disko_kex
Yes I did that, I noticed that "!" appered after some chars. But I still
don't have a clue about the missing chars. :/



-Original Message-
From: Andrei Popovici [mailto:[EMAIL PROTECTED] 
Sent: den 7 oktober 2003 15:15
To: Disko_kex
Subject: Re: [PHP-WIN] Every 1008th character is missing???

Try adding an "\r\n" at the end of every line  of HTML code.
I had the same problem and that worked for me.

- Original Message -
From: "Disko_kex" <[EMAIL PROTECTED]>
To: "'Charles P. Killmer'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, October 07, 2003 1:46 PM
Subject: RE: [PHP-WIN] Every 1008th character is missing???


> I tried with 4.3.2 and 4.3.3 and its not working, but with php 5 is
> working, but then I cant get my mysql to work with php 5.  What server
> are you using? And ideas why some characters is missing?
>
>
>
> -Original Message-
> From: Charles P. Killmer [mailto:[EMAIL PROTECTED]
> Sent: den 6 oktober 2003 15:56
> To: Disko_kex; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Every 1008th character is missing???
>
> I just tried it on my server with both PHP 4.3.2 and 4.3.3 and I got
the
> last 5.  The only thing I changed was the email address to send to.
>
> Charles
>
> -Original Message-
> From: Disko_kex [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2003 8:19 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Every 1008th character is missing???
>
>
> Why is every 1008th character missing when Im tring to send an email?
>
> mail("[EMAIL PROTECTED]", "test","
>
123456789012345678901234567890123456789012345678901234567890123456789012
>
345678901234567890123456789012345678901234567890123456789123456789012345
>
678901234567890123456789012345678901234567890123456789012345678901234567
>
890123456789012345678901234567890123456789123456789012345678901234567890
>
123456789012345678901234567890123456789012345678901234567890123456789012
>
345678901234567890123456789123456789012345678901234567890123456789012345
>
678901234567890123456789012345678901234567890123456789012345678901234567
>
890123456789123456789012345678901234567890123456789012345678901234567890
>
123456789012345678901234567890123456789012345678901234567890123456789123
>
456789012345678901234567890123456789012345678901234567890123456789012345
>
678901234567890123456789012345678901234567890123456789123456789012345678
>
901234567890123456789012345678901234567890123456789012345678901234567890
>
123456789012345678901234567890123456789123456789012345678901234567890123
>
456789012345678901234567890123456789012345678901234567890123456789012345
> ", "From: Redaktionen <[EMAIL PROTECTED]>\r\n"
> ."MIME-Version: 1.0\r\n"
> ."Content-type: text/html; charset=iso-8859-1\r\n"
> ."Reply-To: [EMAIL PROTECTED]"
> ."X-Mailer: PHP/" . phpversion());
>
>
> The last "5" is missing. Im tring to send newletters to my customers
> thru HTML formated emils, and because 1008th character is missing the
> source gets pretty fuckt up.
>
> Anyone got any ideas what I should do??
>
> --
> 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



RE: [PHP-WIN] Re: timeout question

2003-10-07 Thread Disko_kex
I had that problem too. 

set_time_limit = 0 ; in php.ini

and 

Timeout 0 # in httpd.conf


// jocke



-Original Message-
From: J.Veenhuijsen [mailto:[EMAIL PROTECTED] 
Sent: den 7 oktober 2003 06:55
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: timeout question

see in php.ini

max_execution_time = 30 ; Maximum execution time of each script, in 
seconds

or

set_time_limit (PHP 3, PHP 4 )

limit the maximum execution time

void set_time_limit (int seconds)

Set the number of seconds a script is allowed to run. If this is 
reached, the script returns a fatal error.
The default limit is 30 seconds or, if it exists, the max_execution_time

value defined in the configuration
file. If seconds is set to zero, no time limit is imposed.
When called, set_time_limit() restarts the timeout counter from zero. In

other words, if the timeout is
the default 30 seconds, and 25 seconds into script execution a call such

as set_time_limit(20) is made,
the script will run for a total of 45 seconds before timing out.
Note that set_time_limit() has no effect when PHP is running in safe 
mode. There is no workaround
other than turning off safe mode or changing the time limit in the 
configuration file.

Jochem


David Coleman wrote:
> I have a PHP page that for some reason is taking an ungodly long time
to
> execute.  I suspect that this is simply b/c I'm running Apache 1.3 /
> MySQL 4.013-nt, PHP 4, Zend studio 3.0, and MySQL GUI on a 266 MhZ
win2K
> server.  (Yes people, I know I'm choking the poor thing, but I can't
> afford a new server right now.)
>  
> My question to the group is:
>  
> Does anyone know how I can increase my timeouts on page generation?
> Halfway through the rowset, the page stops generating and returns to
the
> browser cut off at whatever point the server (apache, PHP or MySQL, I
> dunno which) gave up and decided the page was taking too long.  It
seems
> to be a 90 second html response timeout imbedded somewhere in my
> configuration, but I have no idea where to look to change this value
to
> unlimited, or maybe to 600 seconds or something more reasonable for
the
> hideous rowsets that my project is dealing with.
>  
> I don't know if this is a PHP question, but I'm trying PHP, Apache,
and
> MySQL in case there is a cursor timeout or something.
>  
> Anyone feel like sharing some nifty tricks to help me tweak my
> performance?  I don't care if the page takes 10 hours to generate, I'm
> on a local secure network and I want my connections open that long.
> (I'd also like to know if there's any tricks to not using cursors and
> loading re-usable recordset-style objects into mysql_result variables,
> so I don't have to hit the db every time I want to re-use a loaded
> rowset.  But let's get my pages to finish generating first.
>  
> :-)
>  
> Thanks a bunch everyone!
>  
> Dave Coleman
> Software Engineer
> TeraByte Software Solutions LLC
> [EMAIL PROTECTED]
>  
>  
>  
> Thanx everyone,
> Dave
>  
> 

-- 
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-WIN] timeout?

2003-10-10 Thread Disko_kex
Hi, Im running IIS and PHP 4.3.3. I have set max_execution_time = 0 in
php.ini and set_time_limit(0); in my php files. But still after about 5
minutes I get CGI-timeout.. error.
 
The scripts sends newsemail to about 3-400 customers, that's why I need
it to be inifity.
 
What should I do?
 
 


[PHP-WIN] failed to open stream: HTTP

2003-10-17 Thread Disko_kex
Hi.
This has always been working for me, and now it isnt?
 
http://www.lokalguiden.se/test.txt";, "r");
?>
 
I get this warning:
Warning: fopen(http://www.lokalguiden.se/test.txt): failed to open
stream: HTTP request failed! ^ in c:\inetpub\wwwroot\lgd\test.php on
line 2
 
I just change from apache to IIS. Please help..


[PHP-WIN] Run php file every day?

2003-10-27 Thread Disko_kex
Hi,
 
Is there an easy way to run a php file same time every day? Im running
IIS5 and PHP4.3.3.
 
Thx


[PHP-WIN] 2 attachments

2003-11-03 Thread Disko_kex
$file = fopen($fileatt,'rb'); 
$data = fread($file,filesize($fileatt)); 
fclose($file);
 
$semi_rand = md5(time()); 
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; 

$headers .= "\nMIME-Version: 1.0\n" . 
"Content-Type: multipart/mixed;\n" . 
" boundary=\"{$mime_boundary}\""; 
 
$email_message = "This is a multi-part message in MIME format.\n\n" . 
"--{$mime_boundary}\n" . 
"Content-Type:text/html; charset=\"iso-8859-1\"\n" . 
   "Content-Transfer-Encoding: 7bit\n\n" . 
$email_txt ."\n\n"; 
 
$email_message .= "--{$mime_boundary}\n" . 
  "Content-Type: {$fileatt_type};\n" . 
  " name=\"{$fileatt_name}\"\n" . 
  "Content-Disposition: attachment;\n" . 
  " filename=\"{$fileatt_name}\"\n" . 
  "Content-Transfer-Encoding: base64\n\n" . 
 chunk_split(base64_encode($data)) . "\n\n" . 
  "--{$mime_boundary}--\n"; 
 
 
This is some of my code for sending an email with an attachment ($data)
but if I want to send two files, how to write? I tried lots of ways with
no result. Plz help


RE: [PHP-WIN] get and post in a form

2003-11-04 Thread Disko_kex

Try this instead:

echo "Hartelijk welkom, $_GET["voornaam"] $_GET["naam"].";

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-WIN] best php editor?

2003-11-04 Thread Disko_kex
Try Editplus or Editpad. You can find them at www.download.com 


-Original Message-
From: Bobo Wieland [mailto:[EMAIL PROTECTED] 
Sent: den 4 november 2003 16:07
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] best php editor?

Hi!

What is the best php editor out there? Preferbly freeware... I use
Homesite+
right now. It's the best one so far that I've tried but I would like
codehints which Homesite doesn't provide. So I would like an editor
that,
when I write "a_defined_php_function(" the editor would show
"first_param_type/function, [second_param_type/function]" etc...

And I would also like a good handling of tabulators...
And if possible also support for xhtml and javascript (bonus if it
supports
AS (Flash ActionScript) too...)

Thanks!

.bobo

-- 
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-WIN] PDFlib text format

2003-11-06 Thread Disko_kex
Hi,
 
If I have a squre 100px width and 100px height and a textstring = "hello
hello hello hello hello hello hello hello hello hello", is it possible
to write the text into that area. I tried a few comands but didn't
succeed.
 
/ jocke


[PHP-WIN] attachment with pdf files

2003-11-13 Thread Disko_kex
Hi again..
 
I have a really strange problem when I sending emails with attachment.
With regualar text files, images etc it works fine but with pdf files it
wont work. I also tried with "MIME E-mail message composing and sending"
class from phpclasses.org. When I compared the orginal file with the one
I sent, I notice that the sent pdf file has added a lot of \ exmple "
will result in \" and some other chars have changed too.
 
Why is that and how can I fix it?
 
// Jocke


RE: [PHP-WIN] attachment with pdf files

2003-11-13 Thread Disko_kex
I had magic_quotes_runtime = On, I turned it Off and now it works fine, 

Big thanks


> -Original Message-
> From: Eric COLINET [mailto:[EMAIL PROTECTED]
> Sent: den 13 november 2003 10:38
> To: Disko_kex; [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] attachment with pdf files
> 
> 
> Maybe you have to set magic_quotes_runtime (in php.ini) to false.
> But it's a strange issue.
> 
> Regards,
> Eric
> 
> At 10:35 13/11/2003, Disko_kex wrote:
> >Hi again..
> >
> >I have a really strange problem when I sending emails with
attachment.
> >With regualar text files, images etc it works fine but with pdf files
it
> >wont work. I also tried with "MIME E-mail message composing and
sending"
> >class from phpclasses.org. When I compared the orginal file with the
one
> >I sent, I notice that the sent pdf file has added a lot of \ exmple "
> >will result in \" and some other chars have changed too.
> >
> >Why is that and how can I fix it?
> >
> >// Jocke

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-WIN] i need help

2003-11-27 Thread Disko_kex

Try use $HTTP_GET_VARS["password"] or $_GET["password"]


> -Original Message-
> From: Hasan Barýþ Karayel [mailto:[EMAIL PROTECTED]
> Sent: den 27 november 2003 17:26
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] i need help
> 
> Hi
> i am new in PHP...
> i made very a simple code but it did not work properly...
> this is my code:
> 
> 
> 
> ::WaterBike Team Istanbul - ITU::
> 
> 
> Show my
password
>  echo("Your username = ". $username."");
> echo("Your password = ". $password."");
> ?>
> 
> 
> 
> 
> when i click the link, i expect this output:
> Show my password
> Your username : baris
> Your password : bkarayel
> 
> But the output is:
> Show my password
> Your usename :
> Your password :
> 
> what is the problem?(note: my system is windows 98 - apache 2.0.48 -
php
> 4.3.4)
> 
> _
> The new MSN 8: advanced junk mail protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
> 
> --
> 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



RE: [PHP-WIN] Re: mail($To problem

2003-12-04 Thread Disko_kex
Hi

It's a documented bug, and its fixed in the latest release of php
(4.3.4). I had the same problem and it works fine now

Have a nice day
jocke
 

> -Original Message-
> From: Seung Hwan Kang [mailto:[EMAIL PROTECTED]
> Sent: den 4 december 2003 12:27
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: mail($To problem
> 
> ok, u do like to put some html codes in the contents... :)
> 
> this one should be ok~~~
> 
>  
> $HTML_H = "welcomeM";
> $HTML_B = "Geee~";
> $HTML_T = "";
> 
> $content = $HTML_H . $HTML_B . $_POST["content"] . $HTML_T;
> 
> mail($_POST["to"], $_POST["subject"], $content, $_POST["from"]);
> 
> ?>
> 
> Alan McDonald wrote:
> 
> > thanks -  but sorry no prize there - it makes no difference
> >
> > Alan
> >
> > "Seung Hwan Kang" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> >>i acidently sent it
> >>
> >>
> >>Seung Hwan Kang wrote:
> >>
> >>
> >>>I guess it's related to slashes... (addslashes)
> >>>
> >>>Here is eg.
> >>>
> >>
> >>// yourform.html
> >>
> >>
> >>to
> >>subject
> >>content
> >>from
> >>
> >>// mailto.php
> >>
> >> >>$to  = addslashes($_POST["to"]);
> >>$subject = addslashes($_POST["subject"]);
> >>$content = addslashes($_POST["content"]);
> >>$from= addslaehses($_POST["from"]);
> >>
> >>mail($to, $subject, $content, $from);
> >>
> >>?>
> >>
> >>well, now it's correct!
> >>
> >>
> >>>from Wollongong, NSW :)
> >>>
> >>>Alan McDonald wrote:
> >>>
> >>>
> Can someone tell me why I might be getting this problem?
> I construct an HTML email and send it,... it's fine,... it goes
> But the last > character after the /html tag gets truncated.
> I always get
>  stuck on the end of my message unless I add another one.
> If my last construct line is
> $content .= ">";
> I do not see the  complete
> tag in the message.
> 
> thanks
> Alan
> 
> --
> 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-WIN] Is the link correct?

2004-01-15 Thread Disko_kex
Hi

$link = "http://www.does_not_exists.com";;

Is there a way to check if the link is correct and return true or false?

Thanks

//jocke

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-WIN] Not about PHP, HTML question

2004-01-21 Thread Disko_kex
Hi,

I know this is a PHP mail list, but I have this enoying problem with
simple HTML. In my body a have:



The problem I experience is that 100% is acully less then "visible"
100%, my design is based on a table (no frames) with height 100%. The
first time I load the page it's a about 10px in the bottom that's empty
and if I update the page it shows correctly (the empty space in the
bottom disappers). Its strange but its seems like 100% is less then 100%
the second time. Is there a way to do this in PHP or some another
langues so 100% is 100% of the visible browser size.

Thanks
//jocke

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-WIN] Use ASP components in PHP code?

2004-01-28 Thread Disko_kex
Hi,
 
Im rewriting my webpage from ASP to PHP, the first problem I discovered
is that I MUST use some ASP components (e.g. send SMS thru ASPSMS). Is
there a way to mix the both, or incorporate ASP in the PHP code.
 
Thx // Jocke
 
 


[PHP-WIN] Problem with form

2004-02-05 Thread Disko_kex
Hi
 
If a have a , what is the name of the "select"? I
tried with both "omr" and "omr[]", but no one works. It works fine if
the name is "omr" but then it is only one value posted.
 
Maybe its easier to understand if you see it yourself: 
http://www.lokalguiden.se/index2.php?action=ledigalokaler
It's the second select I must name omr[] to get all the values posted
but then the javascript doesn't understand the name omr[], what to do?
 
Thx.
 
 


RE: [PHP-WIN] Problem with form

2004-02-05 Thread Disko_kex
Its not the progress of the form that's the problem. If a want to post
more the one value in a "" the name must be "name =
"something[]" in php, but if the  is named with "[]" my
javascripts doesn't understand the name. So it's a javascript question.

This works:

//update "omr"


but then only one value from "omr" is posted with PHP

How can I get this work:






> -Original Message-
> From: John Ellingsworth [mailto:[EMAIL PROTECTED]
> Sent: den 5 februari 2004 16:10
> To: Disko_kex; [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Problem with form
> 
> Is your question a javascript or PHP question?
> 
> For PHP you can do this:
> 
> $omr = $_POST['omr'] ;
>   if(is_array($omr))
>   {
>   for($k=0; $k ` {
>   $sql->Insert("insert into omr (omrID,omrNumber)
> values
> ('$omrID','$omr[$k]')");
>   $affected_rows = $sql->a_rows;
>   }
> 
>   if ($affected_rows == 1)
>   {
>   echo "omr ". $omrID .
> " omr successfully added to
> the database.\n";
>   } else {
>   echo "omr ". $omrID .
> " omr was not successfully
> added to the database.Please try again.\n";
>   }
> 
>   }
> 
> 
> 
> Thanks,
> 
> John Ellingsworth
> http://mail.med.upenn.edu/~jellings/
> AIM: vc2000support
> 
> -Original Message-
> From: Disko_kex [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 05, 2004 10:04 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Problem with form
> 
> 
> Hi
> 
> If a have a , what is the name of the "select"? I
> tried with both "omr" and "omr[]", but no one works. It works fine if
> the name is "omr" but then it is only one value posted.
> 
> Maybe its easier to understand if you see it yourself:
> http://www.lokalguiden.se/index2.php?action=ledigalokaler
> It's the second select I must name omr[] to get all the values posted
> but then the javascript doesn't understand the name omr[], what to do?
> 
> Thx.
> 
> --
> 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