Jump to content

mottwsc

Members
  • Posts

    74
  • Joined

  • Last visited

Everything posted by mottwsc

  1. RESOLVED: I scrapped what I was doing and used the table technique found here: http://css-tricks.com/snippets/css/absolute-center-vertical-horizontal-an-image/
  2. When adding background-size: cover, the image is centered and fills the space; but (1) the window is never scrollable, even when the window is resized to something really small; (2) when the window is resized horizontally, the image shrinks both horizontally and vertically, but I'm just trying to make the image recenter and then stop recentering when it gets to a minimum width of 1024px; (3) when the browser window is maximized, the image is cut off on the bottom (I'm trying to have it all shown unless the window is resized vertically), but when the browser is restored down, the full image shows. So, is there an alternative way to do this? Thanks.
  3. I am trying to get a large background image to be centered at the top of the page but also scroll vertically. This should be straightforward given that scrolling is the default. I have the image where I want it to be displayed but the page will not scroll. I commented out two lines in my CSS just in case. Where am I going wrong? Thanks... CSS body { padding: 0; margin: 0; background-color: #ffffff; background-image: url('Homepage.png'); background-repeat: no-repeat; background-position: center top; background-attachment: scroll; /*width: 100%;*/ /*display: table;*/ } HTML !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta NAME="ROBOTS" CONTENT="NOINDEX,NOFOLLOW"/> <link rel="icon" type="image/png" href="favicon.png" /> <link rel="stylesheet" href="/style.css" type="text/css" /> </head> <body> </body> </html>
  4. After some additional research, it looks like it could be done pretty easily in apache using mod_proxy_balancer (https://blogs.oracle.com/oswald/entry/easy_http_load_balancing_with), although this doesn't account for actual load on the servers; it just gives assignments based on counters. Have others used this method with success? Also, I did see some options looking at SourceForge Distributor, balance and pen. Trying to keep the software and implementation costs down as I prove out the concept...
  5. I'm putting up a beta site on a few VPS servers. Server 1 is for log in. When a user hits Server 1, a need to have a simple program to look at things like the CPU utilization, memory usage, and bandwidth utilization at that point on Server 2 and Server 3 and send the user to either Server 2 or Server 3 depending on which server has lower usage. I will have full root / administrative access to the servers. > Does anyone have simple PHP programs similar to this that I could modify? > Where is the best place for this to sit on Server 1? Thanks for any suggestions!
  6. No I do not. However, I decided to use mySQL directly to dump the table and bulk import it. Thanks for the suggestion, though.
  7. I'm using a PHP script to transfer mySQL records in one table one Server A to another table (same table definition) on Server B. I cannot overwrite the existing data in the table on Server B. There are no keys to worry about. The way I'm doing it (see below) takes too long for higher volumes (10K - 100K records). Can anyone describe a fast, efficient way to do this? If it is faster to do something directly in mySQL, please describe how to do that. Thanks! <?php # connect to server A if (!$cxnA = mysqli_connect($serverA, $user, $pw, $db)) { die("Could not connect to MySQL server A"); } # connect to server B if (!$cxnB = mysqli_connect($serverB, $user, $pw, $db)) { die("Could not connect to MySQL server B"); } $sql= "SELECT * FROM tableA"; if (!$result1 = mysqli_query($cxnA,$sql)) { die("error..."); } $num1 = mysqli_num_rows($result1); if( $num1 == 0 ) { echo "no records<br/>"; } else { echo $num1." records<br/>"; while($row1 = mysqli_fetch_assoc($result1)) { extract($row1); $sql=" INSERT INTO tableB ( field1, field2 ) VALUES ( '$field1', '$field2' )"; if (!$result2 = mysqli_query($cxnB,$sql)) { echo "error inserting record<br/>"; } } } ?>
  8. I've figured this out - thanks anyway.
  9. It appears that they are/can be used to re-direct errors when you do not want them sent to the user. I'm trying to determine the pros and cons of one vs. the other. Could anyone be more helpful / specific on this?
  10. I'm using php5 on linux and do not want to send any error messages to the user but instead to a log file. Which is better in general for this purpose: trigger_error or error_log? In certain cases, I'll also send an email notification on error. For this, I'll use error_log. Is this the best way to do this? Thanks!
×
×
  • 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.