Welcome Guest Search | Active Topics | Members | Log In | Register

What do you need to do in order to move to production? Options · View
mikepotter
Posted: Tuesday, October 03, 2006 8:35:23 AM
Rank: Apprentice Coder
Groups: Member

Joined: 9/28/2006
Posts: 13
Points: 0
Location: Ottawa
What exactly needs to change in order to move from a local server to a production server.

Assuming that you keep all the paths the same, it would make sense to just have to copy the WebORB directory to the production server.

What if the path changes? For instance, to test I have:
http://localhost/Weborb/

but on production I have
http://myhost.com/somedirectory/Weborb/

What, if anything do I need to change in Flex Builder to recognize the new directory structure?

Mike
mikepotter
Posted: Tuesday, October 03, 2006 8:44:18 AM
Rank: Apprentice Coder
Groups: Member

Joined: 9/28/2006
Posts: 13
Points: 0
Location: Ottawa
Somewhat related, is there a reason why the Services/ folder is outside the main Weborb directory?

Mike
Mark Piller
Posted: Wednesday, October 04, 2006 6:25:38 AM

Rank: Administration
Groups: Administration

Joined: 8/21/2006
Posts: 1,607
Points: 4,082
Location: Frisco, TX
Mike,

No changes is needed if the directory structure on the production server is identical with the one on the dev server. However, if Weborb is deployed in a directory other than the root, you need to make the following change in /Weborb/WEB-INF/flex/services-config.xml:

1. Locate with id "my-amf".
2. Change the uri attribute for the element to point to the location of weborb on your production server.
3. You need to rebuild your Flex app. It would be safer to restart Flex Builder if it was already running.

The biggest disadvantage to this approach is you get inoperable local build, but it does works in production. I always prefer to have a setup that works both locally and remotely. Here's what I've done for that:

In services-config.xml I put "weborb.php" as the endpoint uri. Just "weborb.php", no slashes, dots, etc. Then in the same directory where your Flex app resides I put the same weborb.php that you can find in /Examples/FlexRemoting from the weborb distribution. That PHP script basically does the following:

require_once("../../Weborb/ORBHttpHandler.php");
$m_ORBHttpHandler = new ORBHttpHandler();
$m_ORBHttpHandler->processRequest();

Then all you need to do is to change the relative path on the first line. If the location of WebORB is different between your local and remote installations, you will need two different weborb.php files, but it is much better than having to recompile your Flex app every time when you do a remote deployment.

Mark Piller
Midnight Coders, Inc.
twitter: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
Mark Piller
Posted: Wednesday, October 04, 2006 6:29:09 AM

Rank: Administration
Groups: Administration

Joined: 8/21/2006
Posts: 1,607
Points: 4,082
Location: Frisco, TX
>> Somewhat related, is there a reason why the Services/ folder is outside the main Weborb directory?

The only reason is clear logical separation between your application logic and the core remoting engine. Btw, the /Services folder can be located anywhere, as long as you indicate its location in the servicePath attribute of the root element in /Weborb/weborb-config.xml:

Here is what's there by default:



So, yes, if in production WebORB is deployed in a directory other than the root, but the /Services folder stays in the root, you MUST make a change in /Weborb/weborb-config.xml

Mark Piller
Midnight Coders, Inc.
twitter: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
cyprian.pl
Posted: Monday, October 30, 2006 8:17:33 PM
Rank: Newbie Coder
Groups: Member

Joined: 10/26/2006
Posts: 6
Points: 0
Location: Australia
Hello All,


I also have problems with moving to a production server.
My simple Flex app works just fine on my localhost even though WebORB doesn't reside in a root folder ~ I used Mark's solution and used weborb.php as a endpoint uri in services-config.xml [thanks Mark].

Yet something is wrong with my production server: it seems that Flex is able to connect with PHP using WebORB, but there is no object in a response [null value]. I've got also no log output in weborb-log.txt
I tried to run an Examples/FlexRemoting/main.html and it seems to work, yet still no log output.
I've got WebORB in the root folder on my production server.

I've found the following entry in Apache's error_log:
Code:
PHP Warning:  fwrite(): supplied argument is not a valid stream resource in /***/Weborb/Util/Logging/Log.php on line 81

