[PHP] backslashes

2004-08-27 Thread Ryan Schefke
Hi, I have a jump box that sends the following value to the page.

 

Show 

Thank You Notes "Not Sent"

 

Then, the below query is run:

 

$query = "SELECT name, event, description, cash, action, thankyou 

FROM gifts WHERE customerID='$passid' $sort";

 

My problem is with the \'Not Sent\'.  I need the backslashes for the php
statement but the sql query can't handle it and the jump box gives me an
error.

 

Any help?



[PHP] ranking product based on votes in a given week

2005-02-22 Thread Ryan Schefke
I am trying to echo the ranking of votes (highest to lowest) that a product
received in a given week. See example of desired output.

 

In the  query below, It's working great and outputs ID, votes, and week;
however, I can't figure out how to get the ranking for a given week. In the
example below, how would I be able to output values in the Ranking column
for week 8 so that ID 1 is ranked 1, ID 3 is ranked 2, etc. Help?

 

Example ranking:

ID VotesRankingWeek

1  29 1  8

3  23 2  8

7  2  3  8

1  2  1  10



 

 QUERY --

$query = "SELECT WEEK(date) as week, count(*) as hits, listingID as lidcount
FROM 

invotestotal GROUP BY week, lidcount ORDER BY week DESC, hits DESC"; 

$result  = @mysql_query($query);

while ($row = mysql_fetch_array($result, MYSQL_NUM)) {

$printweek = $row[0];

$countinvotes = $row[1];

$lidnumber = $row[2];

 

Then, echo values in table rows...

 

}

 QUERY --

 

 

 DEFINITIONS IN QUERY --

WEEK(date) as week :: week vote took place

count(*) as hits :: counts total votes

listingID as lidcount :: ID of the product that received the vote

 DEFINITIONS IN QUERY --

 

 

 

Best regards,

Ryan



[PHP] setcookie statements are giving me error

2004-04-14 Thread Ryan Schefke
 

I'm trying to set multiple cookies and getting the error below. I removed
all of the white spaces and extra lines before and after my ,
so, that shouldn't be an issue. I get the error for each cookie and it
echoes back as "...cookie not set" like I coded. 

This is the code chunk I'm trying to run, which is called using "require
("setcookie.php");" from my main script. There aren't any extra spaces in my
main script because I can replace the require line with "header ('Location:
http://www.anything.com');" and it will redirect successfully without any
cannot modify header errors, which tells me there's nothing wrong with my
main script. Am I doing something wrong with cookies here? 

"Warning: Cannot modify header information - headers already sent by."

 

 setcookie ("acctActive_ck", "$daysRemaining"); //set cookie for active
account, will terminate when browser window closes
 if (setcookie("acctActive_ck")) { echo "active cookie set"; } else { echo
"active cookie not set";}
 setcookie ("login_ck", "$lo"); //set cookie for active account, will
terminate when browser window closes
 if (setcookie("login_ck")) { echo "login cookie set"; } else { echo "login
cookie not set";}
 setcookie ("password_ck", "$pw"); //set cookie for password, will terminate
when browser window closes
 if (setcookie("password_ck")) { echo "pw cookie set"; } else { echo "pw
cookie not set";}

 

 

Thanks a million,

Ryan



RE: [PHP] setcookie statements are giving me error

2004-04-14 Thread Ryan Schefke
Curt,

Thanks.  That was the issue.  Am I allowed to redirect directly below the
setcookie functions using "header ('Location"

Thanks,
Ryan
==

-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 14, 2004 3:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] setcookie statements are giving me error

* Thus wrote Ryan Schefke ([EMAIL PROTECTED]):
> 
> cannot modify header errors, which tells me there's nothing wrong with my
> main script. Am I doing something wrong with cookies here? 
> 
> "Warning: Cannot modify header information - headers already sent by."

You're missing the most important part of the message, like at
exactly what line the output started.
 
> 
>  setcookie ("acctActive_ck", "$daysRemaining"); //set cookie for active
> account, will terminate when browser window closes
>  if (setcookie("acctActive_ck")) { echo "active cookie set"; } else { echo
> "active cookie not set";}

No other cookie can be set after this line. Headers are sent once
you echo something.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
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] Explanation of cookie behavior

2004-04-15 Thread Ryan Schefke
Gurus,

 

I'm running a login script where the user enters login/password and if it
matches what I have in my db and their account is active, I set a login
cookie (login_ck) and an authentication cookie (authenticate_ck).  If the
login and authentication cookies are set when the user goes back to the
login page I prompt with "welcome back.".  Now, I refresh the login page a
few times, sometimes it gives the welcome back prompt.  Then after anywhere
from 2-5 refreshes, it deletes the login cookie but the authenticate cookie
persists.  Any ideas why this is happening?

 

I'm setting my cookies like this:

setcookie ("authenticate_ck", "$daysRemaining"); //set cookie for active
account, for 30days

setcookie ("login_ck", "$lo", time()+ "60*60*24*30", "", "", "0"); //set
cookie for login, for 30days

 

Thanks,

Ryan



[PHP] RE: Explanation of cookie behavior

2004-04-15 Thread Ryan Schefke
.one more note:

 

If the user checks the "remember me" box then that's how I set the two
cookes; however, if they don't click the "remember me" box then I set the
cookies like this:

 

setcookie ("authenticate_ck", "$daysRemaining"); //set cookie for active
account, will terminate when browser window closes

setcookie ("login_ck", "$lo"); //set cookie for active account, will
terminate when browser window closes

 

.and I can refresh the login page 1,000 times and it doesn't delete the
login cookie or the authenticate cookie.  Notice that when the "remember me"
box is checked I set the login cookie for 30 days whereas if it's not it
expires when the user closes their browser.

 

  _  

