PDA

View Full Version : php5


edbr
01-27-2009, 09:01 AM
having a bad day one of my servers has just upgraded to php5 and now my formhandler has stopped sending attachments which is a disaster. what is different than from 4.4, i cant seem to get it

davidj
01-27-2009, 09:41 AM
some functions have been depreciated

edbr
01-27-2009, 10:18 AM
hm so i see. I have found a class but i anm so confused im about to give up for the night i think but can you help me out , i am not code this.
in a 'test send these values are hard coded
/**
* Asign mail variables to create the mail
* Check the $html var, have a img tag with src='image.gif'
*/
$from = "sender@mail.com"; // *Change Value*
$to = "recipient@mail.com"; // *Change Value*
$subject = " MIME Mail example";
$text = "This is a MIME Mail Plain Text\n\n";
$html = "<p>This is a <b>MIME</b> Mail with:</p>

/**
* Asign Atachments file path and name variables
*/
$attach_image = "test_files/image.jpg";
$attach_file = "test_files/file.gz";

so if i send from a form $_post variables email , name and a file

i assumed they will be attachment for ie

$postmail=$_post['email'];
$posttext=$_post['message'];
$postfile=$_post['file'];
however i cant seem to alter this without it breaking down.

davidj
01-27-2009, 10:26 AM
cant see how the attachment would work from the example

your just storing a path to the file in a var

edbr
01-27-2009, 10:34 AM
actually none of the values are there so im obviously way off here. omorrow i guess, and to round off a great day I just got a call to say there is a cobra in my garden. hopefully be back tomorrow (no smiley)

davidj
01-27-2009, 10:49 AM
i had a cobra on my coffee table the other night

It was a golden thirst quencher

ed ...

fancy learning some OOP

edbr
01-27-2009, 10:56 AM
yes if i can find some time , its a big mystery that is killing me

davidj
01-27-2009, 10:58 AM
if you take the red pill there is no turning back

edbr
01-27-2009, 11:31 PM
if you take the red pill there is no turning back

last time someone said that to me i was at a Hendrix gig. Im definitely up for that but i need to find a quick fix for my prob as its affecting me a lot. might have to farm this out sadly

edbr
01-28-2009, 03:14 AM
ha did it , wheres the smiley for me dancing wildly and screaming like a bansee

davidj
01-28-2009, 05:39 AM
nice one mate

edbr
01-28-2009, 08:13 AM
i should say i used a mail class from Olaf Lederer from his site, in case any one else gets this problem . now ill try and find that snake!!

edbr
01-31-2009, 04:25 AM
took the first oop pill today , hope its like anti-biotics and i feel better when i finish the course!

edbr
01-31-2009, 08:00 AM
i also found that my pagination no longer functioned , what joy . i fixed that but a date compare function n longer works, i understand this has changed with php5 but cant as yet find an answer
my old function
function compareDate ($i_sFirstDate, $i_sSecondDate)
{
$arrFirstDate = explode ("/", $i_sFirstDate);
$arrSecondDate = explode ("/", $i_sSecondDate);

$intFirstMonth = $arrFirstDate[0];
$intFirstDay = $arrFirstDate[1];
$intFirstYear = $arrFirstDate[2];

$intSecondMonth = $arrSecondDate[0];
$intSecondDay = $arrSecondDate[1];
$intSecondYear = $arrSecondDate[2];

$intDate1 = mktime(12, 0, 0, intval($intFirstMonth), intval($intFirstDay), intval($intFirstYear));
$intDate2 = mktime(12, 0, 0, intval($intSecondMonth), intval($intSecondDay), intval($intSecondYear));

return $a = round(abs($intDate2 - $intDate1) / 86400);
}
im guessing its a date format issue but its not clear to me how i should format them

Corrosive
01-31-2009, 08:03 AM
took the first oop pill today , hope its like anti-biotics and i feel better when i finish the course!

Think you might have to stop drinking for them to really work :wink:

edbr
01-31-2009, 08:04 AM
is that why i still itch do you think?

Corrosive
01-31-2009, 08:09 AM
is that why i still itch do you think?

Probably, had a friend who came off 4.4 once and came out in terrible boils...

edbr
01-31-2009, 08:14 AM
Probably, had a friend who came off 4.4 once and came out in terrible boils...

oh thats ok then she was number 17 ....

davidj
01-31-2009, 09:02 AM
err

im lost!

edbr
01-31-2009, 11:08 AM
Is there a reason the date compare function would not work with php5? i am comparing date with a timestamp

edbr
02-02-2009, 05:32 AM
well i asumend there was a difference in formatting dates in php5, yahoogled and found a lot of baffling discussion as to problems people had, tried lots of different formats and then after too many hours noticed I had ommitted a semi colon from a line of php code.
there is no smiley fot this either