But I kind of stick with debugging what's wrong [a path?] because I can't get any output from PHP file...

Any help would be appreciated. Thanks in advance.

regards, Cyprian
pi2.pl ~ web design project
Mark Piller
Posted: Monday, October 30, 2006 9:40:35 PM

Rank: Administration
Groups: Administration

Joined: 8/21/2006
Posts: 1,607
Points: 4,082
Location: Frisco, TX
What operating system do you use? If Windows, have you granted write access to the user on which behalf requests to PHP are impersonated (assuming you're using IIS)? If not IIS, check if the PHP process has Write permission to the /Weborb folder.

Thanks,
Mark


Mark Piller
Midnight Coders, Inc.
twitter: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
cyprian.pl
Posted: Monday, October 30, 2006 10:17:14 PM
Rank: Newbie Coder
Groups: Member

Joined: 10/26/2006
Posts: 6
Points: 0
Location: Australia
Mark Piller wrote:
What operating system do you use? [..]check if the PHP process has Write permission to the /Weborb folder.


I use Mac OS X for development and Fedora Core for production. You were right about permissions, mea culpa, don't know the production server well yet.

How can I now find out what's wrong. I've compared logs from both my servers and here is the first difference

local:
Code:

2006-10-31T16:03:54+11:00 [Debug] ORBHttpHandler::processRequest:Request data: null /1 #Mflex.messaging.messages.CommandMessage messageRefType operation correlationId clientId timeToLive messageId headers destination timestamp body IE76C5B59-1FB4-32CB-26C6-9CC088E18B82


remote:
Code:

ORBHttpHandler::processRequest:Request data: null /3 flex.messaging.messages.RemotingMessage source operation clientId timeToLive messageId headers destination timestamp body doLoginI14E095B7-78B4-B9A8-C3BF-000063F39277 DSEndpoint my-amf/LoginServiceDestinationcypriannAf45169741bfce8b1b2882da4a7fbb5eb


Doesn't tell me much though...
Should I post a whole output for a sigle operation [approx. 16kB].

regards, Cyprian
pi2.pl ~ web design project
Mark Piller
Posted: Tuesday, October 31, 2006 4:40:56 AM

Rank: Administration
Groups: Administration

Joined: 8/21/2006
Posts: 1,607
Points: 4,082
Location: Frisco, TX
Before you post the log, try to compare the traffic between local and remote servers with something like ServiceCapture or Charles. You should be getting the same sequences of request/response exchanges.

ServiceCapture: http://kevinlangdon.com/serviceCapture/
Charles: http://www.xk72.com/charles/

Thanks,
Mark

Mark Piller
Midnight Coders, Inc.
twitter: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
cyprian.pl
Posted: Tuesday, October 31, 2006 6:28:29 AM
Rank: Newbie Coder
Groups: Member

Joined: 10/26/2006
Posts: 6
Points: 0
Location: Australia
It was all about eAccelerator :/
Just switched it off...

Thanks for help though! :)

regards, Cyprian
pi2.pl ~ web design project
juanwalker
Posted: Saturday, March 24, 2007 8:13:03 PM
Rank: Newbie Coder
Groups: Member

Joined: 3/24/2007
Posts: 2
Points: 0
Location: colombia
Greetings.

I need upload my flex app using web. I'm using my public_html directory for the app, all files are right but when i try running weborb this message appears:

[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://isc.utp.edu.co/Weborb/index.php'"]


My app is in http://isc.utp.edu.co/~cafebug/fourier_series/fourier_series.html

Tnx for the answer
Mark Piller
Posted: Tuesday, March 27, 2007 2:39:17 PM

Rank: Administration
Groups: Administration

Joined: 8/21/2006
Posts: 1,607
Points: 4,082
Location: Frisco, TX
Hi,

This usually indicates that an error was thrown from the server script. Any chance you could try to use something like ServiceCapture to see what the server responded with?

Thanks,
Mark

Mark Piller
Midnight Coders, Inc.
twitter: midnightcoder
blog: blog.themidnightcoders.com
website: www.themidnightcoders.com
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v4.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.153 seconds.