Php service issue (flash builder 4)

I started playing with Data/Services panel in FB4. Works pretty nice so far but there are a few issues I have:
1. How can I manualy configure input types for the service? The dialog that appears is buggy - size is very small and I can't select input types there. Also changing method definithion in services.myservice._Super_MyService.as file (which is auto-generated) doesn't work - when I refresh or do something else FB4 just rewrites this file...
2. Second issue is PHP related. I didn't use PHP for several years so my knowledge is still limited. I've created a service class like this:
<?php
class MyService {
public function addUser($username, $password) {
  $connection =
mysqli_connect('127.0.0.1', 'root', 'root', myDB, 3306) or
die(mysqli_connect_error());
  $query = "INSERT INTO users (username,
password, role)
      VALUES ('$username', PASSWORD('$password'),
'visitor')";
  mysqli_query($connection, $query) or
die(mysqli_error($connection));
?>
and it works. But if I move $connection variable outside function (to use it with other methods) I get some errors.. Anyone knows why and how to do this? Tried it with different access modifiers, wrapping it in separate function, but nothing helps..
Thanks

Thanks for your inputs. I will look into that construct thingie (:
As for 'Configure Input Types' dialogue, I can also use it in most cases, but some times it's static size isn't sufficient. For example, try adding this function to service:
public function addUserData($username, $firstName, $lastName, $company, $jobTitle,
        $country, $state, $city, $zipCode, $address, $eMail,
        $phone, $cell, $fax, $webPage, $pictureURL) {
On my PC when trying to change values, only one row is visible, and when I try to 'Select Type' for it, dropdown just closes without changing value. It would be nice if we could resize 'Configure Input Types' dialogue when needed... Or maybe just limit the size of 'Operation:' string in that dialogue..
PS. I just played with it for a bit. If you enter too long function name select window completly disappears:
public function abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz($abcdefghijklmnopqrstuvwxyz) {}

Similar Messages

  • Please help!!! generate sample php service in flash builder 4.5

    Hi all complete noob here. I have gone trough several tutorials and this keeps popping up.
    On most of these tutorials after clicking new data service and selecting PHP the tutorials have a link generate sample php.
    I am using flash builder 4.5 for php premium and I don’t have that link. Was this link possibly moved? I really need this functionality please can someone help me?

    Hi Anju
    no wasnt what I was looking for but did find it after clicking all the buttons in the UI.
    For other users it is located on the Data/Service tab. on the right hand side is a little triangle pointing down. click on it and will have connection options. Select connect to PHP. Not sure why its not on the other tab.
    But thank you for the reply

  • Generate sample php service in flash builder 4.5.

    Hi all complete noob here. I have gone trough several tutorials and this keeps popping up.
    On most of these tutorials after clicking new data service and selecting PHP the tutorials have a link generate sample php.
    I am using flash builder 4.5 for php premium and I don’t have that link. Was this link possibly moved?
    I really need this functionality please can someone help me?

    Same here with Flash Builder 4.6 Premium for PHP, I see no way to generate a sample service!

  • How to create php login in flash builder 4 using php data service

    I have seen the tutorials for creating a php login authentication using HTTP service in flex 3 It uses genrating xml and reading it . But i want to know how to do that with the help of php services in FB4 . I'm a newbie so please any kind of help would be appriciated as 'm not able to get any flex developer in nagpur ....

    Connect to PHP in FB4 is used when you have a PHP Class and you want to use that in FB, for example Employee.php and it has a Employee class and various methods in that like create, update, get, delete.
    However, if you have exposed your functionality in PHP as a HTTP URL (i.e. it is not a class), then you should be using HTTPService from the data menu.
    So if your file is login.php and is accessible as a URL, then using the HTTPService and enter the URL.
    Does this help?
    -Sunil

  • PHP Connection in Flash Builder 4

    Hi
    Sorry if this is in the wrong place. I could see nowhere else to ask this question.
    I am very, very new to Flash Builder (in fact, I am following a tutorial on building a data-centric application using Flash catalyst CS5 and Flash Builder 4).
    The problem I am having is that I cannot seem to validate the data connection in Flash Builder 4.
    For my project, I click "Connect to Data/Service" then select PHP. I select Flex Server and change the "Application Server Type" to PHP.
    The page I then get asks for a Web Root and Root URL. This is where I'm having problems. No matter what I type in these boxes, when clicking the "Validate Configuration", I get the error of "Cannot access the web server".
    I have Apache and PHP installed on this Windows 7 64-bit machine.
    The Web root folder for my site is actaully held on my D drive, so web root reads.. "D:\Web Files\Site".
    The URL for this local site is http://site.local
    I can browse to http://site.local in my browser and all is well. My site shows. I can even see this fine in Flash Builder's Internal web browser.
    I have tried moving the web root folder inside the default apache root htdocs folder, but get the same problem. I have even changed the permissions on all folders to allow full control, but this doesn't help.
    I really am starting to tear my hair out now. Can someone please help me? Am I doing something obviously wrong?
    Many Thanks

    Did you install apache / php / (optionally mysql) separately or in a bundle. I would suggest using xampp bundle, because it configures everything correctly along with installing a few helpful tools like phpmyadmin, etc. Great fast setup for testing purposes. Anyway... about the URL: I think the url you should be using is something like http://localhost/yourprojectfolder/...
    Presuming you have set up a project... and selected the option PHP at application server type you would then input (in my case, using the default xampp setup):
    Web root: C:\xampp\htdocs
    Root url: http://localhost
    Output folder: C:\xampp\htdocs\<projectname_here>-debug
    The url you d input in the browser to navigate to your project would then be: http://localhost/<projectname_here>-debug
    (no index.html at the end, provided your server is setup to serve this file automatically if it exists)
    Hope this helps!

  • PHP Profiler in Flash Builder 4.5

    Hi there, I'm using Flash Builder 4.5 for PHP Premium. I noticed on the features page, http://www.adobe.com/products/flash-builder-php/features._sl_id-contentfilter_sl_featuredi splaytypes_sl_top.html, it advertises "PHP profiling". I'd like to try this feature but I can't find any information on how to initiate a PHP profiling session. Any pointers would be greatly apreciated, I'm sure it's simple once you know how.
    Thanks

    Hope this page helps  http://files.zend.com/help/Zend-Studio/profiling.htm

  • Code lookup issue Flash Builder 4 B2

    Had this issue before with flash builder 4 beta 2 where the code look up will not work
    While working thru Day 4 EX 4.1
    "Using code lookup to generate the click event will present you with the Generate Click Handler option in the code lookup window (see Figure 4). Click the option or press the Enter key to use the option to generate a function."
    Have no problem seeing the code look up for the <s:Button> however once I get the click will not show code look up for Generate Click Handler window.. is there a way to get this to run.. to move foreward with the exercise I just wrote out the code..is there a way to trigger the code look up?

    Mark - so you see click in the drop down and you select it so that your code now says:
    <s:Button click="" />
    and the code lookup now shows "Generate Click Handler" between the click double quotes?
    What happens if you place your cursor between the double quotes in the click event and type ctrl+spacebar?
    Can you share a screenshot of what's happening?

  • Sending php variables to Flash Builder

    Hi guys,
    I have made a form which when sent to a Mysql server adds a table to a database.
    Here is the code that I use in Flash Builder:
    <mx:HTTPService id="srv" url="http://mysite.com/addTeam.php" method="POST">
    <mx:request>
    <teamName>{teamName.text}</teamName>
    <city>{city.text}</city>
    </mx:request>
    </mx:HTTPService>
    ...<mx:Form x="25" y="10">
    <mx:FormHeading label="Add a team"/>
    <mx:FormItem label="Team name">
    <s:TextInput id="teamName"/>
    </mx:FormItem>
    <mx:FormItem label="City">
    <s:TextInput id="city"/>
    </mx:FormItem>
    <mx:FormItem>
    <s:Button label="Add" click="srv.send()"/>
    </mx:FormItem>
    And here is my addTeam.php file:
    <?php
      $teamName = $_POST['teamName'];
      $city = $_POST['city'];
      $addteam = $teamName ." ". $city;
      $connection = mysqli_connect("host", "username", "password", "db") or die(mysqli_connect_error());
      mysqli_query($connection, "SET CHARACTER SET utf8");  //the added table will be in bulgarian language
      $sql = "CREATE TABLE `$addteam`
      FirstName varchar(20),
      SurName varchar(20),
      LastName varchar(20),
      position varchar(20),
      price int
      mysqli_query($connection, $sql) or die ("Query failed: " . mysqli_error($connection));
    ?>
    My question is: How can I return some text to Flash Builder if the query was successful or failed (like "echo") so that the user (admin in this case) knows what is going on and not just clicking the add button and having to go to phpmyadmin to see if the table has been created or not?

    You have this declared
    <mx:HTTPService 
    id="srv" url="http://mysite.com/addTeam.php" method="POST">
    just add
    result="yourResultHandler()"/>
    then create the function that would handle the result.
    <mx:HTTPService 
    id="srv" url="http://mysite.com/addTeam.php" method="POST" result="yourResultHandler(event)">

  • Cannot connect to ColdFusion Data/Service in Flash Builder 4

    Hello,
    I am attempting to connect to a ColdFusion data service using the Connect to Data/Service for Flash4 window, however, when I go to select service type I only see HTTP or XML as options. I have set-up my Flash project with CF Flash Remoting and when I type http://localhost:8500/flashservices/gateway into a browser I get a blank page, which I think means that the Flash gateway is working. I am going crazy trying to figure this out, any help would be greatly appreciated!
    Thanks!

    If you been a customer long enough call and ask for a unlock code for your phone and get a temporary sim to use (similar to how walmart here has straight talk) and use that. You will of course need to buy the sim and buy the time you use. This way it will avoid big charges on your bill etc..  So just call verizon and ask for a unlock code and you will take out your current phone sim (put it somewhere safe) and put the new sim in and turn phone on and put the unlock code in. Make sure the sim you get it set to use the type of network your phone is. (look at the specs of your phone) good luck.

  • Establish a connexion with a PHP service

    Hello,
    I'm trying to make a connexion with a mysqli database so I made a php file for establishing the connexion but when I want to configure the PHP service with flash builder 4 I get an error :
    java.net.ConnectException: Connection refused:  connect
    What can I do against that ?

    Are the (apache and mysql) servers up and running?

  • Flash Builder resets php include_path?

    Hi,
    using the data services of flash builder 4, I run into the following problem:
    we gathered all our include directories in one php file, that sets the include_path (ini_set('include_path')). The service classes include that file as a very first statement so the include_path points to several directories spread over the project, that contain further code.
    the benefit of this is that we do not need to bother about any directory trees when putting together our project. Due to the complexity of the project this still seems to be a good idea...but nevertheless...
    Now when I call a service via the Fb context menu in order to configure the returned data types I always get error messages saying some files could not be found. The error message dumps the include_path var as well and for some reasons all it contains at that point are the pathes to MAMP/php and the ZendFramework/library path.
    I dumped the include_path at several locations to check. Looks fine in the services when I dump right behind the include statement for the paths. But in any other class/function it seems to be reset.
    Calling the services over amfphp browser seems to work fine.
    I might be just pretty blind, so please make me see
    THX!

    Not sure what could be the cause of this failure, we will need you complete setup to reproduce, if it is Ok with you.
    If you would like do debug what could be the cause, let me explain how the amf calls are made from Flash Builder.
    You pointed out that Flash Builder is changing the include_path, but that cannot be done by Flash Builder directly.
    The way it works is that whenever you try using PHP Service from the Data Service view, Flash Builder first installs Zend Framework on your server if it is not present already. Then it puts gateway.php and amf_config.ini files in the output folder of the flex project on your server.
    Now this gateway.php actually becomes the endpoint to make amf requests, and can be used by Flash Builder or any other client like a Flex application running on Flash player.
    The gateway.php file does contain a modification of include_path, where it adds the Zend library in the path, but it does not remove anything.
    You make try to dump the path in gateway.php file to debug the cause of this issue.
    Thanks,
    - Gaurav

  • WSDL Introspection works in Flex Builder 3, but fails in Flash Builder 4.5

    Hi - I'm getting an error trying to introspect this service in Flash Builder 4.5:
    http://85.214.51.185/mercat/IgrWebService.asmx?WSDL
    Flex Builder 3 handles it just fine though. Both IDEs are running in OS X.
    Is this an issue with Flash Builder, or with the WSDL format? Is there anything I can do to fix it?
    Thanks.

    Hi - I'm getting an error trying to introspect this service in Flash Builder 4.5:
    http://85.214.51.185/mercat/IgrWebService.asmx?WSDL
    Flex Builder 3 handles it just fine though. Both IDEs are running in OS X.
    Is this an issue with Flash Builder, or with the WSDL format? Is there anything I can do to fix it?
    Thanks.

  • Flash Builder 4.7 licence activation

    Hello,
        My company bought a flash builder 4.7 premium licence, but apparently it doesn't work...
         I created a small projet to test and add that piece of code to see if it's ok :
    protected function applicationCompleteHandler(event:FlexEvent):void
                                            Many features require a Flash Builder Pro (Premium) license to function properly (i.e. automation)
                                            The LicenseUser class registers a handler (LicenseHandler) to be called if a Flash Builder Pro license is NOT present;
                                            if a Flash Builder Pro license IS present, then the compiler will remove the LicenseHandler class for the SWF
                                            if (Class(this.systemManager.getDefinitionByName("licence.LicenseHandler")))
                                                      Alert.show("This SWF was compiled WITHOUT a Flash Builder Pro license")
                                            else
                                                      Alert.show("This SWF was compiled WITH a Flash Builder Pro license")
       [RequiresLicense("mx.fbpro", handler="licence.LicenseHandler")]
        public class LicenseUser
            public function LicenseUser()
        public class LicenseHandler
            public function LicenseHandler()
    It's a piece of code we can find on some forum and works for some people.
    But the message which is displayed is always the first one => "This SWF was compiled WITHOUT a Flash Builder Pro license"
    I found that page (http://helpx.adobe.com/flash-builder/kb/flex-automation-issues-flash-builder.html) to replace the licence.jar but it still doesn't work...
    The profiler doesn't work either...
    Have you got any ideas please ?
    Thanks.

    Hi
    I am having same issue.
    Have followed the instruction at: http://helpx.adobe.com/flash-builder/kb/overlay-air-sdk-flash-builder.html
    When go to compile my mobile flex app I get cant resolve ViewNavigationApplication and new flex mobile projects do not 'finish' when using the wizard.
    [Update]
    Have AIRSDK 3.5 with ASC 2.0 is working nicely. Also must remember, when updating SDK need to make sure there are not firewall restrictions to the new commands (adt)
    This has solved my ios deployment issue with AIR 3.4 (which was only reason invesigating AIR 3.6 in the first place)

  • Flash Builder 4 and Ruby on Rails

    Hello,
    Currently I am using Flex Builder 3 and RestfulX framework to integrate with Ruby on Rails. Now with Builder 4 adding data centric features there may be an alternative way.
    I wonder what it would take and how one would add support for Ruby on Rails to data centric services of Flash Builder 4
    Here it talks about a possibility of  extending it for Ruby on Rails but provides no link to relevant info.
    http://livedocs.adobe.com/flex/gumbo/html/WSbde04e3d3e6474c417f95e9b120d4172ac1-7fff.html# WSbde04e3d3e6474c4-49529de3120edf1cd4e-8000
    thank you,
    Slava

    Hi
    FB4 DCD supports extensibility through which additional server technologies could be supported. Unfortunately, we have not yet added documentation on this. If you would be interested in building ruby on rails support to FB DCD, please drop me a note at rkrishnaATadobeDOTcom.
    Thanks,
    Ram

  • Please suggest me use BlazeDS with Mac OS X, Glassfish v3, NetBeans 6.9 and Flash Builder 4

    I new user in Java. Please tell me example step by step how to use BlazeDS on Mac OS X, Glassfish v3, NetBeans and Flash Builder 4
    I test follow
    http://sujitreddyg.wordpress.com/category/flex-and-blazeds/
    until i Connect to Data/Service my Flash Builder 4 said like this :
    how i can make it work?
    Thank for answer.

    OK, the latest SVNKit only support Subversion 1.6.5 (http://svnkit.com/documentation.html), so Subclipse 1.6 is the latest version supported.
    Rats. I'll have to use a separate svn client just to work with Subversion 1.7 repositories.

Maybe you are looking for

  • My bill is to double billing. What to do?

    Neste mês, minha fatura chegou com cobranças duplicadas. Uma consta que foi gerada no dia 24/12, porém, a mesma foi paga no mês de Janeiro. Resolvam isso, por favor! This month, my bill arrived with duplicate charges. One states that was generated on

  • Workcentres and Routing Reports

    Hi Gurus, My requirement is as below, Since 1 of the plant has planned to golive in the month of Sep09,now we are in the preparation of Scenario testing in Q.now i need to know with repect to plant XXXX i want to take a cansolidated reports of workce

  • Dbms_xmldom.writetoclob.different result on different oracle version.

    Hi all, I have a problem using dbms_xmldom. please give me an advise. take a look here. ora-06502 when using xmltype thanks

  • UNIQUE FORM RESPONSES

    I am just wondering, if there is an adobe staffer out there, if unique form responses or at the very least unqiue email notifications (just numbered emails when forms are filled out) is in the nearby horizon? I love forms central but any other major

  • I forgot my ipad log in password...what do i do?

    i forgot my ipad log in password...what do i do?