[PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Shane
Greetings gang.

You know me, I never ask for help if I haven't checked all my other options, but this 
is day two, and I'm getting spanked on this one.

Some recently moved scripts from a WIN2K server running PHP 4.2.1 to an Apache PHP 
4.2.3 setup have stop accepting HTML Form Variables.

I can pass variables till I am blue in the face, even see them in the URL but they are 
still showing up as (!isset)

My ISP (Whom is using Virtual Directories) has no solution, and I have tried every 
code variation I could think of to troubleshoot it. This code has been working fine 
for Months on the WIN2K box, but just doesn't pass a var on the Linux solution.

Can any Server pros out there possibly throw me a bone? My deadline is looming. :^)

As always, a million thanks in advance.
Yours truly.
-NorthBayShane

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




RE: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Shane
> I can pass variables till I am blue in the face, even 
> see them in the URL but they are still showing up as (!isset)

Are you accessing these variables through $var or $_GET["var"]?

I am accessing them as $var.

Example (from memory)

if(!isset($var)){
// do nothing
}else{
// VAR IS SET.. DO SOMETHING
}

Real basic stuff, but if I echo out the value so I see if it matches what I see in the 
above URL I get...

(SAMPLE URL) blah/my_url.php?submit=submit

(SAMPLE CODE) 

(SAMPLE RESULTS) Submit = 

Thanks gang!

I have never needed to use $_GET["var"]
What is the main difference?
Would this be a setting difference between a WIN setup of PHP and a Linux setu of PHP?

- over

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




RE: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Shane
Ahh Yes, Register Globals is off on the new set up, and is ON on the old Win Box.

You folks soo rule
Drinks all around!
-Thanks a million
NorthBayShane

Register_Globals is off by default in version 4.2.3. See the following
manual page for more information.

http://www.php.net/manual/en/language.variables.predefined.php




- Original Message -
From: "Shane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 10, 2002 11:08 AM
Subject: [PHP] Pls Help: Moving script from Win to Linux


Greetings gang.

You know me, I never ask for help if I haven't checked all my other
options, but this is day two, and I'm getting spanked on this one.

Some recently moved scripts from a WIN2K server running PHP 4.2.1 to
an Apache PHP 4.2.3 setup have stop accepting HTML Form Variables.

I can pass variables till I am blue in the face, even see them in the
URL but they are still showing up as (!isset)

My ISP (Whom is using Virtual Directories) has no solution, and I have
tried every code variation I could think of to troubleshoot it. This
code has been working fine for Months on the WIN2K box, but just
doesn't pass a var on the Linux solution.

Can any Server pros out there possibly throw me a bone? My deadline is
looming. :^)

As always, a million thanks in advance.
Yours truly.
-NorthBayShane

--
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] In Need of a PHP freelancer...

2003-02-04 Thread Shane
-Original Message-
Greetings... I am in need of a freelancer to write an additional function to our 
company's extranet. Before I go and post a request to this list, I would like to know 
if there is a more appropriate place to post such a request, and still get quality 
folks who know their stuff.

Suggestion are appreciated.
Thanks gang!
- That is all.
NorthBayShane

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




[PHP] HELP: COM(CDO.Message)HTML vs TEXT

2002-07-23 Thread Shane

Greetings PHPers. For those of you with MS COM experience or those who want to know 
how to send a MULTI MIME type message read on.

I'm trying to find out the syntax for sending an HTMLbody and TEXTbody in the same 
message thus making it a TRUE MULTI message. (see code)

This is what I have... what am I doing wrong??? Any Clues?

$message = new COM('CDO.Message');
$message->To = $myList[$i];
$message->From = '[EMAIL PROTECTED]';
$message->Subject 'My Subject Line';
$message->TEXTBody = "This is my plain Text Body!"
$message->HTMLBody = "HTML STRING HERE";
$message->Send();

Do I need to declare the HTML body first?
Do I have to set the AutoGeneratedTextBody property to false?
Commenting out the TEXTBody line sends a auto generated text body by default, but I 
was hoping to be able to customize my TEXTBody with a bit more control.

Your comments are always GREATLY appreciated.
Thanks gang!
- NorthBayShane

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




RE: [PHP] HELP: COM(CDO.Message)(SOLVED!!!)

2002-07-23 Thread Shane

Placing the line
$message->TEXTBody = "This is my plain Text Body!"
AFTER your HTMLBody tag did the trick.

Try it out Solved my own problem, but I hope this helps someone else out.

-Original Message-
From: Shane 
Sent: Tuesday, July 23, 2002 12:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] HELP: COM(CDO.Message)HTML vs TEXT


Greetings PHPers. For those of you with MS COM experience or those who want to know 
how to send a MULTI MIME type message read on.

I'm trying to find out the syntax for sending an HTMLbody and TEXTbody in the same 
message thus making it a TRUE MULTI message. (see code)

This is what I have... what am I doing wrong??? Any Clues?

$message = new COM('CDO.Message');
$message->To = $myList[$i];
$message->From = '[EMAIL PROTECTED]';
$message->Subject 'My Subject Line';
$message->TEXTBody = "This is my plain Text Body!"
$message->HTMLBody = "HTML STRING HERE";
$message->Send();

Do I need to declare the HTML body first?
Do I have to set the AutoGeneratedTextBody property to false?
Commenting out the TEXTBody line sends a auto generated text body by default, but I 
was hoping to be able to customize my TEXTBody with a bit more control.

Your comments are always GREATLY appreciated.
Thanks gang!
- NorthBayShane

-- 
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] MySQL equivalent to append?

2002-07-23 Thread Shane

Greetings, is there a mySQL syntax command equivalent to appending information to a 
text record.

If I wanted to add an email value to a text record that already has an email value in 
it, is there a faster way to do this than reading the original value, combining the 
new value to it, and then running an UPDATE command?

- Thanks

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




[PHP] Help with fopen please.

2002-07-31 Thread Shane

Looked in the archive and manual and came up with no luck, so here it goes.

My end result is to save the output of a PHP script as an HTML file in a specified 
directory on a WIN2K server.

my script is such...
http://myserver.net/extranet/archive.php?jobid=1";;  
$fd = fopen( $filename, "r" ); 
$fd2 = fopen("ftp://me:[EMAIL PROTECTED]/extranet/test2.html";, "w");

while (!feof($fd)) { 
$line = fgets($fd, 1024); 
fputs($fd2,$line); 
} 

fclose($fd); 
fclose($fd2); 
}
?>

I'm having a terrible time getting this to work. Is there a better way? Or can someone 
point me toward or post an example of some working function I could study???

Thanks so much my friends!
- NorhthBayShane

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




[PHP] Best way to save?

2002-08-01 Thread Shane

Besides using fOpen to save the output of a script to a file, What would be your best 
recommendation for a way to save the output of a PHP script to an HTML doc. Images 
will be included.

Thanks gang.
- NorthBayShane

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




[PHP] Favorite Calendar Anyone?

2002-08-01 Thread Shane

Anyone have a favorite Calendar script out there they would like to share?

- NorthBayShane

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




[PHP] HELP with fOpen

2002-08-02 Thread Shane

No lock in the archives, so here it goes...
Greetings all, I am using fOpen to try and create a new file in a local directory on a 
remote server. Each time I run my script is says "PERMISSION DENIED" but the sys admin 
swears the entire directory is set to 777.

Does anyone know if a setting has to be set in PHP for dynamic file creation to take 
place?
I can use fOpen to read a file, I just cant write without the above error.

Please, any help is appreciated, my deadline is looming.

Thanks
- NorthBayShane

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




RE: [PHP] PHP and MySQL

2002-08-02 Thread Shane

-Original Message-
here any way to speed up MySQL queries?
--
Sure, ask for only the data you need. or halt your query when you have what you need.

HTH

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




RE: [PHP] Email failure????

2002-08-02 Thread Shane

Yes Scott, I get that too. But hey, it's friday!

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




[PHP] Pls Help: Quickie: set_time_limit

2002-08-13 Thread Shane

Question friends...Sorry to bug, but the documentation wasn't too clear.

When using set_time_limit() to override the default PHP time limit. Is this syntax 
tacked on to the end of a QUERY?

ALA
mysql_select_db("files", $db, set_time_limit("0"));

I have an upload page that is farting out when the 30 second time limit is reached. I 
am using a mySQL query to store my binary files in a DB. Is the above code snippet the 
proper syntax to use set_time_limit()?

Or am I just high on crack?
Thanks for your help gang.
- NorthBayShane

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




[PHP] UPS Ship Rates avail? XML?

2002-08-21 Thread Shane
Anyone know if there is a place I can query US shipping rates from say UPS or FedEx?
Possibly through Amazon's API?

Thanks in Advance!!!
-NorthBayShane

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


[PHP] Simple one... Please look.

2002-08-30 Thread Shane

Greetings. Can someone please enlighten me on the best way to get information from a 
comma delimited file, to a variable?

Example. A client updates a comma delimited list of names to a directory on a server, 
my script would need to read in the entire list and turn it into a variable.

Once it is in a variable, I can use explode() to parse it into an array.

But how would I read that document? fopen()

Thanks in advance friends.
-NorthBayShane

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




[PHP] Easy Function Question?

2002-09-10 Thread Shane

I have a need to call a function, where all the variables used might not be set. Is 
there a way to have a variable in a function have a default setting if the variable 
passed to the function is VOID?

EXAMPLE:

$name="me";
$phone="";
//$zip is VOID

function myFunction($name, $phone, $zip){
 echo $name.$phone.$zip
}

can I write...?

function myFunction($name, $phone, $zip=""){
 echo $name.$phone.$zip
}

and then $zip will have a value of  if $zip is VOID for some reason...?

I thought it was something like this, but I keep batting ZERO and there is no mention 
of this problem in the places I looked in the docs.

Can anyone throw me a bone?
Thanks gang!

-NorthBayShane

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




RE: [PHP] Easy Function Question?

2002-09-10 Thread Shane

Martin, so if I write...

function myFunction($name, $phone, $zip=""){
 echo $name.$phone.$zip
}

and $zip is NOT SET then $zip will = .
But if $zip IS SET then $zip will = whatever $zip's current value is, and will NOT be 
changed to ?

Please advise.
Thanks Martin

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 5:14 PM
To: Shane; [EMAIL PROTECTED]
Subject: RE: [PHP] Easy Function Question?


function myFunction($name, $phone, $zip=""){
 echo $name.$phone.$zip
}

is the corrent format, but if you call it like this:

myFunction("name", "phone", null);

then $zip will equal null, not ""
something like this might help

function myFunction($name, $phone, $zip=""){
 if (!$zip)  $zip = "";
 echo $name.$phone.$zip
}

HTH
Martin

-Original Message-
From: Shane [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 10:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Easy Function Question?


I have a need to call a function, where all the variables used might not be
set. Is there a way to have a variable in a function have a default setting
if the variable passed to the function is VOID?

EXAMPLE:

$name="me";
$phone="";
//$zip is VOID

function myFunction($name, $phone, $zip){
 echo $name.$phone.$zip
}

can I write...?

function myFunction($name, $phone, $zip=""){
 echo $name.$phone.$zip
}

and then $zip will have a value of  if $zip is VOID for some reason...?

I thought it was something like this, but I keep batting ZERO and there is
no mention of this problem in the places I looked in the docs.

Can anyone throw me a bone?
Thanks gang!

-NorthBayShane

-- 
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] MUST READ: ALL MySQL Newbies!

2002-09-19 Thread Shane

If you are a MySQL newbie you need to read this!

I just screwed up big time and lost about 1 hour of data in a time sensitive 
application by using TINYINT as my ID field.

TINYINT will only allow up to 255 records in a MySQL DB. Please, if you don't know the 
EXACT differences between all the different INTEGER types, please stop what you are 
doing and go to mysql.com and read up. You may be surprised that the number you enter 
after your "INT(10)" has nothing to do with what you think it means.

Ever wish someone could let you know ahead of time that you are about to screw up? 
Well this could be it. Please learn from my mistake, fully understand INTEGER types if 
you ever plan on having a DB grow above 200+ records.

Thanks crew.
- name withheld... too embarrassed right now.

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




[PHP] HELP: Carriage returns don't display in HTML

2002-09-27 Thread Shane

Greetings folks.

I need my carriage returns to show up in my HTML output from my text form field.

There is a JavaScript function that will convert carriage return to  tags, but is 
there a PHP function that will add  or  tags to a text form field in place of 
the carriage returns a user might add.

Thanks in advance!
-NorthBayShane

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




[PHP] String Help PLEASE!

2002-10-08 Thread Shane

Greetings gang, this should be an easy one but it's kicking my butt today.

I need to build a member number in the format of -00- from an auto increment 
ID field from my DB.

I can get the last ID value easy enough, but how the heck can I tag the new ID on to 
the end of the string -00-.

