Professional Web Applications Themes

MySQl/PHP - Macromedia Dreamweaver

first thing to do is install MySQL and PHP on your devolopment PC. You will also need a web server installed of some kind, i reccomend Apache. next, get a copy of mySQL-Front (search the web for it), its a **FREE** database maintainance program that will allow you to administer mySQL locally to setup your databases etc... Some hosts only allow you to have one database, and THEY define the database name, find this out from your host and create a database on your PC using mySQL-front. This will then act as a kinda 'mirror' of your host so in ...

  1. #1

    Default Re: MySQl/PHP

    first thing to do is install MySQL and PHP on your devolopment PC. You will
    also need a web server installed of some kind, i reccomend Apache.

    next, get a copy of mySQL-Front (search the web for it), its a **FREE**
    database maintainance program that will allow you to administer mySQL
    locally to setup your databases etc...

    Some hosts only allow you to have one database, and THEY define the database
    name, find this out from your host and create a database on your PC using
    mySQL-front. This will then act as a kinda 'mirror' of your host so in
    theory, if it works locally, it will work on your host.

    Once you've done that little lot (about 30Mb of sownloading required!), and
    your happy that your server is running locally (goto [url]http://localhost[/url] and
    you should see a web page or what ever is in the folder that localhost
    points to (for apache, this is easily modified in the apache setup file)),
    right, now setup the testing server in dreamweaverMX, its in the site def
    stuff.

    Once your done with that, and you can test php files using F12 in
    dreamweaver and they showup ok, you can begin to add a new database
    connection. In DWMX, goto connections and click database, select the correct
    options and and DW will create the code for you.

    Dont be affraid to post questions or shouts for help in the forum if you get
    stuck.



    Joe
    #

    "Treize13" <gwilson2002aol.com> wrote in message
    news:behrpe$nru$1forums.macromedia.com...
    > I am planning to build a login page for Dreamweaver MX. I would like to
    > connect with MySQL/PHP. I need to know where should I start? Do I require
    to
    > set up in OBDC to add new server for MySQL? or Just go set up DSN with
    > localhost? My web host already have MySQL connection in cpanel but I am
    not
    > sure if that might be work. I have read alot different books. Those are
    many
    > ways to start. I am confusing here. Please help where do I start.
    >
    > Thank in advance.
    >
    >

    joey Guest

  2. #2

    Default Re: MySQl/PHP

    Thank you, Joe. I appreciate it very much help.

    Earle


    Treize13 Guest

  3. #3

    Default Re: MySQl/PHP

    I have PHP 5.0.0b1 zip package which found from php.net website. I have XP
    Pro windows and already have IIS included. If I download into my pc, it will
    not hurt overwrite .dill, IIS, PWS, CGI, etc. into my pc system. Right? I
    read their warning in notepad about installation.


    Treize13 Guest

  4. #4

    Default Re: MySQl/PHP

    "Treize13" <gwilson2002aol.com> wrote in message
    news:beibo1$i40$1forums.macromedia.com...
    > I have PHP 5.0.0b1 zip package which found from php.net website. I have XP
    > Pro windows and already have IIS included. If I download into my pc, it
    will
    > not hurt overwrite .dill, IIS, PWS, CGI, etc. into my pc system. Right? I
    > read their warning in notepad about installation.

    PHP 5 is still Beta software and I would not recommend using it. It's highly
    unlikely that you will find it in use by any hosting companies and you're
    better off developing with a version somewhat close to what is installed on
    the production server. I would recommend installing the 4.3.2 Windows
    installer. It will automatically handle all the configuration of IIS and
    such for you.

    Gary


    Gary White Guest

  5. #5

    Default Re: MySQl/PHP


    Which would be better to use for

    Windows Binaries
    All Windows binaries can be used on Windows 98/Me and on Windows NT/2000/XP.

    PHP 4.3.2 zip package [6,107Kb] - 29 May 2003
    (CGI binary plus server API versions for Apache, Apache2 (experimental),
    ISAPI, NSAPI, Servlet and Pi3Web. MySQL support built-in, many extensions
    included, packaged as zip)
    md5: e1afea6341d97e8160bd7d93712721ec

    or

    PHP 4.3.2 installer [1,035Kb] - 29 May 2003
    (CGI only, MySQL support built-in, packaged as Windows installer to install
    and configure PHP, and automatically configure IIS, PWS and Xitami, with
    manual configuration for other servers. N.B. no external extensions
    included)
    md5: cb55d0d9df6a2bf4ba666c27886d12cb

    I just need to make sure to pick the correct one. I appreciate it.

    Earle


    Treize13 Guest

  6. #6

    Default Re: MySQl/PHP

    question is- what is your real hosting envirionment?
    You should mirror your final server's arrangement- as much as possible.

    is it windows? Is php running as a cgi? then use that installer. The php
    files have to have a specific first line in each file to run as a cgi
    process-

    is it *nix/Apache/php/MySQL ?
    then suggest not working with IIs locally- install Apache and the rest.
    There's integrated installers that put all three of them into one windows
    installer. Php-triad is the name of one of them i think.

    note- this is for setting up a local testing server-
    You can actually enter the info for your remote "real" server into the
    testing server part of the site definition- and connect directly to your
    remote host and real MySQL database. It can be slow however...


    --
    Team Macromedia Volunteer for Dreamweaver
    Certified Dreamweaver MX Developer

    Alan Ames Guest

  7. #7

    Default Re: MySQl/PHP

    I would not recomend using a 3way intergrated installer, they tend to be
    more hassal than its worth.

    This is a copy of a file that i wrote when i installed php/mySQL/apache
    server locally, so i could do it right first time every time i reload
    windoze :-( every 6months:

    <start of file>

    1. install the apache server to c:\

    type in this order when u get 3 input fields to fill in:

    localhost
    localhost
    [email]localhostyourdomain.com[/email]

    click "as a service" (default)

    install.

    -------------------------------------------------------------------------

    2. install PHP to c:\ entering your smtp server and your email address
    e.g:
    smtp.blueyonder.co.uk (server)
    [email]PHPADASDASDASDASDASPAMMMMkybert.com[/email] (email)

    -------------------------------------------------------------------------

    3. open "c:\windows\php.ini"
    scroll down and find this line:

    ;include_path = ".;c:\php\includes"

    change it to the root dir for the site you wanna run.. e.g.:

    include_path = "F:/web sites/mysite"

    (files in this dir now appear as [url]http://localhost/[/url])

    -------------------------------------------------------------------------

    4. - perl, not worked this out yet!
    -------------------------------------------------------------------------

    5a. copy file "httpd.cfg" to "C:\apache\conf\"

    -------------------------------------------------------------------------

    5b. open file: C:\apache\conf\httpd.conf (apache configuration file!)

    -------------------------------------------------------------------------

    5c. scroll down and find this line:

    DoentRoot "/apache/htdocs"

    change it to the root dir for the site you wanna run.. e.g.:

    DoentRoot "F:/web sites/mysite"

    -------------------------------------------------------------------------

    5d. scroll down and find this line:

    <Directory "/apache/htdocs">

    change it to the root dir again:

    <Directory "F:/web sites/mysite">

    -------------------------------------------------------------------------

    5e. scroll down and find this line:

    ScriptAlias /php/ "/apache/php/"

    change it to:

    ScriptAlias /php/ "c:/php/"

    -------------------------------------------------------------------------

    5f. Save this file somewhere as a backup so if you need to re-install
    at some point, just copy over the backup file.

    -------------------------------------------------------------------------

    5g. If, in the future (not now) change any settingd in this file or any
    configuration file for PHP or Apache, you MUST restart the server.
    This is done like so:

    Start>>Programs>>Apache HTTP Server>>Control Apache Server>>Restart

    If you change any mySQL settings in the future, just restart windoze.

    -------------------------------------------------------------------------

    6a. install mySql

    to "C:\" (just keep clicking 'NEXT'...)

    6b. Execute program "C:\mysql\bin\winmysqladmin.exe" and enter your
    databases' username and password as supplied by your host.

    -------------------------------------------------------------------------

    7. Install MySql-front to whatever directory it wants

    -------------------------------------------------------------------------

    8. Restart windows, even if you dont want to!

    -------------------------------------------------------------------------

    9. open browser and goto url:

    [url]http://localhost/[/url]

    this will be interpreted by the apache server as:

    [url]http://DoentRoot/[/url] (see step 5)

    hence, for the setting I used in step 5, it will open:

    F:/web sites/mysite/

    If you get "page cannot be displayed" check your step 5 settings
    and ensure that the directory you specified exists!

    -------------------------------------------------------------------------

    10. open MySql-front.

    click "new"
    enter "all databases"
    click "OK"
    click "connect"

    The program should start, and you should see 2 databases;

    1. mySQL - this is the system database - DO NOT DELETE
    2. Test - can be deleted safely - its just to ensure the install was ok

    If you got an error, mySql isnt running... try restarting windoze
    or check your settings in step 5.

    Setup Privilidges:
    Tools >> User-Manager
    Click "Edit Users"
    Select "localhost" and click "Edit..."
    Enter your username
    enter your password (x2)
    Click "Save"
    Select --username--localhost
    Click "Select All"
    Click "Grant Privilidges"

    This has now setup mySQL to refuse connection unless the username, password
    and host are correct.

    Click "File >> close"
    Click "File >> connection"

    Click "new" and enter your site name, e.g. "My Site"
    Click "OK"

    Enter:
    Host/IP = localhost
    Username = your username
    Password = your password
    database = your database name

    Click "save"
    Click "connect"

    This now connects to your database.
    It will show all tables in "database name". As there is no database
    yet, you need to create one.

    Click "tools >> create database"
    Enter your database name (supplied by Host?)
    click "OK"

    Look in folder "C:\mysql\data", ooohh.. there is your databases!
    You can delete folder "Test" as these are no longer required, however, its
    better and safer to delete it using "Drop Database" in mySQL-Front.

    !!! DO NOT DELETE FOLDER "mySQL" AS IT IS A SYSTEM FOLDER USED BY mySQL !!!

    ************************************************** ***************
    IF YOU NEED TO REINSTALL MYSQL, COPY FOLDER "C:\mysql\data"
    AND SAVE IT SOMEWHERE SAFE.

    ONCE YOU HAVE REINSTALLED, REPLACE "C:\mysql\data" WITH YOUR
    BACKUP COPY.
    ************************************************** ***************

    -------------------------------------------------------------------------

    NOTES
    ~~~~~

    Apache server and mySQL will run as "services" in the background, this is
    the best way to do it as it saves space in the task bar if they are run
    in console mode (minimised).

    The server will run exclusivly for the site specified in step 6.
    To run a different site, change the httpd doent - back it up first so
    you can change back quickly...

    Your databases are in the folder "c:\mySQL\data" in here, the folder name
    represents the database name.

    -------------------------------------------------------------------------

    <end of file>


    if you place a file on your host server (on the web) with contents:
    <?php
    phpinfo();
    ?>
    and name the file myfile.php and call it: [url]www.mydomain/myfile.php[/url]
    it will show you all the settings for php on your hosts PC. now run the same
    file on localhost and see if the settings match, if not, tinker with the
    httpcfg file until there are as close as you can get them.


    hope this file helps,

    Joe
    #



    "Alan Ames" <bluformdude.com> wrote in message
    news:BB323AD4.13B982%bluformdude.com...
    > question is- what is your real hosting envirionment?
    > You should mirror your final server's arrangement- as much as possible.
    >
    > is it windows? Is php running as a cgi? then use that installer. The php
    > files have to have a specific first line in each file to run as a cgi
    > process-
    >
    > is it *nix/Apache/php/MySQL ?
    > then suggest not working with IIs locally- install Apache and the rest.
    > There's integrated installers that put all three of them into one windows
    > installer. Php-triad is the name of one of them i think.
    >
    > note- this is for setting up a local testing server-
    > You can actually enter the info for your remote "real" server into the
    > testing server part of the site definition- and connect directly to your
    > remote host and real MySQL database. It can be slow however...
    >
    >
    > --
    > Team Macromedia Volunteer for Dreamweaver
    > Certified Dreamweaver MX Developer
    >

    joey Guest

  8. #8

    Default Re: MySQl/PHP

    "Treize13" <gwilson2002aol.com> wrote in message
    news:beiebu$l85$1forums.macromedia.com...
    >
    > Which would be better to use for
    >
    > Windows Binaries
    > All Windows binaries can be used on Windows 98/Me and on Windows
    NT/2000/XP.
    >
    > PHP 4.3.2 zip package [6,107Kb] - 29 May 2003
    > (CGI binary plus server API versions for Apache, Apache2 (experimental),
    > ISAPI, NSAPI, Servlet and Pi3Web. MySQL support built-in, many extensions
    > included, packaged as zip)
    > md5: e1afea6341d97e8160bd7d93712721ec
    The above is for Apache.


    > PHP 4.3.2 installer [1,035Kb] - 29 May 2003
    > (CGI only, MySQL support built-in, packaged as Windows installer to
    install
    > and configure PHP, and automatically configure IIS, PWS and Xitami, with
    > manual configuration for other servers. N.B. no external extensions
    > included)
    > md5: cb55d0d9df6a2bf4ba666c27886d12cb
    This one is for IIS. As Alan says, it's probably best to develop using the
    same environment as the host.


    Gary


    Gary White Guest

  9. #9

    Default Re: MySQl/PHP

    I found my hosting that it has PHP version is 4.2.3 and MySQL version
    3.23.56. I did create MySQL database user through hosting cpanel. I can see
    there shows connection strings to pick either Perl or PHP...so I will use
    for PHP. Now what should I do the next. Should I go ahead use phpMyAdmin and
    set it up without web server?


    Treize13 Guest

  10. #10

    Default Re: MySQl/PHP

    What everyone is trying to describe here is a TESTING server on YOUR PC,
    this allows you to test your web site OFFLINE without having to upload the
    files to your host to devolop the site.



    Joe
    #



    "Treize13" <gwilson2002aol.com> wrote in message
    news:beimf2$ps$1forums.macromedia.com...
    > I found my hosting that it has PHP version is 4.2.3 and MySQL version
    > 3.23.56. I did create MySQL database user through hosting cpanel. I can
    see
    > there shows connection strings to pick either Perl or PHP...so I will use
    > for PHP. Now what should I do the next. Should I go ahead use phpMyAdmin
    and
    > set it up without web server?
    >
    >

    joey Guest

  11. #11

    Default MySQL/PHP

    I already set up MySQL user and password in my hosting control panel. Should
    I require to set up with phpMyAdmin? or Use connect with MySQL-Front version
    2.5 program? I need to know where can I connect MySQL and PHP into
    Dreamweaver MX database before I will create to build login page.


    Treize13 Guest

  12. #12

    Default Re: MySQL/PHP

    phpMyAdmin is pretty easy to use .. set up your database in there. And you
    will need to set up the connection to the database in DMX in the Database
    Connections panel. For some great setup instructions, visit
    [url]http://www.dreamweavermxsupport.com[/url]

    --
    Nancy Gill
    Team Macromedia Volunteer for Dreamweaver MX/UltraDev
    [url]http://www.macromedia.com/go/team/[/url]
    BLOG: [url]http://www.dmxwishes.com/blog.html[/url]
    Co-Author: Dreamweaver MX Instant Troubleshooter (coming soon !)
    Technical Editor: Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP Web Development

    "Treize13" <gwilson2002aol.com> wrote in message
    news:bept70$dik$1forums.macromedia.com...
    > I already set up MySQL user and password in my hosting control panel.
    Should
    > I require to set up with phpMyAdmin? or Use connect with MySQL-Front
    version
    > 2.5 program? I need to know where can I connect MySQL and PHP into
    > Dreamweaver MX database before I will create to build login page.
    >
    >

    Nancy Gill Guest

  13. #13

    Default Re: MySQL/PHP

    Thanks, phpMyAdmin that I am really not understand how to set the tables,
    fields, etc etc. I am confusing so many words that I don't understand those
    meanings.

    The follow the steps:

    1) set up MySQL database with user and password
    2) set up in phpMyAdmin to create new table..(?)
    3) Go to DWMX to set up server behavior
    4) set up My SQL connection

    right?



    Treize13 Guest

  14. #14

    Default Re: MySQL/PHP

    Hi, it's me again. I wonder to know if I can allow to use 2 seprated site
    definition, one for login control with php and one for normal as html. Does
    this work? I was thinking if it is possible to set site for to build with
    localhost for login system and other site for normal with public_html.
    Thanks.


    Treize13 Guest

  15. #15

    Default Re: MySQL/PHP

    On Sat, 12 Jul 2003 23:01:47 +0100, "Dave Millen"
    <postmaster[127.0.0.1]> wrote:
    >On Sat, 12 Jul 2003 16:05:14 -0500, Treize13 wrote:
    >
    >> I already set up MySQL user and password in my hosting control panel.
    >> Should I require to set up with phpMyAdmin? or Use connect with
    >> MySQL-Front version 2.5 program? I need to know where can I connect
    >> MySQL and PHP into Dreamweaver MX database before I will create to build
    >> login page.
    >
    I administer all remote MySQL databases with DBManager. You need to
    know the IP address of the database, and your username and password,
    you can put these into DBManager. You can define an unlimited number
    of such connections. With a broadband connection, I can administer the
    databases as if on my machine (don't laugh - I live in Wales.
    Broadband is a novelty here. We've only just had electricity!).

    DBManager is free!

    [url]www.dbtools.com.br[/url]


    Paul Taylor
    Paul Taylor Guest

Similar Threads

  1. Replies: 2
    Last Post: February 14th, 10:54 AM
  2. Replies: 1
    Last Post: January 23rd, 12:06 PM
  3. Replies: 0
    Last Post: January 29th, 02:03 PM
  4. Replies: 1
    Last Post: January 27th, 02:49 AM
  5. Replies: 0
    Last Post: January 24th, 10:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139