Setting Up PHP / Mysql

I'm using osx server 10.5.5.
I'm trying to setup phpmyadmin, and am having a **** of a time. I want to start writing scripts in php, with use of mysql but I can't get them to talk.
I ran a php test by loading into the browser the phoinfo () file, I can see php.ini, but can't find where it is in my system, though I can find the default file in usr/bin
I tried to use an installer for phpmyadmin, but it isn't working, or rather it installed but then i guess this message
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
i've tried all the permutations of users and passwords I can think of, so how do I get past this? I'm assuming it's some config file I need to edit, but where?

When you run the php page that has phpinfo(), at the top it should say where the ini file is located. There should be a php.ini file in /etc. If no "php.ini" file exists, but rather a "php.ini.default" one does, then you can make a copy of the php.ini.default file naming it php.ini instead.
It seems you have mysql running but your root password is wrong when you try and connect. When I setup mysql for the first time I run mysqlsecureinstallation in the terminal, and in the following steps I set the root password. At some point you may want to do that. I believe if you have never set the password for mysql then you don't specify one, you leave it blank. To connect using the mysql client from the terminal I would normally type:
mysql -u root -p
But if no password is setup then you will want to type:
mysql -u root
Try both of those and see what happens. If neither work then try:
mysql -u root -p
again but don't enter anything for the password and hit return.
Are you using a 3rd party installation of php and or mysql, or the default Apple installations?

