Skip to main content
gamedev.net
🔒 Locked

[web] PHP/Apache, script breaks permissions.

Started by swordfish Jan 4, 2007 at 4:07 PM 2 replies 700+ views
Original Post
swordfish
swordfish
I was recently hired to write a simple PHP script for a client wishing to send out mailing lists to his fans. It's a relatively simple script that uses the mail() function at it's core. I fully tested the script on my own server and things worked absolutely fine. I moved the script to my client's web-server, where we tested it somewhat thoroughly. So he tries his first real run of the script to send out a mail to about 600 e-mail addresses. This is 600 sequential calls to mail() from within a FOR loop. He tells me that everything was working fine, until somewhere during process something went wrong. Now the script, and the directory the script was in is completely inaccessible. Thank god the script wasn't in his root directory, or things could've have really went bad. The permissions are set to '000' and I cannot change a thing from FTP or from his WWW CPanel. I did a test on my own server with the same number of addresses and I had no issues. I tried to contact his web-host on his behalf. Unfortunately this is one of those web-hosts with really crappy support and no phone number...so I'm still waiting for a reply. Has this happened to anybody before? Did my script break his server somehow? Is this a security measure put in place by the web-host or even PHP/Apache? What would cause the permissions on the script and it's parent directory to be changed to '000'? (My script does not change permissions - all it does is read/write files and send mail()) Thank you for any help.
http://blog.protonovus.com/
trapdoor
trapdoor
this does sound like a security thing. I'm sure webhosts have ways of trying to spot spammers as they might sign up and just start spamming like crazy, until they are shut down. It could be a program or an actual admin. Now your program of sending out 600 concurrent emails might raise a red flag to them. There might be an easier way of sending out mail... like send them out in small chunks instead of 600 at a time.
iKonquest.com - Web-based strategy.End of Line
Sander
Sander
Your webhost thought it was an unsafe script used by spammers and pwned it. I suggest you call/mail them.
swordfish
swordfish
Okay, that's what I thought. I had to be sure because my own developer-class web-hosting package doesn't have such restrictions. I thought maybe it was a bug in the script itself.

I couldn't find a phone number to call, so I sent an e-mail, with no response after 12 hours. Not every web-host can be as awesome as my own, but it doesn't matter now.

Anyway, I know the error of my ways. I'm going to have it schedule the mailing to N mails every D minutes and do the mailing much more responsibly.

Thanks for clearing this up.
http://blog.protonovus.com/

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.