From: Ryan Schefke [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 15, 2004 10:43 AM
To: Php-General-Help ([EMAIL PROTECTED]);
'[EMAIL PROTECTED]'
Subject: Explanation of cookie behavior

 

Gurus,

 

I'm running a login script where the user enters login/password and if it
matches what I have in my db and their account is active, I set a login
cookie (login_ck) and an authentication cookie (authenticate_ck).  If the
login and authentication cookies are set when the user goes back to the
login page I prompt with "welcome back.".  Now, I refresh the login page a
few times, sometimes it gives the welcome back prompt.  Then after anywhere
from 2-5 refreshes, it deletes the login cookie but the authenticate cookie
persists.  Any ideas why this is happening?

 

I'm setting my cookies like this:

setcookie ("authenticate_ck", "$daysRemaining"); //set cookie for active
account, for 30days

setcookie ("login_ck", "$lo", time()+ "60*60*24*30", "", "", "0"); //set
cookie for login, for 30days

 

Thanks,

Ryan



RE: [PHP] Explanation of cookie behavior

2004-04-15 Thread Ryan Schefke
John - It works now!  That was it.  Thanks!

Ryan

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 15, 2004 10:53 AM
To: PHP Mailing List
Subject: Re: [PHP] Explanation of cookie behavior

Ryan Schefke wrote:
> setcookie ("login_ck", "$lo", time()+ "60*60*24*30", "", "", "0"); //set
> cookie for login, for 30days


Expire is supposed to be an integer.  Try...

setcookie ("login_ck", "$lo", time()+ 2592000, "", "", 0);

-- 
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***

-- 
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] File Upload Recommendations

2004-04-16 Thread Ryan Schefke
Can anyone recommend a file upload script (or if you have one) that has the
following:

 

*   Restricts size/dimensions
*   Restricts file type/extension
*   Customizeable to specify directory
*   Allows user to delete files (optional)
*   Restricts # of files uploaded to a directory (optional)



RE: [PHP] File Upload Recommendations

2004-04-16 Thread Ryan Schefke
Thanks.  I've checked that site out among others (hotscripts,etc.).  I can't
seem to find a good one that works that has my requirements below...thought
someone might have some specific recommendations.

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 16, 2004 10:12 AM
To: Php-General-Help
Subject: Re: [PHP] File Upload Recommendations

Ryan Schefke wrote:
> Can anyone recommend a file upload script (or if you have one) that has
the
> following:
> 
>  
> 
> * Restricts size/dimensions
> * Restricts file type/extension
> * Customizeable to specify directory
> * Allows user to delete files (optional)
> * Restricts # of files uploaded to a directory (optional)
> 
> 

Try here...

http://php.resourceindex.com/Complete_Scripts/File_Management/File_Uploading
/

-- 
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***

-- 
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] FW: Resizing Pictures

2004-04-19 Thread Ryan Schefke
 

How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?

 

Thanks!



RE: [PHP] FW: Resizing Pictures

2004-04-19 Thread Ryan Schefke
Hi Warren,

Thanks for the reply; however, that wasn't the answer I was searching for.
Using PHP, I would like to resize a file once it's store in a directory on a
(my) webserver.  

Anyone know?

-Original Message-
From: Warren Vail [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 11:56 PM
To: Ryan Schefke; Php-General-Help
Subject: RE: [PHP] FW: Resizing Pictures

If you don't mind doing them by hand, Window Paint can, use
Image->Stretch/Skew and Stretch by the same percentage for horizontal and
vertical dimensions to keep the same perspective (less than 100% will reduce
the picture and more than 100% will stretch, but clarity of the image will
suffer from enlarging the image).  I would also suggest save a .bmp in the
original size for future resizing and adjusting, and save as jpg for
transferring to your website (your visitors will appreciate the smaller jpg
format).

good luck

Warren Vail
[EMAIL PROTECTED]


-Original Message-
From: Ryan Schefke [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 8:06 PM
To: Php-General-Help
Cc: 'Ryan Schefke'
Subject: [PHP] FW: Resizing Pictures




How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?



Thanks!

-- 
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] Resizing Pictures

2004-04-20 Thread Ryan Schefke
How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?

 

Thanks!



[PHP] Strange music playing behavior

2004-05-12 Thread Ryan Schefke
I'm getting some strange behavior trying to play music. The script below
works fine standalone. However, when I put it into a larger script the music
doesn't play but all of the echo statements work and when I view the source
the  tags are fine, etc. What could the issue be? If you need me to
send the larger file let me know.

 

 

 
'; 
} else {
echo ' 

 
'; 
}
}
/* MUSIC? */
mysql_close();
?> 



RE: [PHP] Strange music playing behavior

2004-05-12 Thread Ryan Schefke
I know it's a lot of code but it's below.  Again, when I have the /* MUSIC?
*/ section as a standalone file (making sure to open and close the database
and include the correct require statements) it works fine; however, when
added to the code below (music section 4 paragraphs down) it doesn't play
but all the  tags and echo statements are displaying correctly.

Any clues to keep me from banging my head against the wall?

==

 

 
'; 
} else {
echo ' 

 
'; 
}
}
/* MUSIC? */



?>


'.$row[1].'\'s Wedding Website'.''; ?>






  

 

 
  


  
  

 
   
   

  
   
  
  

   

  
  

 
  
  
   

  


 
  
  
   

  


 
  
  
   


  
  

  
  
   


';

 ?> 

'.$row_preferences[0].'';
echo 'Sorted by first
name:';
 ?>
'.$row_lists[1].' '.$row_lists[2].'';
} else $list_person = null;

if (!empty($row_lists[0])) {
$list_position = ''.$row_lists[0].'';
} else $list_position = null;

if (!empty($row_lists[3])) {
$list_story = 'Story:'.$row_lists[3].'';
} else $list_story = null;

if (!empty($row_lists[3])) {
$storyYN = "".$row_lists[1] ."'s
Story:";
} else {
$storyYN = null;
}   

if (!empty($row_lists[4]) || !empty($row_lists[3]))
{
$theirphoto = '';
$list_photo = ''.$storyYN.''.$row_lists[3].''.$theirphoto.'<
/tr>';
} else $list_photo = null;

echo  ''.$list_person.$list_position.
' 
   
'
//  .$list_story.
.$list_photo.
    '
  ';
} 
?>
  
   
  


  
  
  
  






-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 12, 2004 2:20 PM
To: Ryan Schefke; Php-General-Help
Subject: RE: [PHP] Strange music playing behavior

