RE: [PHP] Another hosting question....

2003-06-19 Thread Ben C.
I have tested a lot of the hosting providers and the best I have found is
Valueweb.  Lots of bandwidth (500gb), unlimited domain hosting, and managed
ensim control panel.  I have been with them a couple months and everything
seems good.

-Original Message-
From: Mike Morton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 4:52 PM
To: PHP eMail List
Subject: [PHP] Another hosting question


I know that this subject has been beaten to death, but I going through old
lists, I see a lot of hosting companies for site hosting, but I am
interested specifically in dedicated server hosting.

It is tough to find a hosting facility that is state of the art, with big
pipes and redundancy, but is not a huge corporate company that could not
care less about you

What I am looking for specifically is a company that someone can recommend
from direct experience, one that is customer friendly, offers dedicated
servers at a REASONABLE price, offers admin support and server support, etc,
etc, etc, and most importantly has expertise in compiling PHP.

If anyone out there know of a company like this and can recommend them - I
would appreciate it :) It will save literally hours and hours of sorting
through the  google listings that a php dedicated hosting search brings
back!  (2 days of sorting to this point anyhow!)

TIA

--
Cheers

Mike Morton


*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*


Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple.
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey


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


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



RE: [PHP] Another hosting question....

2003-06-19 Thread Boaz Yahav
Check out :  http://weberdev.ref.phenominet.com

This is your one stop shop for hosting. WeberDev.com is hosted there
and I can tell you that their service is amazing. They are fast,
reliable
and more than anything, very professional (specially in PHP / MySQL).
I have a dedicated server there for years.

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.



-Original Message-
From: Mike Morton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 19, 2003 1:52 AM
To: PHP eMail List
Subject: [PHP] Another hosting question


I know that this subject has been beaten to death, but I going through
old lists, I see a lot of hosting companies for site hosting, but I am
interested specifically in dedicated server hosting.

It is tough to find a hosting facility that is state of the art, with
big pipes and redundancy, but is not a huge corporate company that could
not care less about you

What I am looking for specifically is a company that someone can
recommend from direct experience, one that is customer friendly, offers
dedicated servers at a REASONABLE price, offers admin support and server
support, etc, etc, etc, and most importantly has expertise in compiling
PHP.

If anyone out there know of a company like this and can recommend them -
I would appreciate it :) It will save literally hours and hours of
sorting through the  google listings that a php dedicated hosting search
brings back!  (2 days of sorting to this point anyhow!)

TIA

--
Cheers

Mike Morton


*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*


Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up
with Apple.
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 


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


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



[PHP] forms addslashes ?

2003-06-19 Thread Mukta Telang
Hi,
I want to add slashes to a string, if it contains quotation marks and
which is received as input from a form, so that I can enter it to a
database.
What I am doing is as follows:

echo input type=\text\ name=\title\;
$title=addslashes($title);

But the string that gets added has a lot of slashes!
How should this be done?
Mukta

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



[PHP] GD ImageCopyResized || ImageCopyResampled

2003-06-19 Thread azero
Hi,

I've wrote simple script who makes from image thumbnail
Thereis source:

?php
Header(Content-type: image/jpeg);
$path = implode($argv, );
$im_org = imageCreateFromJpeg($path);
$y = ImageSY($im_org);
$x = ImageSX($im_org);

if ( $x = $y ){
  $y = $y * 120 / $x;
  $x = 120;
} else {
  $x = $x * 120 / $y;
  $y = 120;
}

$im_thumb = imagecreate (120, 120);

$thumb_posX = round ((120 - $x)/2, 0);
$thumb_posY = round ((120 - $y)/2, 0);

ImageCopyResized ($im_thumb, $im_org, $thumb_posX, $thumb_posY, 0, 0,
$x, $y, ImageSX($im_org), ImageSY($im_org));
ImageJpeg ($im_thumb);
ImageDestroy ($im_org);
ImageDestroy ($im_thumb);
?


Probles is that when i use ImageCopyResampled or  ...Resized something wrong
with color pallete.

There is sample:

http://gsk.vtu.lt:8080/~azero/img/thumb.php?a001.jpg
Real picture is here:
http://gsk.vtu.lt:8080/~azero/img/a001.jpg

Is it my code problem or it's gd's bug ?




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



Re: [PHP] forms addslashes ?

2003-06-19 Thread Lars Torben Wilson
On Thu, 2003-06-19 at 05:27, Mukta Telang wrote:
 Hi,
 I want to add slashes to a string, if it contains quotation marks and
 which is received as input from a form, so that I can enter it to a
 database.
 What I am doing is as follows:
 
 echo input type=\text\ name=\title\;
 $title=addslashes($title);
 
 But the string that gets added has a lot of slashes!
 How should this be done?
 Mukta

Do you mean that there are two slashes everywhere there should be one,
or that they are inserted where you do not expect them?

It's slashes doubling up on you, you may have magic_quotes_gpc enabled
in php.ini. magic_quotes_gpc is explained here:

  http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc

You can check whether it's turned on with:

  http://www.php.net/get_magic_quotes_gpc
  http://www.php.net/get_magic_quotes_runtime

So if that's the case, you could either disable magic_quotes in
php.ini, or else test whether it's turned on and then decide whether to
call addslashes().


Torben


-- 
 Torben Wilson [EMAIL PROTECTED]+1.604.709.0506
 http://www.thebuttlesschaps.com  http://www.inflatableeye.com
 http://www.hybrid17.com  http://www.themainonmain.com
 - Boycott Starbucks!  http://www.haidabuckscafe.com -




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



Re: [PHP] forms addslashes ?

2003-06-19 Thread Jason Wong
On Thursday 19 June 2003 20:27, Mukta Telang wrote:

 I want to add slashes to a string, if it contains quotation marks and
 which is received as input from a form, so that I can enter it to a
 database.
 What I am doing is as follows:

 echo input type=\text\ name=\title\;
 $title=addslashes($title);

 But the string that gets added has a lot of slashes!

What exactly do you mean by a lot of slashes ?

 How should this be done?

Check in php.ini that:

  magic_quotes_gpc = Off

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Death is nature's way of saying `Howdy'.
*/


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



Re: [PHP] GD ImageCopyResized || ImageCopyResampled

2003-06-19 Thread Jason Wong
On Thursday 19 June 2003 01:53, azero wrote:
 $im_thumb = imagecreate (120, 120);

Use imagecreatetruecolor().

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
We don't really understand it, so we'll give it to the programmers.
*/


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



Re: [PHP] Using DL to add DLL Files

2003-06-19 Thread Marek Kilimajer
Download dll that is right for your version of php.

Suhas Pharkute wrote:
Hello,

I am trying to include a dll module in the file. In php.ini safe_mode is off

I am getting following warning/error

Warning: MyMod: Unable to initialize module Module compiled with debug=0, thread-safety=1 module API=20020429 PHP compiled with debug=0, thread-safety=1 module API=20010901 These options need to match in c:\apache\htdocs\dlltest.php on line 2

Can any one explain how to solve this? 

Thanks
Suhas


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


Re: [PHP] Empty session directory

2003-06-19 Thread Marek Kilimajer
No, that's what garbage colector is here for. Everytime you call 
session_start(), there is session.gc_probability(from php.ini) % 
probability the directory gets cleaned up.

Iván Díaz wrote:
Hi everyone!

I would like to know if I need to empty from time to time the directory
where the session files are stored. I'm running windows nt4.0 and Apache.
Thanks in advance.





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


[PHP] regex - delimiter problem

2003-06-19 Thread Armand Turpel
Some delimiters chars don't work under windows.
Ex.:
°[a-z]?°
works on linux but on windows you get a warning:
Warning: Unknown modifier '?' in  on line xx
/[a-z]?/
works on both systems
So my question is: Are there similar problems in other functions or 
circumstances where such chars pose a problem?

Thanks,
Armand


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


[PHP] unique random id

2003-06-19 Thread Awlad Hussain
How do i generate a unique random number? 

thanks

awlad




[PHP] Array Sorting

2003-06-19 Thread Ashley M. Kirchner
   I have an array that looks like this:

$i = 0;
$item[$i] = array( 'link'   = 'http://...',
  'image'  = '/images/image.jpg',
  'title'  = 'some title',
  'price'  = '$14.00',
  'cat'= 'Frames',
  'author' = 'Pinochio',
  'artist' = '',
  'asin'   = '010101',
  'manufacturer'   = 'Post'
  ); $i++;
$item[$i] = array( 'link'   = 'http://...',
  'image'  = '/images/something.jpg',
  'title'  = 'this is fun',
  'price'  = '$2.99',
  'cat'= 'Card',
  'author' = 'Mickey',
  'artist' = '',
  'asin'   = '1116221',
  'manufacturer'   = 'Kraft'
  ); $i++;
etc., etc.
   I would like to sort $items based on the manufacturer of each array 
within.  So that, in the above example, the second one would come before 
the first.  Is there a way to do that?

--
H| I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 



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


Re: [PHP] Array Sorting

2003-06-19 Thread Marek Kilimajer
Use usort. This function should do the work:

function cmp ($a, $b) {
if ($a['manufacturer'] == $b['manufacturer']) return 0;
return ($a['manufacturer']  $b['manufacturer']) ? -1 : 1;
}
Ashley M. Kirchner wrote:
   I have an array that looks like this:

$i = 0;
$item[$i] = array( 'link'   = 'http://...',
  'image'  = '/images/image.jpg',
  'title'  = 'some title',
  'price'  = '$14.00',
  'cat'= 'Frames',
  'author' = 'Pinochio',
  'artist' = '',
  'asin'   = '010101',
  'manufacturer'   = 'Post'
  ); $i++;
$item[$i] = array( 'link'   = 'http://...',
  'image'  = '/images/something.jpg',
  'title'  = 'this is fun',
  'price'  = '$2.99',
  'cat'= 'Card',
  'author' = 'Mickey',
  'artist' = '',
  'asin'   = '1116221',
  'manufacturer'   = 'Kraft'
  ); $i++;
etc., etc.
   I would like to sort $items based on the manufacturer of each array 
within.  So that, in the above example, the second one would come before 
the first.  Is there a way to do that?



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


[PHP] Re: Array Sorting

2003-06-19 Thread Mark Clarkstone
I found this Great PHP Starter site check it out
http://www.htmlite.com/PHPintro.php

