/    Sign up×
Community /Pin to ProfileBookmark

Not working all the sudden

Quick question…

If I have a php email form (rather long one; it’s an online application) and all the sudden it stops working, what might be wrong? It worked fine for about 2 months and then it started sending the emails to me blank and not printing anything on the after-submit page.

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogDec 02.2005 — Is it safe to assume you made absolutely no changes to your script? If there were no changes to that, then the only other possibility is a change in the environment where it is processed. If the PHP version was updated (or just reinstalled) then there might be some (intended or unintended) changes to the php.ini file or such that affect how your script runs (such as turning off register_globals, perhaps?).
Copy linkTweet thisAlerts:
@SpectreReturnsDec 02.2005 — Or your mail server died...
Copy linkTweet thisAlerts:
@luciangelauthorDec 03.2005 — Didn't change the script. Don't know if the php was changed. Not a php expert by any means, I'm just using it to dodge the "sendemail" form command that newer browsers seem to hate.
Copy linkTweet thisAlerts:
@NogDogDec 03.2005 — The empty email is making me suspect that register_globals has been turned off on your server (a good thing, actually), but the script was written using variable names which assume it is on. You could try a quick work-around to see if this is the case by adding the following line at the beginning of your PHP code on each script file:
[code=php]
extract($_POST);
[/code]

If this turns out to be a lucky guess and your script now works, then then next step would be to analyze which variables in the script(s) are affected and explicitly set them from the POST data, as simply using extract($_POST) without further precautions can present a possible security hole (users could send post data with variable names that would overwrite other variables in your script).
Copy linkTweet thisAlerts:
@luciangelauthorDec 05.2005 — That fixed it...

Not sure what to do about the security risk thing (aka not sure what you mean, I can see changingthe echo commands to post commands but beyond that...), but I'm not real worried about it at the moment. TY.
×

Success!

Help @luciangel spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...