I looked in the manual at chr(), Parse_str() and str_replace() thinking that would do 
it, but no luck.

Can someone point me in the right direction please?
Thanks a bunch folks!!!
- NorthBayShane

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




[PHP] HTML file to a $var: Pls Help

2002-10-25 Thread Shane
Any way to plug an entire HTML file into a variable?

I looked into file_get_contents() but that was CVS format only.

I need to take a simple HTML file and pass it as a string variable to a mail function.

Any help?
Thanks crew.

- NorthBayShane

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




[PHP] Thumbnails from mySQL binary data

2002-06-12 Thread Shane

Greetings, I just started playing with the GD functions. (FUN!!!) And I am looking for 
advice or scripts on how to turn binary data from my DB into thumbnails.

I understand how to make thumbnails from existing images already "sitting in a 
directory," but how can I get a scaled image to be made directly from the binary data 
in my DB.

Your guidance or advice would be most helpful and TRULY appreciated.

As always, my final functions will be posted for all.
Thanks in advance my friends!!!

- NorthBayShane

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




[PHP] RE: Thumbnails from mySQL binary data

2002-06-12 Thread Shane

I have read warnings that this (imagecreatefromstring.php) is killer SLOW simply 
because it is server side. Have you found this to be true?

Would you suggest just making the thumbnail when the file is uploaded, or do you think 
it is wiser just to  make a thumbnail when the user requests it, and just make them 
wait for the server side code to crunch?

Thanks again group!!!
- NorthBayShane

-Original Message-
From: Philip Hallstrom [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 12:56 PM
To: Shane
Cc: php
Subject: Re: Thumbnails from mySQL binary data


start with this:

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

On Wed, 12 Jun 2002, Shane wrote:

> Greetings, I just started playing with the GD functions. (FUN!!!) And I am looking 
>for advice or scripts on how to turn binary data from my DB into thumbnails.
>
> I understand how to make thumbnails from existing images already "sitting in a 
>directory," but how can I get a scaled image to be made directly from the binary data 
>in my DB.
>
> Your guidance or advice would be most helpful and TRULY appreciated.
>
> As always, my final functions will be posted for all.
> Thanks in advance my friends!!!
>
> - NorthBayShane
>
> --
> 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] GD imagecreatefromstring ADVICE??

2002-06-12 Thread Shane

Anyone have any opinions or real world experience using the function 
"imagecreatefromstring?"

Not much out there on the web? I am looking for the best method for making 
"thumbnails" from my binary DB data.

Thanks again group!!!
- NorthBayShane

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




[PHP] GD Questions: Please help.

2002-06-13 Thread Shane

Greetings fellow PHPers.

I am learning basic GD functionality and I have a few YES/NO questions to ask.
This should only take a few seconds of your time. PLEASE HELP!

So far I have seen several tutorials on creating graphics on the fly.
In each example the either send the image (by itself) to a browser (using the HEADER 
line) or they save it to a directory.

Can I send an image to a browser along with other HTML and PHP information, or does my 
image have to be on it's own.

If I want to send my image to a browser with other HTML do I have to save it to a file 
first?

Does my directory that I am writing to have to have "write permission" set to TRUE for 
me to create an image file? and if it is NOT, will I get an error something like...
Warning: imagejpeg: unable to open '/images/test.jpg' for writing!

Can anyone show me a chunk of sample code or function that shows how I can embed my 
images created on the fly into my normal HTML files.

As always, thanks in advance my friends.

- NorthBayShane

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




RE: [PHP] GD Questions: Please help.

2002-06-13 Thread Shane

Kevin... YOU RULE!!!

A million billion Humble thanks!

So simple, yet was such a pain to get past. I was racking my brain on that one!
Man, if I could just buy you a beer online, I would.

THANK YOU THANK YOU THANK YOU!
- NorthBayShane

BUT...Does this mean I will need a separate PHP page for every graphic script?
You would think there would be a way to call it from a function.

(Thinking out loud now...)
But I suppose I could send a variable along with my  tag like



and then when the PHP code in getimage.php compares the variable passed to it's 
library of code snippets it would spit back the necessary image each time.

H
Is there a better way?

-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 1:34 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] GD Questions: Please help.


Shane, absolutely you can mix HTML and dynamically generated images.  You'll
actually call the image in passively via an  tag like this...



getimage.php will echo the appropriate image header (Content-type: image/png
or whatever) plus your image grabbing/generating code which you will simply
output to the browser.  Deceptively easy, yes?  :)

Hope this helps.
-Kevin


- Original Message -----
From: "Shane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 13, 2002 2:21 PM
Subject: [PHP] GD Questions: Please help.


> Greetings fellow PHPers.
>
> I am learning basic GD functionality and I have a few YES/NO questions to
ask.
> This should only take a few seconds of your time. PLEASE HELP!
>
> So far I have seen several tutorials on creating graphics on the fly.
> In each example the either send the image (by itself) to a browser (using
the HEADER line) or they save it to a directory.
>
> Can I send an image to a browser along with other HTML and PHP
information, or does my image have to be on it's own.
>
> If I want to send my image to a browser with other HTML do I have to save
it to a file first?
>
> Does my directory that I am writing to have to have "write permission" set
to TRUE for me to create an image file? and if it is NOT, will I get an
error something like...
> Warning: imagejpeg: unable to open '/images/test.jpg' for writing!
>
> Can anyone show me a chunk of sample code or function that shows how I can
embed my images created on the fly into my normal HTML files.
>
> As always, thanks in advance my friends.
>
> - NorthBayShane
>
> --
> 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] Image GD Wizardry!

2002-06-26 Thread Shane

One would think that pulling binary data from a DB using the function 
imageCreateFromString would allow you to output that string to any format. (GIF JPEG 
PNG) or whatever is supported by your version of GD.

But this code flakes out and creates no image if it reads from a binary file made by a 
GIF file. (works great for JPEGs!!)

Anyone see what the problem might be? Or know of any way to output a JPEG or PNG from 
a binary GIF file in a mySQL DB?

Theory code only...

1. Query binary string from DB
2. Create Image From String
3. Scale your image to fit the size you need.
4. Use ImageCreateTrueColor to create your compatible background square
5. Fill it with your background color using ImageFilledRectangle
6. Use ImageCopyResampled to place your Image from String onto you background image
7. use imageJpeg to output your true color image as a JPEG

Since this works great as JPEG IN, JPEG OUT, but does NOT work when GIF is the source, 
is this because ImageCopyResampled can't use the GIF image?

If so, anyone have a nice code snippet that will turn client uploads from GIFs into 
JPEGS?

- Thanks in advance folks, I realize this is a tough one, and any suggestions are 
always greatly appreciated, and as always I will post my final solution for the 
archives.

Thanks again.
-NorthBayShane

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




[PHP] Best Delete Confirmation Script

2002-06-27 Thread Shane

Greetings.

I would like your opinions on the best way to implement an "Are You Sure You Want To 
Do This?" dialog for an Admin user when they go to delete a record in a DB.

Do you find that a whole page is usually required for this, or does anyone have any 
nice pop up solutions for such a query.

Sure... I hate doing these things too, but when Joe Big Boss gets a bit trigger happy 
and kills some data he mistakenly thought was a different record. You KNOW who is 
going to hear about it from on high.  :^)

Thanks gang!
- NorthBayShane

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




[PHP] mySQL time = year 2038 [HELP]

2002-07-01 Thread Shane

Checked the archive and saw no difinitives... so... How come when I query my clients 
mySQL DB and use NULL or NOW() as my default in a TIMESTAMP record that it always 
comes up Jan 18, 2038?

Is the clock not set properly, or am I misunderstanding some basic principal of the 
time stamp?

My clients version pf PHP is 4+ on a Windows IIS server.

Any clues???
Thanks
-NorthBayShane

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




RE: [PHP] mySQL time = year 2038 [SOLVED]

2002-07-01 Thread Shane

Yep, I was using the DATE() function in PHP to convert a TIMESTAMP from a MySQL DB 
query. I was getting a year of 2038 because MySQL and PHP use different TIMESTAMP 
formats.

There are several FUNCTIONS that convert the two TIMESTAMPS from one to the other, 
(see comments in PHP manuals) but I wound up using the call from a mySQL query to 
convert the data.

much like this
// GET CONVERTED MYSQL TIME TO UNIX TIME
$getmyTime = mysql_query("SELECT UNIX_TIMESTAMP(timestamp_col) AS yournamehere 
FROM myDBnamehere WHERE id = $whatever")
 or die("Invalid query");
 $mysqlTime = mysql_result($getmyTime, 0, 0);
// TURN TIME INTO VIEWABLE STRING
 $myTime = date("F j, Y  @ h:i A", $mysqlTime)." EST";

This spits back "July 1, 2002 @ 04:41 PM EST" instead of some year in 2038 when I did 
the same thing without the SELECT UNIX_TIMESTAMP query.

Thanks again for all your replies.
PHP RULES! (insert white boy dance here)
- NorthBayShane


-Original Message-
From: Shane 
Sent: Monday, July 01, 2002 9:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] mySQL time = year 2038 [HELP] 


Checked the archive and saw no difinitives... so... How come when I query my clients 
mySQL DB and use NULL or NOW() as my default in a TIMESTAMP record that it always 
comes up Jan 18, 2038?

Is the clock not set properly, or am I misunderstanding some basic principal of the 
time stamp?

My clients version pf PHP is 4+ on a Windows IIS server.

Any clues???
Thanks
-NorthBayShane

-- 
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] MAIL() Trouble. Need your eyes.

2002-07-11 Thread Shane

Greetings, I am attempting to send an HTML based email using the Mail() function in 
PHP.

I am having great luck until I include an OBJECT or EMBED tag in the HTML string.

I am running PHP 4.2.1 on a WIN NT client.

If I uncomment the OBJECT or EMBED lines below in the $message variable, my script 
errors out on the MAIL() call at the bottom.

Please, any help would be appreciated.
Thanks folks!

- NorthBayShane
-
";
$message.= "";
$message.= "";
$message.= "";

--
HERE IS WHERE THE TROUBLE STARTS
IF I UNCOMMENT THE OBJECT OR EMBED TAG
THE SERVER ERRORS OUT ON MY MAIL() CALL
--

//$message.= "";
//$message.= "";
//$message.= "";

--
HERE IS WHERE THE TROUBLE ENDS
--
$message.= "";
$message.= "";
$message.= "Click here if 
you cannot see the animation above.© Copyright 2002, Delaplaine 
Creative. All rights reserved. ";
$message.= " ";
$message.= "";

$subject = "FlashMail Test";
$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "From: ".$myname."<".$myemail.">\r\n";
$headers.= "To: ".$contactname."<".$contactemail.">\r\n";
$headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n";
$headers.= "X-Priority: 1\r\n";
$headers.= "X-MSMail-Priority: High\r\n";
$headers.= "X-Mailer: Just My Server";

mail($contactemail, $subject, $message, $headers);

?>

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




RE: [PHP] MAIL() Trouble. Need your eyes.

2002-07-11 Thread Shane

