I can't get a database connection.

Background: I've already built two sites with databases using DW CS6, PHPMySQL, and the same hosting company, so I know they allow remote connections. (I'm developing using the remote host because I've never found a tutorial for how to move it all from local XAMPP to my host - but hey, it's been working fine so far.)
I set up the database using CPanel Databases, added the user and password, no problem. Went into PHP MySQL and added a table, logged out and back in, the table is there as defined.
In DW, I double-checked the testing server, tested the connection, and it connected successfully.
Then I opened a page for editing and added a database connection (all as I had done on the previous two sites that work fine). I named the connection, entered the user, the password and tried to SELECT a database. No luck. HTTP Error 404. I manually added the database (the only one) and clicked test. Again no luck. HPPT Error 404.
I double checked the testing server, double checked the DB information, and nothing seems to work.
Any clue what I'm doing wrong? Thanks so much if you can help.

UPDATE:
Okay, this is really getting weird. As a typcial computer nerd, I know there are many roads to success, so if one doesn't work, try another.
Trying a different solution, I opened a test.php page and wrote the following code:
<?php
echo "<p>Now testing database connection.</p>\n";
$db_server = "localhost";
$db_username = "mcsb831_mbradmin";
$db_password = "***(redacted)***";
$link = mysql_connect($db_server, $db_username, $db_password);
if (!$link) {
    echo "Could NOT connect.<br />\n";
}else{
    echo "Connected Successfully.<br />\n";
    mysql_close($link);
I loaded the page to the server and guess what? I got the message "Connected Successfully."
Hooray! Now I know the database server is running, and the database and user name and password are valid.
I went to the DW MbrConnect01.php file (the name of the CONNECTION file that Dreamweaver creates when I tried to make the connection through DW), and verified the database name, user name, and password were correct -- I copied and pasted them from the code above to make absolutely certain there were no transcription errors. Here's that file:
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_MbrConnec01 = "localhost";
$database_MbrConnec01 = "mcsb831_members";
$username_MbrConnec01 = "mcsb831_mbradmin";
$password_MbrConnec01 = "***(redacted)***";
$MbrConnec01 = mysql_pconnect($hostname_MbrConnec01, $username_MbrConnec01, $password_MbrConnec01) or trigger_error(mysql_error(),E_USER_ERROR);
?>
And guess what?
I GOT THE STINKING ERROR MESSAGE AGAIN!!
(See previous post for the full text of the message.
Yes, I checked the server using an FTP browser for the presence of the required files, and they are there.
Does anyone have a clue what's going on here? I would absolutely love to use DW's DB automation tools, but none of them will work if I can't get a DW connection to work.
I notice that my code uses mysql_connect while the DW-generated code uses mysql_pconnect (which is deprecated), could that be the culprit? How do I fix it if so?
PLEASE, can someone help?

Similar Messages

  • Error while applying a patch "Unable to get the database connection"

    Dear Experts,
    A patch which got successfully applied is failing Production and the error is kind of surprising to me.
    Apps version is 11.5.10.2
    db version is 10.2.0.4
    The worker log file shows
    Time when worker restarted job: Thu Nov 24 2011 22:14:52
    Start time for file is: Thu Nov 24 2011 22:14:52
    adjava -ms128m -mx256m -nojit oracle.apps.fnd.odf2.FndXdfCmp &un_apps &pw_apps &un_apps &pw_apps &jdbc_protocol &jdbc_db_addr table &fullpath_pa_patch/115
    Reading product information from file...
    Reading language and territory information from file...
    Reading language information from applUS.txt ...
      Temporarily resetting CLASSPATH to:
      "/erp/oracle/prodappl/ad/11.5.0/java/adjri.zip:/usr/java14/jre/lib/charsets.jar:/usr/java14/jre/lib/core.jar:/usr/java14/jre/lib/graphics.jar:/usr/java1
      Calling /usr/java14/bin/java ...
    Exception occured
                  Copyright (c) 2003 Oracle Corporation
                     Redwood Shores, California, USA
             XDF(XML Object Description File) Comparison Utility
                            Version 1
    NOTE: You may not use this utility for custom development
          unless you have written permission from Oracle Corporation.
    Unable to get the database connection using schema username/passwordIo exception: The Network Adapter could not establish the connection
    AD Run Java Command is complete.
                         Copyright (c) 2002 Oracle Corporation
                            Redwood Shores, California, USA
                                        AD Java
                                     Version 11.5.0
    NOTE: You may not use this utility for custom development
          unless you have written permission from Oracle Corporation.
    AD Worker error:
    The above program failed.  See the error messages listed
    above, if any, or see the log and output files for the program.
    Time when worker failed: Thu Nov 24 2011 22:14:53
    {code}
    The error says database connection error.  I am able to connect to the database using sqlplus.  I tried to restart the failed worker, but the same error is repeating. 
    Any help would be appreciated.
    Thanks
    qARS
    Edited by: user7640966 on Nov 24, 2011 9:07 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hussein,
    One thing which I noticed now is in the apps Tier the
    tnsnames.ora under $TNS_ADMIN
    shows entry like this:
    PROD=
            (DESCRIPTION=
                    (ADDRESS=(PROTOCOL=tcp)(HOST=<appsServerName>)(PORT=1521))
                    (ADDRESS=(PROTOCOL=tcp)(HOST=<dbServer>)(PORT=1521))
                (CONNECT_DATA=
                    (SID=PROD)
            )Actually *(ADDRESS=(PROTOCOL=tcp)(HOST=<appsIPaddress>)(PORT=1521))* this line in the tnsnames.ora is not correct. In fact the appsServerName should be replaced with dbServerName
    I deleted the tnsnames.ora and reran autoconfig but it is again recreating the same entry.
    Any clue how this can be fixed?
    Thanks
    qARS

  • Problem in getting the database connection from a connection pool

    Hai All,
    I am facing a problem in getting the database connection from a connection pool created on weblogic server 8.1.
    I am using the Oracle database 8.1.7.
    I have configured my connection pool, datasource and JNDI in weblogic.
    In my java program i have the following code to retrieve the connection.
    import java.sql.*;    
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    class jdbcshp1 {
        public static void main(String[] args) {
         Connection connection = null;
         try {
               Hashtable ht = new Hashtable();
               ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");  // Wanna get rid of this.
               ht.put(Context.PROVIDER_URL,"t3://localhost:7001"); // wanna get rid of this.
               // Get a context for the JNDI look up
               Context ctx = new InitialContext(ht);
            javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("myjndi1");
              //Create a connection object
              connection = ds.getConnection();
         The above code is working fine but, the two ht.put statements are creating problem.
    The problem is, after converting the application into WAR file it can be deployed
    on any machine or different port on same machine. My application fails if its deployed on
    weglogicserver which is at different port.
    Is there any way that i can get rid of those ht.put statements or any other way to solve the problem.
    any help is appreciated.
    Thanks in advance
    Pooja.

    Hai All,
    Firstly, thanks for ur reply.
    Even i have seen some code which uses context constructor with out any parameter and works fine.
    i dont understand why its not working for my code.
    When i remove those ht.put code and use context constructor with out any parameter, it giving an error.
    Context ctx = new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("ocjndi");
    connection = ds.getConnection();The error is as follows:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    the above error is forcing me to include those code but if the port number is changed the code will not work. Plz let meknow if some setting have to be made.
    I appreciate all ur valuable help.
    Thanks once again.
    Pooja.

  • Lock: Can't get shadow database entry for root

    Hi all--
    posting this here since I'm having trouble with a Solaris release version and not OpenSolaris. Plus, Rich makes it pretty clear not to bug him with questions about this program! :-D
    Anyway I've been using Rich Teer's lock program on Solaris 10 (and 9) and it's been great. http://www.rite-group.com/rich/sw/lock.html
    But now that I've built a new machine with the latest general Solaris 10 x86 release (Solaris 10 8/07 s10x_u4wos_12b X86) the portion of lock that gets info from the shadow file doesn't seem to work:
    if I enter the incorrect password (to either lock or lock -p) I get:
    lock: Can't get shadow database entry for root: Error 0
    Rich discusses the background on his lock program in this article:
    http://developers.sun.com/solaris/articles/program_privileges.html
    ...but it's over my head.
    Anyone have some guidance on this? I'd really like to use this program in my work environment. thanks! ..and happy Thanksgiving!
    -Matt

    Futher information on this problem OS is Windows XP PRO SP2
    Jer, I have tried stopping and stating the database many times to no avail. I even stop the listener first before trying a restart, see below
    I need some one to tell me what or where to look next Are there log files could I have some sort of trace report that might tell me more etc...?
    M:\oraclexe\app\oracle\product\10.2.0\server\BIN>net start OracleXETNSListener
    The requested service has already been started.
    More help is available by typing NET HELPMSG 2182.
    M:\oraclexe\app\oracle\product\10.2.0\server\BIN>net start OracleServiceXE
    The OracleServiceXE service is starting........................................
    The OracleServiceXE service was started successfully.
    M:\oraclexe\app\oracle\product\10.2.0\server\BIN>netstat -a
    Active Connections
    Proto Local Address Foreign Address State
    TCP HPPavillonXP:135 HPPavillonXP:0 LISTENING
    TCP HPPavillonXP:445 HPPavillonXP:0 LISTENING
    TCP HPPavillonXP:1521 HPPavillonXP:0 LISTENING
    TCP HPPavillonXP:1981 HPPavillonXP:0 LISTENING
    TCP HPPavillonXP:2869 HPPavillonXP:0 LISTENING
    TCP HPPavillonXP:1025 HPPavillonXP:0 LISTENING
    TCP HPPavillonXP:1045 HPPavillonXP:0 LISTENING
    TCP HPPavillonXP:1048 HPPavillonXP:0 LISTENING
    TCP HPPavillonXP:139 HPPavillonXP:0 LISTENING
    TCP HPPavillonXP:1389 by2m6-cs99.msgr.hotmail.com:1863 ESTABLISHED
    TCP HPPavillonXP:139 HPPavillonXP:0 LISTENING
    UDP HPPavillonXP:445 *:*
    UDP HPPavillonXP:500 *:*
    UDP HPPavillonXP:1030 *:*

  • Hey my brother just got an ipod touch and i can't get it to connect to itunes what to i do he's really excited HELP!! :)

    hey my lil brother just got an ipod touch and its saying connect to itunes and its plugged into my computer and im at the itunes website but i can't get it to connect can anyone HELP ME??!! my mom said that she wants his ipod to be connected so that its on my itunes account so i can see if he buys anything.
                                       PLEASE HELP ME !!!
    ~Maddie

    iOS: Device not recognized in iTunes for Windows
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X
    If you  have iTunes 11 turn on the Sidebar.  Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar

  • Just brought home my IPad. I have the MIFI on and it is bringing in a signal to my IMAC but I can't get it to connect to my IPad. Any suggestions?

    I just brought my IPad home but can't get it to connect to my MIFI. The MIFI is on and working as it's sending a signal to my IMac. How do I get it to recognize the MIFI so I can go online with my IPad?

    Does your iPad see you network?  If no, are you broadcasting its SSID?

  • I'm staying at my house in Peru, South America. From my PC laptop I can see my neighbor's wifi service network, but I also have my mini iPad and I can not figure out why I can't get any wifi connection from my area. Is there a setting I need to do?

    I'm staying at my house in Peru, South America. From my PC laptop I can see my neighbor's wifi service network, but I also have my mini iPad and I can not figure out why I can't get any wifi connection from my area. Is there a setting I need to do?

    Yes, I did try to go on my settings>wifi and was waiting for any wifi signals to pick up, but nothing shows up. But on my PC I get a whole list of networks to choose from. Regarding my neighbor, I already have her password that is why I was able to get it on my PC, the problem is that the mini Ipad is not picking any signal neither can it locate me when I go to maps.

  • Bought a new Ipod touch and the WiFi does not connect.  Tried Reset and total Restore, does not connect to Router on DHCP, tried Static manually and still can not get it to connect even though it registers as connected.

    Bought a new Ipod touch and the WiFi does not connect.  Tried Reset and total Restore, does not connect to Router on DHCP, tried Static IP, Subnet, Router and DNS manually and still can not get it to connect even though it registers as connected.  Using Airport for router, latest firmware, no problems with Iphone 4 or Macbook Pro or any other internet devices.  After total Restore (factory settings) tried again, showed connected to router, but does not display "check" next to router but little rotating icon even though the wifi range signal shows connected at full strength and it says it is connected.  Just can't seem to get it to generate an IP.  Any solutions other than turning it on and off again?  Not a Merry Christmas morning.

    Ok, so, a couple of things:  Denisefromwaleska and I have the exact same size/type/color iPod.  Now wishing I'd bought the black one maybe...
    Second, Airport is an Express and I have a second one that I carry with me when I travel.  Tried to connect my Airport Express to the internet and could not although the iPod did recognize the router and tried to connect to the internet for some time, unlike my previous problem.  Updated firmware on my travel router, still could not connect to the internet.  Going to try to set up a manual Static IP on the travel router here in a few and conect through it although I predict the problem will persist. Back on the Christmas Present Airport Express router, it is back in play and working fine for all devices save the iPod. 
    Thanks again for all your help, hopefully I can get a solution in place soon,

  • How can I get an automatic connection to wifi on startup?

    We lost internet connection during snow/ice storm. I have to manually connect to wifi now. How can I get an automatic connection to wifi?

    An 'uninterruptible power supply' that automatically steps in and takes your computer
    off the grid momentarily, will work in cases of brown-out (under-power) & surge (spike)
    and it does so at a fast rate. Most of these also offer a way to customize sensitivity to
    a certain degree, depending on model and should there be a valid reason to do so.
    An old-school surge protector, even if it has a few fancy LEDs, is no protection. And
    for less than a replacement logic board or an hour of authorized Apple repair, the UPS
    is a fairly good investment. Backup battery is user-replaceable in the better made units.
    Most of them offer extra ports that do not use the battery-backup power feature. If you
    need to have more items run when the power switches up/down or out, you'd need to
    consider a larger capacity backup power unit. In some instances, the makers of these
    (for a time, perhaps even now) did caution users to not install more than one UPS per
    room when the same leg may have inadequate grounding, since these can dump the
    excess surge power from several different UPS units and overload the ground.
    That said, the gamble is yours. I've found to have and use these is some protection
    and when away from the computer. Most settings for controlling them appear in OS X.
    No additional software is required. Other settings may be on the UPS front panel.
    Good luck & happy computing!

  • Can i use single database connection in a hole java application?

    can i use single database connection in a hole java application?.I have so many forms to use database connection.

    Theoretically you can. Not only theoretically. I've seen lots of application which only uses one database connection (they were using, oracle or mysql)
    The first reply given here assumed that the answer to
    your question depends only on the design of your
    application. That is not true.Yes it's true. Nothing in the original questions says that you aren't allowed to open or close the single connection that you have. It's looks more like the OP is interested in sharing a connection (i.e having a singleton or a connection pool with only one connection)
    It does also depend on the behaviour of the database
    in the background.
    Most databases have a time out for connections that
    are idle Not a problem. Most implementations of connection pools and applications which keeps a connection open have a timer which calls e.g. select * from dual (if you are using oracle) when the connection has been idle for X minutes.
    (some, like db2 on z/OS, even cancel
    connections, that are not idle, if they are open a
    certain amount of time or have reached a given limit
    of cpu seconds.)You would also have that problem if you had a connection pool with several connections.
    In essence: If you have no control over the time
    your application runs (and therefore your connection
    is open) or over type or the configuration of the
    database you are accessing, you can't do it.See above.
    The closest thing to what you want would be using
    PooledConnections, iif those are supported for the
    database you want to access.Not true.
    Kaj

  • Hi..I have an AirPort Extreme base connected to my DSL Modem and has been working fine. But I recently bought another DSL modem along with the latest Airport Express. With this one however I can't get it to connect to the Internet. Any suggestions?

    Hi..I have an AirPort Extreme base connected to my DSL Modem and has been working fine. But I recently bought another DSL modem along with the latest Airport Express. With this one however I can't get it to connect to the Internet. The light on the Express is flashing green though. Does it mean I have to re-set the settings on Airport Utility? I.e. the old settings haven't been cleared yet. Any suggestions?

    Let's see if I can get this straight.
    You have an Airport Extreme base station that is set to "Create a wireless network" and you have the box checked for "allow this network to be extended"....
    Then you have an Airport Express that is set to "Extend a wireless network" which you selected the name of your network in the box...
    Correct?
    See this Apple document:
    http://support.apple.com/kb/HT4259?viewlocale=en_US&locale=en_US
    The wireless unit on the right of the diagram can be either of the newer Apple base stations.
    Extreme, Express, Time Capsule

  • I'm trying to connect my Kodak ESP c310 to my Mac mini but it's not coming up in my default printers menu and everything else is working. Their on the same network, software and drivers up to date, but can't get it to connect.

    I'm trying to connect my Kodak ESP c310 to my Mac mini but it's not coming up in my default printers menu and everything else is working. Their on the same network, software and drivers up to date, but can't get it to connect.

    You can purchase recovery disks from HP. Here is a webpage showing you how to do that:
    http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&docname=bph07143
    If HP no longer supplies your specific recovery disk, you can usually find one from a 3rd party site, such as www.restoredisks.com for between $20 and $30.

  • Bought New Extreme, works great with Macs but can't get PC to connect

    I just bought a new Airport Extreme this weekend. As promised it was a breeze to set up and things were working well until I tried to connect my TIVO and my work laptop (Windows) to the network I set up. I can't get either to connect to either the base network or the guest network with any level of security set on it. My only success has been to configure the Guest Network without security on it (but I don't like that idea).
    Please help.

    I don't see "Equivalent Network Password" as a selection on the Base Network screen (or any of them for that matter).
    Isn't this the password for my base station and not the wireless network? Maybe that is my problem. I am trying to connect to the network and not the Base Station? I am getting confused. What I really need to do is connect my work laptop (Windows based machine) and my TIVO to the wireless network I've created (Radio Mode selected to Automatic, Channel Selection to Automatic, Security set to WPA/WPA2 Personal).

  • Bought a blue tooth keyboard and I can't get it to connect to the ipad

    I bought a keyboard from bro ketone to use with the iPad. I can't get it to connect on the Bluetooth. Does anyone use this product with their iPad?

    Return your phone and get your money back. There are no unlocked iphones sold in the US...none...zero...nada. All US iphones are locked to AT&T with no way to officially unlock them as AT&T will not authorize the unlocking of an iphone for anyone for any reason. Doesn't matter if purchase the iphone with or without contract, they are all locked to AT&T. Return it and purchase a phone in France. All of the carriers there offer unlocking.

  • HT4623 i bought an ipod touch got itunes downloaded on my computer but can't get it to connect to ipod because it is locked it was locked when i bought it how can i get it un locked

    i bought an ipod touch and i got itunes downloaded on my computer but can't get it to connect to ipod because it is locked it was locked when i bought it how can i get it unlocked?

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

Maybe you are looking for

  • Macbook Pro is running very slow   how do I resume speed?

    Lately, My macbook pro is running very slow.  Mostly when on the internet or even opening and closing programs. How do I "clean up" and resume speed?  It has been updated!  Not sure what is going on. Any help?

  • Photoshop CS5 Crashes When Trying to Print

    I don't know what anyone needs in order to solve this problem so I'm going to paste the details because it seems like what some people are using. Process:         Adobe Photoshop CS5 [344] Path:            /Applications/Adobe Photoshop CS5/Adobe Phot

  • Joining "semi-random" user sets in to defined OBIEE model

    Hi, Where I'm currently working, I'm running in to a situation I haven't faced before. Different groups around the organization keep "lists" of employees, "lists" of customers, etc. These lists often contain not just the unique identifier for the emp

  • Does and how osb 11g support  WLST scripts

    Does 11g support WLST scripts to import and export OSB configuration? Here are the old ones (as I see, dated 03.03.2009). For old 10.3 they worked perfectly. http://www.oracle.com/technology/products/soa/service-bus/collateral/osbsamples.html In new

  • New features of nokia x

    How to use "IT'S EASY TO SWITCH". In Nokia x