[snip]
I'm getting some strange behavior trying to play music. The script below
works fine standalone. However, when I put it into a larger script the
music
doesn't play but all of the echo statements work and when I view the
source
the  tags are fine, etc. What could the issue be? If you need me
to
send the larger file let me know.
[snip]

Since the code snippet you sent works I would have to say that something
about this code being plugged into other code is a problem. I believe
that is what it is. For sure.

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



RE: [PHP] Strange music playing behavior

2004-05-12 Thread Ryan Schefke
I just tried it between the  tags, that doesn't make a difference.  As
I mentioned, when I run it standalone it will work fine and it's a php file,
not html so the html tags aren't needed.

...this is painful!

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 12, 2004 2:30 PM
To: Ryan Schefke; Php-General-Help
Subject: RE: [PHP] Strange music playing behavior

[snip]
I know it's a lot of code but it's below.  Again, when I have the /*
MUSIC?
*/ section as a standalone file (making sure to open and close the
database
and include the correct require statements) it works fine; however, when
added to the code below (music section 4 paragraphs down) it doesn't
play
but all the  tags and echo statements are displaying correctly.

Any clues to keep me from banging my head against the wall?
[/snip]

Top posting rocks!

It looks like you're outputting your  tags before the html even
starts. Try placing the code somewhere mid-page...between the 
tags

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



RE: [PHP] Strange music playing behavior

2004-05-12 Thread Ryan Schefke
I fixed it, thanks!  It turns out my src=" " location was wrong since I
moved the file.  I just freaked cause I thought it was an issue with
php+html.

Sorry, Ryan

-Original Message-----
From: Ryan Schefke [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 12, 2004 2:35 PM
To: 'Jay Blanchard'; 'Php-General-Help'; 'Ryan Schefke'
Subject: RE: [PHP] Strange music playing behavior

I just tried it between the  tags, that doesn't make a difference.  As
I mentioned, when I run it standalone it will work fine and it's a php file,
not html so the html tags aren't needed.

...this is painful!

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 12, 2004 2:30 PM
To: Ryan Schefke; Php-General-Help
Subject: RE: [PHP] Strange music playing behavior

[snip]
I know it's a lot of code but it's below.  Again, when I have the /*
MUSIC?
*/ section as a standalone file (making sure to open and close the
database
and include the correct require statements) it works fine; however, when
added to the code below (music section 4 paragraphs down) it doesn't
play
but all the  tags and echo statements are displaying correctly.

Any clues to keep me from banging my head against the wall?
[/snip]

Top posting rocks!

It looks like you're outputting your  tags before the html even
starts. Try placing the code somewhere mid-page...between the 
tags

-- 
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] Looking For Easy To Use Shopping Cart

2004-05-14 Thread Ryan Schefke
Can anyone recommend a good open source shopping cart solution? I built an
application for custom websites, now, I just need to interface to a shopping
cart. I'm using mysql. Any suggestions?

...looking for something easy.

Thanks,
Ryan 

 



RE: [PHP] Re: Looking For Easy To Use Shopping Cart

2004-05-14 Thread Ryan Schefke
I want my customer to be able to select a few options via radio buttons (12
months or 24 months - how many photos in their photo album, etc) that impact
the price.  Then, I want the customer to click a "checkout" link that takes
them directly to a form to input billing address and credit card
information.

Any recommendations/guidance?

I'm calling around and speaking to payment gateways and merchant account
providers but wanted to tap into the open source community to see what's out
there that can fit my needs.

I really don't think this is that complex of a task, or maybe it is?

Thanks,
Ryan

-Original Message-
From: Justin Patrin [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart

Ryan Schefke wrote:

> Can anyone recommend a good open source shopping cart solution? I built an
> application for custom websites, now, I just need to interface to a
shopping
> cart. I'm using mysql. Any suggestions?
> 
> ...looking for something easy.
> 
> Thanks,
> Ryan 
> 

Well...

Do you mean that you've created a storefront already and need a cart, or 
do you need the whole thing? There really isn't any only cart software, 
they all include a storefront.

 From what I've seen, Zen Cart is pretty well featured and is open 
source and free.

-- 
paperCrane 

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

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



RE: [PHP] Re: Pulling out string from a string

2004-05-04 Thread Ryan Schefke
Justin,

Very nice preg_match statement.  I realized I need to make a minor tweek to
what I needed. I need to get the number after the "client" string in 

/tgwedding/users/client1/sites/testgrabid.php

...so, in the string above I need to pull out the number "1".

Any help?

-Original Message-
From: Justin Patrin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 04, 2004 5:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Pulling out string from a string

Ryan Schefke wrote:

> Can anyone help me with the code to pull out "clientxxx" from the below
> string:
> 
> /tgwedding/users/client1/sites/testgrabid.php
> 
> 
> 
> I use $PHP_SELF to get the directory structure of the page and store that
> string as a variable. Then, I want to pull out the string "clientxx",
where
> "xx" can be any given number.
> 
> Thanks,
> Ryan 
> 
>  
> 
> 

preg_match('!/([^/]+\d+)/!', $_SERVER['PHP_SELF'], $matches);
$clientxxx = $matches[1];

-- 
paperCrane 

-- 
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] Pulling out string from a string

2004-05-04 Thread Ryan Schefke
Can anyone help me with the code to pull out "clientxxx" from the below
string:

/tgwedding/users/client1/sites/testgrabid.php



I use $PHP_SELF to get the directory structure of the page and store that
string as a variable. Then, I want to pull out the string "clientxx", where
"xx" can be any given number.

Thanks,
Ryan 

 



[PHP] Domain Name Lookup Scripts

2004-05-18 Thread Ryan Schefke
Can anyone suggest any good (free) domain name lookup scripts written in
php?

 

Thanks,

Ryan



[PHP] Please Don't Shoot...

2004-05-20 Thread Ryan Schefke
Me for asking this question, I'm just not sure where to start but with the
experts here.  

 

I'm moving my PHP and MySQL application to a hosting server.  Currently, I'm
looking at 1and1.com's dedicated servers on a Linux machine for $49/month
(let me know if there are better choices).  One problem though, the
dedicated server, unlike a shared server, does not have a SSL certificate.  

 

