Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

how the **** do I connect to my remote server?

Avatar

Level 1

I admit I'm totally lost on how to connect Flex 3 with my remote server so I can work with my live database when building my Flex app.  I followed all the steps to create my Flex project as a web application with PHP server technology, I configured the PHP server with the correct local folder in the web root and the correct remote server for the Root URL, and entered the correct database connection parameters when creating the connection to my MySQL database.  It's not working.  I can't get past testing the connection button.

I'm sure I'm missing something somewhere, but I have no clue what that might be, and after four hours of reading books and searching the web I have to say I'm just about to give up on Flex if I can't find a way to do something this basic with it.  Someone please help!

Many thanks!!

3 Replies

Avatar

Level 1

I guess I can just bypass trying to access MySQL directly from Flex and just go through PHP proxy files to grab the data I need from the database using the HTTPService.  I'll have to publish the Flex files to the server every time I update them, but I'm sure I'll get used to that since I have to do the same in DW for regular PHP files.

I'd appreciate any other solutions that may be more refined than brute-forcing it like I described.

Avatar

Former Community Member

Personally I am always a bit leary about letting Flex Builder manage the connections to the database like this.

That said, here are a few great links describing using HTTPService, PHP, and MySQL:

http://www.switchonthecode.com/tutorials/flex-php-tutorial-transmitting-data-using-json

http://www.switchonthecode.com/tutorials/using-flex-php-and-json-to-modify-a-mysql-database

http://www.switchonthecode.com/tutorials/flex-php-json-mysql-advanced-updating

If this post answers your question or helps, please mark it as such.

Avatar

Level 1

Yes, I came to the same conclusion about having Flex do any sort of direct connection to my database.  I'll stick to using HTTPService and use PHP scripts as a proxy.  I'd seen your answer to a similar question as a reply to other posts, but I'm not convinced yet that I need to go through JSON just yet.  Still, I'll give you a Helpful Answer.

I'm open to any other suggestions.