Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2006, 11:50 AM
Registered User
 
Join Date: Aug 2006
Location: Vancouver, BC, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mailing List

Hello I am brand new at this so go easy, I am trying to create a mailing list for my newsletter and I am using the book. I have entered all the code correctly but it is giving me this

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/content/f/t/p/ftpcarrie/html/mail/class.SimpleMail.php on line 4

I have checked with my hosting company and they assure me that I have PHP 5 capabilities, and I tried to add

AddHandler application/x-httpd-php5 .php

to my .htaccess file then I get a message

POST is not allowed for the URL /mail/admin_transact.php. and my whole site just shows up in code

can somebody please help me or show me where to go to fix this. Much Appriecated!

 
Old August 30th, 2006, 12:27 PM
Registered User
 
Join Date: Aug 2006
Location: Vancouver, BC, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok I think I figured out one part of this, now im getting a new error, I changed the public/private to var,

Parse error: parse error, unexpected T_NEW in /home/content/f/t/p/ftpcarrie/html/mail/class.SimpleMail.php on line 78

here is the code:

    }

    if (!mail ($this->to,$this->subject,$this->message,$this->headers)) {
        throw new Exception('Sending mail failed');
        return FALSE;
    } else {
        return TRUE;
        }

 
Old September 2nd, 2006, 07:17 AM
Registered User
 
Join Date: Sep 2006
Location: Williamsburg, VA, USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Carriemh,

Did you resolve this problem, yet?
I'm new to this, also, so don't expect a lot of help from me, but...

Judging from the error message you posted, it looks like your sending a pathname "...content/f/t/p/ftpcarrie...".
Shouldn't it be "...content/ftp/ftpcarrie..."?

If that's the case, it's probably a syntax problem. Perhaps you need to escape some characters somewhere in your script.

TG^2





Similar Threads
Thread Thread Starter Forum Replies Last Post
About Mailing List ssomchai BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 May 5th, 2008 10:05 PM
Add Mailing List Problem USADarts BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 August 11th, 2004 10:19 PM
Mailing list module has error - HELP drfunkie BOOK: ASP.NET Website Programming Problem-Design-Solution 3 September 8th, 2003 12:09 PM
Mailing List app has more errors - Help drfunkie BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 7th, 2003 10:14 PM
mailing list using php dungey PHP How-To 1 June 4th, 2003 02:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.