So, I need one.  Can anyone recommend a low cost (preferably free), and easy
to install (since I have to do it myself) SSL Cert?

 

Thanks,

Ryan



[PHP] grabbing string from URL if URL is masked/forwarded

2004-05-21 Thread Ryan Schefke
I've tried this code and it works wonders.  

 

$string = "/tgwedding/users/client1/sites/testgrabid.php";
$thisarray = explode("/", $string);
foreach($thisarray as $item) {
  if(ereg('client', $item)) {
 $found = $item;
 $num = ereg_replace('client', '', $found);
  }
}

echo $num;

 

/// the above script will echo "1" from the string
(plan to substitute that string with $PHP_SELF

 

 

But I'm wondering if it will work when I setup a domain name with a
registrar and have that domain name MASKED and FORWARDED to a URL directory
that contains "/tgwedding/users/client1/sites/testgrabid.php".

 

Will this still work or will it not detect the "client1" in the string
because the URL is masked/forwarded.

 

I guess the question is with $PHP_SELF toowhen you echo $PHP_SELF in a
script that is run from a masked domain name will it echo the real directory
URL or the masked one.

 

Thanks,

Ryan



[PHP] cookies malfunctioning moving from windows to linux

2004-05-29 Thread Ryan Schefke
Hi, I developed a Poll system that uses cookies. It works fine under Windows
(Apache and MySQL), but it does not work properly under Linux. - I
transitioned my site from my windows based server to a linux machine.

Cookies does not work properly when I use the system under Linux (Apache and
MySQL).

I already checked php.ini and can't seem to find what is wrong.  The only
difference is the "session.save_path = /tmp" on the Linux box and on the
windows box it was "session.save_path = c:/windows/temp" 

Could you help me ?

Thank you!
Ryan



RE: [PHP] cookies malfunctioning moving from windows to linux

2004-05-29 Thread Ryan Schefke
I don't think that is it.  I believe session.save_path is only for sessions,
not cookies.  I'm only using cookies in the application. 

Can someone please help?

Thanks,
Ryan

-Original Message-
From: Daniel Clark [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 29, 2004 5:55 PM
To: Php-General-Help; Ryan Schefke
Subject: Re: [PHP] cookies malfunctioning moving from windows to linux

Apache must have read and write privs on the tmp directory.

>>Hi, I developed a Poll system that uses cookies. It works fine under
Windows
>>(Apache and MySQL), but it does not work properly under Linux. - I
>>transitioned my site from my windows based server to a linux machine.
>>
>>Cookies does not work properly when I use the system under Linux (Apache
and
>>MySQL).
>>
>>I already checked php.ini and can't seem to find what is wrong.  The only
>>difference is the "session.save_path = /tmp" on the Linux box and on the
>>windows box it was "session.save_path = c:/windows/temp" 
>>
>>Could you help me ?
>>
>>Thank you!
>>Ryan
>>
>>

-- 
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] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Ryan Schefke
Thomas/All,

To summarize, my code containing cookies running on windows with a working
php installation (and Apache) executed all scripts containing cookies
perfectly. However, I transitioned my code to a Linux box with a fresh
install of PHP and now my cookies aren't working.  Below is an example of
setting and writing cookie values from one script.  Again, everything worked
like a charm on my old machine.  That's why I think it has something to do
with the Apache or PHP installation settings.

Note - on the new PHP installation I've had to change the "register_global"
switch to "on" in my php.ini file to get my code working.  Now the cookies
don't work...

Please, please help! 



= SET value of cookie =
setcookie ("showpoll_ck", "$ID"); // set cookie to show poll answers
header ('Location: '.$PHP_SELF);
= SET value of cookie =



= WRITE value of cookie =
'; 
if ($showpoll_ck == "$ID") {
echo 'Thank you for your vote.
Results:';
}

echo '';
?>
= WRITE value of cookie =


** PS, I also tried $_COOKIE['showpoll_ck'] when writing value...that
doesn't make a difference, that's why I think it's something with the
install.


-Original Message-
From: Thomas Seifert [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 30, 2004 3:43 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] cookies malfunctioning moving from windows to linux

Ryan Schefke wrote:
> I don't think that is it.  I believe session.save_path is only for
sessions,
> not cookies.  I'm only using cookies in the application. 
> 
> Can someone please help?
> 
> Thanks,
> Ryan


Yeah, tell HOW you set the cookies.
There is really no difference in linux/windows-php in this cases.


thomas

-- 
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] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Ryan Schefke
Hi All,

Please consider this topic/subject closed.  There was conflict with my
firewall.

Ryan

-Original Message-
From: Hodicska Gergely [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 30, 2004 10:13 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] cookies malfunctioning moving from windows to linux

Hi!

On the server register_globals = off.
Use $_COOKIE['ID'] instead of $ID.

Felho

u.i. always develop with register_globals = off

-- 
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] Windows to Linux -- Issues with mkdir()function and picture uploading

2004-05-30 Thread Ryan Schefke
Hi All,

 

I recently migrated code from my home server (windows) to a dedicated
hosting server (Linux).  I seem to have some issues with permissions and I'm
not sure how to fix it.

 

Take the simple script I wrote below.

=



 

It produces the following error:

Warning: mkdir() failed (Permission denied) in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/php4.php on line 3

=

 

 

The above behavior is on the Linux machine.  Now, I run the same script on
my windows box and it works perfectly.

 

In another script I upload .jpg files to a directory.  It was working
perfectly on the windows home server and on the Linux box I get an access
denied error like this:

Warning: Unable to create
'/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/users/client1/album/175
_7538.jpg': Permission denied in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/photos.php on line 226

 

Could someone please?



RE: [PHP] Re: Windows to Linux -- Issues with mkdir()function and picture uploading

2004-05-30 Thread Ryan Schefke
Thomas, thanks, that worked perfectly!