Ashley M. Kirchner [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 I have an array that looks like this:

 $i = 0;
 $item[$i] = array( 'link'   = 'http://...',
'image'  = '/images/image.jpg',
'title'  = 'some title',
'price'  = '$14.00',
'cat'= 'Frames',
'author' = 'Pinochio',
'artist' = '',
'asin'   = '010101',
'manufacturer'   = 'Post'
); $i++;
 $item[$i] = array( 'link'   = 'http://...',
'image'  = '/images/something.jpg',
'title'  = 'this is fun',
'price'  = '$2.99',
'cat'= 'Card',
'author' = 'Mickey',
'artist' = '',
'asin'   = '1116221',
'manufacturer'   = 'Kraft'
); $i++;
 etc., etc.


 I would like to sort $items based on the manufacturer of each array
 within.  So that, in the above example, the second one would come before
 the first.  Is there a way to do that?

 --
 H| I haven't lost my mind; it's backed up on tape somewhere.
   +
   Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
   IT Director / SysAdmin / WebSmith . 800.441.3873 x130
   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.






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



[PHP] Spellchecking using PHP on WinXP?

2003-06-19 Thread Murray Wells
Hi All,

As I understand it Aspell / Pspell don't work under PHP on the WinXP
platform. Just wondering if anyone knows of an alternative that does
(for use with Apache server, if that's important)?

Much warmth,

Murray
http://www.planetthoughtful.org
Building a thoughtful planet,
one snide comment at a time...

* Worried that you might have missed something amazingly amazing on
PlanetThoughtful?
* Join the newsletter and you'll know for certain you haven't!
* http://www.planetthoughtful.org/html/ptnewsletter.php



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



[PHP] Re: unique random id

2003-06-19 Thread Dustin Pate
?php
$sid = '';
mt_srand ((double) microtime() * 100);
$Puddle =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';

for($index=0; $index  $this-session_code_length - 1; $index++)
{
  $sid .= substr($Puddle, (mt_rand()%(strlen($Puddle))), 1);
}
?

That should work.

Awlad Hussain [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
How do i generate a unique random number?

thanks

awlad






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



[PHP] Trapping PHP Errors

2003-06-19 Thread Gary Ogilvie
Hi everyone,

How do I trap a PHP error and display my own error message instead?

I have two PHP scripts - one that creates tables on MSSQL and one that
deletes tables on MSSQL. I wish to capture the message that appears if
the user attempts to create tables that already exist, or delete ones
that do not exist.

Thanks in advance

Gary


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



Re: [PHP] Array Sorting

2003-06-19 Thread Ashley M. Kirchner
Marek Kilimajer wrote:

Use usort. This function should do the work:
   Hey thanks!  That worked like a charm, once I figured out that 
making the comparison  instead of  I would get an ascending sort 
instead of the descending one.  Now, can I do multiple sorts?  Like, 
sort on cat first, manufacturer next, and title last?  Here's the 
array structure again:

$i = 0;
$item[$i] = array( 'link' = 'http://...',
  'image'= '/images/image.jpg',
  'title'= 'some title',
  'price'= '$14.00',
  'cat'  = 'Frames',
  'author'   = 'Pinochio',
  'artist'   = '',
  'asin' = '010101',
  'manufacturer' = 'Post'
 ); $i++;
$item[$i] = array( 'link' = 'http://...',
  'image'= '/images/something.jpg',
  'title'= 'this is fun',
  'price'= '$2.99',
  'cat'  = 'Card',
  'author'   = 'Mickey',
  'artist'   = '',
  'asin' = '1116221',
  'manufacturer' = 'Kraft'
 ); $i++;
...etc., etc.
--
H| I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 





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


Re: [PHP] Array Sorting

2003-06-19 Thread Marek Kilimajer
Yes, simply don't return 0 when the manufacturers are equal, but 
continue with other checks:

function cmp ($a, $b) {
if ($a['cat'] == $b['cat']) {
// return 0;  -- not anymore, but go on to compare manuf.
if ($a['manufacturer'] == $b['manufacturer']) {
if ($a['title'] == $b['title']) {
// even title is the same, return 0
return 0;
}
return ($a['title']  $b['title']) ? -1 : 1;
}
return ($a['manufacturer']  $b['manufacturer']) ? -1 : 1;
}
return ($a['cat']  $b['cat']) ? -1 : 1;
}
Ashley M. Kirchner wrote:
Marek Kilimajer wrote:

Use usort. This function should do the work:


   Hey thanks!  That worked like a charm, once I figured out that making 
the comparison  instead of  I would get an ascending sort instead of 
the descending one.  Now, can I do multiple sorts?  Like, sort on cat 
first, manufacturer next, and title last?  Here's the array 
structure again:

$i = 0;
$item[$i] = array( 'link' = 'http://...',
  'image'= '/images/image.jpg',
  'title'= 'some title',
  'price'= '$14.00',
  'cat'  = 'Frames',
  'author'   = 'Pinochio',
  'artist'   = '',
  'asin' = '010101',
  'manufacturer' = 'Post'
 ); $i++;
$item[$i] = array( 'link' = 'http://...',
  'image'= '/images/something.jpg',
  'title'= 'this is fun',
  'price'= '$2.99',
  'cat'  = 'Card',
  'author'   = 'Mickey',
  'artist'   = '',
  'asin' = '1116221',
  'manufacturer' = 'Kraft'
 ); $i++;
...etc., etc.


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


Re: [PHP] Array Sorting

2003-06-19 Thread Marek Kilimajer
BTW, this is what I always receive when mailing you:

Final-Recipient: RFC822; [EMAIL PROTECTED]
Action: failed
Status: 5.7.1
Remote-MTA: DNS; serpico.pcraft.com
Diagnostic-Code: SMTP; 554 5.7.1 Original message rejected due to high 
SPAM score: 97.4
Last-Attempt-Date: Thu, 19 Jun 2003 11:36:23 +0200 (CEST)



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


Re: [PHP] Array Sorting

2003-06-19 Thread Ashley M. Kirchner
Marek Kilimajer wrote:

BTW, this is what I always receive when mailing you:

Diagnostic-Code: SMTP; 554 5.7.1 Original message rejected due to high 
SPAM score: 97.4
   Hrm, yes.  Has to do with your .sk domain I'm sure.  Bloody 
automatic filters.

   Thanks for the function, it works as expected.  Now let me go kick 
those filters...

--
H| I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A. 





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


[PHP] Re: one corrupted image and imagecreatefromjpeg

2003-06-19 Thread Daniel
Since it seems noone has an easy answer for this, I thought I'd give advise
to find it manually a little quicker.

How about moving half the images to another directory and check if the bad
jpeg is among the remaining half, then remove half of those, then half of
those, etc. You should be able to find it fairly quickly even though you
have thousands of pictures.

=)

Hatem Ben [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hey all,

I have one corrupted image in a list of thoughsand of images, and the
program stop with this message

Corrupt JPEG data: bad huffman code

Any idea to ignore this image and continue ? i cannot detect which image is
corrupted and imagecreatefromjpeg return true



thank you,

Hatem






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



[PHP] [Newman] Passing an image through a php file.

2003-06-19 Thread Mark Tehara
I would like to pass an image throught http://server/newman/ImageTEST/image.php 

1. I need the headers (Assuming) ? header(Content-type: image/jpeg);  ? would make 
the computer think its a image file.
2. load the image using fopen (d://crushme//images//1.jpg, r);


?php

header(Content-type: image/jpeg);  
fopen (d://crushme//images//1.jpg, r);

?


 The image http://server/newman/ImageTEST/image.php; cannot be displayed, because it 
contains errors. 

This returns this error (above)

Yes 1. Image is in the right location.
Yes 2. I'm stuck.

Any Suggestions would be very good.

/ Mark /



Re: [PHP] [Newman] Passing an image through a php file.

2003-06-19 Thread Awlad Hussain
try this:
?php

header(Content-type: image/jpeg);
fopen (d:/crushme/images/1.jpg, r);

?
- Original Message - 
From: Mark Tehara [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 10:58 AM
Subject: [PHP] [Newman] Passing an image through a php file.


I would like to pass an image throught
http://server/newman/ImageTEST/image.php

1. I need the headers (Assuming) ? header(Content-type: image/jpeg);  ?
would make the computer think its a image file.
2. load the image using fopen (d://crushme//images//1.jpg, r);


?php

header(Content-type: image/jpeg);
fopen (d://crushme//images//1.jpg, r);

?


 The image http://server/newman/ImageTEST/image.php; cannot be displayed,
because it contains errors.

This returns this error (above)

Yes 1. Image is in the right location.
Yes 2. I'm stuck.

Any Suggestions would be very good.

/ Mark /



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



[PHP] Help me compose myself... I'm about to kill Microsoft....

2003-06-19 Thread Daniel
ARGH!

I'm losing my marbles here! I'm developing a small CMS for IE, but IE is
teasing me! It insists on using its cached files instead of those I'm
working on. I've set the cache size to 0, Check for newer versions of
stored pages: to Every visit to the page, and even put this at the top of
my PHP scripts:

header( Last-Modified:  . gmdate( D, d M Y H:i:s, filemtime(
$_SERVER['SCRIPT_FILENAME'] ) ) .  GMT );

It just keeps on using the cached files! WHY?!??! I'm in TEARS here!
Help!!!



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



Re: [PHP] Help me compose myself... I'm about to kill Microsoft....

2003-06-19 Thread Awlad Hussain
try something like this, not sure if this what you want
create a random value like
$random = rand();

then attach it to the each page.. like

index.php?random=$random

good luck

- Original Message - 
From: Daniel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 11:34 AM
Subject: [PHP] Help me compose myself... I'm about to kill Microsoft


 ARGH!

 I'm losing my marbles here! I'm developing a small CMS for IE, but IE is
 teasing me! It insists on using its cached files instead of those I'm
 working on. I've set the cache size to 0, Check for newer versions of
 stored pages: to Every visit to the page, and even put this at the top
of
 my PHP scripts:

 header( Last-Modified:  . gmdate( D, d M Y H:i:s, filemtime(
 $_SERVER['SCRIPT_FILENAME'] ) ) .  GMT );

 It just keeps on using the cached files! WHY?!??! I'm in TEARS here!
 Help!!!



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



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



Re: [PHP] one corrupted image and imagecreatefromjpeg

2003-06-19 Thread Marek Kilimajer
Try to use output buffer. Turn buffering on, and after each 
imagecreatefromjpeg() call check to see if there is some output waiting.

Hatem Ben wrote:
Hey all,

I have one corrupted image in a list of thoughsand of images, and the program stop with this message 

Corrupt JPEG data: bad huffman code

Any idea to ignore this image and continue ? i cannot detect which image is corrupted and imagecreatefromjpeg return true



thank you,

Hatem






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


Re: [PHP] Help me compose myself... I'm about to kill Microsoft....

2003-06-19 Thread Daniel
Thanks for the advice, but that would mean I'd have to change the way the
code works, and that would a bit much, I think... I was hoping for some
registry editing or a little utility or something...

But thanks =)

Daniel


Awlad Hussain [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 try something like this, not sure if this what you want
 create a random value like
 $random = rand();

 then attach it to the each page.. like

 index.php?random=$random

 good luck

 - Original Message - 
 From: Daniel [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, June 19, 2003 11:34 AM
 Subject: [PHP] Help me compose myself... I'm about to kill Microsoft


  ARGH!
 
  I'm losing my marbles here! I'm developing a small CMS for IE, but IE is
  teasing me! It insists on using its cached files instead of those I'm
  working on. I've set the cache size to 0, Check for newer versions of
  stored pages: to Every visit to the page, and even put this at the
top
 of
  my PHP scripts:
 
  header( Last-Modified:  . gmdate( D, d M Y H:i:s, filemtime(
  $_SERVER['SCRIPT_FILENAME'] ) ) .  GMT );
 
  It just keeps on using the cached files! WHY?!??! I'm in TEARS here!
  Help!!!
 
 
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




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



Re: [PHP] Help me compose myself... I'm about to kill Microsoft....

2003-06-19 Thread Daniel
Okay, I think I'll have to kill myself...

I can't believe I am this stupid, but it turned out I was working on a copy
of the file, not the real one. D'OH!!!

Sorry, guys!

Daniel

Daniel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Thanks for the advice, but that would mean I'd have to change the way the
 code works, and that would a bit much, I think... I was hoping for some
 registry editing or a little utility or something...

 But thanks =)

 Daniel


 Awlad Hussain [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  try something like this, not sure if this what you want
  create a random value like
  $random = rand();
 
  then attach it to the each page.. like
 
  index.php?random=$random
 
  good luck
 
  - Original Message - 
  From: Daniel [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, June 19, 2003 11:34 AM
  Subject: [PHP] Help me compose myself... I'm about to kill Microsoft
 
 
   ARGH!
  
   I'm losing my marbles here! I'm developing a small CMS for IE, but IE
is
   teasing me! It insists on using its cached files instead of those I'm
   working on. I've set the cache size to 0, Check for newer versions of
   stored pages: to Every visit to the page, and even put this at the
 top
  of
   my PHP scripts:
  
   header( Last-Modified:  . gmdate( D, d M Y H:i:s, filemtime(
   $_SERVER['SCRIPT_FILENAME'] ) ) .  GMT );
  
   It just keeps on using the cached files! WHY?!??! I'm in TEARS here!
   Help!!!
  
  
  
   -- 
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 






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



[PHP] typecasting .. easy?

2003-06-19 Thread Roy W
$amount is a calculated number
 
If $amount  equals for example 52., how do I get that to print as 52.00
similarly, if amount = 52.5 how do I get that to print as 52.50
 
Thanks!
(looked at all sort of type casting manual stuff to no avail)


Re: [PHP] typecasting .. easy?

2003-06-19 Thread Jon Haworth
Hi Roy,

 If $amount  equals for example 52., how do I get
 that to print as 52.00 similarly, if amount =
 52.5 how do I get that to print as 52.50

Have a look at the number_format() function, it should do what you want.
It'll also add commas to break up any thousands in your number (you can
bypass that if you like).

Cheers
Jon



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



Re: [PHP] typecasting .. easy?

2003-06-19 Thread bbonkosk
This is really a formatting issue, not type casting, so loook in those areas of 
the manual.  Perhaps start around:
http://us2.php.net/manual/en/function.printf.php
-Brad

 $amount is a calculated number
  
 If $amount  equals for example 52., how do I get that to print as 52.00
 similarly, if amount = 52.5 how do I get that to print as 52.50
  
 Thanks!
 (looked at all sort of type casting manual stuff to no avail)
 





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



Re: [PHP] typecasting .. easy?

2003-06-19 Thread Awlad Hussain
try 
$formatted = number_format($amount,2);

- Original Message - 
From: Roy W [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 12:41 PM
Subject: [PHP] typecasting .. easy?


 $amount is a calculated number
  
 If $amount  equals for example 52., how do I get that to print as 52.00
 similarly, if amount = 52.5 how do I get that to print as 52.50
  
 Thanks!
 (looked at all sort of type casting manual stuff to no avail)
 

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



Re: [PHP] Spellchecking using PHP on WinXP?

2003-06-19 Thread Lowell Allen
 From: Murray Wells [EMAIL PROTECTED]
 
 As I understand it Aspell / Pspell don't work under PHP on the WinXP
 platform. Just wondering if anyone knows of an alternative that does
 (for use with Apache server, if that's important)?

Not a PHP solution, but I can recommend the Java-based JSpell spell checker
if you've got Tomcat on Apache and you're OK with *absolutely no support*
installing. http://www.jspell.com/

--
Lowell Allen


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



RE: [PHP] unique random id

2003-06-19 Thread esctoday.com | Wouter van Vliet
check the manual on the rand(); function ..

If you want to make sure this number is unique .. create an array storing
all the numbers you've used once and do some nice tricks with a loop and
stuff untill you get a nice unique random number ... like this:

?php
$UsedValues = Array();

function GetRandomNumber() {
while(  $Rand = round( rand(0, 1000) )  ) {
# Using round() to round the float returned by rand()

if (!in_array($Rand, $UsedValues)) return $Rand;
array_push($UsedValues, $Rand);
}
};

?

-Oorspronkelijk bericht-
Van: Awlad Hussain [mailto:[EMAIL PROTECTED]
Verzonden: donderdag 19 juni 2003 10:47
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] unique random id


How do i generate a unique random number?

thanks

awlad





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



[PHP] Re: Validating a money input

2003-06-19 Thread Mike Mannakee
is_float()

Mike
  Todd Cary [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
  What is the best way to validate a money input?  For example, 3452.67 versus 
3452..67.

  Todd

  -- 
   


[PHP] STRANGE : SELECT OK on Localhost, OK within Dreamweaver, OK on phpmyadmin on site, BUT NOT OK on webpage???????HELP

2003-06-19 Thread WMB
Following select statement works OK on Localhost, OK within Dreamweaver
test, OK on phpmyadmin on site, BUT NOT OK on webpage.

It's the IF part where it states if(m.matchtypeid  3, etc

Here on the webpage itself it shows the 'in-/uitschrijven' or 'gesloten'
bit on those lines where it shouldn't , and just can't figure out why,
they do not show when testing with sqlyog on local pc, within
dreamweaver mx test module, withing phpmyadmin on site. STRANGE
STRANGE!!!

Any brains around who can help me please!

Thanks,
Martin

SELECT distinct m.id, m.naam,
left(m.startingtime,5) as starttijd ,
if(isqualifying,'Ja','') as Q,
date_format(playingdate,'%d-%m') as datumpje,
mt.naam as soort,
if(playingdate  FROM_DAYS( TO_DAYS( NOW( )) + 21),
if(m.matchtypeid  3
,
if(playingdate  FROM_DAYS( TO_DAYS( NOW( )) + 9)
,
'in-/uitschrijven'
,
'Gesloten'
)
,
''
)
,
''
)as inschrijven,
if(f.matchid = m.id, 'Startlijst',
if(wi.zoekcode='$details[1]','Ingeschreven',
date_format(if(playingdate  FROM_DAYS( TO_DAYS( NOW( )) + 9),
'',
FROM_DAYS( TO_DAYS( playingdate ) -21)),'%d-%m'))) as enu
FROM match1 as m
left outer join matchtype mt on mt.id = m.matchtypeid
left outer join flight f on f.matchid = m.id
left outer join wedstrijdinschrijvingen wi on wi.matchid = m.id
and wi.zoekcode='$details[1]'
WHERE playingdate  ( NOW( )- 3 )
ORDER BY playingdate



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




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



Re: [PHP] [Newman] Passing an image through a php file.

2003-06-19 Thread CPT John W. Holmes
 try this:
 ?php

 header(Content-type: image/jpeg);
 fopen (d:/crushme/images/1.jpg, r);

Just my opinion, but maybe you should try reading the file and echoing the
data instead of just opening it. :)

---John Holmes...


 I would like to pass an image throught
 http://server/newman/ImageTEST/image.php

 1. I need the headers (Assuming) ? header(Content-type: image/jpeg);
?
 would make the computer think its a image file.
 2. load the image using fopen (d://crushme//images//1.jpg, r);


 ?php

 header(Content-type: image/jpeg);
 fopen (d://crushme//images//1.jpg, r);

 ?


  The image http://server/newman/ImageTEST/image.php; cannot be displayed,
 because it contains errors.

 This returns this error (above)

 Yes 1. Image is in the right location.
 Yes 2. I'm stuck.

 Any Suggestions would be very good.


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



Re: [PHP] Trapping PHP Errors

2003-06-19 Thread CPT John W. Holmes
 How do I trap a PHP error and display my own error message instead?
 
 I have two PHP scripts - one that creates tables on MSSQL and one that
 deletes tables on MSSQL. I wish to capture the message that appears if
 the user attempts to create tables that already exist, or delete ones
 that do not exist.

http://us2.php.net/manual/en/function.set-error-handler.php

---John Holmes...

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



Re: [PHP] unique random id

2003-06-19 Thread CPT John W. Holmes
 How do i generate a unique random number?

You can use rand(), but there's no guarantee it'll be unique unless you
remember every number you've ever generated

---John Holmes...


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



Re: [PHP] Session Vars

2003-06-19 Thread CPT John W. Holmes
 setting up some pages to allow users to log in, and store their userID in
a
 session var.
 for development purposes, i've installed AMP on my windows box.

 -everything parses fine
 -register globals is on.

 problem: session vars do not seem to be carrying over pages, even when i
set
 the session_id to initial value.

 i start the session and save the variable:

 session_start();

 $PHPSESSID=session_id();

 $_SESSION['userID'] = $userID; //i've checked and $userID DOES contain a
 value: 1
 //If i echo $_SESSION['userID']; then it prints 1.


 header(Location: nextpage.php?PHPSESSID=$PHPSESSID);

 exit;


 on nextpage.php:

 session_start();

 session_id($PHPSESSID);

Please note the second sentence in this direct quote from the manual:

If id is specified, it will replace the current session id. session_id()
needs to be called before session_start() for that purpose. Depending on the
session handler, not all characters are allowed within the session id. For
example, the file session handler only allows characters in the range a-z,
A-Z and 0-9!

Thank you.

---John Holmes...


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



[PHP] php https file download

2003-06-19 Thread Henning Sittler
Hello everyone,

Apache 2.0.40
PHP 4.2.2
Linux

I have a single php script for downloading requested files.  It works
beautifully on http over port 80.  It does NOT work at all over https on
port 443.  I am using the exact same script (the very same file) for both
http and https connections.  Apache has the +StdEnvVars enabled for all
files and dirs under the https site.  Forms and cookies are working
normally, as are redirect headers.  But for some reason, the headers for
file downlaods are not working at all over ssl.

I am really only testing this with IE 6 right now.

What am I missing? What else can I check for?

 d.php 
function d() {
$fsp = '/mydir/myfile.exe';
$mimetype='application/octect-stream'; $encoding='binary';

//echo basename($fsp).filesize($fsp); return;

//header('Location: https://my.site.com/');

header('Content-Type: '.$mimetype);
header('Content-Length: '.filesize($fsp));
header('Content-Disposition: attachment;
filename='.basename($fsp).'');
header('Content-Transfer-Encoding: '.$encoding);
readfile($fsp);

return;
} // end d()

d();
 d.php 


I call this only after a user clicks a link on a second page. Uncommenting
the line starting with echo out puts the expected basename and filesize.
Uncommenting the line starting with header successfully redirects to the
correct url.  Leaving both the above lines commented, the user is prompted
with a open / save dialog but the filename showing is now the script name,
the filesize is missing, and clicking open or save shows a file tansfer
window that does nothing.

I have also tried testing this script with curl on linux.  Here's the
output.  I noticed the Content-Length header is missing!


 curl output 
[EMAIL PROTECTED] curl https://my.site.com/d.php --head
HTTP/1.1 200 OK
Date: Wed, 18 Jun 2003 18:45:24 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Accept-Ranges: bytes
X-Powered-By: PHP/4.2.2
Set-Cookie: PHPSESSID=ca805f9f0318a53e72abacf6db8fa677; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-Disposition: attachment; filename=myfile.exe
Content-Transfer-Encoding: binary
Connection: close
Content-Type: application/octect-stream

 curl output 


What's going on here?  Thanks in advance for any help you can offer!!


Henning Sittler
www.inscriber.com


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



Re: [PHP] php https file download

2003-06-19 Thread CPT John W. Holmes
 Apache 2.0.40
 PHP 4.2.2
 Linux

 I have a single php script for downloading requested files.  It works
 beautifully on http over port 80.  It does NOT work at all over https on
 port 443.  I am using the exact same script (the very same file) for both
 http and https connections.  Apache has the +StdEnvVars enabled for all
 files and dirs under the https site.  Forms and cookies are working
 normally, as are redirect headers.  But for some reason, the headers for
 file downlaods are not working at all over ssl.

 I am really only testing this with IE 6 right now.

Read here:

http://marc.theaimsgroup.com/?l=php-generalw=2r=1s=session.cache_limiter+httpsq=b

---John Holmes...


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



RE: [PHP] php https file download

2003-06-19 Thread Henning Sittler
Beautiful, that worked immediately!  Thanks for your very quick and super
helpful reply, John.

The solution is to change the session.cache_limiter to none in php.ini.


Henning Sittler
www.inscriber.com



-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 9:39 AM
To: Henning Sittler; [EMAIL PROTECTED]
Subject: Re: [PHP] php https file download


 Apache 2.0.40
 PHP 4.2.2
 Linux

 I have a single php script for downloading requested files.  It works
 beautifully on http over port 80.  It does NOT work at all over https on
 port 443. 

Read here:

http://marc.theaimsgroup.com/?l=php-generalw=2r=1s=session.cache_limiter+
httpsq=b

---John Holmes...

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



[PHP] Empty Page problems

2003-06-19 Thread Gary Ogilvie
Hello everyone,

Can anyone tell me what is wrong with my PHP script? I am trying to add
information to an MSSQL database from a separate HTM file. The script it
as follows:

?php

$myEmployeeName=$_GET['name'];
$myEmployeeDept=$_GET['department'];
$myEmployeeNotes=$_GET['notes'];
$myEmployeeCTP=$_GET['ctp_op'];

$myServer = 192.92.0.248; 
$myUser = repro; 
$myPass = repro; 
$myDB = repro;

error_reporting(E_ALL);

print (p class=\text\bAttempting To Connect To MSSQL -
/bbrbr);

$s = @mssql_connect($myServer, $myUser, $myPass)
or die(Couldn't Connect To SQL Server On $myServerbr);

print (uStage 2/ubr);

$d = @mssql_select_db($myDB, $s) 
or die(Couldn't Open Database $myDBbr);

#this is the create bit
print (Connected - Attempting To Create Employee...br);

if ($mYEmployeeCTP == on) {
$query = INSERT INTO users (name, department, notes, ctp_op)
VALUES ('$myEmployeeName', '$myEmployeeDept', '$myEmployeeNotes', 'Y');

$result = mssql_query($query)
or die(Creating Employee Failed);

} else {

$query = INSERT INTO users (name, department, notes, ctp_op)
VALUES ('$myEmployeeName', '$myEmployeeDept', '$myEmployeeNotes', 'N');

$result = mssql_query($query)
or die(Creating Employee Failed);

}

print (Employee Added To Databasebrbr);

print (a href=\index.htm\ class=\link\Go back to index/a/p);

?

Thanks in advance


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



[PHP] PHP: cannot configure SMTP_port....

2003-06-19 Thread Giuliano
Hi Other PHP Users,

i am trying to send mail from a script, but i receive these error message:

Warning: mail() [function.mail]: Failed to connect to mailserver at
localhost port 25, verify your SMTP and smtp_port setting in php.ini
or use ini_set() in c:\apacheserver\apache\htdocs\work-net\serial.php on
line 295

I have PHP + Apache + MySql and work in localhost on a win98 machine. how
can i set it?


Thank you in advance,

Giuliano





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



Re: [PHP] Empty Page problems

2003-06-19 Thread CPT John W. Holmes
 Can anyone tell me what is wrong with my PHP script? I am trying to add
 information to an MSSQL database from a separate HTM file. The script it
 as follows:

How about you tell us what the problem is? What is the result of this
script? What are you expecting the result to be? Take away the @ symbols so
you'll see errors if there are any. Add some debugging to track the progress
through the script

---John Holmes...

 ?php

 $myEmployeeName=$_GET['name'];
 $myEmployeeDept=$_GET['department'];
 $myEmployeeNotes=$_GET['notes'];
 $myEmployeeCTP=$_GET['ctp_op'];

 $myServer = 192.92.0.248;
 $myUser = repro;
 $myPass = repro;
 $myDB = repro;

 error_reporting(E_ALL);

 print (p class=\text\bAttempting To Connect To MSSQL -
 /bbrbr);

 $s = @mssql_connect($myServer, $myUser, $myPass)
 or die(Couldn't Connect To SQL Server On $myServerbr);

 print (uStage 2/ubr);

 $d = @mssql_select_db($myDB, $s)
 or die(Couldn't Open Database $myDBbr);

 #this is the create bit
 print (Connected - Attempting To Create Employee...br);

 if ($mYEmployeeCTP == on) {
 $query = INSERT INTO users (name, department, notes, ctp_op)
 VALUES ('$myEmployeeName', '$myEmployeeDept', '$myEmployeeNotes', 'Y');

 $result = mssql_query($query)
 or die(Creating Employee Failed);

 } else {

 $query = INSERT INTO users (name, department, notes, ctp_op)
 VALUES ('$myEmployeeName', '$myEmployeeDept', '$myEmployeeNotes', 'N');

 $result = mssql_query($query)
 or die(Creating Employee Failed);

 }

 print (Employee Added To Databasebrbr);

 print (a href=\index.htm\ class=\link\Go back to index/a/p);

 ?


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



Re: [PHP] PHP: cannot configure SMTP_port....

2003-06-19 Thread CPT John W. Holmes
 i am trying to send mail from a script, but i receive these error message:

 Warning: mail() [function.mail]: Failed to connect to mailserver at
 localhost port 25, verify your SMTP and smtp_port setting in php.ini
 or use ini_set() in c:\apacheserver\apache\htdocs\work-net\serial.php on
 line 295

 I have PHP + Apache + MySql and work in localhost on a win98 machine.
how
 can i set it?

Have you tried doing what the error message suggests? Setting the SMTP value
in php.ini or through ini_set()? I assume you're coming through some ISP and
do not have your own SMTP server running, so you'd set the SMTP settting in
php.ini to the SMTP server of your ISP.

---John Holmes...


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



[PHP] GD library update

2003-06-19 Thread Yury B .
Hi,
I need to use function imagecreatetruecolor() in my script but it 
doesn't work on my local apache+php+mysql on XP server. It works fine 
on the real server though but i need to play with it around. What do 
I need to do to get it work? from docs I understand I need gd 2.0.1 
or higher, well how to get it and how to install?

Thank you,

Yury
God is our provider 
http://www.body-builders.org/


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



RE: [PHP] Empty Page problems

2003-06-19 Thread Gary Ogilvie
I don't know what the problem is. I have used this script before with
MSSQL with no problems - only this morning in fact. I am VERY new to PHP
so I am still trying to get the hang on it.

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: 19 June 2003 15:07
To: Gary Ogilvie; [EMAIL PROTECTED]
Subject: Re: [PHP] Empty Page problems

 Can anyone tell me what is wrong with my PHP script? I am trying to
add
 information to an MSSQL database from a separate HTM file. The script
it
 as follows:

How about you tell us what the problem is? What is the result of this
script? What are you expecting the result to be? Take away the @ symbols
so
you'll see errors if there are any. Add some debugging to track the
progress
through the script

---John Holmes...

 ?php

 $myEmployeeName=$_GET['name'];
 $myEmployeeDept=$_GET['department'];
 $myEmployeeNotes=$_GET['notes'];
 $myEmployeeCTP=$_GET['ctp_op'];

 $myServer = 192.92.0.248;
 $myUser = repro;
 $myPass = repro;
 $myDB = repro;

 error_reporting(E_ALL);

 print (p class=\text\bAttempting To Connect To MSSQL -
 /bbrbr);

 $s = @mssql_connect($myServer, $myUser, $myPass)
 or die(Couldn't Connect To SQL Server On $myServerbr);

 print (uStage 2/ubr);

 $d = @mssql_select_db($myDB, $s)
 or die(Couldn't Open Database $myDBbr);

 #this is the create bit
 print (Connected - Attempting To Create Employee...br);

 if ($mYEmployeeCTP == on) {
 $query = INSERT INTO users (name, department, notes, ctp_op)
 VALUES ('$myEmployeeName', '$myEmployeeDept', '$myEmployeeNotes',
'Y');

 $result = mssql_query($query)
 or die(Creating Employee Failed);

 } else {

 $query = INSERT INTO users (name, department, notes, ctp_op)
 VALUES ('$myEmployeeName', '$myEmployeeDept', '$myEmployeeNotes',
'N');

 $result = mssql_query($query)
 or die(Creating Employee Failed);

 }

 print (Employee Added To Databasebrbr);

 print (a href=\index.htm\ class=\link\Go back to
index/a/p);

 ?


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


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



[PHP] template engine

2003-06-19 Thread Niels Uhlendorf
Hi,

Since I don't want to continue with Smarty I started with an own 
(little) template engine. In this first try it should only replace
{for loops=INTEGER} ... {/for} through a trivial FOR-loop which runs 
INTEGER times.

This mission was sent to the function loop in this file:
http://www.offucia.org/pages/template-engine/source.php?file=engine.php
In this file I try to work with it
http://www.offucia.org/pages/template-engine/source.php?file=test.php
But the file loop() cannot be found and theres this mistake error:
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or 
'$' in /www/htdocs/v035923/pages/template-engine/engine.php on line 26

Line 26 is this one:
$template = preg_replace(!{for loops=(.*)} (.*) 
{/for}!U,code($1,$2),$template);



Many thx 4 help
Niels Uhlendorf
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: GD library update

2003-06-19 Thread Andrei BEJENARU

Yury B . [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,
 I need to use function imagecreatetruecolor() in my script but it
 doesn't work on my local apache+php+mysql on XP server. It works fine
 on the real server though but i need to play with it around. What do
 I need to do to get it work? from docs I understand I need gd 2.0.1
 or higher, well how to get it and how to install?

 Thank you,

 Yury

The gd library is shipped with the PHP distribution, so you should simply
upgrade to version 4.3.1 or 4.3.2.
You must download the big zip distribution, as it has all the needed
libraries.
Follow the instructions in the install readme file and you should have no
problems.

Andrei BEJENARU



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



[PHP] Re: template engine

2003-06-19 Thread Andrei BEJENARU
You must use
$template = preg_replace(!{for loops=(.*)}(.*){/for}!U, code('\\1','\\2'),
$template);
since the references are of the form \\n

Andrei BEJENARU

Niels Uhlendorf [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 Since I don't want to continue with Smarty I started with an own
 (little) template engine. In this first try it should only replace
 {for loops=INTEGER} ... {/for} through a trivial FOR-loop which runs
 INTEGER times.

 This mission was sent to the function loop in this file:
 http://www.offucia.org/pages/template-engine/source.php?file=engine.php

 In this file I try to work with it
 http://www.offucia.org/pages/template-engine/source.php?file=test.php

 But the file loop() cannot be found and theres this mistake error:
 Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or
 '$' in /www/htdocs/v035923/pages/template-engine/engine.php on line 26

 Line 26 is this one:
 $template = preg_replace(!{for loops=(.*)} (.*)
 {/for}!U,code($1,$2),$template);



 Many thx 4 help
 Niels Uhlendorf




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



[PHP] Why Fatal Error: Allowed memory size ...

2003-06-19 Thread Tony Arcucci
Why this error ( Linux Redhat 8.0, PHP 4.2.2):

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 1048576 bytes) in /var/www/html/xpai/xmail.class on line 71

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 131 bytes) in Unknown on line 0

In PHP.INI memory_limit id 60M.



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



[PHP] Why Fatal Error ?

2003-06-19 Thread Tony Arcucci
Why this error ( Linux Redhat 8.0, PHP 4.2.2):

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 1048576 bytes) in /var/www/html/xpai/xmail.class on line 71

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 131 bytes) in Unknown on line 0

In PHP.INI memory_limit id 60M.




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



RE: [PHP] Why Fatal Error ?

2003-06-19 Thread Jay Blanchard
[snip]
Why this error ( Linux Redhat 8.0, PHP 4.2.2):

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 1048576 bytes) in /var/www/html/xpai/xmail.class on line 71

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 131 bytes) in Unknown on line 0

In PHP.INI memory_limit id 60M.
[/snip]

Because there is not enough memory to allocate to?

Jay

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



RE: [PHP] Why Fatal Error ?[Scanned]

2003-06-19 Thread Michael Egan
Tony,

It might be that somewhere in your code there is a loop or while structure that has an 
error.  This is running endlessly until you run out of memory which is when you see 
the error message.

Check the structures within the code to ensure that they are correct.

HTH,

Michael Egan

-Original Message-
From: Tony Arcucci [mailto:[EMAIL PROTECTED]
Sent: 19 June 2003 15:33
To: [EMAIL PROTECTED]
Subject: [PHP] Why Fatal Error ?[Scanned]


Why this error ( Linux Redhat 8.0, PHP 4.2.2):

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 1048576 bytes) in /var/www/html/xpai/xmail.class on line 71

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 131 bytes) in Unknown on line 0

In PHP.INI memory_limit id 60M.




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



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



Re: [PHP] Why Fatal Error ?

2003-06-19 Thread Tony Arcucci
This is the result of free

[EMAIL PROTECTED] webmin]# free
 total   used   free sharedbuffers cached
Mem:513936 444256  69680  0 157168 135476
-/+ buffers/cache: 151612 362324
Swap:   779104  0 779104

I think that memory is enough, or not ?


Jay Blanchard [EMAIL PROTECTED] ha scritto nel
messaggio news:[EMAIL PROTECTED]
[snip]
Why this error ( Linux Redhat 8.0, PHP 4.2.2):

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 1048576 bytes) in /var/www/html/xpai/xmail.class on line 71

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 131 bytes) in Unknown on line 0

In PHP.INI memory_limit id 60M.
[/snip]

Because there is not enough memory to allocate to?

Jay



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



Re: [PHP] Why Fatal Error ?[Scanned]

2003-06-19 Thread Tony Arcucci
Michael,
this is the line:

array_push($ret, $tmp[0]);

But is very strange, till yesterday phpadmin ( a software for xmail server)
worked fine, not reboot or other was done.
After the error, I changed memory_limit from 8 to 60 to resolve, but with 8M
yesterday worked fine.

Sorry for my english and thank you in advance.


Michael Egan [EMAIL PROTECTED] ha scritto nel messaggio
news:[EMAIL PROTECTED]
Tony,

It might be that somewhere in your code there is a loop or while structure
that has an error.  This is running endlessly until you run out of memory
which is when you see the error message.

Check the structures within the code to ensure that they are correct.

HTH,

Michael Egan

-Original Message-
From: Tony Arcucci [mailto:[EMAIL PROTECTED]
Sent: 19 June 2003 15:33
To: [EMAIL PROTECTED]
Subject: [PHP] Why Fatal Error ?[Scanned]


Why this error ( Linux Redhat 8.0, PHP 4.2.2):

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 1048576 bytes) in /var/www/html/xpai/xmail.class on line 71

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 131 bytes) in Unknown on line 0

In PHP.INI memory_limit id 60M.




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




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



[PHP] call-time pass-by-reference feature really deprecated?

2003-06-19 Thread dorgon
Hi,

I just got a warning message on a system using php version 4.3.1:

snip
Warning: Call-time pass-by-reference has been deprecated - argument 
passed by value; If you would like to pass it by reference, modify the 
declaration of [runtime function name](). If you would like to enable 
call-time pass-by-reference, you can set allow_call_time_pass_reference 
to true in your INI file. However, future versions may not support this 
any longer.
/snip

This msg does not appear on my machine running php 4.3.2. Maybe it's
because of the different configuration?
Will the pass-by-reference feature really be dropped?! Many software
design patterns wouldn't be possible anymore! It's an essential feature.
The config of the system throwing the warning is:

 './configure' '--with-mysql=/usr/local/mysql/' 
'--with-apache=../apache_1.3.27/' '--enable-track-vars' 
'--with-config-file-path=/etc/' '--with-imap=/usr/local/imap-2001a' 
'--with-gettext' '--with-exec-dir=/usr/local/typo3sh/bin' 
'--with-gd=/usr/local/typo3sh' '--with-jpeg-dir' '--with-png-dir' 
'--with-tiff-dir' '--with-ttf=/usr/local/typo3sh' '--with-zlib=yes' 
'--enable-gd-nativ-ttf' '--enable-ftp' '--with-xml'

/dorgon

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


[PHP] exec(), passthru()

2003-06-19 Thread Mignon Hunter
hello all,

I am trying to use either of the functions above to execute a compiled c
program on linux.  The command line works with ./a.out (a.out being the
filename).  Both my test.php and the exe are in the same directory. 
I've tried combinations of all the following. Thx Mignon

?
error_reporting (E_ALL);
error_reporting  (E_ERROR | E_WARNING | E_PARSE);

echo Here it comes:;

$var1 = exec(a.out);
echo $var1;//produces:Here it comes:
//tried a.out'a.out'./a.out'./a.out'
//./a.out

***

$var = passthru(a.out, $ret);
echo $var;//produces:(nothing)
echo $ret;//produces: 127

**

$var2 = system(a.out);
echo $var2; //produces:(nothing)

**

$var6 = ./a.out;
$var7 = exec($var6, $var_array[], $ret_var);
echo $var7;//produces:(nothing)
echo $var_array[];//produces:Array
echo $ret_var;//produces:127
echo $var6;//produces:(nothing)


***

$var3 = exec('./a.out', $var_array[], $ret_var);
echo $var3;//produces:Here it comes





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



[PHP] header(); Issue

2003-06-19 Thread SpyProductions Support Team

I have this in a script:

header(Location: $Relative/outstanding.php?pdd=1pddid=$poid);

It works fine elsewhere in the script without the variables.  Does anyone
know if php 4.06 has issues with this?  Or am I making a boneheaded mistake
here?

$Relative is from an include, and outputs fine.  :)

Thanks!

:)

-Mike



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



Re: [PHP] Another hosting question....

2003-06-19 Thread Guru Geek
Dear List,

I'll say it again, after viewing ALL of these 'hosting question' postsIf
you want really good, reliable, dependable service AND an excellent
combination of MB storage space and Transfer MB's then take a look at
http://www.webmasters.com

They even have 24 hour toll free phone support.  Control panel for your
domain management.  Several free scripts and package add ons.

No, I don't work for them, no I don't get kickbacks from them.  I'm just
that happy with their products and services...

Good Luck,
Roger

Boaz Yahav wrote:

 Check out :  http://weberdev.ref.phenominet.com

 This is your one stop shop for hosting. WeberDev.com is hosted there
 and I can tell you that their service is amazing. They are fast,
 reliable
 and more than anything, very professional (specially in PHP / MySQL).
 I have a dedicated server there for years.

 Sincerely

   berber

 Visit http://www.weberdev.com Today!!!
 To see where PHP might take you tomorrow.

 -Original Message-
 From: Mike Morton [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 19, 2003 1:52 AM
 To: PHP eMail List
 Subject: [PHP] Another hosting question

 I know that this subject has been beaten to death, but I going through
 old lists, I see a lot of hosting companies for site hosting, but I am
 interested specifically in dedicated server hosting.

 It is tough to find a hosting facility that is state of the art, with
 big pipes and redundancy, but is not a huge corporate company that could
 not care less about you

 What I am looking for specifically is a company that someone can
 recommend from direct experience, one that is customer friendly, offers
 dedicated servers at a REASONABLE price, offers admin support and server
 support, etc, etc, etc, and most importantly has expertise in compiling
 PHP.

 If anyone out there know of a company like this and can recommend them -
 I would appreciate it :) It will save literally hours and hours of
 sorting through the  google listings that a php dedicated hosting search
 brings back!  (2 days of sorting to this point anyhow!)

 TIA

 --
 Cheers

 Mike Morton

 
 *
 * Tel: 905-465-1263
 * Email: [EMAIL PROTECTED]
 *
 

 Indeed, it would not be an exaggeration to describe the history of the
 computer industry for the past decade as a massive effort to keep up
 with Apple.
 - Byte Magazine

 Given infinite time, 100 monkeys could type out the complete works of
 Shakespeare. Win 98 source code? Eight monkeys, five minutes.
 -- NullGrey

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

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



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



[PHP] Processing Form Data /w $_POST

2003-06-19 Thread Kyle Babich
I have a form (setup.php) that passes values to processSetup.php when they are written 
into setup.txt.  I'm trying to instead of writing every idividual value into setup.txt 
from setup.php, write a loop that will take as many values as there are in the $_POST 
array and write them all into a single array in logical order in setup.txt.  I'm new 
to php and can't figure out how to do this.  I'm thinking of something like...

for ($_POST) {
 fwrite($setup, /*something to add current $_POST value to the end of an array 
within $setup*/);
}

How should I go about this?

Thank you,
--
Kyle

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



[PHP] Re: header(); Issue

2003-06-19 Thread Esteban Fernandez
Try

header(Location: .$Relative./outstanding.php?pdd=1pddid=.$poid.);

EF.


Spyproductions Support Team [EMAIL PROTECTED] escribió en el
mensaje news:[EMAIL PROTECTED]

 I have this in a script:

 header(Location: $Relative/outstanding.php?pdd=1pddid=$poid);

 It works fine elsewhere in the script without the variables.  Does anyone
 know if php 4.06 has issues with this?  Or am I making a boneheaded
mistake
 here?

 $Relative is from an include, and outputs fine.  :)

 Thanks!

 :)

 -Mike





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



RE: [PHP] Processing Form Data /w $_POST

2003-06-19 Thread Henning Sittler
it's in the manual, read here:
http://ca.php.net/manual/en/control-structures.foreach.php


Henning Sittler
www.inscriber.com



-Original Message-
From: Kyle Babich [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 12:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Processing Form Data /w $_POST


I have a form (setup.php) that passes values to processSetup.php when they
are written into setup.txt.  I'm trying to instead of writing every
idividual value into setup.txt from setup.php, write a loop that will take
as many values as there are in the $_POST array and write them all into a
single array in logical order in setup.txt.  I'm new to php and can't figure
out how to do this.  I'm thinking of something like...

for ($_POST) {
 fwrite($setup, /*something to add current $_POST value to the end of an
array within $setup*/);
}

How should I go about this?

Thank you,
--
Kyle

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

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



[PHP] Re: Processing Form Data /w $_POST

2003-06-19 Thread Bobby Patel
What kind of 'logical' order do you need for the Post array?

To clarify:
Do you need to write to a file the POST variables passed to the script?


Kyle Babich [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have a form (setup.php) that passes values to processSetup.php when they
are written into setup.txt.  I'm trying to instead of writing every
idividual value into setup.txt from setup.php, write a loop that will take
as many values as there are in the $_POST array and write them all into a
single array in logical order in setup.txt.  I'm new to php and can't figure
out how to do this.  I'm thinking of something like...

for ($_POST) {
 fwrite($setup, /*something to add current $_POST value to the end of an
array within $setup*/);
}

How should I go about this?

Thank you,
--
Kyle



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



Re: [PHP] exec(), passthru()

2003-06-19 Thread Jason Wong
On Friday 20 June 2003 00:11, Mignon Hunter wrote:

 I am trying to use either of the functions above to execute a compiled c
 program on linux.  The command line works with ./a.out (a.out being the
 filename).  Both my test.php and the exe are in the same directory.
 I've tried combinations of all the following. Thx Mignon

What exactly do you want to do? exec()  passthru() have different uses. Do 
you want to capture the output of the program? The exit value? Or what?

When running external programs from PHP I find that it helps to specify the 
full path to the program. And you have made sure that you have the right 
permissions to execute said program?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Valerie: Aww, Tom, you're going maudlin on me ...
Tom: I reserve the right to wax maudlin as I wane eloquent ...
-- Tom Chapin
*/


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



Re: [PHP] Re: Processing Form Data /w $_POST

2003-06-19 Thread Kyle Babich
 What kind of 'logical' order do you need for the Post array?
 
 To clarify:
 Do you need to write to a file the POST variables passed to the script?

Yes, setup.php - processSetup.php - setup.txt

 
 
 Kyle Babich [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 I have a form (setup.php) that passes values to processSetup.php when they
 are written into setup.txt.  I'm trying to instead of writing every
 idividual value into setup.txt from setup.php, write a loop that will take
 as many values as there are in the $_POST array and write them all into a
 single array in logical order in setup.txt.  I'm new to php and can't figure
 out how to do this.  I'm thinking of something like...
 
 for ($_POST) {
  fwrite($setup, /*something to add current $_POST value to the end of an
 array within $setup*/);
 }
 
 How should I go about this?
 
 Thank you,
 --
 Kyle
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



[PHP] Re: Processing Form Data /w $_POST

2003-06-19 Thread Bobby Patel
$setup_filename = /path/to/file/on/the/server/;

$fd = fopen($setup_filename , 'a');  #a for appending to file, w to write
from the beginning checkout php.net for more details on fopen

$report = ;
#
#Apply any re-ordering of the Post array here to you 'logical' order
# look at the  manual for asort, ksort, etc

foreach ($HTTP_POST_VARS as $index = $value) {
$report = key:.$index. = .$value.\n;
}

fwrite($fd, $report );
fclose($fd);




Kyle Babich [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have a form (setup.php) that passes values to processSetup.php when they
are written into setup.txt.  I'm trying to instead of writing every
idividual value into setup.txt from setup.php, write a loop that will take
as many values as there are in the $_POST array and write them all into a
single array in logical order in setup.txt.  I'm new to php and can't figure
out how to do this.  I'm thinking of something like...

for ($_POST) {
 fwrite($setup, /*something to add current $_POST value to the end of an
array within $setup*/);
}

How should I go about this?

Thank you,
--
Kyle



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



Re: [PHP] call-time pass-by-reference feature really deprecated?

2003-06-19 Thread Jason Wong
On Thursday 19 June 2003 23:53, dorgon wrote:

 I just got a warning message on a system using php version 4.3.1:

 snip
 Warning: Call-time pass-by-reference has been deprecated - argument
 passed by value; If you would like to pass it by reference, modify the
 declaration of [runtime function name](). If you would like to enable
 call-time pass-by-reference, you can set allow_call_time_pass_reference
 to true in your INI file. However, future versions may not support this
 any longer.
 /snip

 This msg does not appear on my machine running php 4.3.2. Maybe it's
 because of the different configuration?

Maybe, there's a setting for this in php.ini.

 Will the pass-by-reference feature really be dropped?! Many software
 design patterns wouldn't be possible anymore! It's an essential feature.

pass-by-reference has not been dropped, it is Call-time pass-by-reference 
which is being deprecated.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
GIVE:   Support the helpless victims of computer error.
*/


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



[PHP] Re: call-time pass-by-reference feature really deprecated?

2003-06-19 Thread rush
Dorgon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Will the pass-by-reference feature really be dropped?! Many software
 design patterns wouldn't be possible anymore! It's an essential feature.

I think call-pass-by-reference is going away, but pass-by-reference is going
to be default in PHP5.

rush
--
http://www.templatetamer.com/




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



Re: [PHP] call-time pass-by-reference feature really deprecated?

2003-06-19 Thread dorgon
Maybe, there's a setting for this in php.ini.
yes. there is:
declaration of [runtime function name](). If you would like to enable
call-time pass-by-reference, you can set
allow_call_time_pass_reference to true in your INI file.
pass-by-reference has not been dropped, it is Call-time pass-by-reference 
which is being deprecated.
so call-time pass-by-reference is giving parameters as reference to 
functions, e.g.

function returnObjectToAccumulator($obj) {...}

If this feature is really dropped, how would you implement 
ConnectionPools for DB-connections for instance, or any classes
managing a set of object and providing them by returning references?

many OOP design patterns (primarily adopted from java) would not be
possible anymore. I think this would be worth talking about.
Is there any plausible reason for that decision?

/dorgon

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


RE: [PHP] Re: Processing Form Data /w $_POST

2003-06-19 Thread Dan Joseph
Hi,

 $report = key:.$index. = .$value.\n;

actually, shouldn't it be:

$report .= key:.$index. = .$value.\n;

If you don't have the . there, its going to keep overwriting the report,
and thus writing only the last $report item that was built.  .= would concat
'em all together.  Am I misunderstanding?

-Dan Joseph


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



[PHP] Re: call-time pass-by-reference feature really deprecated?

2003-06-19 Thread dorgon
whats the difference?

call-time-pass... is function callMe($obj) {...}
and pass-by-ref is return $obj ?
I'm not sure if I got you.
tx
dorgon
Rush wrote:
Dorgon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Will the pass-by-reference feature really be dropped?! Many software
design patterns wouldn't be possible anymore! It's an essential feature.


I think call-pass-by-reference is going away, but pass-by-reference is going
to be default in PHP5.
rush
--
http://www.templatetamer.com/




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


[PHP] Version Independent Sessions?

2003-06-19 Thread Lee Herron QCS
Does anyone know of a working snippet to manage sessions using any
combination of Register_Global and pre/post php v4.1?

Would love to look at some examples ..



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



Re: [PHP] Re: Processing Form Data /w $_POST

2003-06-19 Thread Bobby Patel
Yes that's right. this was just from the top of my head and it's early for
me.

it should be
$report .= key:.$index. = .$value.\n;

as Dan has pointed out.
Dan Joseph [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

  $report = key:.$index. = .$value.\n;

 actually, shouldn't it be:

 $report .= key:.$index. = .$value.\n;

 If you don't have the . there, its going to keep overwriting the report,
 and thus writing only the last $report item that was built.  .= would
concat
 'em all together.  Am I misunderstanding?

 -Dan Joseph




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



RE: [PHP] picture help

2003-06-19 Thread Edward Peloke
thanks Jason,

This worked much better!

Eddie

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 5:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] picture help


On Thursday 19 June 2003 05:05, Edward Peloke wrote:
 thanks, I tried and it doesn't help.  For some reason some of the pictures
 I upload look fine and some look bad no matter if I use imagecopyresampled
 or resized

  $newimg=imagecreate($nw,$nh);

Use imagecreatetruecolor() instead.

--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Kime's Law for the Reward of Meekness:
Turning the other cheek merely ensures two bruised cheeks.
*/


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


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



RE: [PHP] Re: header(); Issue

2003-06-19 Thread Mike At Spy

I'll give one of the suggestions a whirl (or both).  I do have this same
sort of thing on a different server with a more recent version of PHP -
which is why I thought it might be a version issue. :)

-Mike


 -Original Message-
 From: Esteban Fernandez [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 19, 2003 12:41 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: header(); Issue


 Try

 header(Location: .$Relative./outstanding.php?pdd=1pddid=.$poid.);

 EF.


 Spyproductions Support Team [EMAIL PROTECTED] escribió en el
 mensaje news:[EMAIL PROTECTED]
 
  I have this in a script:
 
  header(Location: $Relative/outstanding.php?pdd=1pddid=$poid);
 
  It works fine elsewhere in the script without the variables.
 Does anyone
  know if php 4.06 has issues with this?  Or am I making a boneheaded
 mistake
  here?
 
  $Relative is from an include, and outputs fine.  :)
 
  Thanks!
 
  :)
 
  -Mike
 
 



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




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



Re: [PHP] call-time pass-by-reference feature really deprecated?

2003-06-19 Thread Bobby Patel
Isn't Call-time pass-by-reference the following

$variable = myFunction1($x); Where
myFunction1() is defined as function myFunction1($x)

Where as pass-be-reference is called as
$variable = myFunction2($x); Where is defined as function myFunction2
($Obj);

I think the latter is better anyways, because the caller shouldn't know the
internals of  the function, so you don't know if the function will copy the
argument and use that instead.

Dorgon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
  Maybe, there's a setting for this in php.ini.

 yes. there is:
  declaration of [runtime function name](). If you would like to enable
  call-time pass-by-reference, you can set
  allow_call_time_pass_reference to true in your INI file.

  pass-by-reference has not been dropped, it is Call-time
pass-by-reference
  which is being deprecated.

 so call-time pass-by-reference is giving parameters as reference to
 functions, e.g.

 function returnObjectToAccumulator($obj) {...}

 If this feature is really dropped, how would you implement
 ConnectionPools for DB-connections for instance, or any classes
 managing a set of object and providing them by returning references?

 many OOP design patterns (primarily adopted from java) would not be
 possible anymore. I think this would be worth talking about.

 Is there any plausible reason for that decision?

 /dorgon




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



[PHP] Re: Another hosting question....

2003-06-19 Thread Paul Chvostek
On Wed, Jun 18, 2003 at 07:52:21PM -0400, Mike Morton wrote:
 
 What I am looking for specifically is a company that someone can recommend
 from direct experience, one that is customer friendly, offers dedicated
 servers at a REASONABLE price, offers admin support and server support, etc,
 etc, etc, and most importantly has expertise in compiling PHP.
 
 If anyone out there know of a company like this and can recommend them - I
 would appreciate it :) It will save literally hours and hours of sorting
 through the  google listings that a php dedicated hosting search brings
 back!  (2 days of sorting to this point anyhow!)

I would tout my own company, but we focus more on co-location of
customer-provided equipment rather than server rental.

So I'll tout the competition and throw http://prioritycolo.com/ into the
fray.  The guy who owns and runs it is friendly, honest and highly
knowledgeable, the upstream connectivity is fast and reliable (though
not multihomed AFAIK).  The servers are FreeBSD with CPanel (unless you
specifically require something else), and the prices are excellent.

Plus, he's local.  :-)  His cage is at 151 Front, just down the hall
from mine.

-- 
  Paul Chvostek [EMAIL PROTECTED]
  it.canadahttp://www.it.ca/
  Free PHP web hosting!http://www.it.ca/web/


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



[PHP] Re: Version Independent Sessions?

2003-06-19 Thread dorgon
that's some of my scripts I once used.
have a look at it. it won't run instantly, since I just
took them from a collection of classes
hth
/Dorgon
the most interesting part will be:

// initialize global session object
session_start();
if (isset($_SESSION)) { // php versions = 4.1.0
if (!isset($_SESSION['userSess'])) {
$_SESSION['userSess'] = new UserSession();
$sess = $_SESSION['userSess'];
$sess-init();
}
else {
$sess = $_SESSION['userSess'];
$_SESSION['userSess']-reuse();
}
}
else { // for downward compatibility to old php version ( 4.1.0)
if (!isset($userSess)) {
$userSess = new UserSession();
$sess = $userSess;
$userSess-init();
session_register(userSess);
}
else {
$sess = $userSess;
$userSess-reuse();
session_register(userSess);
}
}
Lee Herron Qcs wrote:
Does anyone know of a working snippet to manage sessions using any
combination of Register_Global and pre/post php v4.1?
Would love to look at some examples ..


?php
/** class Session
 *
 * This abstract class provides additional session handling functions beside
 * PHP4's already built-in routines for session treatment.
 * functions reuseAction(), loginAction($user), loginFormAction(), logoutAction()
 * have to be implemented by child classes!
 * All functions are commented below.
 *
 * @author  [EMAIL PROTECTED]
 * @version $Id: $
 *
 */

define(__SESSION_CLASS, 1);

class Session {
var $userID;
var $userData;
var $msg;

var $params;

/**
 * after starting a new native php4-session,
 * the Session object should be created
 */
function Session() {
$this-params = array();
$this-msg = ;
$this-userID = null;
$this-userData = array();

}

/**
 * reuse() should be called on each page request within session scope
 * get-parameters which should be stored in the session can be submitted
 * by a single get-variable: params=KEY1_VALUE1,KEY2_VALUE2,KEY3_VALUE3...
 * ater that the login action is called and
 * finally the proper reuseAction() function of the child class is called
 */
function reuse() {
if (isset($GLOBALS['_GET']['params'])) {
$doubles = explode(.,$GLOBALS['_GET']['params']);
foreach ($doubles as $par) {
$par = explode(_,$par);
$this-params[$par[0]] = $par[1];
}
}
$this-doLogin();
$this-reuseAction();
}

/**
 * login action
 * proper functions loginAction(), log
 */
function doLogin() {
if (isset($GLOBALS['_GET']['dologin'])) {
switch($GLOBALS['_GET']['dologin']) {
case form:
$this-loginFormAction();
break;
case login:
if ($GLOBALS['_POST']['user_login'] == ) {
$this-msg = Please enter your login 
name.;
return false;
}
else {
if(!defined(__USEROBJECT_CLASS)) 
include $GLOBALS['conf']-get(dir_objects).userobject.inc;
$user = new UserObject();

$user-loadUserByLogin($GLOBALS['_POST']['user_login']);
if 
($user-checkPwd($GLOBALS['_POST']['user_password'])) {
if 
($this-loginAction($user)) {
$this-userData = 
$user-getRecord();
$user-unload();

$this-userID = 
$this-userData['user_id'];

$this-params['last_selflogin_time'] = $this-userData['last_login_time'];

$this-params['last_selflogin_host'] = $this-userData['last_login_host'];

$user-loadLastAdmin();

$this-params['last_userlogin_name'] = $user-get(user_first_name). 
.$user-get(user_last_name);
  

Re: [PHP] call-time pass-by-reference feature really deprecated?

2003-06-19 Thread dorgon
I think you are absolutely right.
thanx!
I'll fix it and see if the warning still remains.
/Dorgon
Bobby Patel wrote:
Isn't Call-time pass-by-reference the following

$variable = myFunction1($x); Where
myFunction1() is defined as function myFunction1($x)
Where as pass-be-reference is called as
$variable = myFunction2($x); Where is defined as function myFunction2
($Obj);
I think the latter is better anyways, because the caller shouldn't know the
internals of  the function, so you don't know if the function will copy the
argument and use that instead.
Dorgon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Maybe, there's a setting for this in php.ini.
yes. there is:
declaration of [runtime function name](). If you would like to enable
call-time pass-by-reference, you can set
allow_call_time_pass_reference to true in your INI file.

pass-by-reference has not been dropped, it is Call-time

pass-by-reference

which is being deprecated.
so call-time pass-by-reference is giving parameters as reference to
functions, e.g.
function returnObjectToAccumulator($obj) {...}

If this feature is really dropped, how would you implement
ConnectionPools for DB-connections for instance, or any classes
managing a set of object and providing them by returning references?
many OOP design patterns (primarily adopted from java) would not be
possible anymore. I think this would be worth talking about.
Is there any plausible reason for that decision?

/dorgon






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


Re: [PHP] call-time pass-by-reference feature really deprecated?

2003-06-19 Thread Jason Wong
On Friday 20 June 2003 01:11, dorgon wrote:
  Maybe, there's a setting for this in php.ini.

 yes. there is:

Yes, I know there is ;-) The 'maybe' is maybe you have it set different on the 
two systems.

  declaration of [runtime function name](). If you would like to enable
  call-time pass-by-reference, you can set
  allow_call_time_pass_reference to true in your INI file.
 
  pass-by-reference has not been dropped, it is Call-time
  pass-by-reference which is being deprecated.

 so call-time pass-by-reference is giving parameters as reference to
 functions, e.g.

 function returnObjectToAccumulator($obj) {...}

 If this feature is really dropped, how would you implement
 ConnectionPools for DB-connections for instance, or any classes
 managing a set of object and providing them by returning references?

 many OOP design patterns (primarily adopted from java) would not be
 possible anymore. I think this would be worth talking about.

 Is there any plausible reason for that decision?

Call-time pass-by-reference
=
  function doo($i_may_or_may_not_be_a_reference) {
$i_may_or_may_not_be_a_reference++;
  }

  $i = 1;
  doo($i);
  echo $i; // 1
  doo($i);
  echo $i; // 2

// here doo() is not defined to have parameters passed by reference. The 
decision on whether to pass by reference is made at run-time, hence call-time  
pass-by-reference. It is this behaviour which is being deprecated.

So in the newer versions of PHP if call-time pass-by-reference is disabled and 
you wish to pass parameters by reference you'll have to define your functions 
accordingly:

  function doo($i_am_passed_by_reference) { ... }

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Federal grants are offered for... research into the recreation
potential of interplanetary space travel for the culturally disadvantaged.
*/


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



Re: [PHP] unique random id

2003-06-19 Thread Don Read

On 19-Jun-2003 Awlad Hussain wrote:
 How do i generate a unique random number? 
 

http://www.php.net/manual/en/function.uniqid.php

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.


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



Re: [PHP] call-time pass-by-reference feature really deprecated?

2003-06-19 Thread dorgon
Thanks for the explanation.
Yes, let us drop call-time pass-by-reference!! I'm with you. ;-)
/dorgon

Jason Wong wrote:
On Friday 20 June 2003 01:11, dorgon wrote:

Maybe, there's a setting for this in php.ini.
yes. there is:


Yes, I know there is ;-) The 'maybe' is maybe you have it set different on the 
two systems.


declaration of [runtime function name](). If you would like to enable
call-time pass-by-reference, you can set
allow_call_time_pass_reference to true in your INI file.
pass-by-reference has not been dropped, it is Call-time
pass-by-reference which is being deprecated.
so call-time pass-by-reference is giving parameters as reference to
functions, e.g.
function returnObjectToAccumulator($obj) {...}

If this feature is really dropped, how would you implement
ConnectionPools for DB-connections for instance, or any classes
managing a set of object and providing them by returning references?
many OOP design patterns (primarily adopted from java) would not be
possible anymore. I think this would be worth talking about.
Is there any plausible reason for that decision?


Call-time pass-by-reference
=
  function doo($i_may_or_may_not_be_a_reference) {
$i_may_or_may_not_be_a_reference++;
  }
  $i = 1;
  doo($i);
  echo $i; // 1
  doo($i);
  echo $i; // 2
// here doo() is not defined to have parameters passed by reference. The 
decision on whether to pass by reference is made at run-time, hence call-time  
pass-by-reference. It is this behaviour which is being deprecated.

So in the newer versions of PHP if call-time pass-by-reference is disabled and 
you wish to pass parameters by reference you'll have to define your functions 
accordingly:

  function doo($i_am_passed_by_reference) { ... }



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


[PHP] switch structure...

2003-06-19 Thread Dan Joseph
Hi All,

Looking for some guidance on something I want to be able to do with switch,
and I don't think it exists, but I'd like to consult the list as a last
resort.

I have a switch setup similar to:

switch ($step) {
case 0 :
blah...
break;

case 1 :
blah...
breakl
}

Under case 0, I'd like to do a few things, and then if a certain condition
is met, move into case 1.  Is this possible?  Am I off the wall here?  Is
there a better way of doing this madness I've come up with?

-Dan Joseph


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



[PHP] exec() and passthru()

2003-06-19 Thread Mignon Hunter
Jason,

I'm only subscribed to digest and found your reply in archives and
couldnt figure out how to reply  :{

Anyway, right now I'm just trying to get something to work.  The c exe
is as follows:
**
#include stdio.h
#define NAME Mignon
int main(void)
{

  int q;

  q = 5;
  printf(Hello, %s,%d \n, NAME,q);
  return 0;
}
*

I'm trying to return the Hello, Mignon, 5 which is what's outputted on
the command line.

After I get this to work, I'll be needing it to execute a complex
function in c, and bring variables back to my php shopping cart.

Here's my test.php:
?
error_reporting (E_ALL);
error_reporting  (E_ERROR | E_WARNING | E_PARSE);

echo Here it comes:;

/*$var1 = exec(a.out);
echo $var1;//produces:Here it comes:
//tried a.out'a.out'./a.out'./a.out'
//./a.out
*/
//***

/*$var = passthru(a.out, $ret);
echo $var;//produces:(nothing)
echo $ret;//produces: 127
*/
//**

/*$var2 = system(a.out);
echo $var2; //produces:(nothing)
*/
//**

/*$var6 = ./a.out;
$var7 = exec($var6, $var_array[], $ret_var);
echo $var7;//produces:(nothing)
echo $var_array[];//produces:Array
echo $ret_var;//produces:127
echo $var6;//produces:(nothing)
*/

//***

/*$var3 = exec(`/var/www/htdocs/vertex_test/a.out`, $var_array[],
$ret_var);
echo $var3;//produces:Here it comes
echo $ret_var;
echo $var_array[0];
*/
//

passthru(/var/www/htdocs/vertex_test/a.out, $res);
echo $res;

?

-- 
Mignon Hunter
Web Master and Developer
Toshiba International
713.466.0277 x 3461


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



Re: [PHP] switch structure...

2003-06-19 Thread Chris Boget
 I have a switch setup similar to:
 Under case 0, I'd like to do a few things, and then if a certain condition
 is met, move into case 1.  Is this possible?  Am I off the wall here?  Is
 there a better way of doing this madness I've come up with?

Just do a conditional break.

Chris


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



Re: [PHP] switch structure...

2003-06-19 Thread R'twick Niceorgaw
On 19 Jun 2003 at 13:52, Dan Joseph wrote:

 Hi All,
 
   Looking for some guidance on something I want to be able to do with switch,
 and I don't think it exists, but I'd like to consult the list as a last
 resort.
 
   I have a switch setup similar to:
 
   switch ($step) {
   case 0 :
   blah...
   break;
 
   case 1 :
   blah...
   breakl
   }
 
   Under case 0, I'd like to do a few things, and then if a certain condition
 is met, move into case 1.  Is this possible?  Am I off the wall here?  Is
 there a better way of doing this madness I've come up with?
 
 -Dan Joseph
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

case 0:
blah blah blah.
if (my condition == false)
break;
case 1:
blah blah ..




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



RE: [PHP] switch structure...

2003-06-19 Thread Dan Joseph
Hi,

 Just do a conditional break.

 case 0:
   blah blah blah.
   if (my condition == false)
   break;
 case 1:
 blah blah ..

Oh...  you know, I've gotta stop leaving my brain at home.  Thanks Chris,
R'twick..  It sure is a relief to know that this list is here when I'm
having bad PHP days..  which lately, is everyday...  This solved my problem
perfectly.

-Dan Joseph


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



[PHP] error handling

2003-06-19 Thread Mignon Hunter
On my dev server the php.ini is set to log all errors and notices.  

Isnt there a way to over ride this on a per script basis to output to
stdout (or my browser) ?

Thx
-- 
Mignon 


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



Re: [PHP] error handling

2003-06-19 Thread Jason Wong
On Friday 20 June 2003 02:11, Mignon Hunter wrote:
 On my dev server the php.ini is set to log all errors and notices.

 Isnt there a way to over ride this on a per script basis to output to
 stdout (or my browser) ?

Yes, manual  Error Handling and Logging Functions

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Most people's favorite way to end a game is by winning.
*/


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



[PHP] file downloading

2003-06-19 Thread Roberts, Mark (Tulsa)
I need to provide a way for users to download data files from a web site.
 
I know that I could have then right click and save-as, however, I need to record this 
action in a database. If they just right click, I don't have any way to trigger the 
script to record the transaction.
 
Does some one have a good way to do this, or at least give me some ideas? Thanks.

Mark Roberts 
Sr. Systems Analyst 


 


Re: [PHP] switch structure...

2003-06-19 Thread Chris Boget
 Oh...  you know, I've gotta stop leaving my brain at home.  Thanks Chris,
 R'twick..  It sure is a relief to know that this list is here when I'm
 having bad PHP days..  which lately, is everyday...  This solved my problem
 perfectly.

np.  
We've all had our brain fart days.  Or weeks. :p

Chris


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



[PHP] PHP header and odbc struggle with MS-SQL 2003...

2003-06-19 Thread Scott Fletcher
Any success with making the PHP Header and PHP odbc_connect work
successfully on PHP version 4.0.2 while the IIS 5.0 is hooked up to MS-SQL
2003?  We had no problem with this if IIS 5.0 is hooked up to MS-SQL 2000.

I assumed it had to do with the PHP depending on the named-pipe.  I just
switched the ODBC driver over to TCP/IP then all of a sudden, errors with
PHP Header and PHP odbc_connect.  Problem is force.cgi-redirect doesn't
exist on PHP 4.0.2.  But PHP ODBC have problem with MS-SQL 2003 because it's
a little different.

Yea, we know we need newer PHP version, I already have most of the website
working on the test machine with the newer php version except a few more
websites that have yet to be upgraded to work with newer version.

Thanks,
 Scott



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



Re: [PHP] exec() and passthru()

2003-06-19 Thread Jason Wong
On Friday 20 June 2003 01:56, Mignon Hunter wrote:

 I'm only subscribed to digest and found your reply in archives and
 couldnt figure out how to reply  :{

 Anyway, right now I'm just trying to get something to work.  The c exe
 is as follows:
 **
 #include stdio.h
 #define NAME Mignon
 int main(void)
 {

   int q;

   q = 5;
   printf(Hello, %s,%d \n, NAME,q);
   return 0;
 }
 *

 I'm trying to return the Hello, Mignon, 5 which is what's outputted on
 the command line.

In that case what you want is shell_exec():

  $output = shell_exec('/path/to/a.out'); // note the whole command line has
  // to be enclosed in '' or .
  echo $output;

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Taxes are going up so fast, the government is likely to price itself
out of the market.
*/


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



[PHP] Convert KB to MB?

2003-06-19 Thread MIKE YRABEDRA


Is there a simple script that will take a value in Kilobytes and convert it
to MegaBytes?



++
Mike Yrabedra (President)
323 Incorporated 
Home of MacDock, MacAgent and MacSurfshop
++
W: http://www.323inc.com/
P: 770.382.1195
F: 734.448.5164
E: [EMAIL PROTECTED]
I: ichatmacdock
++
Whatever you do, work at it with all your heart,
as working for the Lord, not for men.
~Colossians 3:23 {{{
++



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



Re: [PHP] Convert KB to MB?

2003-06-19 Thread Mike Migurski
Is there a simple script that will take a value in Kilobytes and convert
it to MegaBytes?

$value_in_mb = $value_in_kb / 1024;

ta da

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html


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



[PHP] Re: error handling

2003-06-19 Thread Mignon Hunter
I looked in the manual (twice now).  I want to keep logging to the log
file but print to browser on this one script.

I have in my script:
error_reporting (E_ALL);
error_reporting  (E_ERROR | E_WARNING | E_PARSE);

but they're still only being logged to file.  I dont have access to
php.ini.


Yes, manual  Error Handling and Logging Functions

On Friday 20 June 2003 02:11, Mignon Hunter wrote:
 On my dev server the php.ini is set to log all errors and notices.

 Isnt there a way to over ride this on a per script basis to output to
 stdout (or my browser) ?




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



  1   2   >