I'll give it a shot, but there are # symbols all over the place in the other tags 
(like COLOR links...etc...

But thanks though?
Anyone else???

Thanks folks!

-Original Message-
From: Paul Roberts [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 11:31 AM
To: Shane
Subject: Re: [PHP] MAIL() Trouble. Need your eyes.


try escaping the # in there.


Paul Roberts
[EMAIL PROTECTED]



- Original Message - 
From: "Shane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 11, 2002 7:21 PM
Subject: [PHP] MAIL() Trouble. Need your eyes.


Greetings, I am attempting to send an HTML based email using the Mail() function in 
PHP.

I am having great luck until I include an OBJECT or EMBED tag in the HTML string.

I am running PHP 4.2.1 on a WIN NT client.

If I uncomment the OBJECT or EMBED lines below in the $message variable, my script 
errors out on the MAIL() call at the bottom.

Please, any help would be appreciated.
Thanks folks!

- NorthBayShane
-
";
$message.= "";
$message.= "";
$message.= "";

--
HERE IS WHERE THE TROUBLE STARTS
IF I UNCOMMENT THE OBJECT OR EMBED TAG
THE SERVER ERRORS OUT ON MY MAIL() CALL
--

//$message.= "";
//$message.= "";
//$message.= "";

--
HERE IS WHERE THE TROUBLE ENDS
--
$message.= "";
$message.= "";
$message.= "Click here if 
you cannot see the animation above.© Copyright 2002, Delaplaine 
Creative. All rights reserved. ";
$message.= " ";
$message.= "";

$subject = "FlashMail Test";
$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "From: ".$myname."<".$myemail.">\r\n";
$headers.= "To: ".$contactname."<".$contactemail.">\r\n";
$headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n";
$headers.= "X-Priority: 1\r\n";
$headers.= "X-MSMail-Priority: High\r\n";
$headers.= "X-Mailer: Just My Server";

mail($contactemail, $subject, $message, $headers);

?>

-- 
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] MAIL() Trouble. Need your eyes.

2002-07-11 Thread Shane

Nope, no luck. Still errors out.
Is there a limit to how man characters a MAIL() call can have?

-Original Message-
From: Paul Roberts [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 11:31 AM
To: Shane
Subject: Re: [PHP] MAIL() Trouble. Need your eyes.


try escaping the # in there.


Paul Roberts
[EMAIL PROTECTED]



- Original Message - 
From: "Shane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 11, 2002 7:21 PM
Subject: [PHP] MAIL() Trouble. Need your eyes.


Greetings, I am attempting to send an HTML based email using the Mail() function in 
PHP.

I am having great luck until I include an OBJECT or EMBED tag in the HTML string.

I am running PHP 4.2.1 on a WIN NT client.

If I uncomment the OBJECT or EMBED lines below in the $message variable, my script 
errors out on the MAIL() call at the bottom.

Please, any help would be appreciated.
Thanks folks!

- NorthBayShane
-
";
$message.= "";
$message.= "";
$message.= "";

--
HERE IS WHERE THE TROUBLE STARTS
IF I UNCOMMENT THE OBJECT OR EMBED TAG
THE SERVER ERRORS OUT ON MY MAIL() CALL
--

//$message.= "";
//$message.= "";
//$message.= "";

--
HERE IS WHERE THE TROUBLE ENDS
--
$message.= "";
$message.= "";
$message.= "Click here if 
you cannot see the animation above.© Copyright 2002, Delaplaine 
Creative. All rights reserved. ";
$message.= " ";
$message.= "";

$subject = "FlashMail Test";
$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "From: ".$myname."<".$myemail.">\r\n";
$headers.= "To: ".$contactname."<".$contactemail.">\r\n";
$headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n";
$headers.= "X-Priority: 1\r\n";
$headers.= "X-MSMail-Priority: High\r\n";
$headers.= "X-Mailer: Just My Server";

mail($contactemail, $subject, $message, $headers);

?>

-- 
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] Help a Header Headache!!

2002-07-11 Thread Shane

I am trying to send an EMBED and OBJECT tag inside an HTML email using the mail() call.
 My HEADER Content type is...

$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "From: ".$myname."<".$myemail.">\r\n";
$headers.= "To: ".$contactname."<".$contactemail.">\r\n";
$headers.= "Reply-To: ".$myname."<$myreplyemail>\r\n";
$headers.= "X-Priority: 1\r\n";
$headers.= "X-MSMail-Priority: High\r\n";
$headers.= "X-Mailer: Just My Server";

mail($contactemail, $subject, $message, $headers);

Each Time I add the EMBED or OBJECT tag, the mail() call errors out.
What type of content-type do I need to use to be able to send EMBED tags through an 
HTML email in PHP?

Please help, I have had no luck with the manual or my archives.

Thanks folks.
- NorthBayShane

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




[PHP] Best String to Array Solution

2002-07-11 Thread Shane

Greetings, this may be simple, but it's late and my brain needs a hand.

I have a string such as "first,second,third,fourth"

I need a way to take each one of the items separated by the comma to be an item in an 
array.

I tried ereg() but to no avail. Is there a simpler way to do it?
Thanks gang!

Chaka Loves You!

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




RE: [PHP] HELP!!! Word count

2002-07-11 Thread Shane

Dan, if you are entering the words in a form, when the variable holding the string 
hits your script do something like this (Hey I just figured this out myself too

Gotta love these lists

$tmpStr= whatever the form passes your script
// turn string into an array
// use EXPLODE() to seperate the words into an array
// since they are seperated by a " " (blank space)
$tmpAry = explode(' ',$tmpStr);
// if they were seperated by commas you would write
$tmpAry = explode(',',$tmpStr); // DIG
// then just use count($tmpAry) to figure out the size of your array
// and you have the number of words!

There might be an easier way than that, but it workes for me.
-Peace dude
PS: Thank Andrew Braund for the solution, he sent a varriant of it to me

That's two people you helpes Andrew!
YOU RULE!!!

- NorthBayShane
-Original Message-
From: Peter [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 6:20 PM
To: Dan McCullough; PHP General List
Subject: RE: [PHP] HELP!!! Word count


if i remember correctly there was something on word counts posted in the last week or 
or .. maybe even last couple days... have a scroll thru and u will find it :)

> -Original Message-
> From: Dan McCullough [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 12 July 2002 11:08 AM
> To: PHP General List
> Subject: [PHP] HELP!!! Word count
> 
> 
> I have some clients who want to charge a flat rate for words 
> entered, but over a certain number of
> words there is an additional charge, to complicate matters there 
> is an option/addon where you can
> bold the lines, and there is a charge per line, so you have to 
> calculate the total number of lines
> based on character total.
> 
> Anyone know of way to accomplish this, I know that it will have 
> to be done in seperate ways.  but
> does anyone have an idea or two .. hlp 
> 
> thanks,
> 
> dan
> 
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> -- 
> 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] Thumbnails from Binary DB info.

2002-04-29 Thread Shane

Greetings folks. I'm looking for a solution to make thumbnails from my binary files 
inside my mySQL DB. 

Can anyone give me some direction for options besides Image Magick?

TIA
- NorthBayShane

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




[PHP] B R A I N F R E E Z E !

2002-05-22 Thread Shane

Too Many HOURS!!!
Too Little M&Ms!!
Forgot... Brain... Ouch!

Someone please remind me, what the hell the syntax for the short hand of the PHP "IF 
THEN" statement is where multiple variables need to be checked

if($foo == "Panda" and $bar == "bear){
 doWhatever();
}

Thanks gang!
- Shane

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




RE: [PHP] B R A I N F R E E Z E !

2002-05-22 Thread Shane

Thanks gang

echo("mm".$moreChocolate)

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




[PHP] HELP!!! QUOTES!

2002-05-24 Thread Shane

Question Please.

What is the syntax for getting double quotes to appear in an echo statement.

EXAMPLE:

echo "My dog has 'fleas'";

puts out... My dog has 'fleas'

But I need it to put out... My dog has "fleas" (NOTE DOUBLE QUOTES)
(So I can call a JavaScript function)

What am I missing here?

As always... Thanks in advance my friends.
- Shane

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




[PHP] Best GD Module for 4.0.6

2002-05-28 Thread Shane

Howdy crew...

I have a client's ISP that is running php 4.0.6 on WIN IIS but does NOT have a version 
of GD installed.

My question to you is, What is the best version of the GD module that works with 
4.0.6, and where can I get it?

Trying to download just the GD module on PHP.NET has proven to be difficult.

Thanks in advance, as always.
- Shane

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




[PHP] PLEASE: Second request...

2002-05-29 Thread Shane

Second request... Please, any help out there for where I can download the best GD 
module for PHP 4.0.6 on my WIN 2000 IIS box.

Thanks folks!

--
Howdy crew...

I have a client's ISP that is running php 4.0.6 on WIN IIS but does NOT have a version 
of GD installed.

My question to you is, What is the best version of the GD module that works with 
4.0.6, and where can I get it?

Trying to download just the GD module on PHP.NET has proven to be difficult.

Thanks in advance, as always.
- Shane

-- 
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] Escaping double quotes

2006-05-25 Thread Shane
Not sure I understand your question correctly. I think you can just use 
soemthing like:


echo '';

Mindaugas L wrote:

or heredeoc syntax :)

On 5/25/06, John Nichel <[EMAIL PROTECTED]> wrote:



Pavleck, Jeremy D. wrote:
> So I'm writing this page (PHP Newbie here) and it checks to see if a 
var

> is set, if it isn't it spits out the form info like so: echo " action="myform.php" method="post">";
> Now is there a way to 'wrap' that so I don't have to escape quotes?
> Something like perls 'qq' function is what I'm looking for.
> I tried a few different functions from the website, magic_quotes,
> addslashes, htmlspecial etc etc but none did what I was looking for
>


http://us2.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc 



--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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

2004-04-02 Thread shane
Here is it!


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

[PHP] Multiple page form

2002-11-26 Thread Shane McBride
Hi there.

It's been a while since I have done any PHP work. I am creating an online
employment application using multiple forms for a client. I was going to use
PHP. I don't remember if I need to pass variables along with the form for
each page, or can I just call them on the last page.

The application form is very long. Any ideas? There may be a script that
exists already?

Anyway, it's nice to be back.

- Shane



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




RE: [PHP] Multiple page form

2002-11-26 Thread Shane McBride
So, you are using a database to store the records?

-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 10:45 AM
To: Shane McBride; [EMAIL PROTECTED]
Subject: Re: [PHP] Multiple page form


> It's been a while since I have done any PHP work. I am creating an online
> employment application using multiple forms for a client. I was going to
use
> PHP. I don't remember if I need to pass variables along with the form for
> each page, or can I just call them on the last page.
> The application form is very long. Any ideas? There may be a script that
> exists already?

What I usually do for my multi-page form is INSERT the data to a table on
the first page then UPDATE that record on subsequent pages.  The only
thing I need to pass on is the primary key value for the record.

Chris



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




[PHP] Parse out text

2002-12-13 Thread Shane McBride
I have a form that is submitting a Javascript to validate fields before the
form casn be submitted. The problem is that the field name has to be
prefixed with "required". So, if I have a field called email, it has to be
called requiredemail in order for the javascript to work.

How can I remove the "required" before the form is submitted? All I need is
a hint...

Thanks,
Shane



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




[PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

One of my pages opens ~100 files, reads from them, and closes them, (only one 
file open at a time).

The problem is that the page just dies mid-way through execution - no errors, 
no segfault, it just dies and returns a blank page to the user.  the problem 
goes away if I reduce the number of files accessed.

its a build of PHP 4.1.2 on Linux running as an Apache module,  (if it makes 
any odds, the configure line is below).

I can't see anything on bugs.php.net about this - has anyone seen this before 
(and, of course, the crucial question; what can I do to fix it?)

Any help appreciated,

Thanks

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc


 './configure' '--with-gd' '--enable-gd-native-ttf' '--enable-track-vars' 
'--enable-sysvsem' '--enable-sysvshm' '--enable-calendar' '--with-zlib' 
'--prefix=/opt/php-4.1' '--with-config-file-path=/usr/local/etc/httpd/conf' 
'--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr' 
'--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml' 
'--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp' '--with-ttf' 
'--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl' 
'--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6' 
'--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr' 
'--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr' 
'--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv' '--with-kerberos' 
'--enable-xslt' '--with-xslt-sablot' '--with-freetype-dir=/usr' 
'--with-apxs=/usr/sbin/apxs'
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3
STUVeNEID6bzu4+hq+PqCI4=
=zZqL
-END PGP SIGNATURE-


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




Re: [PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Thanks for the input - but its definately not that; time limit is set to 600 
seconds and it dies inside 1 second :(

(i should have added this to the original mail, but it seems to supply the 
page but keep the connection open, strange...)

S

On Wednesday 18 September 2002 12:01 am, Tyler Longren wrote:
> How long does the script tend to run before it just "quits"?  Perhaps
> a timeout is set too low in php.ini.
>
> Take a look at max_execution_time in php.ini
>
> tyler
>
> On Tue, 17 Sep 2002 23:14:46 +0100
>
> Shane Wright <[EMAIL PROTECTED]> wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Hi
> >
> > One of my pages opens ~100 files, reads from them, and closes them,
> > (only one file open at a time).
> >
> > The problem is that the page just dies mid-way through execution - no
> > errors, no segfault, it just dies and returns a blank page to the
> > user.  the problem goes away if I reduce the number of files accessed.
> >
> > its a build of PHP 4.1.2 on Linux running as an Apache module,  (if it
> > makes any odds, the configure line is below).
> >
> > I can't see anything on bugs.php.net about this - has anyone seen this
> > before (and, of course, the crucial question; what can I do to fix
> > it?)
> >
> > Any help appreciated,
> >
> > Thanks
> >
> > - --
> > Shane
> > http://www.shanewright.co.uk/
> > Public key: http://www.shanewright.co.uk/files/public_key.asc
> >
> >
> >  './configure' '--with-gd' '--enable-gd-native-ttf'
> >  '--enable-track-vars'
> > '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar'
> > '--with-zlib' '--prefix=/opt/php-4.1'
> > '--with-config-file-path=/usr/local/etc/httpd/conf'
> > '--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr'
> > '--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml'
> > '--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp'
> > '--with-ttf' '--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl'
> >
> > '--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6'
> > '--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr'
> > '--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr'
> > '--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv'
> > '--with-kerberos' '--enable-xslt' '--with-xslt-sablot'
> > '--with-freetype-dir=/usr' '--with-apxs=/usr/sbin/apxs'
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.0.7 (GNU/Linux)
> >
> > iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3
> > STUVeNEID6bzu4+hq+PqCI4=
> > =zZqL
> > -END PGP SIGNATURE-
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9h8Q85DXg6dCMBrQRApEbAKCIewL9fgwPT1ey3byL2t2pg1BPRACfWJwN
rUT+B2yFqGn6e2IO3XAGqeM=
=qz1m
-END PGP SIGNATURE-


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




Re: [PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

my ISP keeps a little behind the curve - sometimes thats a good thing, but 
sometimes not.  :(

We could install our own PHP, but unless this is a known issue that has been 
fixed since I'd rather not risk any others by installing a new version (and 
having to deal with the update issues that causes with my ISPs updates)

Thanks

Shane

On Wednesday 18 September 2002 1:20 am, [EMAIL PROTECTED] wrote:
> Can't you upgrade to 4.2.3 many bugs were fixed.

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9h8gz5DXg6dCMBrQRArHKAJ4w3TjYJpI4ZaRSIi1cXWqOj7DzdwCgu1et
ofTLnvU/I9C4RQMNnpvwXIY=
=JLHf
-END PGP SIGNATURE-


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




Re: [PHP] Adding users to a linux system?

2002-10-15 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


you need to be root to add users - and your web server is most likely not 
runings as root (certainly shouldn't be!!)

To make this work, add the user apache runs under to /etc/sudoers  (look at 
the sudo man page),

then change the command you have to this...

sudo /usr/sbin/adduser -g mel -d /dev/null -s /bin/false -p $pass $usuario


That will use sudo to run adduser as root.

btw - try to only allow sudo access for the apache user, and only to use the 
command adduser (e.g. NOT rm or anything else dangerous..)

Also, make very sure that $paqss and $usuario contain only alphanumeric 
characters; no backticks or quotes or anything.


Hope that helps

Cheers

Shane



On Tuesday 15 October 2002 2:16 pm, :: wkwrz entertainment :: wrote:
> $creador = "/usr/sbin/adduser -g mel -d /dev/null -s /bin/false -p $pass
> $usuario";
>  $creador = exec($creador);
>  echo $creador;
>
>
> I HAVE THIS, BUT IN THE APACHE LOG FILE I HAVE THIS:
> adduser: unable to lock password file
>
>
> what should i do to run the $creador sucefully?

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9rCgK5DXg6dCMBrQRAtm5AKCykAWtTJntkIKIbKx1hH7kAM+i0gCgrd6o
Lz8qZCsNAdhY1orz0yNDLLM=
=sqJ/
-END PGP SIGNATURE-


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




Re: [PHP] Adding users to a linux system?

2002-10-15 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


A C wrapper running setuid root?

I guess there's less chance of getting a 'bad' username to execute arbitrary 
commands, but at the same time I wonder about the possiblity of exploiting 
overflows, but that'd be much harder.  (hmm, if the C program shells to 
adduser anyway the same problem is there?)

I dunno, personally I dont like the idea of _anything_ needing root..

S

On Tuesday 15 October 2002 3:51 pm, Tim Monaghan wrote:
> Is it better to use a c wrapper to do this? thats what Ive always done.
> Which is more secure?
>
> Tim
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Custom Programming
> Web Programming community & discussion
> http://www.inter-apps.com
>
>
>
> - Original Message -
> From: "Shane Wright" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 15, 2002 9:36 AM
> Subject: Re: [PHP] Adding users to a linux system?
>
>
>
> you need to be root to add users - and your web server is most likely not
> runings as root (certainly shouldn't be!!)
>
> To make this work, add the user apache runs under to /etc/sudoers  (look at
> the sudo man page),
>
> then change the command you have to this...
>
> sudo /usr/sbin/adduser -g mel -d /dev/null -s /bin/false -p $pass $usuario
>
>
> That will use sudo to run adduser as root.
>
> btw - try to only allow sudo access for the apache user, and only to use
> the command adduser (e.g. NOT rm or anything else dangerous..)
>
> Also, make very sure that $paqss and $usuario contain only alphanumeric
> characters; no backticks or quotes or anything.
>
>
> Hope that helps
>
> Cheers
>
> Shane
>
> On Tuesday 15 October 2002 2:16 pm, :: wkwrz entertainment :: wrote:
> > $creador = "/usr/sbin/adduser -g mel -d /dev/null -s /bin/false -p $pass
> > $usuario";
> >  $creador = exec($creador);
> >  echo $creador;
> >
> >
> > I HAVE THIS, BUT IN THE APACHE LOG FILE I HAVE THIS:
> > adduser: unable to lock password file
> >
> >
> > what should i do to run the $creador sucefully?

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9rDKV5DXg6dCMBrQRAn5JAJ90z11UFAUQ7KBgGIC5OdWJH8XlvwCggqQ6
En4ZsJ31Y617D2IdfDou6pI=
=26WP
-END PGP SIGNATURE-


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




Re: [PHP] Number formatting

2002-06-06 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

> $aprTemp = number_format($apr, 2); which in the case of 3.05 will return
> 305.00 and 300.00 for 3%.  Anyone have a snippet to test and display
> properly so that 3% would be 3.00, etc.

you could try this...

$val = sprintf("%0.02f", $val);

Cheers

- -- 
Shane
www.shanewright.co.uk
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8/58q5DXg6dCMBrQRApb0AJsFZ7WxZK5PRguKZqNbRndVUnkl/QCgpafj
VWVFBaJ9ysYxJqNP3Bxm2EI=
=zrZI
-END PGP SIGNATURE-


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




Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi 

This may sound silly - but is there enough free disk space on whatever 
partition /tmp is mounted on?  

Alternatively, as a workaround, you could create a new directory and give the 
web server user permission to write to it and tell PHP to save sessions 
there.  (this is actually better from a security standpoint as well; less 
chance of session hijacking).

Cheers

- -- 
Shane
www.shanewright.co.uk
Public Key: http://www.shanewright.co.uk/files/public_key.asc


On Thursday 06 June 2002 6:31 pm, dan radom wrote:
> I can't seem to get session tracking to work to save my life.  The end
> result I'm after is to store the value of the single column returned from
> this query .. SELECT user_id from users WHERE user_name = '$user_name' AND
> user_password = '$user_password' .. for use throughout the site.  The
> current error I'm getting is "Warning: Failed to write session data
> (files). Please verify that the current setting of session.save_path is
> correct (/tmp) in Unknown on line 0" which is very strange, as
> session.save_path is set to /tmp, and tmp is "drwxrwxrwt2 root
> root".  The code is listed below.  Any suggestions are greatly appreciated.
>
> dan
>
>
>
>
> 
> //  if ($user_name) {
> //class 'new uid' { var $row->user_id; };
> //start_session();
> //$abqSession = new abqnl;
> //$abqSession->user_id = $uid;
> //session_register("abqSession");
> // }
>
> if ($user_name) {
> session_id($_GET['user_id']);
> session_start();
> $foo="$row->user_id";
> $_SESSION["uid"] = $foo;
> echo "$foo";
> }
>
>
>   include '/storage/apache/htdocs/test.radom.org/.siteconf.php';
>
>   echo "";
>
>   if (!$user_name) {
>
>   echo "";
>
>   echo "";
>   echo "";
>
>   echo "";
>
>   echo "";
>   echo "user name";
>   echo "";
>
>   echo "";
>   echo "";
>   echo "";
>
>   echo "";
>   echo "";
>
>   echo "";
>   echo "password";
>   echo "";
>
>   echo "";
>   echo "";
>   echo "";
>
>   echo "";
>   echo "";
>
>   echo "";
>   echo "";
>
>   echo "";
>   echo "";
>   echo "";
>   echo "";
>   echo "";
>
>   echo "";
>
>   echo "";
>   echo "";
>
>   echo "";
>
>   exit;
>
>   } else
>
>   $result = pg_exec ($database, "SELECT user_id from users WHERE user_name
> = '$user_name' AND user_password = '$user_password'");
>
>   if (!$result) {
> echo "query died\n";
> exit;
>   }
>
>   if (pg_num_rows($result) == 0) {
>   echo "you have entered an invalid user name and password
> combination.  please try again.  new users may create an account from the
> sign up link above."; exit;
> }
>
>
>   for ($i = pg_num_rows($result) - 1; $i >= 0; $i--) {
>   if(!($row = pg_fetch_object($result)))
> continue;
>   }
>
>   echo "your user_id is ";
>
>   pg_close($database);
>
> ?>
> 
> 

- -- 
Shane
www.shanewright.co.uk
Public Key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8/6S75DXg6dCMBrQRAjhVAKCcAb1x2/rWZFqtDBKQTCYb4OCmdACgmax8
eav61ozpEGIbHXzIYU7zt5A=
=EIC2
-END PGP SIGNATURE-


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




Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

On Thursday 06 June 2002 7:55 pm, dan radom wrote:
> the last bgcolor example was cut and pasted from oreilly's session tracking
> examples.  it should work.

IIRC, some things depend on your PHP version and ini file (register_globals, 
track_vars and maybe others).  its worth trying those definately.  The manual 
also says that $_SESSION is only available after 4.1.0 - if you're using an 
older version try $HTTP_SESSION_VARS.

>  that file write error concerns me.  i think
> something larger is going on here.

Definately - if all else fails it could be worth upgrading PHP (if your ISP 
won't let you, maybe they've seen the problem before?).

Ah!  What user is your web server running as?  Try creating a new user, 
running the web server as that user (group as well come to think of it), and 
trying the permissions with that).  I'm not sure why this should make a 
difference but it rings bells for some reason (can't remember enough offhand 
about UNIX users/permissions).

Cheers

- -- 
Shane
www.shanewright.co.uk
Public Key: http://www.shanewright.co.uk/files/public_key.asc

> * Chris Knipe ([EMAIL PROTECTED]) wrote:
> > Have you tried using $_SESSION['bgcolor'] = "bleh"
> >
> > It might work... who knows...
> >
> > - Original Message -
> > From: "dan radom" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, June 06, 2002 8:36 PM
> > Subject: Re: [PHP] am i just a session tracking idiot?
> >
> > > what's weird is that if i set session.save_handler = mm, i obviously
> > > don't
> >
> > get the file error, but it still won't work.
> >
> > > here's another example of what i've tried...
> > >
> > > mars:~/apache/htdocs/test.radom.org$ cat test.php
> > >  > > // create a new session
> > > session_start();
> > >
> > > // register a session-variable
> > > session_register("bgcolor");
> > >
> > > // Assign a value to the session-variable
> > > $bgcolor = "#8080ff";
> > > ?>
> > > 
> > > 
> > > Session Example #1
> > > 
> > >
> > >  >
> > vlink="#00" alink="#00">
> >
> > > Welcome to a session-enabled page! The background color on the next
> > > page
> >
> > will be set to a stylish blue.
> >
> > > Go to another session-enabled page.
> > > 
> > > 
> > >
> > > and
> > >
> > > mars:~/apache/htdocs/test.radom.org$ cat test2.php
> > >  > > // Resume session created in Listing 1-2
> > > session_start();
> > > ?>
> > > 
> > > 
> > > Session Example #1
> > > 
> > >
> > >  >
> > vlink="#606060" alink="#808000">
> >
> > >  > > // Retrieve SID from cookie.
> > > print "Your SID is $PHPSESSID ";
> > >
> > > // Display the value of the $bgcolor variable.
> > > print "The persistent background color is: $bgcolor.";
> > > ?>
> > >
> > >
> > > argggh!
> > >
> > > * dan radom ([EMAIL PROTECTED]) wrote:
> > > > I've just tried that.  /foo is owned by nobody and is mode 777. 
> > > > there's
> >
> > 135M available on that partition.
> >
> > > > * Shane Wright ([EMAIL PROTECTED]) wrote:
> > > > > -BEGIN PGP SIGNED MESSAGE-
> > > > > Hash: SHA1
> > > > >
> > > > > Hi
> > > > >
> > > > > This may sound silly - but is there enough free disk space on
> > > > > whatever partition /tmp is mounted on?
> > > > >
> > > > > Alternatively, as a workaround, you could create a new directory
> > > > > and
> >
> > give the
> >
> > > > > web server user permission to write to it and tell PHP to save
> >
> > sessions
> >
> > > > > there.  (this is actually better from a security standpoint as
> > > > > well;
> >
> > less
> >
> > > > > chance of session hijacking).
> > > > >
> > > > > Cheers
> > > > >
> > > > > - --
> > > > > Shane
> > > > > www.shanewright.co.uk
> > > > > Public Key: http://www.shanewright.co.uk/files/public_key.asc

[PHP] Re: multi-line textfields don't post

2002-06-10 Thread Shane Kelly

Do you mean the data doesn't transfer over to your database?


"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Whenever I use a mult-line textfield, the data inside doesn't transfer
> over.  But single-line textfields work just fine.
>
> how do i fix this?
>



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




[PHP] Help with header function

2002-06-10 Thread Shane Kelly

I'm creating an upload form for users to upload files to my server.  but I
don't want them to overwrite existing files if they try to upload using the
same file name...

THE FOLLOWING SCRIPT WORKS PERFECTLY

if (file_exists("uploads/documents/".$file_name)==TRUE) {
 die ("File already exists");
 }
 else {
 copy($file,"uploads/documents/".$file_name); }

BUT  I WOULD RATHER HAVE IT REDIRECT THEM TO ANOTHER PAGE USING

if (file_exists("uploads/documents/".$file_name)==TRUE) {
 header("Location:http://www.mysite.com/file_exists.php";);
 }
 else {
 copy($file,"uploads/documents/".$file_name); }

THIS SCRIPT DOESN'T WORK...DOES ANYONE KNOW WHY???

Thanks

Shane
[EMAIL PROTECTED]



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




Re: [PHP] Help with header function

2002-06-10 Thread Shane Kelly

I don't get an error message...but the page doesn't automatically forward to
the redirected url.





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




Re: [PHP] Help with header function

2002-06-11 Thread Shane Kelly

LOL...thanks ed...figured it out last night...
don't need to do a file_exists

since i capture file_name in my db...I do a query before the insert to see
if the file_name entered in the form, matches any of the file_names stored
in mySQL.  if the count of the record set > 0 then the file exists, and
redirect using header: Location...etc,etc.

If count=0 then insert form contents into docuemnt and copy file to folder.

Thanks

Shane
"Ed Lazor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> LOL  Yea, it's always much easier if we have actual code to work from
rather
> than taking guesses in the dark.
>
> -Original Message-
> Why do I get the feeling I'm playing that "mind bender" game where you
have
> to guess the right combination within so many turns?  LOL
>
>

> This message is intended for the sole use of the individual and entity to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law.  If you are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message.  If you have received this message in error, please immediately
> advise the sender by reply email and delete the message.  Thank you very
> much.
>



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




[PHP] Re: mysql problems, need help quick

2002-06-11 Thread Shane Kelly

not on auto increment...thats the point!
why would you need to get the #6 back anyway...

this is the fundementals of database theory... chances are the database is
using this autoincrement field as the PRIMARY KEY...in which case no
duplicates are allowed..

In terms of records...your id#7 has become record #6.

I can't think of any reason why loosing the #6 should affect anything you
want to do.

XXx
"Hawk" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm filling a database with info, and I'm using id as identifiers in the
> list, the id is auto increment, and I deleted one entry, now I have a hole
> in the database, is there any way to fix this?
> lets say I have
> 1
> 2
> 3
> 4
> 5
> 6
> And I deleted 6
> Now it looks like
> 1
> 2
> 3
> 4
> 5
> 7
> 8
> 9 and so on
>
> is there somewhere the "next" number is located ?
>
>
>



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




[PHP] Re: Newbie needs some help picking a php editor.

2002-06-11 Thread Shane Kelly

Hi Al...

I use Macromedia Dreamweaver UltraDev with PHAkt plugin (you'll have to add
it from the dreamweaver ultradev extensions @ www.macromedia.com/exchange

Macromedia UltraDev is available for 30 day free trial at their site

it has brilliant php support..you barely have to know a stitch of code, but
it helps.

There are also other PHP extensions available at macromedia exchange.

check out www.php.net
they talk about other possible resources...but I love ultradev.





"Al" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I spent a good bit of time looking at editors to help me prepare and
> modify php scripts.  I've found it very time consuming to evaluate them.
>
> In general, I've found you have to download, install and play with them
> some just to determine if they fit your needs.  And I know from
> experience, often programs only show their deficiencies after you've
> used them a bit.
>
> And, I've found many that claim "php" editing; but they really aren't
> anything but a simple plain text editor.
>
> My needs are modest.  I'm well versed with HTML, css, etc.  And have
> done a bit of customizing scripts.
>
> For now, I mostly need an editor that will:
>   Help me keep the syntax correct.
>   Provide a list of functions, etc. to pick from.
>   Upload my script files via ftp.
>   Have the usual search/replace across files
>
> Would be nice if it:
>   Had a project feature
>   Could run a script I'm working on locally with its includes, etc. on
> my remote host.
>
> Right now I'm looking at "php Coder Pro"; "phpEdit" and "UltraEdit".
>
> Can anyone comment on these?  And please suggest any others.
>
> Thanks.
>



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




[PHP] get pwd on windows

2002-06-11 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

Ok, I need to write this little script to run on a Windows box (don't ask...), 
but I'm getting completely shafted by the inconsistent use of long filenames.

I need to get the current directory, but it must have long filenames and not 
be chopped to xxx~1 or anything.   $SCRIPT_FILENAME is not set, there is no 
pwd utility, nothing is set in the environment and realpath('./') returns 
cropped firectory names.

Is there a way to do this or am I condemned to bang my head against a wall and 
swear some more?

Cheers

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9Bjcw5DXg6dCMBrQRAjjbAJ4iz2jRJ5rMzkV7Md5GHpTd3YcX1wCfZb6B
44Qwj0u6jdfNpGtf+LTEX+w=
=HgUp
-END PGP SIGNATURE-


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




Re: [PHP] Dos Paths

2002-07-10 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi 

I have a problem that's somewhat related to this - I can get short filenames 
from the OS but I really need long filenames.  Does anyone know how to do 
this?

Thanks

Shane


On Wednesday 10 July 2002 1:14 pm, BB wrote:
> I've got an application that requires dos folder names (8.3 standard) as
> input.
>
> I also have PHP, which quite happily can cope with both.
>
> Can someone help me write a function to translate full paths to dos paths
>
> Thanks

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9LEBu5DXg6dCMBrQRAk7bAKCS10F8NjFrStSaha0Dkno0uwGE0QCgjdFi
gNzKf3kaWjP5h2rWtImS6Xw=
=I22O
-END PGP SIGNATURE-


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




[PHP] Vancouver PHP Conference - January 22-23

2004-01-06 Thread Shane Caraveo
Subject: The PHP Vancouver Conference - January 22-23

The Vancouver PHP Users' Association is proud to present The PHP
Vancouver Conference, a professional and technical conference
focused on the PHP scripting language.
Join the world's leading PHP developers and business professionals as
they share their experience with PHP professionals and students from
around the world.
When:   January 22-23, 2004
Where:  SFU Harbour Centre Campus, Vancouver, BC
Keynote:Rasmus Lerdorf, creator of PHP
Standard attendee rate is only $150 plus applicable taxes, offering an
affordable alternative to US-based events. Student pricing is also
available.
For more information or to register, see:
http://vancouver.php.net/?s=conference
The conference will feature a series of talks on topics ranging from the
upcoming PHP5 to the practical implications of implementing PHP in the
enterprise.
'Birds of a Feather' (BOF) and 'Work in Progress' (WIP) sessions will be
held on the first night. These are informal discussions on technical
topics related to PHP, open to all attendees.
As a conference sponsor, ActiveState is pleased to offer attendees a
free copy of Komodo Personal Edition, the award-winning, professional
IDE for PHP. A coupon for your copy will be provided at the conference.
Sponsorship packages are still available, including exhibition space for
those who wish to promote their products and services. For more
information on sponsorship opportunities, see:
http://vancouver.php.net/?s=sponsorship
Space is limited so book early!
http://vancouver.php.net/?s=conference
I look forward to seeing you there.

Shane Caraveo
Senior Developer, PHP
ActiveState
604.484.6435
http://www.ActiveState.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session Errors, do you recognize?

2001-01-10 Thread Shane McBride

Make sure that the 
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 9:04 AM
Subject: [PHP] Session Errors, do you recognize?


Hey, I keep getting the same error messages when trying to fire up sessions
in this code i wrote. i've written some test scripts to test sessions on my
machine, and they are working, so the problem must lie within my code. Here'
what I'm getting, anyone know how to resolve this?

Warning: Cannot send session cookie - headers already sent by (output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14

Warning: Cannot send session cache limiter - headers already sent (output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14


wpdbcon.php --



i also tried doing

if (!session_is_registered('cart') {
$cart = array();
session_register('cart');
}
else {
session_start();
}

i thought it was sending conflicting data when it was trying to initialize,
didn't work either.

thanks in advance.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Session Errors, do you recognize?

2001-01-10 Thread Shane McBride

One more thing after looking at the code. Try this:



- Original Message -
From: "JB" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 9:04 AM
Subject: [PHP] Session Errors, do you recognize?


Hey, I keep getting the same error messages when trying to fire up sessions
in this code i wrote. i've written some test scripts to test sessions on my
machine, and they are working, so the problem must lie within my code. Here'
what I'm getting, anyone know how to resolve this?

Warning: Cannot send session cookie - headers already sent by (output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14

Warning: Cannot send session cache limiter - headers already sent (output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14


wpdbcon.php --



i also tried doing

if (!session_is_registered('cart') {
$cart = array();
session_register('cart');
}
else {
session_start();
}

i thought it was sending conflicting data when it was trying to initialize,
didn't work either.

thanks in advance.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How can I get a random number

2001-01-10 Thread Shane McBride

This is what I have used:

$token = md5(uniqid(rand()));


- Original Message - 
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Monday, January 10, 2000 5:13 PM
Subject: [PHP] How can I get a random number


> How can I get a random number
> 
> Thank you,
> 
> 
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
>  
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] pause

2001-01-10 Thread Shane McBride

If you find something other than client side validation, let me know please.
I had to resort to VBScript and I hate it!

- Original Message -
From: "jeremy brand" <[EMAIL PROTECTED]>
To: "DanO" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 4:42 PM
Subject: RE: [PHP] pause


> Funny, I would say forget javascript; I don't trust client side
> validation.
>
> :)  Just my two cents.
>
> Jeremy
>
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 ::
[EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>""   -- Quoted from Yahoo! homepage, http://www.yahoo.com
>
>
> > don't forget javascript!
> >
> > you could validate the form before posting to php.
> >
> > DanO
> >
> >
> > -Original Message-
> > From: jeremy brand [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 10, 2001 1:18 PM
> > To: Robert Ludvik
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] pause
> >
> >
> > You could use custom HTML meta content refresh tags.  This is not a
> > PHP think, but an HTML thing.
> >
> > Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 ::
[EMAIL PROTECTED]
> > http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> > Get your own Free, Private email at http://www.smackdown.com/
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >""   -- Quoted from Yahoo! homepage, http://www.yahoo.com
> >
> > On Wed, 10 Jan 2001, Robert Ludvik wrote:
> >
> > > Date: Wed, 10 Jan 2001 21:18:38 +0100
> > > From: Robert Ludvik <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] pause
> > >
> > > hi
> > > i know i've noticed somewhere something about how to implement a Pause
in
> > PHP -
> > > I mean, if ie.a user inputs a wrong number, the script says "Oh no,
it's
> > > wrong", waits a few seconds and redirects her back to input form. i
know i
> > could
> > > say to him "hit a Back button...", just wondering if something lika
Pause
> > > exists. i've searched php.net and zend.com but found nothing useful.
> > > thanks
> > > Bobe
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Apache error after setting path for mysql=

2001-01-10 Thread Shane Reid

I reconfigured php with ./configure --with-mysql=/usr/local/etc/mysql 
--with-apxs=/usr/local/etc/apache/bin/apxs and apache will no longer start.  I removed 
the path from the mysql to get the webserver back up but my question was why would it 
not be able to find libmysqlclient.so.10 (error down below).   The file is located at 
/usr/local/etc/mysql/lib/mysql/libmysqlclient.so.10 ... any reason its not picking up 
the fact that its there when I pointed it to the directory I told mysql to install to?

Cannot load /usr/local/etc/apache/libexec/libphp4.so into server: Shared object 
"libmysqlclient.so.10" not found

-Shane



Re: [PHP] How do I store a pic?

2001-01-12 Thread Shane McBride

Kenneth,

I store the path to the image in the table. I am unsure if you can actually
write an image to a table.
When the item is deleted, I run an "exec" command to remove the actual file.

Here's some snippets:

The actual html to create the upload file text box within a :



This is the code for the page that is called using the form action. I added
a timestamp to the filename to avoid anyone accidentially overwriting a
file. (and hacking - you know a picture of a naked lady where a picture of a
garden rack is supposed to be):

// Creates the image file with a timestamp
$timestamp = time();
$image= $timestamp.$picture_name;
exec("mv $picture /path/to/your/directory/$image");

The "exec" command is what you really want to pay attenetion to. Also, this
example is assuming you are running Linux and MySQL. This is the delete
routine that removes the file and the record from the table:

   //Remove File from server
  $sol_1 = "SELECT * FROM featured WHERE image = '$sell_record'";
  $sol_result = myself_query($sol_1, $connection) or die ("SQL_RESULT");
  $row = myself_fetch_array($sol_result) or die ("Couldn't execute $sol_1");
  $image = $row["image"];
  exec("rm $picture /path/to/your/directory/'$image'");

Please note that you must use the actual path to the directory, not the
httpd path. I hope this helps you. Let me know.

Shane

- Original Message -
From: "Kenneth R Zink II" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Friday, January 12, 2001 4:35 PM
Subject: [PHP] How do I store a pic?


> How do I store a jpg within a table?
>
> I want for a user to be able to pull a jpg from either their HD and store
it
> in a table with some other information for a classifieds section.  That
way
> when the ad is deleted, the picture goes with it instead of remaining on
my
> HD.
>
> Kenneth R Zink II [EMAIL PROTECTED]ICQ# 5095094
> '87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!!
> http://www.s-series.org/htm/windstorm/project-windstorm.htm
> '85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS
!!!
> http://www.s-series.org/htm/firestorm/firestorm.htm
> Racing by the Grace of God!!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /sapi/isapi/stresstest notes.txt stresstest.cpp stresstest.dsp

2001-01-14 Thread Shane Caraveo

shane   Sun Jan 14 16:29:49 2001 EDT

  Modified files:  
/php4/sapi/isapi/stresstest notes.txt stresstest.cpp stresstest.dsp 
  Log:
  Multithreaded stress test program for isapi module now supports phpt files
  still stuff to do before it's realy done, but does run the tests, just need
  to get it to compare results right now.
  
  
  

Index: php4/sapi/isapi/stresstest/notes.txt
diff -u php4/sapi/isapi/stresstest/notes.txt:1.1 
php4/sapi/isapi/stresstest/notes.txt:1.2
--- php4/sapi/isapi/stresstest/notes.txt:1.1Sun Jan  7 16:10:06 2001
+++ php4/sapi/isapi/stresstest/notes.txtSun Jan 14 16:29:49 2001
@@ -1,11 +1,13 @@
 This stress test program is for debugging threading issues with the isapi module.
 
-Create a file that contains a list of php script files, one per line.  If you need to 
provide input, you can create an input file for each script file.  File contents would 
look like:
+2 ways to use it.
 
-e:\inetpub\pages\index.php
-e:\inetpub\pages\info.php
-e:\inetpub\pages\posttest.php e:\inetpub\pages\postdata.txt
+1: test any php script file on multiple threads
+2: run the php test scripts bundled with the source code
+
 
+GLOBAL SETTINGS
+
 If you need to set special environement variables, in addition to your regular 
environment, create a file that contains them, one setting per line:
 
 MY_ENV_VAR=
@@ -13,6 +15,35 @@
 This can be used to simulate isapi environment variables if need be.
 
 By default, stress test uses 10 threads.  To change this, change the define 
NUM_THREADS in stresstest.cpp.
+
+1: test any php script file on multiple threads
+
+Create a file that contains a list of php script files, one per line.  If you need to 
+provide input, place the GET data, or Query String, after the filename.  File 
+contents would look like:
+
+e:\inetpub\pages\index.php
+e:\inetpub\pages\info.php
+e:\inetpub\pages\test.php a=1&b=2
+
+run: stresstest L files.txt
+
+2: run the php test scripts bundled with the source code
+
+supply the path to the parent of the "tests" directory
+(expect a couple long pauses for a couple of the larger tests)
+
+run: stresstest T c:\php4-source
+
+
+
+TODO:
+
+Make an apropriate test of the output against the EXPECT data for the test files, 
+right now it simply doesn't work since I'm burnt (tired that is).
+
+Make more options configurable: number of threads, itterations, etc.
+
+Improve stdout output to make it more usefull
+
+Log totals for each test.
 
-This test program is a work in progress, no garauntees on it working right.
+Implement support for SKIPIF
 
Index: php4/sapi/isapi/stresstest/stresstest.cpp
diff -u php4/sapi/isapi/stresstest/stresstest.cpp:1.3 
php4/sapi/isapi/stresstest/stresstest.cpp:1.4
--- php4/sapi/isapi/stresstest/stresstest.cpp:1.3   Sun Jan  7 17:14:49 2001
+++ php4/sapi/isapi/stresstest/stresstest.cpp   Sun Jan 14 16:29:49 2001
@@ -29,11 +29,24 @@
 //
 // The mandatory exports from the ISAPI DLL
 //
+#define NUM_THREADS 10
+#define ITERATIONS 1
+HANDLE terminate[NUM_THREADS];
+HANDLE StartNow;
+// quick and dirty environment
+typedef CMapStringToString TEnvironment;
+TEnvironment IsapiEnvironment;
+CStringArray IsapiFileList;  // list of filenames
+CStringArray TestNames;  // --TEST--
+CStringArray IsapiGetData;   // --GET--
+CStringArray IsapiPostData;  // --POST--
+CStringArray IsapiMatchData; // --EXPECT--
 
 typedef struct _TIsapiContext {
HANDLE in;
HANDLE out;
DWORD tid;
+   TEnvironment env;
 } TIsapiContext;
 
 //
@@ -57,77 +70,52 @@
 char * GetEnv(char *);
 
 
-#define NUM_THREADS 10
-#define ITERATIONS 1
-HANDLE terminate[NUM_THREADS];
-HANDLE StartNow;
-// quick and dirty environment
-CMapStringToString IsapiEnvironment;
-CStringArray IsapiFileList;
-CStringArray IsapiArgList;
 
 
 DWORD CALLBACK IsapiThread(void *);
-int stress_main(const char *filename, const char *arg);
-
-
+int stress_main(const char *filename, 
+   const char *arg, 
+   const char *postfile, 
+   const char *matchdata,
+   const char *testname);
 
-int main(int argc, char* argv[]) {
-   LPVOID lpMsgBuf;
-   char *filelist, *environment;
-
-   if (argc < 2) {
-   printf("Usage: stress filelist.txt env.txt\r\n");
-   return 0;
-   }
-   filelist = argv[1];
-   environment = argv[2];
-
-   hDll = LoadLibrary("php4isapi.dll"); // Load our DLL
 
-   if (!hDll) {
-   FormatMessage( 
-  FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-   NULL,
-   GetLastError(),
-   MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
-   (LPTSTR) &lpMsgBuf,
-   0,
-   NULL 
-   );
-   fprintf(stderr,"E

[PHP-CVS] cvs: php4 /sapi/isapi/stresstest stresstest.cpp

2001-01-14 Thread Shane Caraveo

shane   Sun Jan 14 16:56:23 2001 EDT

  Modified files:  
/php4/sapi/isapi/stresstest stresstest.cpp 
  Log:
  fix file reading, add results
  
Index: php4/sapi/isapi/stresstest/stresstest.cpp
diff -u php4/sapi/isapi/stresstest/stresstest.cpp:1.4 
php4/sapi/isapi/stresstest/stresstest.cpp:1.5
--- php4/sapi/isapi/stresstest/stresstest.cpp:1.4   Sun Jan 14 16:29:49 2001
+++ php4/sapi/isapi/stresstest/stresstest.cpp   Sun Jan 14 16:56:23 2001
@@ -36,11 +36,18 @@
 // quick and dirty environment
 typedef CMapStringToString TEnvironment;
 TEnvironment IsapiEnvironment;
+
+typedef struct _TResults {
+   LONG ok;
+   LONG bad;
+} TResults;
+
 CStringArray IsapiFileList;  // list of filenames
 CStringArray TestNames;  // --TEST--
 CStringArray IsapiGetData;   // --GET--
 CStringArray IsapiPostData;  // --POST--
 CStringArray IsapiMatchData; // --EXPECT--
+CArray Results;
 
 typedef struct _TIsapiContext {
HANDLE in;
@@ -207,6 +214,10 @@
enum state {none, test, skipif, post, get, file, expect} parsestate = none;
 
FILE *fp = fopen(filename, "r");
+   char *tn = _tempnam(temppath,"pht.");
+   char *en = _tempnam(temppath,"exp.");
+   FILE *ft = fopen(tn, "w+");
+   FILE *fe = fopen(en, "w+");
if (fp) {
while (fgets(line,sizeof(line)-1,fp)) {
if (line[0]=='-') {
@@ -245,36 +256,25 @@
cGet += line;
break;
case file:
-   cFile += line;
+   fputs(line, ft);
break;
case expect:
-   cExpect += line;
+   fputs(line, fe);
break;
}
}   
 
fclose(fp);
+   fclose(ft);
+   fclose(fe);
 
-   if (!cTest.IsEmpty() && !cFile.IsEmpty() && !cExpect.IsEmpty()) {
-   BOOL created = FALSE;
-   char *fn = _tempnam(temppath,"pht.");
-   char *en = _tempnam(temppath,"exp.");
-   FILE *fp = fopen(fn, "w+");
-   FILE *fe = fopen(en, "w+");
-   if (fp && en) {
-   fwrite(cFile, cFile.GetLength(), 1, fp);
-   fwrite(cExpect, cExpect.GetLength(), 1, fe);
-   IsapiFileList.Add(fn);
-   TestNames.Add(cTest);
-   IsapiGetData.Add(cGet);
-   IsapiPostData.Add(cPost);
-   IsapiMatchData.Add(en);
-   created = TRUE;
-   }
-   if (fp) fclose(fp);
-   if (fe) fclose(fe);
-
-   return created;
+   if (!cTest.IsEmpty()) {
+   IsapiFileList.Add(tn);
+   TestNames.Add(cTest);
+   IsapiGetData.Add(cGet);
+   IsapiPostData.Add(cPost);
+   IsapiMatchData.Add(en);
+   return TRUE;
}
}
return FALSE;
@@ -322,9 +322,19 @@
return;
}
 
+   Results.SetSize(IsapiFileList.GetSize());
+
ReadGlobalEnvironment(environment);
 
DoThreads();
+
+   printf("\r\nRESULTS:\r\n");
+   // show results:
+   DWORD r = Results.GetSize();
+   for (DWORD i=0; i< r; i++) {
+   TResults result = Results.GetAt(i);
+   printf("%s\r\nOK: %d FAILED: %d\r\n", TestNames.GetAt(i), result.ok, 
+result.bad);
+   }
 }
 
 int main(int argc, char* argv[]) {
@@ -409,11 +419,15 @@
for (DWORD i=0; ihttp://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /sapi/isapi/stresstest stresstest.cpp

2001-01-14 Thread Shane Caraveo

shane   Sun Jan 14 16:57:16 2001 EDT

  Modified files:  
/php4/sapi/isapi/stresstest stresstest.cpp 
  Log:
  check files open
  
Index: php4/sapi/isapi/stresstest/stresstest.cpp
diff -u php4/sapi/isapi/stresstest/stresstest.cpp:1.5 
php4/sapi/isapi/stresstest/stresstest.cpp:1.6
--- php4/sapi/isapi/stresstest/stresstest.cpp:1.5   Sun Jan 14 16:56:23 2001
+++ php4/sapi/isapi/stresstest/stresstest.cpp   Sun Jan 14 16:57:16 2001
@@ -218,7 +218,7 @@
char *en = _tempnam(temppath,"exp.");
FILE *ft = fopen(tn, "w+");
FILE *fe = fopen(en, "w+");
-   if (fp) {
+   if (fp && ft && fe) {
while (fgets(line,sizeof(line)-1,fp)) {
if (line[0]=='-') {
if (_strnicmp(line, "--TEST--", 8)==0) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /sapi/isapi/stresstest stresstest.cpp

2001-01-14 Thread Shane Caraveo

shane   Sun Jan 14 17:13:51 2001 EDT

  Modified files:  
/php4/sapi/isapi/stresstest stresstest.cpp 
  Log:
  clean up temp files
  
Index: php4/sapi/isapi/stresstest/stresstest.cpp
diff -u php4/sapi/isapi/stresstest/stresstest.cpp:1.6 
php4/sapi/isapi/stresstest/stresstest.cpp:1.7
--- php4/sapi/isapi/stresstest/stresstest.cpp:1.6   Sun Jan 14 16:57:16 2001
+++ php4/sapi/isapi/stresstest/stresstest.cpp   Sun Jan 14 17:13:51 2001
@@ -315,6 +315,25 @@
return IsapiFileList.GetSize() > 0;
 }
 
+void DeleteTempFiles(const char *mask)
+{
+   char FindPath[MAX_PATH];
+   WIN32_FIND_DATA fd;
+   memset(&fd, 0, sizeof(WIN32_FIND_DATA));
+
+   _snprintf(FindPath, sizeof(FindPath)-1, "%s\\%s",temppath, mask);
+   HANDLE fh = FindFirstFile(FindPath, &fd);
+   if (fh != INVALID_HANDLE_VALUE) {
+   do {
+   char NewFindPath[MAX_PATH];
+   _snprintf(NewFindPath, sizeof(NewFindPath)-1, 
+"%s\\%s",temppath, fd.cFileName);
+   DeleteFile(NewFindPath);
+   memset(&fd, 0, sizeof(WIN32_FIND_DATA));
+   } while (FindNextFile(fh, &fd) != 0);
+   FindClose(fh);
+   }
+}
+
 void DoTestFiles(const char *filelist, const char *environment)
 {
if (!GetTestFiles(filelist)) {
@@ -335,6 +354,12 @@
TResults result = Results.GetAt(i);
printf("%s\r\nOK: %d FAILED: %d\r\n", TestNames.GetAt(i), result.ok, 
result.bad);
}
+
+   // delete temp files
+   printf("Deleting Temp Files\r\n");
+   DeleteTempFiles("exp.*");
+   DeleteTempFiles("pht.*");
+   printf("Done\r\n");
 }
 
 int main(int argc, char* argv[]) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /sapi/isapi/stresstest stresstest.cpp

2001-01-14 Thread Shane Caraveo

shane   Sun Jan 14 17:17:45 2001 EDT

  Modified files:  
/php4/sapi/isapi/stresstest stresstest.cpp 
  Log:
  dont do results if not using test files
  
Index: php4/sapi/isapi/stresstest/stresstest.cpp
diff -u php4/sapi/isapi/stresstest/stresstest.cpp:1.7 
php4/sapi/isapi/stresstest/stresstest.cpp:1.8
--- php4/sapi/isapi/stresstest/stresstest.cpp:1.7   Sun Jan 14 17:13:51 2001
+++ php4/sapi/isapi/stresstest/stresstest.cpp   Sun Jan 14 17:17:44 2001
@@ -450,9 +450,9 @@
IsapiPostData.GetAt(i),
IsapiMatchData.GetAt(i),
TestNames.GetAt(i)))
-   InterlockedIncrement(&Results[i].ok);
+   if (test) InterlockedIncrement(&Results[i].ok);
else
-   InterlockedIncrement(&Results[i].bad);
+   if (test) InterlockedIncrement(&Results[i].bad);
Sleep(10);
}
}



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /sapi/isapi/stresstest notes.txt stresstest.cpp

2001-01-14 Thread Shane Caraveo

shane   Sun Jan 14 17:52:47 2001 EDT

  Modified files:  
/php4/sapi/isapi/stresstest notes.txt stresstest.cpp 
  Log:
  test now produce valid OK or FAIL.
  
Index: php4/sapi/isapi/stresstest/notes.txt
diff -u php4/sapi/isapi/stresstest/notes.txt:1.2 
php4/sapi/isapi/stresstest/notes.txt:1.3
--- php4/sapi/isapi/stresstest/notes.txt:1.2Sun Jan 14 16:29:49 2001
+++ php4/sapi/isapi/stresstest/notes.txtSun Jan 14 17:52:47 2001
@@ -37,13 +37,10 @@
 
 TODO:
 
-Make an apropriate test of the output against the EXPECT data for the test files, 
right now it simply doesn't work since I'm burnt (tired that is).
-
 Make more options configurable: number of threads, itterations, etc.
 
 Improve stdout output to make it more usefull
 
-Log totals for each test.
-
 Implement support for SKIPIF
 
+Improve speed of CompareFile function (too slow on big files).
Index: php4/sapi/isapi/stresstest/stresstest.cpp
diff -u php4/sapi/isapi/stresstest/stresstest.cpp:1.8 
php4/sapi/isapi/stresstest/stresstest.cpp:1.9
--- php4/sapi/isapi/stresstest/stresstest.cpp:1.8   Sun Jan 14 17:17:44 2001
+++ php4/sapi/isapi/stresstest/stresstest.cpp   Sun Jan 14 17:52:47 2001
@@ -83,12 +83,11 @@
 int stress_main(const char *filename, 
const char *arg, 
const char *postfile, 
-   const char *matchdata,
-   const char *testname);
+   const char *matchdata);
 
 
 
-BOOL test = FALSE;
+BOOL bUseTestFiles = FALSE;
 char temppath[MAX_PATH];
 
 void stripcrlf(char *line)
@@ -99,6 +98,37 @@
if (line[l]==10 || line[l]==13) line[l]=0;
 }
 
+
+BOOL CompareFiles(const char*f1, const char*f2)
+{
+   FILE *fp1 = fopen(f1,"r");
+   if (!fp1) return FALSE;
+   FILE *fp2 = fopen(f2,"r");
+   if (!fp2) {
+   fclose(fp1);
+   return FALSE;
+   }
+
+   CString file1, file2, line;
+   char buf[1024];
+   while (fgets(buf, sizeof(buf), fp1)) {
+   line = buf;
+   line.TrimLeft();
+   line.TrimRight();
+   file1+=line;
+   }
+   fclose(fp1);
+   while (fgets(buf, sizeof(buf), fp2)) {
+   line = buf;
+   line.TrimLeft();
+   line.TrimRight();
+   file2+=line;
+   }
+   fclose(fp2);
+
+   return file1==file2;
+}
+
 BOOL ReadGlobalEnvironment(const char *environment)
 {
if (environment) {
@@ -154,6 +184,8 @@
 
i++;
}
+   Results.SetSize(TestNames.GetSize());
+
fclose(fp);
return IsapiFileList.GetSize() > 0;
 }
@@ -371,7 +403,7 @@
printf("USAGE: stresstest [L|T] filelist [environment]\r\n");
return 0;
} else {
-   if (argv[1][0]=='T') test = TRUE;
+   if (argv[1][0]=='T') bUseTestFiles = TRUE;
if (argc > 1) filelist = argv[2];
if (argc > 2) environment = argv[3];
}
@@ -416,7 +448,7 @@
return -1;
}
 
-   if (test) {
+   if (bUseTestFiles) {
char TestPath[MAX_PATH];
if (filelist != NULL) 
_snprintf(TestPath, sizeof(TestPath)-1, "%s\\tests", filelist);
@@ -443,16 +475,24 @@
for (DWORD j=0; jhttp://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Search Engine submittal and PHP

2001-01-17 Thread Shane McBride

I have a site that uses PHP extensively. Each page has PHP, so of course each page 
ends in the .php extension.

Does anyone know if this affects the way a search engine crawls a site? I have several 
sites that are very successful, but this site does not even show up on the search 
engines. All design criteria and submission techniques were the same, except I used 
PHP on this particular site on every page.

Thanks for your help...
Shane



[PHP] Ethics question...

2001-01-17 Thread Shane McBride

I have spent a lot of time working on a specific E-Commerce (shopping-cart) to fill a 
need for a customer. Now that the project is complete, I would like to market the 
product, which is entirely PHP and MySQL.

My question is: Is it ethical to sell a product ( at a relatively low-cost) written in 
PHP, especially since this group made it possible?

If that's ok to do, does anyone have any ideas how I can put a time limit on a demo 
that isn't easily defeated?


TIA,
Shane



Re: [PHP] Ethics question...

2001-01-17 Thread Shane McBride

Wow, I caused quite a debate. And I thought I would get slammed :)

BTW - PHP / Apache is going to be up to the client at this point. :)

- Shane

- Original Message -
From: "Maxim Maletsky" <[EMAIL PROTECTED]>
To: "'jeremy brand'" <[EMAIL PROTECTED]>; "Kath" <[EMAIL PROTECTED]>
Cc: "'Rasmus Lerdorf'" <[EMAIL PROTECTED]>; "Shane McBride"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 10:03 PM
Subject: RE: [PHP] Ethics question...


> hey, hey ... I wrote "Microsoft" just to tell you how _big_ a customer
could
> be...
> a simple comparison... no politics here ... :-))
>
> Cheers,
> Maxim Maletsky
>
>
>
> -Original Message-----
> From: jeremy brand [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 18, 2001 12:02 PM
> To: Kath
> Cc: Maxim Maletsky; 'Rasmus Lerdorf'; Shane McBride;
> [EMAIL PROTECTED]
> Subject: Re: [PHP] Ethics question...
>
>
> > Soo true.
> >
> > But why would Microsoft be using PHP? =D
>
> Why would Microsoft be using Solaris, or Linux even?  (hint, the same
> reason -- their stuff works less good).
>
> :)
>
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 ::
[EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>http://www.JEEP-FOR-SALE.com/ -- I need a buyer
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help w/ quotes/html and data from MySQL

2001-01-23 Thread Shane McBride

I have a field in MySQL that holds data that may look like this:

Rose Painting"Looks really nice, blah, blah"25.00

Now, I want to pull that data back into a form  to edit. Here's how I have 
unsuccessfully been doing it:

?>
 beginning code
Description:

...ending code
?>

I looks like that the embedded html in the MySQL data is actually being "rendered" 
(for the lack of a better term).
How can I get the whole chunk of data back into the form?

TIA,
-Shane



Re: [PHP] Help w/ quotes/html and data from MySQL

2001-01-23 Thread Shane McBride

After I sent this message I looked at the code again. I saw the error as
obvious as daylight. It's working great now.

Thanks.


- Original Message -
From: "Steve Edberg" <[EMAIL PROTECTED]>
To: "Shane McBride" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, January 23, 2001 5:50 PM
Subject: Re: [PHP] Help w/ quotes/html and data from MySQL


> At 4:47 PM -0500 1/23/01, Shane McBride wrote:
> >I have a field in MySQL that holds data that may look like this:
> >
> >Rose Painting"Looks really nice, blah, blah"25.00
> >
> >Now, I want to pull that data back into a form  to edit.
> >Here's how I have unsuccessfully been doing it:
> >
> >?>
> > beginning code
> >Description:
> > >rows=\"5\">
> >...ending code
> >?>
> >
> >I looks like that the embedded html in the MySQL data is actually
> >being "rendered" (for the lack of a better term).
> >How can I get the whole chunk of data back into the form?
> >
>
>
> Well, if you're using PHP:
>
> echo
> 'Description:',
> '',
> htmlentities($description),
> ''
> ;
>
> Presumably, other web development languages have an equivalent
> construct to PHP's htmlentities().
>
> Also, the value of a textarea tag is not put in a 'value' attribute
> within the tag as with the INPUT tag; it is put in the textarea
> 'container' - that is, between the  and  tags.
>
> - steve
>
>
> --
> +--- "They've got a cherry pie there, that'll kill ya" --+
> | Steve Edberg   University of California, Davis |
> | [EMAIL PROTECTED]   Computer Consultant |
> | http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
> +-- FBI Special Agent Dale Cooper ---+
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help: Google like page functions

2001-01-23 Thread Shane McBride

I thought this had been addressed earlier, but I could not find the thread.

If I have a MySQL DB that has 50 records in it and I want to display 5 per page. How 
do I do this. Also, 50 was just a nice round number, the number will change constantly.

All the search engines are doing this type of thing. I just can't seem to figure out 
what I should search for.

- Shane



Re: [PHP] Help: Google like page functions

2001-01-23 Thread Shane McBride

I found a great little snippet by accident that does the "Previous 123 Next"
links. If anyone is interested, here's the link to it:

http://www.phpbuilder.net/snippet/detail.php?type=snippet&id=21


- Original Message -
From: "Shane McBride" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 23, 2001 6:35 PM
Subject: [PHP] Help: Google like page functions


I thought this had been addressed earlier, but I could not find the thread.

If I have a MySQL DB that has 50 records in it and I want to display 5 per
page. How do I do this. Also, 50 was just a nice round number, the number
will change constantly.

All the search engines are doing this type of thing. I just can't seem to
figure out what I should search for.

- Shane



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] include_path in windows

2001-01-26 Thread Shane McBride

I am trying to get my php.ini file configured correctly.

I have a script that calls the require function/command( I'm not sure which it is..)

Here's what the .ini file is:
include_path=d:\sites;d:\sites\merchantpower\setup

According to the notation in the .ini file I have the correct syntax, but it never 
seems to look in the second path.

Can someone explain this to me better. Remember I'm dealing with Windows to do 
development.

I would think that the script would start to look in the d:\sites directory and then 
go to any sub directory from there...

TIA,
-Shane



[PHP] include_path again

2001-01-26 Thread Shane McBride

OK, I figured out that I had forgotten the quotes around the path(s), but I still 
don't understand the path itself. Will it look in sub directories.For example:

include_path=".;d:\sites"

Will PHP look in any subs under sites?


- Shane



[PHP] common.inc probs.

2001-01-26 Thread Shane McBride

I have a script that pulls in the following file via: require 'common.inc'

The problem occurs when it hits the $UNIX_PATH variable. At least I think that's where 
it creates a problem. If I comment it out it works fine, but I of course need that 
variable. 

First of all I created a script that creates this file and I don't understand why it 
doubled the backslashes in the $UNIX_PATH variable. Secondly, why it is crapping out 
on the double backslashes? I thought PHP would use the first one as an escape 
character.

As a side note: I know the example shown here shows a windows path for the unix path 
variable, I'm trying to port this over to winders..  :-0

http://localhost/mp/images/$image";
$DOC_ROOT="mp";
$ADMINROOT="admin";
?>

TIA-

-Shane




[PHP] Use of exec() in windows

2001-01-26 Thread Shane McBride

All,

I'm trying to port a wonderful application over to miserable windows. I can not find 
documentation of how to invoke exec on windows. Here's what I tried:

// Creates the image file with a timestamp
$timestamp = time();
$image= $timestamp.$picture_name;
if ($PLATFORM == "windows") {
$new_path = str_replace('^', '\\', $WINDOWS_PATH);
exec("copy c:\temp\$picture $new_path.$image");
echo $new_path.$image;
} else {
exec("mv $picture 
/services/webpages/t/h/thebackcarecenter.com/public/RDI_Shop/images/$image"); 
}

The previous step uploads the file. It does get to the temp directory, but never 
copies to the permanent directory. All the varaibles are defined. I think it lies in 
how I'm trying to execute a command.








Re: [PHP] Help Please, MySQL is driving me insane

2001-01-26 Thread Shane McBride

Have you started the server? If not go to the command prompt and:
1. cd c:\mysql\bin (assuming this is where it was installed.
2. type mqsqld-opt (optimized for pentium class PC)

That should start the server.
If you need more help let me know.

- Shane

- Original Message -
From: "Chris" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 10:20 PM
Subject: [PHP] Help Please, MySQL is driving me insane


I've installed PHP using the 4.04 win32 installer. I recently downloaded the
mysql(latest version) win32 installer and used that. But STILL mysql doesnt
work. Can someone give a code snipet i can use to see if it is working?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help Please, MySQL is driving me insane

2001-01-26 Thread Shane McBride

The username that it defaults to is root, with no password. There is a
command you need to run to set a password.

- Original Message -
From: "Chris" <[EMAIL PROTECTED]>
To: "Jason Bouwmeester" <[EMAIL PROTECTED]>; "PHP"
<[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 10:29 PM
Subject: Re: [PHP] Help Please, MySQL is driving me insane


> But i installed it to the default c:\mysql.
> How can I set a username and such to allow me to use it on my cpu?
> - Original Message -
> From: "Jason Bouwmeester" <[EMAIL PROTECTED]>
> To: "PHP" <[EMAIL PROTECTED]>
> Sent: Friday, January 26, 2001 4:12 PM
> Subject: RE: [PHP] Help Please, MySQL is driving me insane
>
>
> > I just installed mySQL yesterday from mysql.com (or .net or whatever it
> > was). It installed fine, there was a note about what to do if you didn't
> > install it to c:\mysql properly - I installed mine to a different
> directory,
> > followed the instructions and all went fine. Might be one place to
start.
> >
> > HTH,
> > jb
> >
> > -Original Message-
> > From: Chris [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, January 26, 2001 8:21 PM
> > To: PHP
> > Subject: [PHP] Help Please, MySQL is driving me insane
> >
> >
> > I've installed PHP using the 4.04 win32 installer. I recently downloaded
> the
> > mysql(latest version) win32 installer and used that. But STILL mysql
> doesnt
> > work. Can someone give a code snipet i can use to see if it is working?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] phpinfo ?

2001-01-26 Thread Shane McBride

Try this:









-Shane
- Original Message -
From: "kaab kaoutar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 10:23 AM
Subject: [PHP] phpinfo ?


> Hi there!
>
> I'm sure it's a stupid problem but the phpinfo does work while trying the
> following html code:
>
> PHP Test
> 
> 
>
> 
>
> the result is a blank page!
>
> And when i create an php file with only: 
> i have a dos window where a list of information is listed quickly then
> shut!(i can hardly see it)
> by the way is it the same to put php code between 
> and  and   ?
>
> thanks
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] move_uploaded_file - getting furthur ..still need help

2001-01-26 Thread Shane McBride

Here's what I get:

Warning: Unable to create 'd:\sites\merchantpower\mp\images\': Permission denied in 
d:/sites/MerchantPower/mp/admin/add_record2.php on line 47




[PHP] really need help...

2001-01-26 Thread Shane McBride

I am getting this error and I don't understand. I am running PHP 4.0.4 and Xitami web 
server on Windows 98SE. I know this is not the most ideal setup, but I just use it for 
developing.

Warning: Unable to create 'd:\sites\merchantpower\mp\images\': Permission denied in 
d:/sites/MerchantPower/mp/admin/add_record2.php on line 49

Do I need to set permissions somewhere? I have no idea where...maybe the web server? 
It's like the file never gets to the temp directory.

I'm lost.
Here's the code:
if (is_uploaded_file($picture)) {
copy($picture, $new_path);
//move_uploaded_file($picture, $new_path);
} else {
echo "Possible file upload attack: filename '$picture'.";
}
}

Any help would be greatly appreciated...

-Shane



[PHP-CVS] cvs: php4 /main main.c

2001-02-21 Thread Shane Caraveo

shane   Wed Feb 21 12:50:49 2001 EDT

  Modified files:  
/php4/main  main.c 
  Log:
  zend_compile_file returns a NULL on error, check for that before
  calling destroy_op_array unless we like crashes :-)
  
  
  
Index: php4/main/main.c
diff -u php4/main/main.c:1.350 php4/main/main.c:1.351
--- php4/main/main.c:1.350  Tue Feb 20 17:43:15 2001
+++ php4/main/main.cWed Feb 21 12:50:49 2001
@@ -19,7 +19,7 @@
 */
 
 
-/* $Id: main.c,v 1.350 2001/02/21 01:43:15 hholzgra Exp $ */
+/* $Id: main.c,v 1.351 2001/02/21 20:50:49 shane Exp $ */
 
 
 #include 
@@ -1263,7 +1263,8 @@
 
op_array = zend_compile_file(file, ZEND_INCLUDE CLS_CC);
retval = (op_array?SUCCESS:FAILURE);
-   destroy_op_array(op_array);
+   /* SMC op_array may be NULL */
+   if (op_array != NULL) destroy_op_array(op_array);
 
return retval;
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/mysql php_mysql.c

2001-02-21 Thread Shane Caraveo

shane   Wed Feb 21 15:57:29 2001 EDT

  Modified files:  
/php4/ext/mysql php_mysql.c 
  Log:
  Initalize some of the global vars.  Crashed under ms debugger without having them 
initialized.
  
  
  
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.70 php4/ext/mysql/php_mysql.c:1.71
--- php4/ext/mysql/php_mysql.c:1.70 Sun Feb 18 08:59:18 2001
+++ php4/ext/mysql/php_mysql.c  Wed Feb 21 15:57:28 2001
@@ -16,7 +16,7 @@
+--+
 */
  
-/* $Id: php_mysql.c,v 1.70 2001/02/18 16:59:18 eschmid Exp $ */
+/* $Id: php_mysql.c,v 1.71 2001/02/21 23:57:28 shane Exp $ */
 
 
 /* TODO:
@@ -274,6 +274,10 @@
 static void php_mysql_init_globals(zend_mysql_globals *mysql_globals)
 {
mysql_globals->num_persistent = 0;
+   mysql_globals->default_socket = NULL;
+   mysql_globals->default_host = NULL;
+   mysql_globals->default_user = NULL;
+   mysql_globals->default_password = NULL;
 }
 
 
@@ -349,10 +353,10 @@
 
 static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 {
-   char *user, *passwd, *host_and_port, *socket, *tmp, *host=NULL;
-   char *hashed_details;
+   char *user=NULL, *passwd=NULL, *host_and_port=NULL, *socket=NULL, *tmp=NULL, 
+*host=NULL;
+   char *hashed_details=NULL;
int hashed_details_length, port = MYSQL_PORT;
-   MYSQL *mysql;
+   MYSQL *mysql=NULL;
void (*handler) (int);
zval **z_host=NULL, **z_user=NULL, **z_passwd=NULL;
zend_bool free_host=0;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] require on compressed files

2001-02-28 Thread Shane Wegner

Hi all,

I am trying to get the expected behavior of:
require("filename.gz");
or
require("filename.bz2");
to work properly.

Beyond using gzopen, gzread, and gzwrite to do it using a
temp file, is there any other way to include a compressed
file with PHP code?  I thought of using gzread and passing
that to eval but it isn't pure PHP and uses 
respectively.

Thanks in advance,
Shane

-- 
Shane Wegner: [EMAIL PROTECTED]
      http://www.cm.nu/~shane/
PGP:  1024D/FFE3035D
  A0ED DAC4 77EC D674 5487
  5B5C 4F89 9A4E FFE3 035D

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] writing a time to mysql????

2001-04-26 Thread Shane McBride

Here's some code that I am using to get the time that is inout from a form into mysql. 
It looks like I may have the format backwartds. Any ideas?

"INSERT into events (e_title, e_details, start, end, s_time, e_time) values ('$title', 
'$details', '$s_year-$s_month-$s_day','$e_year-$e_month-$e_day', 
'$stime_hour.$stime_minute', '$etime_hour.$etime_minute')";

s_time and e_time are thr start and end time of the event.

$stime_hour $stime_minute are the hour and minute fileds from the form.

Any ideas

- Shane
DISCLAIMER: I am by no means an expert on this, or any other, topic...



Re: [PHP] PHP vs. ASP

2002-01-09 Thread Shane Wright

Hi

Something I dont think anyone's mentioned yet is that PHP is also great for 
running stuff from the command line - e.g. for background scripts for a site 
or mailing scripts or whatever...

In case that doesnt sound so useful, it measn you can use all the same 
libraries for the online site as for the offline processing bits :)

--
Shane

On Wednesday 09 Jan 2002 1:43 pm, Jake wrote:
> Hello there, I need some help.
>
> I have to do a technical report(about 2200 words) comparing PHP to ASP.  I
> have already decided to make PHP the winner becasue it is superior.  But I
> am kinda stumped on what areas to compare the two.
>
> If you could help me out in suggesting some possible areas of comparison.
> Keeping in mind that I need about the same amount of info on both PHP and
> ASP.  Also if you could point me in the right direction by including some
> web links that deal with the topic.
>
> Thank You,
> Jake

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Time calculation after UNIX

2002-01-16 Thread Shane Wright


Use 64bit integers!  They'll count up to a much higher number and will last 
way beyond 2038.

In the database, set the correct type (INT8 in PostgreSQL, dont know about 
the others).  Dont worry about PHP as I'm sure there'll be a few newer 
versions supporting wider int formats before then (if it doesn't already??)

--
Shane

On Wednesday 16 Jan 2002 9:33 am, Olav Drageset wrote:
> Hi
>
> I have a database that is supposed to last more than 30 years
>
> Could someone advice me how to calculate (add and subtract) time in a maner
> that willl be correct after 2030 when Unix Time stop working?
>
> ragards
>
> [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] RTFM

2002-01-18 Thread Shane Wright

Hi

Maybe this list should be split - kindof into a php-newbies and a 
php-advanced ?

--
Shane

On Friday 18 Jan 2002 9:39 pm, Richard Crawford wrote:
> Consider yourself fried. ;-)
>
> Seriously, though, I think that there are more advanced PHP lists that
> would probably be more to your liking.  Try doing a search on php.net or
> yahoogroups.com for something more technical.  I, personally, joined
> this list just over a year ago when I was assigned a project at work to
> rebuild Phorum to work against my former company's custom database.  The
> respondents on this group were incredibly helpful; and most of the
> responses to technical questions I've seen on this list have usually
> included comments like, "This works because...", or "You can find more
> information about this at...".
>
> I've found that this list is an excellent resource for beginners, as
> well as an excellent place for advanced users to get quick answers to
> urgent questions.
>
> Nick Wilson wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> >
> > Hi all,
> > just a very quick note: I've been following the list for about a
> > week and I probably follow one or two threads a day. Some of the stuff
> > here is *very* interesting. Unfortunately most of the stuff posted is a
> > little ridiculous in that it's posted by people that clearly don't know
> > where the online manual is located.
> >
> > Don't get me wrong, I'm no expert and I don't object to the 'I had a
> > look but...' posts I just think the list might be a little more
> > interesting if those that *really* know there stuff stopped giving
> > detailed answers to Q's like 'my html page shows the php code' and were
> > just a little less tolerant.
> >
> > Feel free to fry me.
> > - --
> >
> > Nick Wilson
> >
> > Tel:+45 3325 0688
> > Fax:+45 3325 0677
> > Web:www.explodingnet.com
> >
> >
> >
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.0.6 (GNU/Linux)
> >
> > iD8DBQE8SJLTHpvrrTa6L5oRAg8SAKCLzzFk6i29BzABak9ezbtsVIIw9wCgnn4o
> > +Evq2JM0f2FDj1O1WEvm82o=
> > =NaDy
> > -END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   3   >