Hello there,

I have a script which logs in to imap email account and processed that script.
Today that script suddenly stopped working.
I may have done php upgrade on my system
I'm using fedora 18 64 bit with php version

PHP 5.4.20 (cli) (built: Sep 19 2013 09:03:36)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

When I run that php page from browser it fails to function imap_open with following error

Warning: imap_open(): Couldn't open stream {mail_server_address/novalidate-cert/imap/ssl}INBOX in /var/www/html/test.php on line 6
Could not Connect to MailServer mail_server_address
Notice: Unknown: No such host as mail_server_address (errflg=2) in Unknown on line 0

but strange enough when i run this script from command line like
php -f test.php
it works.

My web server runs as apache user.
I can run script as any user and it works fine from command line
but it fails from browser.
Can anyone suggest me what could be the issue?

Member Avatar for LastMitch

Can anyone suggest me what could be the issue?

@hemanshurpatel

It's an permission issue or a path issue, since you are using Zend framework.

First check folders permissions to that file.

Make sure that file test.php is in the MVC framework struture:

http://framework.zend.com/manual/1.12/en/learning.quickstart.intro.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.