Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Use Dev-PHP with existing Virtual Hosts?

Help
Owen Smith
2008-01-22
2012-12-07
  • Owen Smith
    Owen Smith
    2008-01-22

    Hi, in search of an easy path for PHP debugging, I've ended up with a copy of Dev-PHP IDE (portable version at the mo) 2.2.2. I've got the parser attached, the mozilla control working, but the Internal Preview always points to localhost, and not all my projects are at localhost (but they are still local)

    I have several projects going on at the mo, and have Apache virtual hosts set up - so, for example, I can view project A at http://projecta.local, probject B at http://projectb.local, etc. This is working fine in my browser, but I can't seem to find a config option in dev-php to set the local server path?

    Anyone know of a way to set the URL Internal Preview looks at, or am I gonna have to screw with my Apache setup again?

    Using WAMP if that helps...

     
    • Hi,

      > a copy of Dev-PHP IDE... I've got the parser attached
      Since you already have a PHP engine (coming with WAMP), this was not necessary. But we should not use the same PHP.INI as WAMP itself.
      The PHP.INI file specialized for devphp can be declared from Options » General options » Parser (if left empty, PHP will use the file named php.ini, stored in the same folder as php-cgi.exe, if any - else the PHP engine will use a default one). A PHP.INI can even be a component of your "project" (see below).

      > the mozilla control working.
      Sorry - it's my fault. Actually, this was not necessary because we can connect to devphp, from any local browser. The option about mozilla control won't be included in next versions.
      Indeed, devphp is provided with its own internal web server.
      As soon as devphp is launched, we can link to this small server thru _http://localhost:pn/_ where pn is the port number, as defined by Options » General options » Local web server » port number
      The local server path must also be defined here. This folder should only be accessed by devphp - usually it's the root of the repository of the project.
      Our internal server is a "true" one, although only one server is running at the same time, corresponding to the running devphp.exe
      Of course, our local server is only "local" - this means that we can use it only from the same computer. Another computer on the same Local Area Network can't "see" it.

      > find a config option in dev-php to set the local server path
      See above Options » General options » Local web server ;)

      > I have several projects going on at the mo
      Sorry - I don't understand /going on at the mo/ - Does it mean /at the moment/ ?

      Dev-PHP can connect to an "external" web server. External here, means outside of devphp. Of course, such a server can be a local one (running on the same computer)
      Nevertheless in order to debug, at the moment we need to use *only* the "internal" web server.

      > Using WAMP if that helps...
      Well...W : as usual, A : no matter, M : no comment, P : devphp is able to use any PHP engine provided it is 'thread safe'.

      See also
      http://pierre.fauconnier.free.fr/wikini/wakka.php?wiki=DevphpEnProjects
      http://pierre.fauconnier.free.fr/wikini/wakka.php?wiki=DevphpEnXdebug

      Regrads,
      Pierre.

       
    • Owen Smith
      Owen Smith
      2008-01-23

      Ah - that's very helpful. So I can use my own browser pointing at http://localhost:someport, and will still be able to debug as if I was using the Dev-PHP 'Internal Preview'? If that's true, it's very useful, thankyou. I'm trying it now, and it looks like I'm getting somewhere!

      Yes, I am using the php parser from my WAMP install, but thankyou for the ini file tips. I was concerned about using my existing one.

      And yes, sorry, 'going on at the mo' means 'in progress at the moment' :)

       
      • Hi,

        In the event of bug(s), please report to
        http://sourceforge.net/tracker/?group_id=54728&atid=474628

        There's another interesting feature for using a separate browser :
        it's possible to activate its own javascript debugger,
        firebug for example.

        Many thanks for your reports,
        Pierre.