
dlebowski
Members-
Posts
262 -
Joined
-
Last visited
Everything posted by dlebowski
-
Thanks for the reply. Are you telling me to run : mysql_close() After each query? Or change something on sql server? What about "mod_limitipconn.c"? Will this help?
-
I have an application that runs a mysql query every 2 seconds a user is on the page. When I do a netstat to see my active internet connections, I will some times have one person with over 100. This creates huge load problems on my server (and I have a pretty fast dedicated server) My question is, how can one limit this? Can apache do something? I really need help with this! Thanks in advance.
-
Hi Thorpe. This is a live bidding application for an auction company. It has to be every second unfortunately. I have the AJAX running a small php script every second. Doesn't Java and Flash basically work the same way in that it is running the script every second to get real time data updates? So essentially the load will be the same?
-
I have a situation that requires someones expertise on AJAX. I currently have an online application that needs to be updated real time. So, I am using ajax to do a DB query every 1 second. There is only one record in the DB that gets updated real time and these ajax requests just query the data from that one record. There can be up to 80 individuals logged in and viewing this page. All of them hitting my server every 1 second with AJAX. Is this going to create too much of a drag on the resources on my server? If so, would Flash or Java be a better option? And if so, how do those technologies work? Don't they have to make the same requests to the database every second as well? Wouldn't the server load be the same? I am really in desperate need of figuring this out soon! Any suggestions or comments would be welcomed! Thank you. Ryan
-
http://php-dkim.sourceforge.net/ Has anyone had any experience with this?
-
I was thinking about using PHPMailer because it supports DKIM. Are there any particular steps I need to take to prevent someone from hacking it and sending out emails? Is there anything I need to worry about when using it?
-
I have tried installing dkim-milter on my server running Centos 5. I have had no luck getting this to work. I want all emails sent from my domain to have DKIM in the header. Can someone point me in the right direction on how to get this done? Thank you in advance.
-
Thanks again for your help. Here is how I actually got it to work the way I wanted it to. I just inserted the $query variable into the "message" portion of my email function. Worked great! $query = ''; while ($row33 = mysql_fetch_array($result33)) { $query .= ' <tr><td style="text-align: center;"> ' . $row33['LotNumber'] . ' </td><td> ' . $row33['LotTitle'] . ' </td><td style="text-align: center;"> ' . $row33['SellingPrice'] . ' </td><td style="text-align: center;"> ' . $row33['LotQuantity'] . ' </td></tr> '; } print $query;
-
I have the mail() fuction working fine without this code. My dilemma is that I don't know how to put that while loop into a variable. If you can help me with that, then this thing will be solved. Thanks so much for your help. Ryan
-
That is great. I am closer now. Thank you. Now how do I get the "message" portion of the mail() function to allow me to insert that? It does like a lot of php in the message body.
-
Right, that is why I was asking what I need to do from here. I wasn't sure someone else had ran into this and had already came up with a solution. Thanks for the quick reply.
-
I want to email my customers a list of stuff they bought. I figure out that I have to use the implode function to get that to work. My question is how do i get it so that it will put the data in a table format so each entry is on it's own line? include("dbinfo.inc.php"); mysql_connect("localhost",$uname,$pword) or die("cannot connect"); mysql_select_db("$database")or die("cannot select DB"); $query33="SELECT LotNumber, LotTitle, SellingPrice, LotQuantity, Buyer FROM lots WHERE Date='2009-12-06' and Buyer='1821'"; $result33=mysql_query($query33); $num33=mysql_numrows($result33); mysql_close(); while ($row33 = mysql_fetch_row($result33)) { print $comma_separated = implode(" ", $row33 ); }
-
Hey abazoskib. Thanks for the reply. I do not have it assigned to more than one element. For example, I have 6 thumbnails. When I mouseover them, the <div> called "BigOne" changes. I just basically don't want to have to use the full size images shrunk down as thumbnails. Can you give me an example of how to do this?
-
I have gotten my script to do exactly what I want it to do with one exception. I have some thumbnail images that people can mouse over and the actual image is 100px by 75px. That is what I use for my thumbnail and they reside in www.website.com/images/thumbs/image1.jpg. I have the large version of the image that resides in www.website.com/images/image1.jpg. Its actual size is 640px by 480. When I mouse over my thumbnail, I don't want the thumbnail to appear for the larger image, I want the large image to appear instead? Let me know if you need ellaboration. Any help would be great! Thank you. Javascript: <script language="JavaScript"> function Change_Big_One(thumb){ document.getElementById('BigOne').src=thumb.src.replace("_th","") } </script> HTML THUMBNAIL: <div><img src="https://www.website.com/images/thumbs/image1.jpg" class="thumb" onMouseOver="Change_Big_One(this)"></div> HTML LARGER IMAGE: <div><img src="" id="BigOne"></div>
-
I cannot figure out why this will not work for me in IE6. Can anyone help me with this? Thank you in advance. function loadXmlHttp(url, id) { var f = this; f.xmlHttp = null; if (window.XMLHttpRequest&&!f.ie||/^http/.test(window.location.href)) f.xmlHttp = new XMLHttpRequest(); // Firefox, Opera 8.0+, Safari, others, IE 7+ when live - this is the standard method else if (/(object)|(function)/.test(typeof createRequest)) f.xmlHttp = createRequest(); // ICEBrowser, perhaps others else { f.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } if(f.xmlHttp != null){ f.el = document.getElementById(id); f.xmlHttp.open("GET",url,true); f.xmlHttp.onreadystatechange = function(){f.stateChanged();}; f.xmlHttp.send(null); } }
-
[SOLVED] odbc_connect Command Line it Works, Browser Is Blank
dlebowski replied to dlebowski's topic in PHP Coding Help
I managed to figure out what the problem was SELinux (Centos 5) was preventing apache processes from connecting to a the remote MSSQL server. This would explain why my shell accounts could run the php scrip fine. I resolved this issue by running: setsebool -P httpd_can_network_connect=1 This allowed my web server to connect to my MSSQL server and query the data via ODBC. -
[SOLVED] odbc_connect Command Line it Works, Browser Is Blank
dlebowski replied to dlebowski's topic in PHP Coding Help
Here is what it looks like when I run my script test.php from the command line: Now if I browse to it in my browser, it gives me the Warning:. -
[SOLVED] odbc_connect Command Line it Works, Browser Is Blank
dlebowski replied to dlebowski's topic in PHP Coding Help
Yes. It's giving me this error running my php script via a browser: Warning: odbc_connect() [function.odbc-connect]: SQL error: [unixODBC][FreeTDS] Unable to connect to data source, SQL state S1000 in SQLConnect If I run the php script via the command line on my web server, it works perfect. -
[SOLVED] odbc_connect Command Line it Works, Browser Is Blank
dlebowski replied to dlebowski's topic in PHP Coding Help
I now am getting this in my browser with debugging turned on: Warning: odbc_connect() [function.odbc-connect]: SQL error: [unixODBC][FreeTDS] Unable to connect to data source, SQL state S1000 in SQLConnect It will works correctly when I run it via the command line. So this error only occurs when I try to view my page in a browser. Any ideas at all would be appreciated. thanks. -
Do you need the semicolon after ['username']? Before: <p><strong>Thanks for logging in <?php echo $username['username'] ?> After: <p><strong>Thanks for logging in <?php echo $username['username']; ?>
-
All, I have successfully created an ODBC connection from my LINUX web server to a Windows SQL server on our network. When I run my php code from the command line, it works perfectly. When I try and pull the same page up in my browser, all I get is a blank page. Has anyone come across this before? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en"> <body> <? # connect to a DSN "mssql" with a user and password "mypassword" $connect = odbc_connect("mssql", "sa", "mypassword"); # query the users table for name and surname $query = "SELECT DEPT FROM DEPT"; # perform the query $result = odbc_exec($connect, $query); # fetch the data from the database while(odbc_fetch_row($result)) { $name = odbc_result($result, 1); print("$name \n"); } # close the connection odbc_close($connect); ?> </body> </html>
-
Mail() Function Wanting To Send MYSQL Query in Message
dlebowski replied to dlebowski's topic in PHP Coding Help
I want the results of this query, to be sent in the $mail_body. include("dbinfo.$companyname.inc.php"); mysql_connect("localhost",$uname,$pword) or die("cannot connect"); mysql_select_db("$database")or die("cannot select DB"); $query45 = "SELECT itemspurchased FROM items WHERE ID = '1' LIMIT 1"; $result45=mysql_query($query45); $num45=mysql_numrows($result45); while ($row45 = mysql_fetch_row($result45)) { $itemspurchased = $row45[0]; } } -
Mail() Function Wanting To Send MYSQL Query in Message
dlebowski replied to dlebowski's topic in PHP Coding Help
Thanks for the reply. It sends all the HTML over fine. It's the query results that will not go over. -
I have a basic mysql query that will return multiple results using mysql_fetch_row. I want those results to be inserted in the the "$mail_body" portion of the email that is going out. I cannot get this to work. The only thing that will work is if I just use a standard "$variable" variable in the "$mail_body". Can someone me with this? Let me know if I need to elaborate. Thank you. <?php $Name = "Da Duder"; //senders name $email = "[email protected]"; //senders e-mail adress $recipient = "[email protected]"; //recipient $mail_body = "The text for the mail..."; //mail body $subject = "Subject for reviever"; //subject $header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields mail($recipient, $subject, $mail_body, $header); //mail command ?>
-
All, I have my test database and a live database. When I make changes to my test database structure, I want to automatically be able to compare the database structure in my test environment, to my live environment. So if I added a new field to a table in my test database, I want that field to automatically be added to my live environment. I know SQLyog will do it. Are there any other options? Thanks.