Similar Messages

  • Setting up PHP & MySQL (MAMP Pro?)

    I recently upgraded to Leopard on my MacBook Pro and plan on purchasing Dreamweaver, then porting my websites over from my PC. I'm now ready to set up Apache, PHP and MySQL on my Mac, but I'm not sure where to start.
    When I was using Tiger, I downloaded a program called MAMP, which installed and configured all these programs. It seemed to work OK, though I couldn't make a database connection. However, that was apparently due to a problem that will be fixed if I purchase MAMP Pro.
    But here's my first question: Has MAMP Pro been updated to work with Leopard?
    Second question: Is MAMP Pro Apple software?
    I thought MAMP was made by a different company... http://www.mamp.info/en/mamp-pro/
    But I just discovered this page http://www.apple.com/downloads/macosx/development_tools/mamppro.html
    Finally, what are some pros and cons of using MAMP versus setting up Apache, PHP and MySQL one at a time? I understand Apache and PHP are already installed on my Mac, but they probably need to be configured. In addition, I'm not sure if they're the latest versions.
    One thing I like about MAMP is that it apparently keeps all these programs relatively separate from the system, presumably minimizing the chance of interfering with my Mac's overall operation. You can delete all the MAMP programs by simply deleting a folder, I believe.
    Thanks.

    Mac comes with a fully functioning Apache web server with all the scripting languages (except VB). You need to enable them in the configuration file.
    You need some light weight UNIX administration skills to do this. Use the system restore disk to set the password for the root account.
    Open a terminal screen from the Utilities folder in Applications. Type "su", press return, then enter the root password you set using the system restore disk.
    Make a backup copy of the Apache configuration file with the following command (type this in with no mistakes and press the return key).
    cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.copy
    Enter the following to open the Apache configuration (type this in with no mistakes and hit the return key).
    /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/httpd/httpd.conf &
    Locate and remove the # comment symbol from the following lines and save the file in /etc/httpd/httpd.conf.
    #LoadModule php4_module libexec/httpd/libphp4.so
    #AddModule mod_php4.c
    Exit the TextEdit application and quit out of the terminal application.
    Put the following web page into a file named greetings.php inside the folder Library/WebServer/Documents.
    <html>
    <head>
    <title>Experiment</title>
    </head>
    <?php
    echo "Greetings";
    ?>
    </body>
    </html>
    Once you have made these changes, you can reboot to activate the changes.
    Put the following into your browser to test the configuration.
    http://localhost/greetings.php
    You should see "Greetings" on a web page titled "Experiment".
    MySQL is a separate server that you need to download and configure to complete your web server.
    I hope this helps.
    Best regards - Greg

  • ANN: Setting up PHP and MySQL for newbies!

    We've recently released two new solution recipes to help
    designers make the
    jump to building dynamic sites. Each solution recipe
    describes step by step
    how to set up PHP and MySQL on your XP or Vista systems. You
    can find them
    on the Solution Recipe page:
    Installing PHP and MySQL on Windows Vista
    Installing PHP and MySQL on Windows XP
    http://www.webassist.com/professional/products/solutionrecipes.asp
    Each of these Solution Recipes include PDFs that you can
    print out or read
    on screen.
    We also have steps outlined for the Mac in PDF format, one
    for 10.4.x and
    the other for 10.5.x:
    10.4.x:
    http://www.webassist.com/media/professional/support/PDFs/InstallingPHP-OSX-10-4_PDF.pdf
    10.5.x:
    http://www.webassist.com/media/professional/support/PDFs/InstallingPHP-OSX-10-5_PDF.pdf
    All content is freely available. Go get'em!
    Best - Joe
    Joseph Lowery
    VP of Marketing, WebAssist -
    http://www.webassist.com
    Author, Dreamweaver CS3 Bible -
    http://www.idest.com/dreamweaver/

    Cool. I've bookmarked it for later.
    Thanks!
    --Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    "Joseph Lowery" <[email protected]> wrote in
    message
    news:ftj87l$nem$[email protected]..
    > We've recently released two new solution recipes to help
    designers make
    the
    > jump to building dynamic sites. Each solution recipe
    describes step by
    step
    > how to set up PHP and MySQL on your XP or Vista systems.
    You can find them
    > on the Solution Recipe page:
    >
    > Installing PHP and MySQL on Windows Vista
    > Installing PHP and MySQL on Windows XP
    >
    http://www.webassist.com/professional/products/solutionrecipes.asp
    >
    > Each of these Solution Recipes include PDFs that you can
    print out or read
    > on screen.
    >
    > We also have steps outlined for the Mac in PDF format,
    one for 10.4.x and
    > the other for 10.5.x:
    >
    > 10.4.x:
    >
    http://www.webassist.com/media/professional/support/PDFs/InstallingPHP-OSX-10-4_PDF.pdf
    >
    > 10.5.x:
    >
    http://www.webassist.com/media/professional/support/PDFs/InstallingPHP-OSX-10-5_PDF.pdf
    >
    > All content is freely available. Go get'em!
    >
    > Best - Joe
    >
    > Joseph Lowery
    > VP of Marketing, WebAssist -
    http://www.webassist.com
    > Author, Dreamweaver CS3 Bible -
    http://www.idest.com/dreamweaver/
    >

  • Problems with recordset in PHP/MySQL setting

    We use Dreamweaver CS5 for creating dynamic pages (PHP pages with MySQL database). We test the site locally on a Windows 7 operating system with EasyPHP as WAMP server.
    We often have a problem in managing the record set.
    The following problem occurs quite often:
    We take a PHP page. We create a recordset. We use a dynamic table or a repeated region to show the results of the recordset. So far so good.
    Then we want to change something to the recordset for example the filter. When editing the recordset, the advanced mode is shown, it is impossible to swith to the simple mode.
    By deleting the recordset the problem is not solved. By deleting and afterwards rebuilding the recordset, syntax errors occur. It seems that the php code for building the recordset didn't dissapear.
    The only solutions till now seems to completely restart with a new PHP page.
    Anyone has a solution for this or anyone did experience the same problem ?
    Thank you very much in advance.
    Ilse 

    You cannot switch to Simple mode in the Recordset dialog box if you have made any changes to the SQL in Advanced mode.
    Opening the Recordset dialog box to edit the settings does occasionally result in the code being inserted again instead of being changed. This appears to be an intermittent bug, which I have experienced myself, and know that others have complained about it, too. As far as I know, there is no solution other than to watch carefully the code that Dreamweaver generates.
    If you don't understand the code, you would be well advised to learn what it means and does. Relying on Dreamweaver to do everything for you severely limits what you can do with PHP/MySQL. Adobe regards the server behaviors as quick prototyping tools, rather than for developing production websites.

  • PHP - MySQL - SET column

    In my sql database I have a set column that works fine.  The user can select multiple options.  However, I am having trouble displaying those options using the record set in dreamweaver.  I want the recordset to find any one of the possible options and display the record, but it's not displaying anything.  Am I missing something here?

    OK, my bad. So a SET is sort of a user defined datatype, where the developer sets the allowable values of the column?  The thing that troubled me is that the example the reference guide gives shows it being used to store multiple values as in the last line here:
    For example, a column specified as SET('one', 'two')         NOT NULL can have any of these values:
    'one'
    'two'
    'one,two'
    So that's not really a problem inherent in a SET column, just a way that it can be misused like any other string column.
    David_Powers wrote:
    bregent wrote:
    I'll just put in my $0.02 that +99% of the time using a SET to store more than one piece of data in a database field is a bad idea. It violates rules of normalization and makes data analysis very difficult.
    Not really. A SET column in MySQL doesn't violate the rules of normalization. It's actually a shorthand way of creating a lookup table - or a linking table, since it creates a many-to-many relationship. Internally, MySQL simply stores a numerical reference to each value. In other words, behind the scenes it's storing a bunch of foreign keys.
    The way you search for a particular option stored in a SET column is to use the MySQL function, FIND_IN_SET().
    SELECT * FROM mytable
    WHERE FIND_IN_SET('whatever', column_name)

  • How to set up a PHP/mySQL "server" in arch?

    Hi,
    I know its a wide question, and i may have to go to different howtos and such, but as this distro is different from the others there might be some differences in that.
    If i want to run a PHP based site in mozilla and the site is hosted in my machine, do i need to do something real strange to make it work ?
    if you can post any link to some info, it wont hurt. and yes i will google anyway!

    sud_crow wrote:If i want to run a PHP based site in mozilla and the site is hosted in my machine, do i need to do something real strange to make it work?
    I am running Apche/PHP/MySQL on my machine and simple to setup. Few things requires to know. It can be done in different way. This is how I do including how to test the server(s). Host name is: "localhost". If anything is missing, please let me know.
    <b>INSTALL:</b>
    pacman -S apache
    pacman -S php
    pacman -S mysql
    <b>APACHE:</b>
    <b>1. </b>Add the following line in /etc/httpd/conf/httpd.conf :
    LoadModule php4_module /usr/lib/apache/libphp4.so
    AddModule mod_php4.c
    AddType application/x-httpd-php .php
    <b>2.</b> Add line in /etc/host :
    127.0.0.1 localhost.localdomain localhost
    <b>3.</b> Edit /etc/rc.conf :
    # Networking
    HOSTNAME="localhost"
    <b>4.</b> Run in terminal (root):
    # /etc/rc.d/httpd start
    <b>5.</b> Edit /etc/httpd/conf/httpd.conf (close "AddModule mod_php4.c"):
    LoadModule php4_module /usr/lib/apache/libphp4.so
    # AddModule mod_php4.c
    AddType application/x-httpd-php .php
    <b>6.</b> Add line in /etc/rc.local (to start at boot):
    /etc/rc.d/httpd start
    <b>Test</b> Apache:
    http://localhost/
    <b>PHP:</b>
    <b>1.</b> Edit /usr/etc/php.ini (open the mysql extension):
    extension=mysql.so
    Test PHP with a simple script:
    <html>
    This is a test. Say hello to Arch:
    <p>
    <body>
    <?php
    $myvar = "Hello Arch Linux";
    echo $myvar;
    ?>
    </body>
    </html>
    Save the file as "test.php" and copy to /home/httpd/html/
    <b>Test</b> PHP:
    http://localhost/test.php
    <b>MySQL:</b>
    <b>1.</b> Run in terminal:
    # /etc/rc.d/mysqld start
    <b>2.</b> Add line in /etc/rc.local (to start at boot):
    /etc/rc.d/mysqld start
    <b>Test</b> MySQL
    Run in terminal (don't enter any password):
    # mysql -p
    <b>Note:</b> Change the /var/lib/mysql directory to user "mysql" if not getting MySQL to run.
    <b>For more information</b> (if new in PHP/MySQL):
    http://hotwired.lycos.com/webmonkey/99/21/index2a.html

  • Snow Leopard, PHP, MySQL, Apache and Wordpress!

    Hi there,
    It's taken me most of the day to work this out, so I thought I should post about it somewhere and here, on the Apple forum, is the ideal location.
    I'm a web developer and love the fact that my MacBook works out of the box with a Unix webserver and with little effort, I was able to set up PHP and MySQL on it. I was delighted to hear that the new Snow Leopard was shipping with the latest and greatest of both. It wasn't quite that easy when it came down to running my test sites, one of which I'm working on is a Wordpress site. Far from being daunting, the solutions to the problems I had were quite simple. The issues arose from the OS not having much exposure yet and not many people having posted their experiences on the web. It was just time consuming.
    I should mention at this point that this does require some tinkering with Terminal, but not so much as to cause damage if you do something wrong.
    First off Apache. Thankfully this is as stable as it always has been. All this requires to activate it is to visit System Preferences > Sharing and switch on Web sharing. Bish-bosh, job done.
    Next off PHP. If you open a Safari window and run your phpinfo.php file (where ever you have it saved. If you don't, they're out there, it's a tiny piece of code which you can use to find out your current php setup). You'll find that everything is superb! PHP 5.3! Excellent! Hang on, scroll down to the date and time section. Whoa! What's this big fat warning here.
    That warning my friend, has been the bane of my misery all day. Wordpress hates it. HATES IT! It causes no end of grief. So what's the multi step, multi program solution?
    Open your php.ini file and add the line:
    date.timezone=Country/City
    (do a Google search for PHP Timezones and you will get the exact settings. It's not so good that it understands every city in the world. My setting was Europe/Dublin).
    That's all. This will solve your issue of the timezone error everywhere. Stop and start Apache (System Preferences > Sharing, tick off and tick back on Web Sharing) and hey presto, error is gone.
    Wait a minute, where the **** is my php.ini file. Unfortunately this is where you have to get your hands dirty. Your php.ini file is a system file which resides in the /etc/ folder. Open a terminal window and type exactly the following:
    cd /etc/
    cp php.ini.default php.ini
    This makes the php.ini file from the default. This protects the original so if you ever need to create a new copy or if you make a mistake in the next steps, you can start again.
    Next I'm going to tell you how to edit this file. This uses a program called vi (there are GUI editors out there that will save you this heartache, so if anyone knows any, please post in response. I think TextWrangler is one).
    First you need to set the php.ini file so you can edit it. Type in exactly as follows:
    sudo chmod 777 php.ini
    Sudo is the superuser commmand. It may not be needed, but stick it in anyway. If you are asked for a password, put in your normal password (that you would be asked for say if you were installing something you downloaded).
    At the next prompt, type in:
    vi php.ini
    This will open the php.ini file. Using the up and down keys, find a blank line in the file. You will notice that alot of the lines start with ';'. These are commented lines. Once you find a blank line, press 'i' to insert text. Your screen will now say '-- INSERT --' at the bottom in red. Type the following in exactly (you will NOT be able to cut and paste):
    ; Set PHP Default Timezone
    date.timezone=Europe/Dublin
    Substitute "Europ/Dublin" with your own timezone. When you are done, press escape. Now type in the following:
    :wq!
    The colon is important (not a typo on my part) as this tells vi you are going to run a command. You should now be back at your prompt. Now you need to reset the permissions on the file. Type the following:
    sudo chmod 444 php.ini
    And that's it. That's your PHP setup and finished. If you run your phpinfo.php file now, you should see your timezone under the date and time where you were getting the error before.
    Now the MySQL. This is a bit of fun because, even though MySQL ships with the system, it's not exactly set up correctly! So once again into terminal.
    This time go to the local directory:
    cd /usr/local/
    If you type in:
    ls -al
    You'll get a directory listing. This has the MySQL folder listed as mysql-5.0.77-osx10.5-x86 (or something! I did that from memory!). This IS the MySQL folder but if you, like me, had previously set the MySQL Preference Pane in your System Preferences, then it won't be able to access this. Type the following command:
    sudo cp -R /usr/local/mysql* /usr/local/mysql
    This should copy everything into a folder called mysql. It takes a couple of seconds (first time on my machine it was a good 20 seconds) to run so be patient. Now you need to do the following:
    sudo chown mysql:mysql /usr/local/mysql
    This sets the owner and group of the mysql files to 'mysql'. If you go back to your MySQL preference pane in System Preferences, you should now be able to start it (something weird about it makes it require to close and reopen the System Preferences window before it can open the MySQL pref pane. This is normal, just click ok).
    The bit that got me here, is that I thought that my activation of the MySQL was actually a new install. I tried everything to change the root user and password for MySQL but in fact, if you had it installed on Leopard, prior to upgrading to Snow Leopard, all your users and passwords are the same. If you HAVEN'T installed it before, I recommend you read the Post Installation Customisation (section 2.3) on the manual for MySQL 5.1 on http://www.mysql.com
    So that's about it. All that remains is to test Wordpress. I have phpmyadmin installed (I've heard CocoaMySQL is very good, like iTunes for db's so I'm gonna check that out later) and was able to create the new wordpress database. I changed the settings in the wp-configure.php file to match my setup but nothing worked. I changed the host from '127.0.0.1' back to 'localhost' (a common complaint of the wordpress setup) but no joy. Then I changed the host back to '127.0.0.1' and added the port :3306 (so the full host is '127.0.0.1:3306') and bingo, the install worked, my database setup and my test site worked.
    So that's it! Many of you out there will say, why didn't you just use MAMP. I did use MAMP, but I also got the Timezone issues and it took far more tinkering and hacking to make it work. I decided that, as my lovely MacBook now running lovely Snow Leopard had the lovely newest versions of PHP and MySQL installed, I'd rather get them working than use a runaround with MAMP. I'm a happier camper for it.
    I hope this helps some of you out there. I don't personally have a blog yet, but when I do, I'll post this up there for all to access. I may even add screen shots!!! But seriously, I hope this helps you all out with your installs. It's so handy to have all this stuff straightaway with Snow Leopard, it's just a matter of getting it to work.
    All the best now,
    T

    Hmmmm... I did a clean drive install of Snow Leopard because I used to do it once a year with Windows and hadn't done it in 3 with my MBP.
    First, my httpd.conf file had the line enabling PHP commented out, so when I went to see my simple file with phpinfo(), I saw the source. Saw your post, thought it was the timezone, fixed that (which will probably make wordpress happy when I get it running), and it still didn't work. Looked at the httpd.conf file, found that PHP was disabled by default, fixed that line, restarted the server, and my phpinfo() worked like a charm.
    Also if you want to edit config files, I use TextWrangler's "open hidden files" option.
    But... I have no /usr/local directory at all. Doesn't exist on my machine. Checked the options in the base install and MySQL isn't offered as an option. Checked the optional installs and MySQL isn't there. Even letting spotlight search for hidden files, the only files with MySQL in their name were from php scripts in my web folders.
    There's some stuff about installing/compiling from source.
    http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/
    Dunno if I want to go down that road quite yet.

  • PHP MYSQL and DW Question: Invalid characters and new lines entry/viewing

    Hello all,
    I have followed David Powers' two php/dw/mysql books and I've
    set up PHP
    pages that insert, edit, delete, etc. listings. Everything
    works fine
    except for invalid characters being inserted into the
    database, and then
    displaying with a question mark in firefox.
    Is there a trick to cleaning up the data that a user may
    paste into a
    textbox on a web page for insertion in the database before
    the data is
    inserted or as it is inserted? Em dashes, en dashes, 'curly
    quotes' etc.
    are giving me problems.
    Also, when I enter new lines into the php page while I'm
    typing out
    information for a record, these new lines are not being
    displayed either
    in the database (using phpmyadmin to view) or on the
    resulting details
    pages, even though I'm using nl2br, etc. Is there a way to
    make this
    work reliably?
    Thank you for any help you may give me!
    -John

    Hello all,
    I have followed David Powers' two php/dw/mysql books and I've
    set up PHP
    pages that insert, edit, delete, etc. listings. Everything
    works fine
    except for invalid characters being inserted into the
    database, and then
    displaying with a question mark in firefox.
    Is there a trick to cleaning up the data that a user may
    paste into a
    textbox on a web page for insertion in the database before
    the data is
    inserted or as it is inserted? Em dashes, en dashes, 'curly
    quotes' etc.
    are giving me problems.
    Also, when I enter new lines into the php page while I'm
    typing out
    information for a record, these new lines are not being
    displayed either
    in the database (using phpmyadmin to view) or on the
    resulting details
    pages, even though I'm using nl2br, etc. Is there a way to
    make this
    work reliably?
    Thank you for any help you may give me!
    -John

  • PHP/Mysql issue

    I use Dreamweaver CS3 to create my sites on a Windows/Apache
    Server with PHP5 and Mysql 5. The site works perfectly on my
    testing server at home. On the Web server I'm getting the following
    error which causes the page to not load:
    PHP Warning: mysql_query(): supplied argument is not a valid
    MySQL-Link resource in
    /hermes/bosweb/web248/b2488/ipw.horsehelp/public_html/residents/residents.php
    on line 63
    PHP Warning: mysql_select_db(): supplied argument is not a
    valid MySQL-Link resource in
    /hermes/bosweb/web248/b2488/ipw.horsehelp/public_html/residents/residents.php
    on line 61
    The lines in question are:
    Line 61 - mysql_select_db($database_conn_phh, $conn_phh);
    $query_getSuccess = "SELECT * FROM horses WHERE status =
    'Success Story' ORDER BY horse_barn ASC";
    $getSuccess = mysql_query($query_getSuccess, $conn_phh) or
    die(mysql_error());
    $row_getSuccess = mysql_fetch_assoc($getSuccess);
    $totalRows_getSuccess = mysql_num_rows($getSuccess);
    All of the code is supplied by Dreamweaver. I did not tweak
    the code. I'm not a web developer and what I have found out there
    is still reading greek to me. My connection file is working and
    connecting the database that I have tested.
    Since the above code is throughout the site in one form or
    another it's causing me major headaches. Any help would be
    appreciated.

    This is the first time I've used Adobe products so if the
    following is in the wrong forum (It's the closest one I found so
    far) or the format is incorrect please forgive me.
    I'm new to Dreamweaver CS3 and as I was reading the "first
    steps" it mentions to set up a Dreamweaver site right away. I got
    as far as completing "Site Definition" page under the basic side of
    the setup screen.
    The next screen is "Do you want to work with server
    Technology?"
    There are 2 options - Yes or No. If you select yes a
    drop-down menu appears with several options (but you can only
    select one)...
    Asp Javascript
    Asp VbScript
    Asp.net#
    Asp.net Vb
    Cold Fusion
    JSP
    Php MySql.
    I know nothing about these format and brand new to web design
    so I thought it best to contact GoDaddy (my hosting account) to
    find out what their servers would support. I spoke to a tech rep
    but she wasn't sure.
    She did mention that I have a windows hosting account and Php
    MySql would not work unless I changed to their Linux platform at no
    additional charge.
    The site I have in mind will design with CSS, Liquid layout,
    have some flash, widgets, an inquiry form that clients complete and
    results e-mailed to me, auto-responder, Paypal link and whatever
    else I can discover from Dreamweaver.
    My question being:
    I haven't even begun designing my site because I do not know
    what weather I should select the Yes option and select one of the
    formats mentioned above (if so which one) - or select the No
    option. If I do select the No option at the very beginning, will I
    have problems with my site uploading and working correctly?
    Thank you
    Travis

  • Using LIMIT function in PHP/MySQL Dreamweaver RecordSet

    I want to have a record set that skips the first record, and shows the next three. I've found several suggestions online to use the LIMIT function, but I keep getting "error in SQL syntax." What am I missing?
    mysql_select_db($database_adventcms, $adventcms);
    $query_rsSideNews = "SELECT * FROM tb_news LIMIT 1, 3 WHERE status = 'Live' ORDER BY `date` DESC";
    $rsSideNews = mysql_query($query_rsSideNews, $adventcms) or die(mysql_error());
    $row_rsSideNews = mysql_fetch_assoc($rsSideNews);
    $totalRows_rsSideNews = mysql_num_rows($rsSideNews);

    And there we go. That's the reason I need to go through PHP/MySQL training rather than relying on google searches!

  • Command in php / mysql

    Hello,
    I used to program a lot in ASP, and loved the command
    function.
    However, now that I'm programming in PHP I do not have this
    at my disposal unfortunately.
    How does everyone perform certain actions on forms right
    now?, for example I'm performing an update on a record, but want to
    update all records in the table first by setting a certain field to
    0.
    Any thoughts and ideas / samples are greatly
    appreciated!

    Jasmine2002 wrote:
    > Correct, in ASP however I had the command so I can later
    on easily call up the
    > box and change / add / update my SQL.
    >
    > Do you just write the appropriate PHP for it?, I don't
    really know how to
    > properly write this in conjuction with Dreamweaver.
    I suspect that command is probably a stored procedure.
    Unfortunately,
    stored procedures were added to MySQL only in version 5.0,
    and
    Dreamweaver doesn't support stored procedures in the PHP
    MySQL server
    model. (I've lobbied for support, but it hasn't happened
    yet.)
    Your update is rather unusual, but you should be able to get
    Dreamweaver
    to generate the code for you using the Update Record server
    behavior.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • I need help with DW, PHP & MySQL please.

    Hello, I am new to website development and am trying to set up a form for collecting data on my website and have a question that I can’t find an answer to anywhere else. I was wandering if someone there would be kind enough to help?  I am using Dreamweaver in CS4 and my host already has PHP & MySQL installed on the server that I can use.  My question is: Do I need to download XAMP or WAMP on my computer before trying to connect my form to the server?  Also, do I need to change the page I am putting the form on to .PHP extension or can I just embed the PHP form into an existing HTML page?
    Most of the training tutorials I’ve read don’t start at the most basic beginning but rather expect people to already have a basic knowledge of the topics they are trying to learn.  If anyone knows the best place to get answers to the most basic questions like this one or a beginners guide to working with DW, PHP & MySQL I will gladly go there rather than waste your time on questions you’ve probably already answered a bezillion times.
    Thank you for the help.

    Strictly speaking, you don't need XAMPP or WAMP on your local computer. But if you're serious about getting involved with PHP/MySQL, you should definitely set up a local testing environment with one or the other. It's safer and more efficient. Don't expose all your errors on a live server. You can find instructions on  how to set up a testing environment here: http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html.
    To develop with PHP, you should always use a .php file name extension. Any other choice is very rare.
    There's a tutorial on building your first dynamic website with DW here: http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html.
    For more in-depth help, you might want to consider grabbing hold of a copy of "The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP". (Yes, I wrote it, so it's a bit of shameless self-promotion, but you'll find it answers many of your questions - and probably a lot you hadn't even thought of.)

  • PHP MySQL Error Code 500

    May be someone can help me out with this problem.
    I have setup a new site using PHP MySQL and Dreamweaver 8.02.
    Dreamweaver connects to the database but after creating a
    recordset the recordset cannot be used.
    instead Dreamweaver returns:
    HTTP Error Code 500 internal Server Error
    Any help will be much appriciated.
    Jos

    Hello,
    I have also had the same error - namely that whilst I could connect via ftp, upload/download files, and view database tables, any attempt to view of modify recordsets resulted in error 500.
    Having checked other potential causes (e.g. selection/non-selection use of passive FTP setting, enabling of php, etc.), on the back of posts here I contacted my host and asked if if could relate to mod security, as further investigation revealed that the issue only occurred on sites where mod security had not been disabled (I don't like to disable mod security for obvious reasons - and I'm told you can't do that site by site with apache2 anyway).
    After a few false starts, the problem was resolved - with the following response from my host: "The false positives were being generated by "/_mmServerScripts/MMHTTPDB.php" and that is what we've worked around in the rules. As such, any domain on [servername] using that script in the same way shouldn't generate a false-positive moving forward."
    So it seems the answer (assuming your on an apache server of course) may be to modify the rules to allow full access for MMHTTPDB.php.
    I hope that is of help to some.

  • Apache2, PHP, MySQL Help

    Hi,
    Sorry if this is a bit of a newbie thing todo but I am not too good with solaris configuration yet.
    Can anyone supply a decent step by step and easy tutorial/how-to on how to set up Apache, PHP, MySQL and PHPmyadmin on a SPARC solaris 10 box please...
    Thanks Rob

    Can anyone supply a decent step by step and easy
    tutorial/how-to on how to set up Apache, PHP, MySQL
    and PHPmyadmin on a SPARC solaris 10 box please...Setting up Apache is very easy since all it takes is setting it up. Its installed by default, you can check /etc/apache for an example configuration file. Next to that www.apache.org/docs/ is also a very valuable read.
    <blunt SPAM>
    You could also consider looking into the Java webserver (formely SunONE). Its currently being made available for free with the Java Enterprise System and compares very well to Apache. If you'll also be doing some Java it would be a better choice (IMO its a better choice than Tomcat) and it can also do PHP.
    http://www.sun.com/software/products/web_srvr/home_web_srvr.xml
    http://www.zend.com/sun/?article=/sun/index.php&kind=&id=6179&open=1&anc=0&view=1
    http://www.php.net/
    </SPAM>
    As you'll note I included the PHP website because with the above setup you'd also need to manually setup PHP. If you have the companion CD present you can install the PHP module which will end up on /opt/sfw/apache. This directory will also present you a php.ini example which will need to be placed in /etc/apache as well. Setting it up is basicly following the documentation in the ini file, and the Apache documentation on adding an extra module (/opt/sfw/apache/libexec/libphp4.so).
    MySQL. Also very easy since its shipped with Solaris as well. Look into /etc/sfw/mysql for a README which covers the most essential steps to set it up. In short you'll need to setup a few directories for MySQL to work and optionally (but recommended) copy the default config file to /etc (/etc/my.cnf) which will define certain basic settings. The readme explains. Next you're likely to need the MySQL guide (if you're new with MySQL) which can be located at http://dev.mysql.com/doc/refman/4.1/en/index.html.
    This applies to the version (close enough anyway) which is shipped with Solaris. From personal experience I can say that MySQL 5 will also run very well on Solaris 10.
    Finally the PHPMyadmin... That really is an RTFM issue, once you have your environment setup (Apache and the likes) its likely you only need to copy it to your document root and point your browser to it.
    Hopes this helps somewhat.

  • Php mysql math error when using format(somenumber,2)

    osx 10.5.2, php 5.2.5, mysql 5.0.51 (standard leopard desktop os install)
    Select format(myField,2) as someNumber from myTable ...
    returns data i would expect, formatted as you would expect.
    while looping through the data returned i am calculating a running total.
    for numeric values less than 1,000 results are expected. for numbers gt 1000, php seems to want to truncate the value at the comma. 1,111.11 evaluates to 1; 25,000 evaluates to 25.
    If you remove the format() from the sql statement everything works the way you would expect.
    wrapping the value returned in a floatval() had no effect.
    I am posting this on the apple site rather than php/mysql forums on the off chance that this is a mac centric issue. googling the obvious combinations wasn't productive.

    Sounds like a locale issue.
    Many international formats use comma as the decimal separator, not the thousands.
    There are many levels where this could be set. It could be an OS setting (you don't say where you or, or the locale information of your machine (System Preferences -> International -> Format). It could be in PHP (see: http://www.php.net/setlocale ), or it could be in the database (data could be written in a comma-based table).
    It will take a little research to work out where your specific problem lies.

Maybe you are looking for

  • Installation problem for Oracle 9.2 on Win XP pro

    This is what I have done so far: 1. Launch Setup 2. Specify the Product Key and Home Directory 3. Select Database Option 4. Select Personal Edition (I am a student) 5. Click Install The Installer starts and I see a progress bar on top. It goes till 3

  • How to make copies of delivered class/function module.

    Hello All, Can anybody tell me how/where should I go, to make copies of delivered class "CL_HRMSS_RECRUITING_WF" and the function module "HRWPC_EREC_CREATE_EREC_OBJECT". Also if I am renaming with Z<my-class-name>, and using the method "CREATENBOBJEC

  • I have snow leopard 10.6.8.  Turbotax requires 10.7 or later.  Should I install yosemite

    I have snow leopard 10.6.8.  Will my existing Office work automatically if I upgrade to yosemite?

  • ASR9000 PBTS limitation

    i have some question regarding the PBTS : we can't configure more than 8 TE in the default class ,is this limitation will solved on the coming release    can i have one forwarding class assigned to 32 TE tunnels and traffic loadbalance  through all o

  • How do I make a random order of songs in iTunes?

    it's been a long time since I have made a playlist in iTunes and I know see that creating a playlist with a random order seems no longer possible. No, I DO NOT want to shuffle on my iPod because I have other playlists that I want o segregate from the