-Original Message-
From: Thomas Seifert [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 30, 2004 2:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Windows to Linux -- Issues with mkdir()function and
picture uploading

Ryan Schefke wrote:
> The above behavior is on the Linux machine.  Now, I run the same script on
> my windows box and it works perfectly.

windows has (afaik in its default settings) no good file-permissions.

the php-scripts usually run as the user the webserver runs as ...
so the webserver-user has to have write-permissions on the directory it 
needs to write to.
so either chown (change the owner) or chmod (change the permissions to 
be writable for the group or even other if needed) the directory.



thomas

-- 
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] Windows to Linux -- Getting errors still...

2004-05-30 Thread Ryan Schefke
Hello,

 

I successfully tested the GD library and several scripts with PHP locally on

my windows machine. I went to test the same php-files on my internet server
(Linux).
But on the server I get the following error: 

 

Warning: imagejpeg: unable to open 'temp.jpg' for writing in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/photos.php on line 29

I already changed the file permissions but it didn't still work.

Does anybody know how to solve the problem?

 

This is line 29:

imagejpeg($base_image, 'temp.jpg'); //convert and save it to temp.jpg

 

Thanks,

Ryan



[PHP] GD Library Upgrade

2004-05-31 Thread Ryan Schefke
I'm working with a host on a Linux box with PHP 4.2.2.  The version of GD
Library they have is 1.8.4.  I was uploading some pictures using a script
that leveraged GD Library 2+.  Using the php version with the newer GD
library seemed to produce a better quality image.  I have two questions:

 

1 - Can a newer version of GD Library (1.8.4 vs 2+) make a difference in
image quality?

2 - I'd like to upgrade the Linux box that has PHP 4.2.2 and GD Library
1.8.4 to the most recent version.  Is this easy?  Any guidance?  Do I need a
patch?

 

PS - I've been working off of this site: http://www.boutell.com/gd but
wanted to bounce this around with some experts first.

 



[PHP] RE: GD Library Upgrade

2004-05-31 Thread Ryan Schefke
Any thoughts on this?

 

I'm working with a host on a Linux box with PHP 4.2.2.  The version of GD
Library they have is 1.8.4.  I was uploading some pictures using a script
that leveraged GD Library 2+.  Using the php version with the newer GD
library seemed to produce a better quality image.  I have two questions:

 

1 - Can a newer version of GD Library (1.8.4 vs 2+) make a difference in
image quality?

2 - I'd like to upgrade the Linux box that has PHP 4.2.2 and GD Library
1.8.4 to the most recent version.  Is this easy?  Any guidance?  Do I need a
patch?

 

PS - I've been working off of this site: http://www.boutell.com/gd but
wanted to bounce this around with some experts first.

 



RE: [PHP] RE: GD Library Upgrade

2004-06-01 Thread Ryan Schefke
So there's no way to upgrade PHP 4.2.2's GD Library without upgrading to the
latest version of PHP?

Ryan

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 01, 2004 5:21 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] RE: GD Library Upgrade

On Tuesday 01 June 2004 12:42, Ryan Schefke wrote:

> I'm working with a host on a Linux box with PHP 4.2.2.  The version of GD
> Library they have is 1.8.4.  I was uploading some pictures using a script
> that leveraged GD Library 2+.  Using the php version with the newer GD
> library seemed to produce a better quality image.  I have two questions:
>
>
>
> 1 - Can a newer version of GD Library (1.8.4 vs 2+) make a difference in
> image quality?

Possibly. You would have to read the changelog of GD to see.

> 2 - I'd like to upgrade the Linux box that has PHP 4.2.2 and GD Library
> 1.8.4 to the most recent version.  Is this easy?  Any guidance?  Do I need
> a patch?

You would normally have to recompile PHP to get it use a newer version of
GD. 
If your host allowed you to do so then you might as well upgrade your
version 
of PHP and use the bundled GD libs.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Q:  Why did the programmer call his mother long distance?
A:  Because that was her name.
*/

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

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



RE: [PHP] RE: GD Library Upgrade

2004-06-01 Thread Ryan Schefke
Jason,

I have root access to my server.  It's a dedicated server with 1and1.com.  I
have zero experience with shell commands and will be working off of any
directions I can find online.  

I'm researching whether to upgrade PHP from 4.2.2 to 4.3.6 or just upgrade
the GD Library from 1.8.4 to the latest.  But I'm still not sure if it's
best to upgrade the entire thing or just the library.

I'm totally new at installing apps via shell...if anyone is interested in
doing it for a small fee please let me know!

Ryan

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 01, 2004 2:25 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] RE: GD Library Upgrade

On Wednesday 02 June 2004 01:10, Ryan Schefke wrote:

> So there's no way to upgrade PHP 4.2.2's GD Library without upgrading to
> the latest version of PHP?

That was not what was said nor implied in my reply. Basically upgrading the
GD 
lib used by PHP needs root privileges. If I understand you correctly, you're

on a shared host, thus _you_ are not able to upgrade anything.

If you do manage to persuade your hosting company to do an upgrade then they

may as well upgrade PHP and use the bundled GD lib which apparently works 
better with PHP than the standard GD lib as opposed to just upgrading the GD

lib.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Put your Nose to the Grindstone!
-- Amalgamated Plastic Surgeons and Toolmakers, Ltd.
*/

-- 
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] Willing to Pay For Upgrade Help

2004-06-01 Thread Ryan Schefke
Is any Linux techie out there willing to accept a small payment to upgrade
my Linux dedicated root server from PHP 4.2.2 to PHP 4.3.3 (or 4.3.6,
whichever is recommended)?  I need to leverage the latest version of GD
Library for better quality picture uploads.  I'm a windows guy and don't
have much experience with shell commands and Linux machines.

 

Thanks,

Ryan



[PHP] Fatal Error Help

2004-06-03 Thread Ryan Schefke
Can someone verify that the solution to this problem is to change my php.ini
file's "memory_limit = 8M;" line to "memory_limit = 16M;"?

 

My script was working fine (file uploading) before.  Then, last night I
upgraded to php 4.3.6 and installed Turck mmcache.  Now I get the following
error:

 

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 6400 bytes) in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/sitesetup.php on line 31

 

Line 31:

$imageToResize = imagecreatefromjpeg("$img_source"); // get the image
pointer to the original image

 

 



