Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Russ

  1. Where would I find a list of scripting languages available on my shared hosting account (where can I find info on the types of scripts that I can run in cgi-bin)? The TCH website lists php and perl, and I know that python is available. Are there others? What about bash? Thanks.
  2. Russ


    Is there a link that indicates what version of python, and what python modules, have been installed on the server? Also, I any information on how to run python scripts from my domain would be very helpful. I have some ".py" files that I have on my laptop that I would like to run from my site, and imagine some modifications are necessary to run from the server? Thanks in advance for any help.
  3. Perfect. Thanks. One follow up question - when looking for a solution to my question, I can across this post on the forum https://forums.totalchoicehosting.com/index.php?showtopic=43245&hl=%22404+not+found%22 and thought that it might address my problem. So I changes the index settings of the folder. It didn't make a difference, and your solution fixed everything. What should I set the index setting back to? Thanks again.
  4. My site/domain has been dormant for quite some time, but I am preparing to relaunch the site. In preparation of relaunching, I have uploaded a couple of test files to my public_html folder. When I point my browser at the page, I receive the following message in the browser window: I created a test page thru c-panel, which "previewed" fine in the HTML Editor window, but when I pointed my browser at that page, I receive the same message. Any ideas as far as what the problem might be? Thanks.
  5. Thank you, Andy. I will give that a try. I appreciate your help.
  6. Thanks, Andy. Is there anyway to change that? Makes me nervous to send an email that would disclose my cPanel username.
  7. Sorry I haven't replied sooner - thought that I had "Reply Notification" sent, but it turns out that I didn't... The help desk has made it clear that they "have limited" support for scripts and cannot help with this issue. So I don't see them helping on this topic any further. As far as the "pipe script" is concerned, it is a php script that I wrote which reads an email that is "piped" to it and then the script sends an email. In cPanel, you set an "email forwarding" to the script (using "pipe"). Emails sent by that script will disclose my cPanel username in the "Received:" header; whereas, emails sent via a php script to which I point my browser (with identical "mail()" code) will result in a "Receved:"header similar to the one you generate. Anyway thank for your help.
  8. Okay. Well, then again, that's weird. With what amounts to the same code, two diffenent scripts are generating two different "Received:" headers?
  9. I just had a thought....Maybe this could be the reason - When the email is sent with the script Alex created, it is sent by pointing the browser at the script. When the email is sent from the pipe script, it is a shell script. Could that difference account for the different "Received:" headers?
  10. First, thanks to all for the help. Alex, I found your script and inserted my email address (in lieu of yours) and ran the script. The email that I received had a "Received:" header that was similar to the one you and carbonize received: I then cut and pasted the code from your script into the script that was set up with the pipe. When the pipe script sent the email, however, the "Received:" header had my cPanel username in it: Isn't that weird?
  11. Thank you, Thomas, Carbonize and Bruce. I have reopened my Help Desk ticket. I will let you know how that goes.
  12. I had submitted a Help Desk ticket, but their response was as follows: I assume that you are on a shared server? At any rate, not sure what to do? I am a newbie trying to pick up php, can you explain why your suggested code is better? I really do appreciate you taking the time to help me with this. Thank you.
  13. Thanks, for your reply. Here is the code snippet that I am using. > $add_headers = 'From: YYY@MyDomain.net' . "\r\n" . 'Return-path: YYY@MyDomain.net' . "\r\n"; mail('XXX@MyDomain.net', $subject , $message , $add_headers, "-fYYY@MyDomain.net"); This the "Received:" header in the recipient email: It still has my cPanel username, rather than "Nobody."
  14. Nobody has any other thoughts on resolving this?
  15. Tried that, but it had no effect on the "Received:" header, which still reads:
  16. I have a question about setting email headers when using mail() in a php script. When I send an email from my domain thru TCH Webmail (using, for example, xxx@MyDomain.net) to another email address (either on my domain or otherwise), the "Received:" header reads, in part, as follows: However, when I send an email using the script, I set the "From:" and "Return-path" to an email address I have for my domain (YYY@MyDomain.net). When I look at the header in the email that was received by the address to which the script sends the email, the "Received:" header has my CPanel user name in it - and that kind of makes me nervous. In particular, ere is what the "Received:" header looks like: I have tried to modidfy the "Received:" header by changing adding some text to the header via the mail() function, but it doesn't change the "Received:" header. Here is the code snippet I am using to send email and set headers: > //Some additional email headers $add_headers = 'From: YYY@MyDomain.net' . "\r\n". "Return-path: YYY@MyDomain.net" . "\r\n"; mail('XXX@MyDomain.net', $subject , $message , $add_headers, "-f YYY@MyDomain.net"); I have tried to add additional header to the $Header variable to set the "Received:" header, but it doesn't change anything in the header of the received email. I don't want to make the header fraudulent, but I would prefer not to disclose my cPanel username. I tried researching this on the Internet, but have not found anything helpful. I checked with the TCH Help Desk, but they said that it was a not a server issue, but a scripting issue. They suggested I try to forum for assistance. Any suggestions?
  17. Last night I was having problems with emails that were being sent from my domain. I could receive emails form other domains (for example, my earthlink account and my work account), and I could send emails back and forth between accounts on my domain, but emails generated from my domain were not getting thru to outside accounts (for example, my earthlink and work accounts). I submitted a help desk ticket, and they said that it was because the server I am on was "Blacklisted." They said that a request had been made to "Whitelist" the server, and that could take up to 24 hours. I am curious, what does that mean? What causes a server to be "Blacklisted"? Was it something I did? Or something that someone else on the server did (I presume that I am on a shared server)? Sorry if this isn't the correct forum to post this question. If it isn't, please let me know which one is appropriate. Thanks.
  18. Thanks, Dick. I went back and looked over the bounce back emails - and it seems that some of them had error messages buried in the toward the bottom. Well, thanks again. I really do appreciate your help. Your customer service is excellent!
  19. I am curious, in reconstructing what my issues were with the script, it seems that I had problems setting up the hash bang and the email pipe properly and with white spaces in the script. In the latter instance, would errors have been logged somewhere? I am trying to figure out what was wrong with the white space. In particular, it was my understanding, based on the research I have been doing, that white space before the opening php tag (<?php) or after the closing php tag (?>) would cause errors that would prevent the script from working, but that white space between the tags was fine. After I had gotten my hash bang correct and the email pipe set up properly, I still had a problem with the script - I was getting bounce back emails telling me it did not work. That problem was "fixed" when I removed the blank line in line 3 of the above quoted script (see post #7, above). An except of the script follows: > #!/usr/bin/php-q <?php // read from stdin $fd = fopen("php://stdin", "r"); $email = ""; while (!feof($fd)) { $email .= fread($fd, 1024); } //BALANCE OF THE SCRIPT OMITTED - SEE POST #7 FOR ENTIRE SCRIPT ?> Once I removed line #3, as you suggested, the script worked as I intended. I am trying to determine why that blank space was was causing a problem. I had originally cut and pasted that part of the script from this tutorial. I cannot remember if I pasted it into notebook or wordpad. Could that have caused this issue? Could one of those apps have inserted some sort of formatting that was interpreted as improper code when the script ran? I thought that if there was an error log and I checked it, it might give a clue. Any ideas? Thanks, again.
  20. GOT IT! Lost the forest thru the trees...I had the email for the pipe set up as phptest@mydomain.net, but was sending email to testphp@mydomain.net. Thank you so much, Dick. I appreciate you putting up with my ignorance! Russ
  21. Thanks, Dick. The problem that I am having now is this...I get your emails from the script, but not my own. If I send an email to the piped email, I don't get a bounce back error, but I don't get an email from the script either? Strange.
  22. Okay, I can confirm that I did in fact receive the emails. But, alas, I cannot get this to work. Here is what I did, maybe I messed something up... Since you got it to work with a script saved in public_html, I wanted to see if it worked when the script was saved in a folder under public_html, so I changed the pipe that you set up to be as follows - /home/*******/public_html/php_test/pipemail.php, with the same script. And, I got the same bounced back email I had been getting. So, I changed the pipe back to what you had - /home/*******/public_html/pipemail.php - and I didn't get the bounce back email, but unlike in your case, I did not get any emails! What am I doing wrong? Thank you for your patience. Russ
  23. Okay. I have heard back from the help desk. But they were not able to get this working. They said that my email pipe in cPanel was not set correctly. Instead of: They said it should be: They re-set my email pipe in cPanel accordingly. However, the script/piping still does not work, and I get a similar baunce back email as described above. The help desk says that the problem is with the script and stated: I tested the script by modifying it to read from a txt file instead of "php://stdin", and load modified script and a test text file onto my site and ran it in the browser. That worked fine and the email at the end of the script was sent and received. So I imagine that the problem is either in the pipe set up or the hashbang. But I am at a loss to understand. Any "web design experts" out there that can help out this lost noobie? Russ
  24. Thanks, Dick. I tried #!/usr/local/bin/php -q as the hashbang, but it did not work. So, as you've suggested, I have submitted a ticket.
  • Create New...