Question:
Question based on imap_open() in php?
MegaMind
2013-06-01 08:40:12 UTC
I am devoloping an email reading program. I was developing this program using wamp server. it worked in wamp server. But when i upload it into the server,
it doesn't work.

In my program imap_open() stream was like this:
----------------------------------------------------------------------

$email_connection =
imap_open
( ' { imap.mail.yahoo.com:993/imap/ssl} INBOX ', ' ymail address ', ' password ' )
or die('Cannot connect to yahoo');


When i run the program after uploading to the server
--------------------------------------------------------------------------
My browser says,
-------------------------
Error: Requested url content cannot be resolved.

In the error_log file there is something like this
------------------------------------------------------------------
[01-Jun-2013 10:05:01 America/Chicago] PHP Warning:
imap_open(): Couldn't open stream {imap.mail.yahoo.com:993/imap/ssl}INBOX in /home2/some/public_html/some/php_files/ mail_reader. php on line 6


in wamp server(local server) my programe was working fine and it read the mails as i wanted.
But it doesn't work in the server that i purchased. Can someone please help me.
Three answers:
anonymous
2013-06-05 06:29:20 UTC
Couple of things to try. Please follow up and let me know as I am curious.



Try adding /novalidate-cert after ssl in you imap address.



Or Try (This should display an array of more detailed imap errors.):

$str = imap_errors(); echo("imap_errors():\n"); print_r($str);



Again, please let me know what you find.
anonymous
2016-03-11 02:07:05 UTC
I guess I'm mostly reiterating what others said above but maybe I can explain it in a more simple way. HTML invovles no functionality, it's not even an actual programing language it's just instructions to tell the browser how to display text. You can't access a database or provide anything dynamic with HTML by itself. It also makes not sense, why you would use a browser based solution for your stand alone solution. The only two reasons I can think of to require a seperate solution from the Web-based solution are to avoid requiring a web browser or the remove the need for an Internet Connection all altogether. Otherwise just have all users use the web-based option. If you need something that doesn't require a web browser then you'll have to find a none-webbase programing language like Visual Basic Or some variation of C and then link to the Database through some form of remote database connection like ODBC or ADO. If the requirement is that the user not need an internet connection things get far more complex. You couldn't possible keep the database synced with out a database connection from time to time. It might be possible ( but take large amounts of storage) to create a program that syncs with the remote database when connected but cache's the data locally when there is no database available. The bottomline... at this point is sounds like you're way over your head. You either need to find someone who has good experince in application planning and development or you need to start learning it yourself. Get some books and start reading.
Elvia
2016-11-26 18:22:44 UTC
610


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...