Jump to content

jazzman1

Staff Alumni
  • Posts

    2,713
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by jazzman1

  1. Apache and php are two different things! You can apply apache rewriting rules without php at all. So, back to the problem above, can I see the link that you wanna be matched.
  2. What happens when you ran the script of your first post? Did you get some errors or just a blank page?
  3. Do you have a meta tag with charset utf8 on the top of the page, something like: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. Hi vasko (здравей), is there a some particular reason to use JSON notation creating multiple names and input fields inside one form? I'm missing something here. Can you explain your logic, please?
  5. Is there a file productdetail.php inside web root?
  6. You know what a slash "/" symbol does, right?
  7. Ah...no! If you want to create own html email template, you should code it like it's 1995-1996 Coding an html email is basically like you're coding simple web page using old fashioned style.
  8. As I said before, you are doing something wrong and only you knoq what is it
  9. Ok, try to connect to my testing google account. Open up the terminal to your remote server and type: openssl s_client -crlf -connect imap.gmail.com:993 // next TAG LOGIN tuparov86@gmail.com Canada2011+ If everything is OK, I shoud have receive a message from google that someone recently tried to use an application to sign in to my mail Google Account.
  10. Now, you know where the problem is. I don't have a too much time now for explanations.
  11. Yes, that's the problem the non-english characters. What encoding charset are you using inside console?
  12. That's good. Does the username and the password contain non-english characters? Did you check inside google mail box for that messge above?
  13. Now, open up your browser again, login into your google account and check for a message with a title - Suspicious sign in prevented. Double check accountName and password. You are doing something wrong I'm pretty sure. Did you try to run openssl from your local server?
  14. First, check whether openssl is alredy installed on the machine. Open up a ssh connection, go to the server terminal and try to login into your Google account. So, the command is: If you recieve some error message, let's see it. If everything is ok, try to run next script by php: <?php $mbox = imap_open ('{imap.gmail.com:993/ssl/novalidate-cert}[Gmail]/All Mail', 'accountName@gmail.com', "accountPassword") or die("can't connect: " . imap_last_error()); echo "<h1>Mailboxes</h1>\n"; $folders = imap_listmailbox($mbox, "{imap.gmail.com:993}", "*"); if ($folders == false) { echo "Call failed<br />\n"; } else { foreach ($folders as $val) { echo $val . "<br />\n"; } } echo "<h1>Headers in INBOX</h1>\n"; $headers = imap_headers($mbox); if ($headers == false) { echo "Call failed<br />\n"; } else { foreach ($headers as $val) { echo $val . "<br />\n"; } } imap_close($mbox);
  15. I already told you how Open up your browser and login into your gmail account. Then check for a message with that title -Suspicious sign in prevented, and follow the steps making the server ip to have an access to your google account.
  16. Ah...now I see! You got a message from imap_last_error() right? So, if everything is OK about the username and the password, you should check inside google mail box from a message with a title - Suspicious sign in prevented! Make the server ip address to be a trust by google. That's all you can do. Never had an experiance with IMAP in php, but often use openssl in bash and I think this cause the problem.
  17. IMAP is a library. Are sure that your hosting provides you by default?
  18. It's good to share the solution in case, someone has the same problem in the future.
  19. This is a good example of a full working PHP application using Smarty. Try to understand how to separate your presentation and logic. Once you got the idea, you could jump over twig and try to create the same app using twig.
  20. Why don't you consider of using some template engine. I reccomend twig!
  21. No, the right answer is after the last function of this mysql* (pdo) library, but on the top of the footer file will be OK too
  22. Yep, now is fixed! I've got two emails from your local server:
  23. The easiest way to do everything you want is to use some php mail library. i highly recommend - Swift Mailer.
  24. According docs of mysql and mysqli libraries, the connection will be closed automatically when the script ends unless your connection is persistent. So, for PDO according docs, again, php won't be closed automaticaly the connection and it still remains active until the object is detroyed. Assuming we have next files: header.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML> <HEAD> <TITLE>Some title</TITLE> </HEAD> <?php // send the query to db server and display some result ?> home.php <BODY> <?php // send the query string and display something ?> footer.php <?php // do we have to close the connaection here or to the end of every including php file? ?> </BODY> </HTML> display.php <?php // open the db connection once $conn = mysql_connect('db_server','userName','userPass'); $db_name = mysql_select_db('db_name'); include 'header.php'; include 'home.php'; include 'footer.php'; What do you thing? Where should we have to close the connection?
×
×
  • 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.