Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2000
Posts: 190
Enthusiast
Enthusiast
Joined: Jun 2000
Posts: 190
I suspect my hosting ISP has changed how their crons are run because I've been using the same subscriptions.php script for 3 years and it has worked fine. The error that came via e-mail is:

[:"red"]Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/www/the-highway/forum/cron/php/subscriptions.php on line 192[/]

Here's the section of that script referred to below. I can't find anything wrong with it. Suggestions?

Code
$to       = $config['emailaddy'];<br />	$subject  = "Subscription Count";<br />	$msg      = "$count Number of subscriptions sent out!\n";<br />	----->$headers  = "From: $config['emailaddy'] <$config['emailaddy']>$newline";<-----<br />	$headers .= "Sender: $config['emailaddy']$newline";<br />	$headers .= "Reply-to: $config['emailaddy']$newline";<br />	$headers .= "X-Mailer: $config['emailaddy']$newline";<br />	$headers .= "Return-Path: <$config['emailaddy']>$newline";<br />	mail("$to","$subject","$msg",$headers);


Jeff


Artificial Intelligence is no match for natural stupidity!
Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Hey Pilgrim - long time no see

Have you not updated any files recently? Possible they've updated their php recently?


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Try changing this:
Code
<br />$headers  = "From: $config['emailaddy'] <$config['emailaddy']>$newline";<-----<br />	$headers .= "Sender: $config['emailaddy']$newline";<br />	$headers .= "Reply-to: $config['emailaddy']$newline";<br />	$headers .= "X-Mailer: $config['emailaddy']$newline";<br />	$headers .= "Return-Path: <$config['emailaddy']>$newline";<br />


to this:
Code
<br />$headers  = "From: {$config['emailaddy']} <{$config['emailaddy']}>$newline";<-----<br />	$headers .= "Sender: {$config['emailaddy']}$newline";<br />	$headers .= "Reply-to: {$config['emailaddy']}$newline";<br />	$headers .= "X-Mailer: {$config['emailaddy']}$newline";<br />	$headers .= "Return-Path: <{$config['emailaddy']}>$newline";<br />


Basically putting { and } around any array inside of a quote string.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)