• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Error on Production Server when php service is called.

Guest
Jan 19, 2012 Jan 19, 2012

Copy link to clipboard

Copied

The web application runs fine on my development machine but on the production server it gives me the following error and no responce when a phpservice is called.

error:

Send failed

Channel.Connect.Failed error NetConnection.Call.BadVersion: : url:

'http://ipaddress/Project/public/gateway.php'

Network Monitor:

network monitor.jpg

Development Machine:

Windows 7

MySQL 5.5.16

Zend Framework 1.10

Production Machine:

Ubuntu 11.10

MySQL 5.1.58

Zend Framework 1.11

I followed the following steps to deploy the application on production server;

1. created identical database with same credentials on the production server

2. confirmed that my php service works on the server by manually navigating to the php file and printing the data retrieved on the page

3. modified the paths in amf_config.ini to reflect production server

[zend]

webroot = "/var/www"

zend_path ="/usr/local/zend/share/ZendFramework/library"

library ="/var/www/Project/library"

services ="/var/www/Project/services"

[zendamf]

amf.production = true

amf.directories[]=Project/services

4. initialized the class by adding

// Initialization customization goes here

_serviceControl.endpoint = "http://ipaddress/Project/public/gateway.php";

in the .as file for the php service

I have also found from my zend server logs that when my php service is called its throws the following error:

PHP Notice:  Undefined index: HTTPS in /usr/local/zend/share/ZendFramework/library/Zend/Amf/Response/Http.php on line 59

I doubt that there is anything wrong in the deployment process but please do let me know if you could think of something i might have missed.

The other thing im wondering is the php notice if it were to be caused due to different Zend Framework versions!

Kindly advice

TOPICS
PHP

Views

3.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 20, 2012 Jan 20, 2012

Copy link to clipboard

Copied

EGJ Steens has post a fix at http://forums.adobe.com/message/4097998#4097998#4097998/Using Flash Builder

Zend framework 1.11 added an extra function in the Http.php file (which was mentioned in the post) and was fixed as follows

protected function isIeOverSsl()

    {

        $_SERVER['HTTPS'] = 'off';  //Adding this line fixed the issue

        $ssl = $_SERVER['HTTPS'];

        if (!$ssl || ($ssl == 'off')) {

            // IIS reports "off", whereas other browsers simply don't populate

            return false;

        }

        $ua  = $_SERVER['HTTP_USER_AGENT'];

        if (!preg_match('/; MSIE \d+\.\d+;/', $ua)) {

            // Not MicroSoft Internet Explorer

            return false;

        }

        return true;

    }

}

My concern is if i wish to secure my application with ssl using HTTPS will this prevent me from doing so.

Any Pointers Anybody?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 24, 2012 Jan 24, 2012

Copy link to clipboard

Copied

OK I installed an ssl cert and If i want to view my website over https I have to comment that line which was added in the previous comment

// $_SERVER['HTTPS'] = 'off';

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 11, 2012 Feb 11, 2012

Copy link to clipboard

Copied

I will suggest instead:

$ssl = isset($_SERVER['HTTPS']);

that should work in both cases;

this seems to be a bug coming from the upstream Zend package,

more info @: http://framework.zend.com/issues/browse/ZF-11783

Bye

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 19, 2012 Apr 19, 2012

Copy link to clipboard

Copied

LATEST

Thanks for the reply bitstylist

I will try this when i get a chance.

Has anyone already tried this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines