CF10, FB 4.7, Apache on MAC

Hi All,
I have couple days trying to configure this new MAC with FB 4.7 and ColdFusion 10.
Alex was helping me to debug this issue but I still cannot figure this out, sorry no an expert in MAC or apache.
http://apache-flex-users.2333346.n4.nabble.com/Flex-amp-CF-on-MAC-OSX-10-8-4-td2614.html
Here is the way I configured the CF in MAC:
http://iknowkungfoo.com/blog/index.cfm/2013/2/27/Installing-ColdFusion -10-on-OSX-108-Mountain-Lion
So my web server is:
[ localhost:cfusion ] Apache : /private/etc/apache2
The article said that I can use "/Users/myUserName/Sites" as my web root, or not? I am confuse.
I am trying to configure my project for Flash Builder4.7, in windows for CF9 and IIS i set:
ColdFusion root folder: c:/ColdFusion9
Web root: c:/inetpub/wwwroot
Root URL: http://localhost/
Output folder: c:/inetpub/wwwroot/myTest-debug
So far I figure this in MAC
ColdFusion root folder: /Applications/ColdFusion10/cfusion
Web root: ???
Root URL: http://localhost/
Output folder: This should be the same as the web root.
I hope this is clear. Thanks!

I found this article:
http://coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmya dmin-osx-108-mountain-lion
It helps to understand that "OSX has historically had 2 web roots one at a system level and one at a user level."
System Level:
     /Library/WebServer/Documents/
     http://localhost/
User Level:
     /Users/username/Sites/
     http://localhost/~username/
Also explain how to change permissions.
I want to use the user level, do I need to copy the CFIDE folder into /Users/username/Sites/?

Similar Messages

  • Reinstall just apache from Mac OS 10.4 Install CD

    I installed an application to enable php with the os installed apache, ended up not liking the app and deleting it. Since, apache (personal web sharing) is faded and says that it did not come installed on this computer and to use the mac os install disk.
    Where can I find the files on the CD to replace/install on my harddrive to start completely fresh again?

    This Apple doc talks about optional installs without having to reload your OS -- but Apache isn't on the list.
    I think you have two choices available to you:
    (1) Download Pacifist to extract the needed installer pieces, that you can't normally get to, from the OS X installer CD (I am not familiar with this product so can't attest to its efficacy or user-friendliness) or
    (2) do an "archive and reinstall" of your OS from the installer CD. You'll have to go into the "Previous Systems" folder and move the applicable customizations of your OS back over into the new system directory after you have done the Intel or PPC combo update and any security updates via Software Update. After all that, then you can delete the "Previous Systems" folder.

  • Apache makes Mac Mini lag

    Hey guys,
    I was suffering from weird lag on my week-old Mac Mini, which I'm writing this message on. After days of researching turned out that Apache was causing it. No specific app takes a lot of CPU at the time the lag appears, nor is the full RAM used. I'm talking about app-wide lag: the whole system lags, a lot.
    I simply found it out by closing everything, and one by one starting the different apps. The lag started immediatly after launching Apache via MAMP and stopped right when I stopped it. Same with XAMPP and without using any GUI (the pre-built Apache).
    Any idea how I could fix this by myself? I am *not* looking forward to sending the machine to be fixed, as it is my primary work machine. I guess the Apache should be re-installed, but I'm completely new to compiling stuff on Mac.
    I need Apache so I can develop on localhost. I'm a developer just moved to OSX from Windows.
    Any help is appreciated! I'm willing to give complementary details, but I need directions to get them.
    Martti Laine

    This is probably just a software problem.
    Start with the basics: verify the disk and repair permissions (using Disk Utility).
    OS X has a version of Apache built-in. You can activate it by turning on Web Sharing in System Preferences. Try this and see if it lags. You can activate PHP with a few simple Terminal commands. This may be all you need.
    If you need mySQL and more control over your environment, then MAMP is a better solution (I've never used XAMPP so I can't compare the 2). Try reinstalling it and repairing permissions again.
    You can also use Activity Monitor to see what processes are hogging resources, and Console to see any other problems. I wouldn't be surprised to see some timeouts. If this doesn't fix your problem, check the MAMP forum with the data you've acquired.
    I use MAMP on a Mac Pro with no noticeable lags.

  • Installing APACHE on MAC

    Hi, I have been struggling for a while trying to configure my MAMP, I've work with Linux before and I manage to configure my LAMP pretty well. But MAC is ginving me a hard time. What I've could do so far is starting the apache serve although i dont know if the apache server I started is the one that i am seeing on my browser, that because when i go to localhost i see the It Works! message, but if i change the index.html in /Library/WebSever/Documents/ and reload the browser or open another browser and search the address localhost, I am still getting the same It Works message and not the one i'd change. I have try different browsers, clearing cache, incognito windows. I getting crazy here. I would appreciate some help

    Mac OS X has Apache built-in.   I'll ask this thread be moved to the developer forum, where more people would know how to properly set it up.  Note: Mac Pros are desktops an Macbook Pros are notebooks.  MAC is an acronym for media access control, a hexadecimal address for network devices, and Mac is the shorthand name for Macintosh.  

  • Limit apache log - mac os 10.6

    My Apache error is getting out of control! yesterday it was about 70Gb. I was told to use logrotate to limit/delete this file every 5 or 10 days.
    This is great, except I can't figure out if there is a version of logrotate for mac os 10.
    Is there a way to install logrotate?
    If not, is there an alternative to help me with this problem?
    Thank you.

    onema wrote:
    My Apache error is getting out of control! yesterday it was about 70Gb. I was told to use logrotate to limit/delete this file every 5 or 10 days.
    This is great, except I can't figure out if there is a version of logrotate for mac os 10.
    Is there a way to install logrotate?
    That's not your problem. The log file shouldn't be that big.
    If not, is there an alternative to help me with this problem?
    What does the log file say? It should be several dozen million lines of the same thing. Fix that and it will fix the problem.

  • How can I make an HTTP redirect in Apache on Mac?

    In IIS on Windows, I was making a redirect that when I went to localhost, it would go to localhost/IndigoUnlimited for my site. Now, I am using Apache, and to get to my site on my Mac, I need to type in localhost/~myuser. How can I make a redirect so when I go to localhost it will redirect me to localhost/~myuser?

    You'd do this by editing your hosts file. That's actually what was happening when using IIS to set up the redirect. It just had a fancy interface.
    A really nice link with in-depth walkthrough, explanation, AND video!
    http://osxdaily.com/2012/08/07/edit-hosts-file-mac-os-x/
    You can redirect websites locally using the same logic, perfect for setting up test domains

  • How to fix 403 in Mac OS X built-in Apache?

    I'm trying to set a local environment on my new MacBook Air 13": built-in Apache with my own DocumentRoot, PHP, and MySQL. I usually update /etc/hosts just to run my local websites with a pretty permalink: local/example. For references, I usually check:
    How to turn Mac OS X Lion into a web server?
    Enabling Apache in Mac OS X Mountaion Lion
    Apache permissions
    This time I'm simply getting a 403 Forbidden error every time I hit 127.0.0.1, localhost, or local. First I saw through the terminal that both Apache and PHP are running (even though I can't view PHP pages); then I updated all permissions according to Apache permissions; now I'm just desperate. Here are the relevant Apache configs:
    /etc/hosts (view file — added one line)
    /etc/apache2/httpd.conf (view file — updated the DocumentRoot)
    /etc/apache2/users/joao.conf (view file — created this file)
    /etc/apache2/extra/httpd-vhosts.conf (view file — updated VirtualHost)
    It looks like Apache is somehow denying me access to my DocumentRoot (which by the way is ~/Sites). Because ~/Sites is actually a symlink, I then tried to update DocumentRoot with the following paths (all pointing to the same directory):
    ~/Sites
    /Users/joao/Sites
    /Users/joao/Dropbox/Workflow/Sites (the original directory)
    Still throwing 403. Any ideas how to fix/debug this?

    Quick update: here's what my /var/log/apache2/joao.pt-error_log looks like,
    [Sun Jul 07 12:50:45 2013] [error] [client 127.0.0.1] (13)Permission denied: access to / denied
    [Sun Jul 07 12:50:45 2013] [error] [client 127.0.0.1] (13)Permission denied: access to /favicon.ico denied
    [Sun Jul 07 12:50:45 2013] [error] [client 127.0.0.1] (13)Permission denied: access to /favicon.ico denied
    [Sun Jul 07 12:50:45 2013] [error] [client 127.0.0.1] (13)Permission denied: access to /favicon.ico denied
    [Sun Jul 07 12:50:47 2013] [error] [client ::1] (13)Permission denied: access to / denied
    [Sun Jul 07 12:50:47 2013] [error] [client ::1] (13)Permission denied: access to / denied
    [Sun Jul 07 12:50:48 2013] [error] [client ::1] (13)Permission denied: access to /favicon.ico denied
    [Sun Jul 07 12:50:48 2013] [error] [client ::1] (13)Permission denied: access to /favicon.ico denied

  • Apache 2 PHP5 frustrations

    I'm attempting to install OS X Apache 2 and PHP 5.2.2 on my personal Mac with very frustrating results. Working with the terminal scares the devil out of me but I'm trying. Nevertheless, there doesn't seem to be any one logical place for Apache to be installed, let alone php5. Different sources say it should be installed in different directories. For example:
    /usr/local
    /opt/local
    /Library
    and probably two or three more.
    I do web design and need to test locally and all this is very confusing. The reason I'm in this mess is that recently I had to do an Archive and Restore from my iMac disk. Okay, but in checking via Terminal with: httpd -v, I'm told Apache 2 was installed...yet I've read that to use Apache 2, you have to have Personal Web Sharing turned off and launch it from the terminal or from a special Apache 2 PreferancePane.
    If there and idiot proof way to install Apache 2 and the latest PHP version? Some kind of easy networking-illiterate installer package? And if so, what do I need to do to clean out any preexisting incorrect installations? (I probably have about three Apache2 folders in the above named folders but don't know how to launch the correct one...also PHP folders all over...can't get anything to work properly).
    Any help will be greatly appreciated!
    iMac G5 20" Display   Mac OS X (10.4.9)  

    There is no such thing as an Apache2 Preference Pane. When you install Apache2, it breaks the Websharing button because the launching binary cannot find the httpd.pid file. If you want the websharing button to work you need to do something to the httpd launch binary file, like replace it with the new one manually. I don't remember what exactly fixes it
    Apache2 can go wherever you want, and the files are all consolidated. This script installs the package and has a few pointers:
    # Build and install Apache on Mac OSX (NOT server!).
    gnutar -xzf httpd.tar.gz
    cd httpd-2.2.4
    # The installer will ignore these folders if they already exist:
    # /usr/share/httpd/error/
    # /usr/share/httpd/icons/
    # /Library/WebServer/
    # These items are now in a new location:
    # /var/log/apache2/access_log
    # /var/log/apache2/error_log
    # /etc/apache2/httpd.conf
    # Note that subsequent runs of the installer moves previous configurations to subfolder "original"
    # Components are listed at http://httpd.apache.org/docs/2.2/programs/configure.html
    ./configure --enable-layout=Darwin --enable-rewrite --disable-userdir --enable-so
    make
    sudo make install
    #/usr/libexec/httpd/mod_bonjour.so ?
    #/usr/libexec/httpd/modhfsapple.so ?
    # Permissions at ls /usr/sbin/envvars* seem to be wrong
    Notice that I did not figure out hpw to install the bonjour module and the HFS module.
    As for PHP, I don't know. Read this page and you may get a clue:
    http://Gnarlodious.com/Computer/Apache

  • Mac to GoDaddy Linux Zend Deployment problems

    I develop on a Macintosh (localhost) and deploy to GoDaddy Linix
    I did the following, exactly but it does not work.
    I am on beta 2  - What am I missing?
    Help please this is a demo to close a deal with a client.
        copied  ZendFramework/  to  server root
        exported release build to local HD
        Copied  build folder to server root
        copied the missing services folder from bin-debug to the build folder on the server
        ---- amf-config.ini ------
                Uncommented and set zend_path to absolute path ( http://www.danielpride.com/ZenFrameworks )
                Set amf.production to true.
                Set Webroot to (  http://www.danielpride.com )
    Note: there is no fml file to be seen on my entire MACINTOSH hard drive ?
    Request: If you cite folders in your response please be explicit as to the path.
    Thanks in advance.

    Thank you so much for getting back to me but I still am getting
    Send failed
    Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: 'http://www.danielpride.com/Vehicles3/gateway.php'
    My amf config looks like this (I edited "debug" out of the last line, no one mentioned it but it does not work either way
    [zend]
    ;set the absolute location path of webroot directory, example:
    ;Windows: C:\apache\www
    ;MAC/UNIX: /user/apache/www
    webroot =../*
    allation directory, example:
    ;Windows: C:\apache\PHPFrameworks\ZendFramework
    ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework
    ;zend_path =
    [zendamf]
    amf.production = true
    amf.directories[]=Vehicles3/services
    The steps I am taking are as follows (note it works great on localhost, I just build and do the following
         copy  ZendFramework/  to  server root
        exported release build to local HD
        Copied  build folder to server root
        copied the missing services folder from bin-debug to the build folder on the server
         reset the constants for the new server in the include file for the services
        ---- amf-config.ini ------
                Set amf.production to true.
                Set Webroot to ( ../* )
    Thanks
    Dan

  • CF10 Standard reverted to Developer and remains there

    hi there
    I have a very strange behavior: Since years, we run CF10 Standard on Win2k3 for an old productive site. Some weeks ago, I faced some DOS-like problems on it and discovered that CF Admin shows the version as Developer Edition. This was absolutely surprising to me as we have a valid CF10 Standard Serial since 2012. Of course I entered it immediately again but to no avail. CF10 would remain in developer state.
    Can this be caused by some CF10 Updates? We are at Update 13. Afaik, we do not need anything that is a CF10 Enterpreise feature. Can it be that some CF10Ent feature was turned on somehow that now prevents entering a Standard serial? And if so, what can I do to get bacl to a full working CF10 Standard? Any other ideas?
    CF10 currently runs on Apache 2.2.27. Apache was updated several times over time.
    This is critical because of the IP limitations. Lucky we that this system is used only seldomly. But still: DOS like problems appear.
    Any ideas how to correct that?
    not to say that this is quite urgent to me ...
    Thanks
    Tinu

    Hi Tinu,
    Go to \ColdFusion10\cfusion\lib and locate license.properties. Open this file in notepad or wordpad and then you will find the ColdFusion 10 Serial number there. If not, then please type in your license key, save the file and Restart the ColdFusion services.
    This should work for you.
    Regards,
    Anit Kumar

  • Apache tomcat on solaris9

    Can any one tell detailed installation and configuration of apache tomcat on solaris9
    advance thanks,
    susesun

    Possibly the instructions on this page will help you. I found them with a Google search - apache tomcat mac install.
    Best of luck.

  • Can Some One Help With A PHP Class?

    I have a simple function and I can not for the life of me get it to work properly. Here's the PHP:
    <?php
    class userProjectNotes {
              var $username = "user";
              var $password = "secret";
              var $server = "url-here.net";
              var $port = "3306";
              var $databasename = "mscoast";
              var $connection;
              public function __construct() {
                          $this->connection = mysqli_connect(
                                                                                      $this->server, 
                                                                                      $this->username, 
                                                                                      $this->password,
                                                                                      $this->databasename,
                                                                                      $this->port
                        $this->throwExceptionOnError($this->connection);
               * Gets all my stuffs from the places... Yeah... You get it...
              public function getAlluserProjectnotes($userTable) {
                        $stmt = mysqli_prepare($this->connection, "SELECT * FROM $userTable");
                        $this->throwExceptionOnError();
                        mysqli_stmt_execute($stmt);
                        $this->throwExceptionOnError();
                        $rows = array();
                        mysqli_stmt_bind_result($stmt, $row->notes_id, $row->date_added, $row->note, $row->pid);
                  while (mysqli_stmt_fetch($stmt)) {
                    $rows[] = $row;
                    $row = new stdClass();
                    mysqli_stmt_bind_result($stmt, $row->notes_id, $row->date_added, $row->note, $row->pid);
                        mysqli_stmt_free_result($stmt);
                  mysqli_close($this->connection);
                  return $rows;
    ?>
    ( I ommited the ThrowexceptionOnError to save space in this post.
    And here is my call to it:
    protected function list_creationCompleteHandler():void
                                            userProjectNotes.endpoint = "http://www.url-here.net/app-resources/gateway.php";
                                            getAlluserProjectnotesResult.token = userProjectNotes.getAlluserProjectnotes(userNotesTable);
    it works locally, but remotely I get:
    Channel disconnected before an acknowledgement was received

    Yup yup! My other services are working fine. just this one service is causing the issue...
    [zend]
    ;set the absolute location path of webroot directory, example:
    ;Windows: C:\apache\www
    ;MAC/UNIX: /user/apache/www
    webroot =/var/www/url-here.net/web/app-resources
    ;set the absolute location path of zend installation directory, example:
    ;Windows: C:\apache\PHPFrameworks\ZendFramework\library
    ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework/library
    zend_path = /var/www/url-here.net/web/app-resources/ZendFramework/library
    [zendamf]
    amf.production = false
    amf.directories[]=services

  • Https (secure connection) on local testing server??

    Hi all
    I am building a shopping cart, which will use an https
    connection.
    Is there a way to setup an https connection on my local
    testing server (Apache, PHP, Mac OSX)?
    My guess is that it's not possible, but I might not know some
    special trick...?
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    An Ingenious WebSite Builder:
    http://sitelander.com

    > UPS tools that will only accept POST data coming from an
    https page
    Oh - I see. I think this will be hard to do. You'd need to
    get a local
    certificate and all - not sure how to go about that....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "(_seb_)" <[email protected]> wrote in message
    news:ev39uo$pm3$[email protected]..
    > Murray *ACE* wrote:
    >> Why do you want to do this?
    >>
    >
    > to test locally?... I've been able to test everything
    locally so far on my
    > virtual testing server, and thought it'd be nice if I
    could test the
    > shopping cart locally as well. But it uses third party
    UPS tools that will
    > only accept POST data coming from an https page.
    > And yes, I'm pretty sure it's a stupid idea... But as I
    said, maybe
    > there's a trick I'm not aware of...
    >
    > --
    > seb ( [email protected])
    >
    http://webtrans1.com | high-end web
    design
    >
    > An Ingenious WebSite Builder:
    http://sitelander.com

  • Unable to connect to the server to pull data from mysql

    Hello,
    I am novice working with Flash Builder 4 and I just created a test application which runs well in my computer pulling data from Mysql using PHP and populating a datagrid. But when I transfered it to the my hosting provider failed. I have been doing some modifications to the gateway.php and amf.config.ini to solve some of the issues. Now the application try to run but doesn't populate the data in the datagrid. I included a tracking point in my data service file to read the connections variables, but they come up in blank. I highly appreciate any help. Here are my gateway.php, amf.config.ini and the data service.
    gateway.php
    <?php
    ini_set("display_errors", 1);
    $dir = dirname(__FILE__);
    $webroot = $_SERVER['DOCUMENT_ROOT'];
    $configfile = "$dir/amf_config.ini";
    $fp = fopen("tracking.txt", "a");
    fwrite($fp, "1-config file " . $configfile . "\r\n");
    //default zend install directory
    $zenddir = $webroot. '/ZendFramework/library';
    //-$zenddir = $webroot;
    fwrite($fp, "2-default zendir" . $zenddir . "\r\n");
    //Load ini file and locate zend directory
    if(file_exists($configfile)) {
         $arr=parse_ini_file($configfile,true);
         if(isset($arr['zend']['webroot'])){
              $webroot = $arr['zend']['webroot'];
              $zenddir = $webroot. '/ZendFramework/library';
         if(isset($arr['zend']['zend_path'])){
              $zenddir = $arr['zend']['zend_path'];
    fwrite($fp, "3-after zendir" . $zenddir . "\r\n");
    // Setup include path
    //add zend directory to include path
    set_include_path(get_include_path().PATH_SEPARATOR.$zenddir);
    // Initialize Zend Framework loader
    require_once 'Zend/Loader/Autoloader.php';
    //-require_once 'Autoloader.php';
    Zend_Loader_Autoloader::getInstance();
    // Load configuration
    $default_config = new Zend_Config(array("production" => false), true);
    $default_config->merge(new Zend_Config_Ini($configfile, 'zendamf'));
    $default_config->setReadOnly();
    $amf = $default_config->amf;
    fwrite($fp, "4- configfile" . $dafault_config["production"] . "\r\n");
    // Store configuration in the registry
    Zend_Registry::set("amf-config", $amf);
    // Initialize AMF Server
    $server = new Zend_Amf_Server();
    $server->setProduction($amf->production);
    if(isset($amf->directories)) {
         $dirs = $amf->directories->toArray();
         foreach($dirs as $dir) {
             // get the first character of the path.
             // If it does not start with slash then it implies that the path is relative to webroot. Else it will be treated as absolute path
             $length = strlen($dir);
             $firstChar = $dir;
             if($length >= 1)
                  $firstChar = $dir[0];
             if($firstChar != "/"){
                  // if the directory is ./ path then we add the webroot only.
                  if($dir == "./"){                  
                       $server->addDirectory($webroot);
                  }else{
                       $tempPath = $webroot . "/" . $dir;
                        $server->addDirectory($tempPath);
              }else{
                      $server->addDirectory($dir);             
    fwrite($fp, "5-temp path" . $tempPath . "=>" . "\r\n");
    fwrite($fp, "******************************************" . "\r\n");
    // Initialize introspector for non-production
    if(!$amf->production) {
         $server->setClass('Zend_Amf_Adobe_Introspector', '', array("config" => $default_config, "server" => $server));
            $server->setClass('Zend_Amf_Adobe_DbInspector', '', array("config" => $default_config, "server" => $server));
    // Handle request
    echo $server->handle();
    ?>
    amf.config.ini
    [zend]
    ;set the absolute location path of webroot directory, example:
    ;Windows: C:\apache\www
    ;MAC/UNIX: /user/apache/www
    ;-webroot =c:/wamp/www/
    webroot = /home/frutiexp/public_html
    ;set the absolute location path of zend installation directory, example:
    ;Windows: C:\apache\PHPFrameworks\ZendFramework
    ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework
    ;zend_path = /home/frutiexp/public_html/ZendFramework
    [zendamf]
    amf.production = true
    amf.directories[]=fb41/services
    ;amf.directories[]=./
    CoursesService.php
    <?php
    *  README for sample service
    *  This generated sample service contains functions that illustrate typical service operations.
    *  Use these functions as a starting point for creating your own service implementation. Modify the
    *  function signatures, references to the database, and implementation according to your needs.
    *  Delete the functions that you do not use.
    *  Save your changes and return to Flash Builder. In Flash Builder Data/Services View, refresh
    *  the service. Then drag service operations onto user interface components in Design View. For
    *  example, drag the getAllItems() operation onto a DataGrid.
    *  This code is for prototyping only.
    *  Authenticate the user prior to allowing them to call these methods. You can find more
    *  information at <link>
    class CoursesService {
         var $username = "myusername";
         var $password = "mypassword"
         var $server = "localhost";
         var $port = "3306";
         var $databasename = "frutiexp_trainsur";
         var $tablename = "courses";
         var $connection;
          * The constructor initializes the connection to database. Everytime a request is
          * received by Zend AMF, an instance of the service class is created and then the
          * requested method is invoked.
         public function __construct() {
                $this->connection = mysqli_connect(
                                              $this->server, 
                                              $this->username, 
                                              $this->password,
                                              $this->databasename,
                                              $this->port
    $fp = fopen("./tracking.txt", "a");
    fwrite($fp, "1-service".  $databasename . " " . $username . "\r\n");
    fclose($fp);
              $this->throwExceptionOnError($this->connection);
          * Returns all the rows from the table.
          * Add authroization or any logical checks for secure access to your data
          * @return array
         public function getAllCourses() {
              $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename");         
              $this->throwExceptionOnError();
              mysqli_stmt_execute($stmt);
              $this->throwExceptionOnError();
              $rows = array();
              mysqli_stmt_bind_result($stmt, $row->cou_id, $row->cou_title, $row->cou_overview, $row->cou_objectives);
             while (mysqli_stmt_fetch($stmt)) {
               $rows[] = $row;
               $row = new stdClass();
               mysqli_stmt_bind_result($stmt, $row->cou_id, $row->cou_title, $row->cou_overview, $row->cou_objectives);
              mysqli_stmt_free_result($stmt);
             mysqli_close($this->connection);
             return $rows;
          * Returns the item corresponding to the value specified for the primary key.
          * Add authroization or any logical checks for secure access to your data
          * @return stdClass

    Hello Jdesko,
    Thank you for you prompt response. Yes, I have changed the connections variables in my dataservice ( I didn't post real values). You are right, after all I didn't make changes on the gateway.php except to add some tracking points. The one that I changed is the amf.config,ini. The application runs without any error exceptions, but don't populate the datagrid. According with the tracing is stoping just when establishing the connection to the database. Please let me know if you have any other clue. thanks

  • Flex + amf php server deployment problem

    Hi all,
    After almost a month of research on this problem. I was able to remove all my errors on production but still not able to retrieve data.
    Please help......
    Here is the scenerio details :
    I created a form which will take input from user and store those values in database.you can visit it here on web server :
    http://www.accurateoptics.in/
    I followed all the steps mentioned on adobe's test drive tutorial. It works fine on my local machine with WAMP installation. But the moment,
    I upload it...Bang!!!! there comes the error ::::
    Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: http://www.accurateoptics.in/gateway.php
    I googled again, read a lot of articles and figured out that some changes are required in my gateway.php and amf-config.ini files for production environment.
    Did the necessary changes and uploaded again.Bang!!!!!!! new error comes:::::::
    Channel disconnected before an acknowledgement was received.
    to solve this, again googled a lot and figured out that i need to upload zend framework files so, did that and setting up the path for zend in amf-config.ini.
    uploaded again.
    Now, i am stuck at this point where no error is thrown only an alert box comes with a ok button. also, data is not retrieved from server.
    I dont know what error i am making.here is my amf-config.ini file:::::::::::::
    [zend]
    ;set the absolute location path of webroot directory, example:
    ;Windows: C:\apache\www
    ;MAC/UNIX: /user/apache/www
    webroot =http://www.accurateoptics.in
    ;set the absolute location path of zend installation directory, example:
    ;Windows: C:\apache\PHPFrameworks\ZendFramework\library
    ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework/library
    ;zend_path =
    zend_path = ./ZendFramework/library
    [zendamf]
    amf.production = true
    amf.directories[]= http://www.accurateoptics.in/services
    here is my gatway.php file :::::::::::::;
    <?php
    ini_set("display_errors", 1);
    //$dir = dirname(__FILE__);
    $dir = '.';
    $webroot = $_SERVER['DOCUMENT_ROOT'];
    //$configfile = "$dir/amf_config.ini";
    $configfile = "amf_config.ini";
    //default zend install directory
    $zenddir = $webroot. '/ZendFramework/library';
    //Load ini file and locate zend directory
    if(file_exists($configfile)) {
    $arr=parse_ini_file($configfile,true);
    if(isset($arr['zend']['webroot'])){
    $webroot = $arr['zend']['webroot'];
    $zenddir = $webroot. '/ZendFramework/library';
    if(isset($arr['zend']['zend_path'])){
    $zenddir = $arr['zend']['zend_path'];
    // Setup include path
    //add zend directory to include path
    set_include_path(get_include_path().PATH_SEPARATOR.$zenddir);
    // Initialize Zend Framework loader
    require_once 'Zend/Loader/Autoloader.php';
    Zend_Loader_Autoloader::getInstance();
    // Load configuration
    $default_config = new Zend_Config(array("production" => false), true);
    $default_config->merge(new Zend_Config_Ini($configfile, 'zendamf'));
    $default_config->setReadOnly();
    $amf = $default_config->amf;
    // Store configuration in the registry
    Zend_Registry::set("amf-config", $amf);
    // Initialize AMF Server
    $server = new Zend_Amf_Server();
    $server->setProduction($amf->production);
    if(isset($amf->directories)) {
    $dirs = $amf->directories->toArray();
    foreach($dirs as $dir) {
    // get the first character of the path.
    // If it does not start with slash then it implies that the path is relative to webroot. Else it will be treated as absolute path
    $length = strlen($dir);
    $firstChar = $dir;
    if($length >= 1)
    $firstChar = $dir[0];
    if($firstChar != "/"){
    // if the directory is ./ path then we add the webroot only.
    if($dir == "./"){
    $server->addDirectory($webroot);
    }else{
    $tempPath = $webroot . "/" . $dir;
    $server->addDirectory($tempPath);
    }else{
    $server->addDirectory($dir);
    // Initialize introspector for non-production
    if(!$amf->production) {
    $server->setClass('Zend_Amf_Adobe_Introspector', '', array("config" => $default_config, "server" => $server));
    $server->setClass('Zend_Amf_Adobe_DbInspector', '', array("config" => $default_config, "server" => $server));
    // Handle request
    echo $server->handle();
    ?>
    Looking for some help!! Thanks in advance..............

    Please elaborate.
    I tried visitng http://www.accurateoptics.in/endpoint.php
    but "page not found " returned
    However, i also tried visitng "http://www.accurateoptics.in/gateway.php"
    it shows me this echo result on page " Zend Amf Endpoint ".
    so, if i m reaching to this place that means my gateway.php and amf-config.ini is fine.
    the problem is somewhere else in any of these three files.

Maybe you are looking for