RE: [PHP] Fatal Error Help

2004-06-03 Thread Ryan Schefke
I will try it but I wanted to make sure that was the best way to solve the
issue.  Why would the same script work before (with memory_limit = 8MB) and
now it has that error?  That's where I'm confused.  

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 03, 2004 12:48 PM
To: Ryan Schefke
Cc: Php-General-Help
Subject: Re: [PHP] Fatal Error Help

Ryan Schefke wrote:
> Can someone verify that the solution to this problem is to change my
php.ini
> file's "memory_limit = 8M;" line to "memory_limit = 16M;"?
> 
>  

What about verifying it yourself?

Yes, that should help. If not, try higher values. Don't forget to 
restart the webserver.

-- 
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 with an objective

2004-06-14 Thread Ryan Schefke
All,

 

I would like to use php to email a picture (as an attachment) that is on my
server (linux), without manually attaching/uploading one.  Is this possible?
If so, how can it be done?

 

Thanks,

Ryan



[PHP] PHP & MySQL DATE comparison

2004-06-16 Thread Ryan Schefke
Hello,

 

I'm pulling a date in the "datetime" format via a MySQL query.  Using PHP I
would like to check if that date is prior to today's date.  Can someone
please help with this quick question.

 

Thanks,

Ryan



RE: [PHP] PHP & MySQL DATE comparison

2004-06-16 Thread Ryan Schefke

Hi All,

Answering my own question here, maybe this will help others out:

I found a nifty function below that will return seconds from Unix epoch to a
mysql value in the datetime format.  I'll just compare this to the php
function time().  Let me know if anyone has a better solution.



