12 Replies Latest reply on Feb 8, 2010 3:08 AM by joelisaachart@gmail.com

    configurations errors on mac


      I have dived in at the deep bought a mac and moving to flex 4. Coming from a delphi windows background I am finding it painful at the moment.



      I have php installed and working on the mac. (phpinfo) is working.

      I have installed MYSQL & navicate (created a sample database) so I know that is working.

      I have download ver 10 of the zend framework (created a folder libray/webserver/share/httpd/Zend then added all the files there)
      I have added the following to the php.ini file (located at /private/etc/php.ini)




      include_path = ".:/libray/webserver/share/httpd/Zend"


      When I try to generate a sample php Service I get the error:


      Server error The mysql driver is not currently installed


      What configuration have I got wrong here please?


      At idiot please






        • 1. Re: configurations errors on mac



          Mac is built on Unix so the .dll extensions won't work, you need to io include the .so extensions. Personally I have been trying to generate a service with flex and it doesn't seem to work for me either. I have found there are two versions of php services in tutorials online, ones that use the mysql_libraries and ones that use the mysqli_libraries.


          Try writing your own service according to the format found here: http://corlan.org/2009/06/12/working-in-flash-builder-4-with-flex-and-php/


          Also on your new mac I'm not sure what you are using to run apache and php, but the simplest solution is to download MAMP: http://www.mamp.info/en/index.html


          MAMP works great for creating a server development environment that works.


          good luck, if you have any other mac related questions feel free to drop me a line.


          Best Wishes,

          Joel Hart

          • 2. Re: configurations errors on mac
            flashste Level 1

            Cheers I got MAMP server working okay and it runs locally okay. We have a web hosting service that hosts an existing Delphi PHP web site. Delphi PHP uses the  Zend framework but it is a different version. How do I change the configuration on the web service to also see the new version of the Zend framework.


            I presume if I add the path in the PHP.ini file there will be conflicts between both versions.



            One step forward and one back








            • 3. Re: configurations errors on mac
              flashste Level 1

              Getting closer.


              I have an simple database app that is located at http://www.iw50.com/myapp/testapp1/bin-debug/testapp1.html


              it simply shows the first record. This works fine locally. Using a PHP file. I upload to the server the bin-debug folders and edit the amf_config.ini.


              When I upload and run I get :


              Send failed
              Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: 'http://www.iw50.com/myapp/testapp1/bin-debug/gateway.php'


              my amf_config.ini is as follows:


              ;set the absolute location path of webroot directory, example:
              ;Windows: C:\apache\www
              ;MAC/UNIX: /user/apache/www
              webroot = C:\Inetpub\vhosts\iw50.com\httpdocs


              ;set the absolute location path of zend installation directory, example:
              ;Windows: C:\apache\PHPFrameworks\ZendFramework
              ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework
              zend_path = C:\Inetpub\vhosts\iw50.com\httpdocs\ZendFramework


              amf.production = false


              and I have the Zendframework in the correct place.


              www.iw50.com/loadedextensions.php show all the extensions are loaded.


              What am I missing here please?







              • 4. Re: configurations errors on mac
                flashste Level 1

                I have produced a webservice in php




                This brings back the reg and PCN number.


                I have added the service as a datasource and when I use the flex 'test
                ' util I get a result.


                When I run the app I get a security error locally.


                I have put everything on the web and the web service is in the same domain.


                When I click I do not get any results




                <?xml version="1.0" encoding="utf-8"?>
                <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                               xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="700" xmlns:appealsservice="services.appealsservice.*" xmlns:userservice="services.userservice.*" xmlns:userservice1="services.userservice1.*" xmlns:ticketsservice="services.ticketsservice.*" xmlns:valueObjects="valueObjects.*" xmlns:test2="services.test2.*" xmlns:getreg1="services.getreg1.*">
                            import mx.events.FlexEvent;
                            import mx.controls.Alert;








                            protected function button_clickHandler(event:MouseEvent):void
                                Operation1Result3.token = getreg1.Operation1(userTextInput.text);


                        <getreg1:Getreg1 id="getreg1" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
                        <s:CallResponder id="Operation1Result"/>
                        <s:CallResponder id="Operation1Result2" result="posts = Operation1Result2.lastResult as Posts"/>
                        <valueObjects:Posts id="posts">
                        <s:CallResponder id="Operation1Result3" result="posts2 = Operation1Result3.lastResult as Posts"/>
                        <valueObjects:Posts id="posts2">
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
                    <mx:Form defaultButton="{button}">
                        <mx:FormItem label="User">
                            <s:TextInput id="userTextInput"/>
                        <s:Button label="Operation1" id="button" click="button_clickHandler(event)"/>
                    <mx:Form x="89" y="115">
                        <mx:FormHeading label="Posts"/>
                        <mx:HRule width="100%"/>
                        <mx:FormHeading label="Post"/>
                        <mx:FormItem label="Registration_No">
                            <mx:Text text="String[]"/>
                        <mx:FormItem label="PCN">
                            <mx:Text text="String[]"/>








                4hours later

                • 5. Re: configurations errors on mac
                  Gaurav P(Adobe)

                  Do you mean that on running the application, you get a security error?

                  Can you provide the exact security error message that you are getting.

                  • 6. Re: configurations errors on mac
                    joelisaachart@gmail.com Level 1

                    Try putting a crossdomain.xml file in the root.



                    • 7. Re: configurations errors on mac
                      flashste Level 1

                      When running locally I get :


                      Security error accessing url
                      Destination: DefaultHTTP



                      On the web there are no error messages.

                      • 8. Re: configurations errors on mac
                        flashste Level 1

                        I have now added the crossdomian file:


                        <?xml version="1.0"?>
                        <!-- http://www.foo.com/crossdomain.xml -->
                        <allow-access-from domain="*" />


                        This should eliminate any security issues. I will change later.


                        Ok I now do not get the error locally but the button fails to return any results.


                        Are there any ways to trace what is happening here?






                        • 9. Re: configurations errors on mac
                          flashste Level 1

                          The only other variable could be my local web server is running on port 3570. Do I have to configure soemthing here?

                          • 10. Re: configurations errors on mac
                            joelisaachart@gmail.com Level 1

                            Simple use the trace command in debug mode in flex to see what is 



                            Additionally navigate to the MAMP folder in your applications folder, 

                            check the logs folder, read the contents of PHP Error log



                            • 11. Re: configurations errors on mac
                              flashste Level 1

                              I do not see a MAMP folder in my application. Where is it located


                              • 12. Re: configurations errors on mac
                                flashste Level 1

                                I think the flex 4

                                is buggy I deleted stuff of the form to start again but the forms still appeared.


                                I have re-created the app:




                                and it is working.


                                Onward an upwards.


                                Thanks for the info.