Jump to content

drmota

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

drmota's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am using this PHP script which needs to open several different files with similar names and extensions. This means: fopen(file_1.txt); However, I have about 300 of those files which I need to open and I don't want to rename them one by one. PERL had this awesome feature where you could create a variable with an asterix (wildcard) which would then find anything matching, using a wildcard. Something like: fopen(file_*.txt); ^Would open all files which had file_SOMETHING.txt in them. So is there anything like this in PHP? thanks in advance!
  2. Another issue is that your pretending to send the mail from a hotmail address. The client will see that the actual server and the From address differ and mark the emails as spam. You should always send your emails from a valid email address on the actual server sending the email. My ISP is giving me a dynamic IP, which is static. This may be a problem then ;s Will setting up an Evolution E-mail (im using Ubunty) and using that one to send help?
  3. This is what it says about the postfix I set-up: (It says this like 200 times): Aug 18 17:43:58 Vojta2 postfix/smtpd[3735]: lost connection after RCPT from 114-42-140-172.dynamic.hinet.net[114.42.140.172] Aug 18 17:43:58 Vojta2 postfix/smtpd[3735]: disconnect from 114-42-140-172.dynamic.hinet.net[114.42.140.172] Aug 18 17:47:18 Vojta2 postfix/anvil[3739]: statistics: max connection rate 1/60s for (smtp:114.42.140.172) at Aug 18 17:43:56 Aug 18 17:47:18 Vojta2 postfix/anvil[3739]: statistics: max connection count 1 for (smtp:114.42.140.172) at Aug 18 17:43:56 Aug 18 17:47:18 Vojta2 postfix/anvil[3739]: statistics: max cache size 1 at Aug 18 17:43:56 Aug 18 18:09:01 Vojta2 CRON[3751]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete) Aug 18 18:11:52 Vojta2 postfix/qmgr[1813]: 9F95876042C: from=<nobody@Vojta2>, size=402, nrcpt=1 (queue active) Aug 18 18:11:52 Vojta2 postfix/qmgr[1813]: 3C2DC760425: from=<nobody@Vojta2>, size=373, nrcpt=1 (queue active) Aug 18 18:11:52 Vojta2 postfix/qmgr[1813]: 4E0B1760427: from=<nobody@Vojta2>, size=402, nrcpt=1 (queue active) Aug 18 18:11:52 Vojta2 postfix/smtp[3762]: connect to mx3.hotmail.com[65.54.188.126]:25: No route to host Aug 18 18:12:22 Vojta2 postfix/smtp[3760]: connect to mx3.hotmail.com[65.55.92.184]:25: Connection timed out Aug 18 18:12:22 Vojta2 postfix/smtp[3761]: connect to mx4.hotmail.com[65.55.92.136]:25: Connection timed out Aug 18 18:12:22 Vojta2 postfix/smtp[3762]: connect to mx1.hotmail.com[65.55.92.168]:25: Connection timed out Aug 18 18:12:25 Vojta2 postfix/smtp[3761]: connect to mx3.hotmail.com[65.55.37.88]:25: No route to host Aug 18 18:12:52 Vojta2 postfix/smtp[3760]: connect to mx2.hotmail.com[65.55.37.120]:25: Connection timed out Aug 18 18:12:52 Vojta2 postfix/smtp[3762]: connect to mx1.hotmail.com[65.55.37.104]:25: Connection timed out Aug 18 18:12:55 Vojta2 postfix/smtp[3761]: connect to mx1.hotmail.com[65.54.188.126]:25: Connection timed out Aug 18 18:13:22 Vojta2 postfix/smtp[3760]: connect to mx1.hotmail.com[65.55.92.184]:25: Connection timed out Aug 18 18:13:22 Vojta2 postfix/smtp[3762]: connect to mx4.hotmail.com[65.55.92.136]:25: Connection timed out Aug 18 18:13:25 Vojta2 postfix/smtp[3761]: connect to mx1.hotmail.com[65.54.188.72]:25: Connection timed out Aug 18 18:13:52 Vojta2 postfix/smtp[3760]: connect to mx2.hotmail.com[65.55.92.152]:25: Connection timed out Aug 18 18:13:52 Vojta2 postfix/smtp[3762]: connect to mx1.hotmail.co And then this: Aug 18 13:34:21 Vojta2 postfix/smtp[3102]: 4E0B1760427: to=<[email protected]>, relay=none, delay=75992, delays=75842/0.05/150/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.55.37.88]:25: Connection timed out) Any ideas?
  4. Please answer
  5. Thanks, i showed you which SMTP server I installed, any idea where its logs are located?
  6. So you are saying the SMTP is set up correctly?
  7. Hello, Something that's been really bugging me the last days is a problem in PHP, the mail(); function, so here goes. First, my script: $to = "[email protected]"; $subject ="contact form"; $body = "Hello, you have been contacted"; $from = "$_POST['email']; $headers = 'From : [email protected]'."\r\n".'Reply-To: [email protected]'; if (mail($to, $subject, $body, $headers)) { echo "worked"; } else { echo "didn't work"; } I'm using Ubuntu linux and have set up an SMTP server like so: sudo apt-get install postfix And configured it. I have also forwarded TCP port 25 to the server. Problem: I run the script and it echos 'worked', meaning that there was no error. However, I don't get a mail sent into my inbox. :'( Thanks in advance, Drmota
  8. They are on the same pc, correct folder. Works from browser but not terminal Why does it have to be so hard..
  9. I have been using lampp for several years, I have decent knowledge in how to set it up. As I posted before, I am able to run the script through the browser (meaning it is configured and all). What I need is a MySQL package on my computer. I will use one of the two which were advised to me by the terminal. However, will this be able to connect to the MySQL database I have on my lampp server i.e. the one at http://localhost/phpmyadmin/ ? thanks
  10. When I type mysql -v I get 'the program cannot be found' and it shows me packages for installation. Will this be able to connect to the databases which I have on my mysql server installed with lampp? To the first question, I installed mysql with lampp, how do I configure it into this script? Thanks so much
  11. <?php #!/usr/bin/php mysql_connect('localhost','usrname','pw') or die ('Error connecting'); ?> And the error is: PHP Fatal error: Call to undefined function mysql_connect() in /dir/file.php on line 4 Thanks for cooperating
  12. Hello thanks for the replies! However get an error each time I try to run the script: PHP Fatal error: Call to undefined function mysql_connect(). I have installed Lampp for my distro and it works fine. I can even view the file from my browser (it's in my htdocs) and it works fine from there. But I need it to be able to run like this: php script.php Without getting the error I have verified by sudo which php That #!/usr/bin/php is the correct path to my php, but I still get that error. I hope this can get figured out! Thanks a lot!
  13. Hello, So i get data stored onto my computer all the time. I parse this data once an hour, but then I need it to get into my MySQL database somehow. I chose PHP to do this for me. Now, I am a Linux Ubuntu 11.04 user and I have written a simple PHP script which inserts the data i need it to into a database. The connection and SQL query are in the PHP script. I will need this script to run once every hour. For this I will be using the cron job. Does anyone know what to write in the terminal to create a cron job, which runs through the PHP script and connects to the MySQL database, and eventually inserting data into a table? Thanks in advance
  14. By "It must be on top of every script" You mean any chunk of php which uses this session?
  15. Hey, I made a simple form: <html> <body> <form action="action.php" method="POST"> <input type="text" name="text" /> <br> <input type="submit value="submit" /> </form> </body> </html> The action.php is as follows: <?php $text = $_POST['text']; header('location:next/index.php'); next/index.php is as follows: <?php include_once('../index.html'); echo "Hello, your text was " . $text . "!"; ?> Problem: Where the $text variable is located in next/index.php there is a blank space. The php includes the first index.html correctly without errors, but it seems like it doesn't store the variable. Thanks in advance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.