-Original Message-
From: Ryan Schefke [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 16, 2004 12:43 PM
To: Php-General-Help
Subject: [PHP] PHP & MySQL DATE comparison

Hello,

 

I'm pulling a date in the "datetime" format via a MySQL query.  Using PHP I
would like to check if that date is prior to today's date.  Can someone
please help with this quick question.

 

Thanks,

Ryan

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



[PHP] Resolving a warning

2004-06-16 Thread Ryan Schefke
Hi All,

 

I've built my own shopping cart and use a library supplied by USAePay.  The
library is accessed via an include statement in my code.  Because of theirs
a desire to keep this library outside of my public web file directory
USAePay recommended using:

 

include "/usr/local/lib/php/usaepay.php";

 

I put the file "usaepay.php" in that directory (using a dedicated linux box
with root access) and run my script with the above include.  I get the
following: 

 

Warning: main(): open_basedir restriction in effect.
File(/usr/local/lib/php/usaepay.php) is not within the allowed path(s):
(/home/httpd/vhosts/tgwedding.com/httpdocs:/tmp) in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/payment7.php on line 11

 

How can I resolve this?

 

Thanks,

Ryan



[PHP] http to https

2004-06-17 Thread Ryan Schefke
I'm getting some strange behavior when trying to go from http to an https
script. 

 

After clicking a form submit button the script will execute the two lines
below.  It does this and sends it to the correct page without the https,
only http.  What is strange is when I go back on my browswer and resubmit,
it correctly sends it to the https location and all is well.

 

$redirect = "https://www.tgwedding.com/payment6.php";;

header ("Location: $redirect");

 

 

What am I doing wrong?



RE: [PHP] http to https

2004-06-17 Thread Ryan Schefke
Quick follow up...

Has anyone had any issues with redirecting from an http script to https?
Every time I try to to a redirect to https it hangs. For example, I write a
simple script like this, nothing...

https://www.tgwedding.com/payment6.php');
?>

...but if I type that link in a browser http is working fine.



-Original Message-
From: Andre Dubuc [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 17, 2004 8:01 PM
To: Ryan Schefke; [EMAIL PROTECTED]
Subject: Re: [PHP] http to https

Hi Ryan,

I encountered all sorts of problems attempting to do the same (especially
with 
AOL, Yahoo, etc click-throughs).

I finally resolved the problem by calling https on the page itself (which is

listed then as http) like so at the top (after my session_start(); of
course:

https://www.your_site.com.php";);
exit;}
?>


Hth,
Andre

On Thursday 17 June 2004 07:27 pm, Ryan Schefke wrote:
> I'm getting some strange behavior when trying to go from http to an https
> script.
>
>
>
> After clicking a form submit button the script will execute the two lines
> below.  It does this and sends it to the correct page without the https,
> only http.  What is strange is when I go back on my browswer and resubmit,
> it correctly sends it to the https location and all is well.
>
>
>
> $redirect = "https://www.tgwedding.com/payment6.php";;
>
> header ("Location: $redirect");
>
>
>
>
>
> What am I doing wrong?

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



RE: [PHP] http to https

2004-06-17 Thread Ryan Schefke
Hi Andre,

Thanks for responding.  I'm not using sessions, just cookies.  I used your
recommendation in the code below (which gets executed if the submit button
is pushed.  It still sends it to "http://www.tgwedding.com/payment6.php";
instead of "https://www.tgwedding.com/payment6.php";

Any advice please?


if (isset($submit)) {
if ($radiobutton == 1) {
$value=$validcoupon;
} else {
$value=0;
}
$query_insertcoupon = "UPDATE sitepayment SET couponcode='$value'
WHERE customerID='$CID'";
$result_insertcoupon = mysql_query ($query_insertcoupon); // run the
query
if ($_SERVER['HTTPS'] != "on"){
header("Location: https://www.tgwedding.com/payment6.php";);
exit;}

//  $redirect = "https://www.tgwedding.com/payment6.php";;
//header ("Location: $redirect");
}   
=








-Original Message-
From: Andre Dubuc [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 17, 2004 8:01 PM
To: Ryan Schefke; [EMAIL PROTECTED]
Subject: Re: [PHP] http to https

Hi Ryan,

I encountered all sorts of problems attempting to do the same (especially
with 
AOL, Yahoo, etc click-throughs).

I finally resolved the problem by calling https on the page itself (which is

listed then as http) like so at the top (after my session_start(); of
course:

https://www.your_site.com.php";);
exit;}
?>


Hth,
Andre

On Thursday 17 June 2004 07:27 pm, Ryan Schefke wrote:
> I'm getting some strange behavior when trying to go from http to an https
> script.
>
>
>
> After clicking a form submit button the script will execute the two lines
> below.  It does this and sends it to the correct page without the https,
> only http.  What is strange is when I go back on my browswer and resubmit,
> it correctly sends it to the https location and all is well.
>
>
>
> $redirect = "https://www.tgwedding.com/payment6.php";;
>
> header ("Location: $redirect");
>
>
>
>
>
> What am I doing wrong?

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



RE: [PHP] http to https

2004-06-18 Thread Ryan Schefke
Hitek - I tried adding the exit; after the header ('Location...

Andre - Your idea about sending them to another page is a good one.  I tried
it, without any luck.  

What could the issue still be?

To simplify my problem, I have a simple script:

https://www.tgwedding.com/payment6.php');
exit;
?>

Which just hangs when I access the page and it doesn't redirect.  Typing URL
in browser correctly sends me to the secure page though.



-Original Message-
From: Andre Dubuc [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 17, 2004 9:42 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] http to https

Well, I'm no php-guru, that's for sure, but if you are trying to call:

https://www.tgwedding.com/payment6.php from
http://www.tgwedding.com/payment6.php

might be where the problem lies. You might need to do a 'refresh' since
"What 
is strange is when I go back on my browser and resubmit, it correctly sends 
it to the https location and all is well."

What I have done a s a clutz-hack is to create an additional page for the 
re-direct, which then sends it back to the page in question. (I used that
for 
'cookie' detection/browser ident as well on my opening pages.) I suppose you

might get away with a Meta Refresh but I'm not too clear whetehr you can 
accomplish that for the same page . . 

Aside from that idea . . . .
 
Hth,
Andre


On Thursday 17 June 2004 08:31 pm, you wrote:
> Yeah, I'm assuming it's set.  I have an installed ssl cert from a CA and
> have successfully run other https scripts (by typing in the URL) on the
> server.
>
> I check phpinfo(),  http://www.tgwedding.com/tgwedding/phpinfo.php
> php, http, ftp, https, ftps, compress.bzip2, compress.zlib
>
> I searched php.ini for "ssl" and "https" and didn't find anything though
>
>
> -Original Message-
> From: Andre Dubuc [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 17, 2004 8:26 PM
> To: Ryan Schefke
> Subject: Re: [PHP] http to https
>
> Just a thought - is https on the server set? (Check your php.ini)
>
> On Thursday 17 June 2004 08:20 pm, Ryan Schefke wrote:
> > Hi Andre,
> >
> > Thanks for responding.  I'm not using sessions, just cookies.  I used
> > your recommendation in the code below (which gets executed if the submit
> > button is pushed.  It still sends it to
> > "http://www.tgwedding.com/payment6.php"; instead of
> > "https://www.tgwedding.com/payment6.php";
> >
> > Any advice please?
> >
> > 
> > if (isset($submit)) {
> > if ($radiobutton == 1) {
> > $value=$validcoupon;
> > } else {
> > $value=0;
> > }
> > $query_insertcoupon = "UPDATE sitepayment SET couponcode='$value'
> > WHERE customerID='$CID'";
> > $result_insertcoupon = mysql_query ($query_insertcoupon); // run the
> > query
> > if ($_SERVER['HTTPS'] != "on"){
> > header("Location: https://www.tgwedding.com/payment6.php";);
> > exit;}
> >
> > //  $redirect = "https://www.tgwedding.com/payment6.php";;
> > //header ("Location: $redirect");
> > }
> > =
> >
> >
> >
> >
> >
> >
> >
> >
> > -Original Message-
> > From: Andre Dubuc [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 17, 2004 8:01 PM
> > To: Ryan Schefke; [EMAIL PROTECTED]
> > Subject: Re: [PHP] http to https
> >
> > Hi Ryan,
> >
> > I encountered all sorts of problems attempting to do the same
(especially
> > with
> > AOL, Yahoo, etc click-throughs).
> >
> > I finally resolved the problem by calling https on the page itself
(which
> > is
> >
> > listed then as http) like so at the top (after my session_start(); of
> > course:
> >
> >  > header("Location: https://www.your_site.com.php";);
> > exit;}
> > ?>
> >
> >
> > Hth,
> > Andre
> >
> > On Thursday 17 June 2004 07:27 pm, Ryan Schefke wrote:
> > > I'm getting some strange behavior when trying to go from http to an
>
> https
>
> > > script.
> > >
> > >
> > >
> > > After clicking a form submit button the script will execute the two
>
> lines
>
> > > below.  It does this and sends it to the correct page without the
> > > https, only http.  What is strange is when I go back on my browswer
and
> > > resubmit, it correctly sends it to the https location and all is well.
> > >
> > >
> > >
> > > $redirect = "https://www.tgwedding.com/payment6.php";;
> > >
> > > header ("Location: $redirect");
> > >
> > >
> > >
> > >
> > >
> > > What am I doing wrong?

-- 
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] Please Send MIME Script

2004-06-21 Thread Ryan Schefke
Could someone please send me a function for MIME mail.  I've been searching
for the past 3 hours and haven't come across anything that is solid and
works for me.  I need the following:

 

1 - send MULTIPLE attachments

2 - send message in html and text.

 

Thanks,

Ryan



[PHP] Help with eregi

2004-06-22 Thread Ryan Schefke
Could someone please help me with an eregi statement.

 

I have a string that can vary as such:

 

client1/album/album_121-2132_IMG.JPG

client2/album/album_121-2132_IMG.JPG

client59/album/album_121-2132_IMG.JPG

client499887/album/album_121-2132_IMG.JPG

 

I want to select whatever comes after the last forward slash, like
album_121-2132_IMG.JPG

 

Thanks,

Ryan



[PHP] Crontab PHP Script

2004-06-26 Thread Ryan Schefke
Hi,

 

Can someone please give me some guidance.  I'd like to run a php script
every minute (in reality every night, but just testing).  I've done some
reading and found that a crontab is the best way to go (I think).  I'm using
Plesk 7 on a Linux box and I have root access.

 

I made a quick php script called crontab.php to email me.

 

==

\r\n";



/* bcc */

//  $headers .= "Bcc:
[EMAIL PROTECTED]";



mail($to, $str_subject, $messagecontent,
$headers);

?>

 

 

Then I setup my crontab command as:
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php
 

 

 

I used " * " for every field except M, which I set to " 01 " to run every
minute.

 

 

It's not working...can someone guide me along and let me know what I've done
wrong.

 

Thanks,

Ryan



RE: [PHP] Crontab PHP Script

2004-06-27 Thread Ryan Schefke
Just some closure on my crontab question:

1 - Since my linux box has Plesk 7 (PSA) and it already had php installed on
it I guess php is installed in the "/usr/local/psa/admin/bin/php" directory.
Pretty sure atleast since the below crontab command is now executing my
script:
/usr/local/psa/admin/bin/php
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php

I believe traditionally php is installed in "/usr/local/bin/php" but I could
be wrong...this is what was throwing me off.

2 - Tim, you were right, all stars will make the crontab run every minute on
my linux box


-Original Message-
From: Tim Traver [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 27, 2004 1:17 AM
To: Ryan Schefke; Php-General-Help; [EMAIL PROTECTED]
Subject: Re: [PHP] Crontab PHP Script

Not sure if this is different in linux, but usually the first parameter is 
the minutes, and if you had 01 in it, that means that it would do it once 
an hour (i.e. 12:01, 1:01, 2:01, etc...

They should all have stars to do it once a minute.

In freeBSD, it would look like this :
*   *   *   *   root/usr/local/bin/php 
home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php

Tim.


At 04:34 PM 6/26/2004, Ryan Schefke wrote:
>Hi,
>
>
>
>Can someone please give me some guidance.  I'd like to run a php script
>every minute (in reality every night, but just testing).  I've done some
>reading and found that a crontab is the best way to go (I think).  I'm
using
>Plesk 7 on a Linux box and I have root access.
>
>
>
>I made a quick php script called crontab.php to email me.
>
>
>
>==
>
>
> /* subject */
>
> $str_subject = "crontab test";
>
>
>
> /* message */
>
> $messagecontent = "this is a test to
see
>if crontab working nightly\n\n";
>
>
>
> /* to */
>
> $to = "[EMAIL PROTECTED]";
>
>
>
> /* from */
>
> $headers .= "From: tgWedding
><[EMAIL PROTECTED]>\r\n";
>
>
>
> /* bcc */
>
> //  $headers .= "Bcc:
>[EMAIL PROTECTED]";
>
>
>
> mail($to, $str_subject,
$messagecontent,
>$headers);
>
>?>
>
>
>
>
>
>Then I setup my crontab command as:
>/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php
><https://217.160.251.56:8443/sysuser/crontab_edit.php?cte_src=CTEJKgkqCSoJK
g
>kvaG9tZS9odHRwZC92aG9zdHMvdGd3ZWRkaW5nLmNvbS9odHRwZG9jcy90Z3dlZGRpbmcvY3Jvb
n
>RhYi5waHA=>
>
>
>
>
>
>I used " * " for every field except M, which I set to " 01 " to run every
>minute.
>
>
>
>
>
>It's not working...can someone guide me along and let me know what I've
done
>wrong.
>
>
>
>Thanks,
>
>Ryan


SimpleNet's Back !
http://www.simplenet.com

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



[PHP] Double parenthesis crisis

2004-07-07 Thread Ryan Schefke
In the below code the variable $thecomments might have some quotations in
it.  Like:

 

$thecomments = how you "like me now"

 

I'm trying to display the value of that variable in an input box using the
value=" " as shown below; however, the double quotations are screwing me up.
Can someone please make some suggestions on how I can fix this. I've tries
several combinations.addslashes, value= (no quotations, etc). Thanks.

 

 

  $thecomments = addslashes($row_allitems[6]);

//echo $thecomments;

  // this is the section to list the instructions
comments

  echo

  " 

 Instructions/comments:

 

 



  ";



[PHP] Help Formatting String into URL

2004-07-10 Thread Ryan Schefke
Hi,

 

Can someone help me write a short code snippet to format a string to add:

 

http://www    -- if the string is "google.com" and doesn't have
http://www   in front of it

 

http:// -- if the string is "www.google.com" and doesn't
have http:// in front of it

 

.if you know of a better way to securely check/format a url like this please
let me know.

 

Thanks,

Ryan

 



RE: [PHP] Re: Help Formatting String into URL

2004-07-10 Thread Ryan Schefke
Hi Frank,

Thanks, you got me started. I modified your function a bit.  I'm testing for
3 cases now and the appearance of http://, https://, or ftp:// in front of
the string.  Let me know if you advise any changes.

http://$url";;
   } else {
$result = "http://www.$url";;
}
 return $result;
}
?>
-Original Message-
From: Frank Voorburg [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 10, 2004 9:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Help Formatting String into URL

Ryan,

You can use the following function:

function FormatUrl($url)
{
  if (eregi("www", $url))
$result = "http://$url";;
  else
$result = "http://www.$url";;
 return $result;
}

You can test it using:

$test1 = FormatUrl("google.com");
$test2 = FormatUrl("www.google.com");
print "test1 = $test1";
print "test2 = $test2";

And this will give you the results:

test1 = http://www.google.com
test2 = http://www.google.com

Good luck!

-Frank



"Ryan Schefke" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
>
>
> Can someone help me write a short code snippet to format a string to add:
>
>
>
> http://www <http://www/>   -- if the string is "google.com" and doesn't
have
> http://www <http://www/>  in front of it
>
>
>
> http:// <http://www/>-- if the string is "www.google.com" and doesn't
> have http:// in front of it
>
>
>
> .if you know of a better way to securely check/format a url like this
please
> let me know.
>
>
>
> Thanks,
>
> Ryan
>
>
>
>

-- 
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] Uploading a directory of files

2004-07-16 Thread Ryan Schefke
Does anyone have a script to upload a directory full of files?

 

.something like a recursive upload.

 

Thanks,

Ryan