Jump to content

knowram

Members
  • Posts

    226
  • Joined

  • Last visited

Posts posted by knowram

  1. More info on the problem.

     

     

    There are 5 different servers involved

    Production web server / SQL server (virtual box)

    Old production web server (to be decommissioned)

    Test web server / Mysql server

    1 SQL server

     

     

    From the production box I can connect to the MySQL database and both MSSQL databases. From the old production box I can also connect to the MySQL and both MsSQL databases. But from the test box I can only connect to the MySQL server on its self.

     

    If I look at the log from my router/firewall that is between the test server and everything else I don't even see an attempt to connect. However when I use SQL Server Management Studio Express I do see the connection being established. Which leads me to believe that I am missing something in the configuration of my test server but I don't know what.

     

    Thanks again for the help

     

     

  2. There are 5 different servers involved

    Production web server / SQL server (virtual box)

    Old production web server (to be decommissioned)

    Test web server / Mysql server

    1 SQL server

     

     

    From the production box I can connect to the MySQL database and both MSSQL databases. From the old production box I can also connect to the MySQL and both MsSQL databases. But from the test box I can only connect to the MySQL server on its self.

     

    And yes I have admin access to all these.

     

     

     

  3. All I cant figure is that you have your DB details wrong

     

    This part of the code is an exact copy form the production server.

     

    Can you try
    
    mssql_connect("localhost", "user", "password")
    
    
    See if this works.
    
    You are trying to connect to a database on your server, right?

     

    No the MSSQL server is a different box. Is there something in a configuration file somewhere that lets you connect to remote servers?

     

    Thanks again for the help

     

  4. Here is the connect statement. I am having the problem connecting from a test server. The production server work great.

    The production server is a windows server running IIS. My test box is an apple with Apache installed.

     

    mssql_connect("idc01-netwug.associa.corp", "user", "password") or
     die ("Could not connect to database");
    mssql_select_db("WhatsUp") or
    die ("Could not select database");

     

    Thanks for the help. I am out of ideas.

     

     

  5. I am getting a Warning: mssql_connect(): Unable to connect to server: error and when I look at the log from my router/firewall I don't even see an attempt to connect. Is there some configuration in the php.ini file I need to check or anywhere else? phpinfo() shows a mssql section so i assumed that it was installed correctly.

     

    Thanks for the help.

  6. I changed the port my Apache server running on Mac OSX uses from 80 to 8080 a while back. Now I have changed /etc/httpd/httpd.confg back to using port 80 and have restarted the server but I can still only browse to it on port 8080.

     

    here is the Apache info from phpinfo()

    Apache Environment
    
    Variable	Value
    DOCUMENT_ROOT	/Library/WebServer/Documents
    HTTP_ACCEPT	text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    HTTP_ACCEPT_ENCODING	gzip, deflate
    HTTP_ACCEPT_LANGUAGE	en
    HTTP_CONNECTION	keep-alive
    HTTP_HOST	minihost.local:8080
    HTTP_IF_MODIFIED_SINCE	Mon, 15 Oct 2007 23:43:27 GMT
    HTTP_REFERER	http://minihost.local:8080/
    HTTP_USER_AGENT	Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/522.11.1 (KHTML, like Gecko) Version/3.0.3 Safari/522.12.1
    PATH	/usr/bin:/bin:/usr/sbin:/sbin
    REMOTE_ADDR	172.16.1.10
    REMOTE_PORT	61699
    SCRIPT_FILENAME	/Library/WebServer/Documents/test4u.php
    SCRIPT_URI	http://minihost.local/test4u.php
    SCRIPT_URL	/test4u.php
    SERVER_ADDR	172.16.1.11
    SERVER_ADMIN	[no address given]
    SERVER_NAME	minihost.local
    SERVER_PORT	80
    SERVER_SIGNATURE	<ADDRESS>Apache/1.3.33 Server at minihost.local Port 80</ADDRESS>
    SERVER_SOFTWARE	Apache/1.3.33 (Darwin) PHP/4.3.11 mod_ssl/2.8.24 OpenSSL/0.9.7l DAV/1.0.3
    GATEWAY_INTERFACE	CGI/1.1
    SERVER_PROTOCOL	HTTP/1.1
    REQUEST_METHOD	GET
    QUERY_STRING	no value
    REQUEST_URI	/test4u.php
    SCRIPT_NAME	/test4u.php

     

    Thanks for the help

     

  7. I have having trouble connecting to a MSSQL server. I am trying to connect from a test box. I can ping the MSSQL server from my test box but can't connect. How do I figure out why its not connecting? I copied the exact code from my production box so I know the username and password is correct. Is there someway to get some more details?

     

    Thanks for the help.

     

     

     

  8. I have 2 images that would like to use as a background. The first is going to be used to bake a simple bar at the top of the page. I want this bar to cover the full width of the page and up to the top. Te second is the background image which I want to place under the bar and in the upper left corner.

     

    These are the things I have tried

    body{
    background-image: url('Images/head.png');
    background-repeat: repeat-x;
    }
    
    bground{
    background-image: url('Images/background_compass.gif');
    background-repeat: no-repeat;
    }
    

    As expected I only see the second image.

    body{
    background-image: url('Images/head.png');
    background-repeat: repeat-x;
    }
    
    div.body{
    background-image: url('Images/background_compass.gif');
    background-repeat: no-repeat;
    }
    <body link="black" vlink="black" alink="black">
    	<div class="body">
    	<br>
    	hello</div>
    </body>
    </html>
    

    the compass.gif image is on top of the head image and doesn't go all the way to the edge of the page.

    div.body{
    background-image: url('Images/head.png');
    background-repeat: repeat-x;
    }
    
    body{
    background-image: url('Images/background_compass.gif');
    background-repeat: no-repeat;
    }
    
    <body link="black" vlink="black" alink="black">
    	<div class="body">
    	<br>
    	hello</div>
    </body>
    </html>

    This is the closest I could get. The images are in the right order but there is a gap between the head image and the top and sides of the page.

     

    Any ideas? there must be a way to do this.

    Thanks

     

     

  9. I am trying to set up the ADAuth.php script that I found in the script section. However I am having problems getting it to work. How can I tell whether the script is able to bind to the search user? Also how hard would it be to use encription when sending the username and password?

     

    Thanks for the help

     

     

     

  10. Ok I must be missing something. Here is a test page I set up that isn't working.

    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <script type="text/javascript">
    		var showHide = {
    			eles: '',
    
    			getEles: function(){
    				this.eles = document.getElementsByTagName("*");
    				return this;
    			},
    
    			getElesByClass: function(class){
    				var ret_eles = [];
    				for(x in this.eles){
    					if(this.eles[x].className === class) ret_eles.push(this.eles[x]);
    				}
    				return ret_eles;
    			},
    
    			sh: function(id, class){
    				var classes = showHide.getElesByClass(class);
    				for(i in classes){
    					if(classes[i].id === id) classes[i].style.display = (classes[i].style.display == 'none')? 'block' : 'none';
    				}
    			}
    		};
    		window.onload = showHide.getEles();
    	</script>
    
    <?php
    
    echo '<body>';
    for ($a = "0"; $a <= "50"; $a++){
    echo '<table border="0" cellspacing="0" cellpadding="0">
    	<tr>
    		<td width="50" align="right">
    		<ul class="checklist1">
    			<li class="list">
    				<span class=label onClick="showHide.sh('.$a.', showHide)" >
    					<div id="'.$a.'" class="showHide">
    						up
    					</div>
    					<div id="'.$a.'" class="showHide" style="display:none;">
    						down
    					</div>
    				</span>
    			</li>
    			</ul>
    		</td>
    	</tr>
    	<tr>
    		<td>
    			<div id="'.$a.'" class="showHide" style="display:none;">
    			hello<br>
    			hello<br>
    			hello<br>
    			hello<br>					
    			</div>
    		</td>
    	</tr>
    </table>';
    }
    echo '</body>';
    ?>

     

     

  11. With help from people on this form I am using the following script to Show or hid sections of my site depending on what links are hit simulating expanding folders in windows explorer. My problem is my site has gotten more complex and now has 20 some of these expanding areas and has become really slow in IE 6. Both firefox and Safari handle it as just like windows explorer. Is there anything I can do to make it work better in IE?

     

    Thanks for the help

     

    <script type="text/javascript">
    	document.getElementsByClassName = function(clsName){
        		var retVal = new Array();
        		var elements = document.getElementsByTagName("*");
        		for(var i = 0;i < elements.length;i++){
            		if(elements[i].className.indexOf(" ") >= 0){
                		var classes = elements[i].className.split(" ");
                		for(var j = 0;j < classes.length;j++){
                    		if(classes[j] == clsName)
                        		retVal.push(elements[i]);
                		}
            		}
            		else if(elements[i].className == clsName)
                			retVal.push(elements[i]);
       			    }
        			return retVal;
      		}
    
              function showHide(id, clName) {
                     var classes = document.getElementsByClassName(clName);
                     for(var i = 0;i<classes.length;i++){
                          if(classes[i].id == id){
                             classes[i].style.display = (classes[i].style.display == 'none')? 'block' : 'none';
                          }
                     }
              }
              </script>

     

     

  12. I have 3 tables a, b, and c. I know what is in table a and I want the related info from table b and a. Is there some what to do that in one query?

     

    Some thing like

    $result = mssql_query("select c.info from c and b.get from b
    					JOIN b
    					ON c.index = b.index 
    					JOIN a 
    					ON b.index2 = a.index
    						WHERE a.get = '12115'") or
    				die ("Can't get info");
    
    while ($aDevice = mssql_fetch_array($result, MSSQL_ASSOC)){
    	echo'<pre>';
    	print_r($aDevice);
    	echo'</pre>';
    }

     

    that probably doesn't make any sense but I hope someone gets the idea.

     

    Thanks for the help

     

  13. I am trying to set up php to work with IIS on a windows server. php seams to be installed and working properly i can look a phpinfo() page but it isn't finding the configuration file. At first it said it was using one that was installed in C:\Program Files\PHP even thought the one i want to use is in C:\PHP. So I deleted the C:\Program Files\PHP directory thinking it would find the one in the C:\PHP directory but no luck. What do i do?

     

    Thanks for the help

  14. I am using header content-type to download an excel file.

     

    header("Content-type: application/x-msdownload");
    header("Content-Disposition: attachment; filename=NetworkInfo.xls");
    header("Pragma: no-cache");
    header("Expires: 0");

     

    Is there any way to set the column width?

    Thanks for the help

     

  15. I am new to javascript and I was hoping someone would help me edit this code.

     

    I found this simple show / hide code at

     

    http://www.movalog.com/archives/code-snippets/javascript-toggle-visibility

    <script type="text/javascript">
    <!--
    function toggle_visibility(id) {
    var e = document.getElementById(id);
    if(e.style.display == 'none')
    e.style.display = 'block';
    else
    e.style.display = 'none';
    }
    //-->
    </script>
    
    <a href="#" onclick="toggle_visibility('foo');">Click here to toggle visibility of element #foo</a><div id="foo">This is foo</div>
    

    i would like to use it to show different things on a page depending on what link is clicked. something like this

    <a href="#" onclick="toggle_visibility('foo1');">Click here to toggle visibility of element #foo1</a><div id="foo">This is foo</div>
    
    <a href="#" onclick="toggle_visibility('foo2');">Click here to toggle visibility of element #foo2</a><div id="foo">This is foo</div>
    
    <a href="#" onclick="toggle_visibility('foo3');">Click here to toggle visibility of element #foo3</a><div id="foo">This is foo</div>
    

     

    Thats easy enough but is there a way that I can make it hide what is not clicked? so if I click foo1 and then click foo2 when I click foo2 it will hide foo1? If there is already something like this outer. please send me a link

     

    thanks for the help

     

     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.