Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Spork52
  • Content: Threads
  • Order by date
  1. Spork52

    str_replace doesn't work when subject is array of arrays

    Is str_replace supposed to work when the subject (haystack) is an array of arrays, not just a simple array? Here's an example: $old_array[0] = array("needle1","needle2","needle3"); $old_array[1] = array("needle4","needle5","needle6"); $new_array = str_replace("needle","pin", $old_array); echo...
  2. Spork52

    Is this secure? Serving content from two servers with SSL

    Is there any reason the following setup wouldn't be secure? Server 1: - Shopping cart system that accepts credit cards. - ASP, IIS, unknown database, SSL. - I have very little access to this server. Server 2: - Used to customize additional content for Server 1 (cannot be done on Server 1...
  3. Spork52

    PHP session vars time out after only a few minutes.

    I have a PHP site on a shared host (PHP version: 5.3.3-7.1+hw2). The session variables (e.g.: $_SESSION["some_variable"]) usually time out too fast (under 5 minutes). On the local test server (PHP 5.4.10) there is no problem. The hosting tech support guys are no help. phphinfo (below) shows...
  4. Spork52

    $$ variable variables not working with foreach loop

    I'm trying to loop through an array of variable names to grab values from a form and assign the values to variables. It's not working--none of the form values get picked up. Here's what I've tried: $field_list = array("field1","field2",etc.) foreach ($field_list as $value) { $$value =...
  5. Spork52

    MySQL from remote server: Catastrophic Error

    My ASP website connects to a remote MySQL server like this: connectstring = "Driver={MySQL ODBC 3.51 Driver}; Server=myserverip; Port=3306; Database=mydbname; USER=myusername; PASSWORD=mypassword;" Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open(connectstring) After...
  6. Spork52

    Implicit conversion varchar to money not allowed?

    Documentation for T-SQL says that the conversion from varchar to money is implicit (http://msdn.microsoft.com/en-us/library/ms187928.aspx see chart about 1/3 down the page). But, when I try inserting into a money column like this: sql = "INSERT INTO myTable (myMoney) VALUES ('" &...
  7. Spork52

    QUERY SPEED: IN vs. NOT IN

    I've got to update records in a table containing about 210,000 records and I'm curious if different versions of the query will make much difference in the time it takes to execute. Specifically, is it better to use IN with a subquery that returns a large recordset or NOT IN with a subquery...
  8. Spork52

    CSS Menu: Need link to work when over <li>, not just text

    I'm working on an CSS menu but I've hit a couple of problems: 1) I want the links to work and the text color to change when rolling over anywhere in a <li>. RIght now, this only happens if the cursor is over the text. Is there some way to do this with CSS only (no images and no Javascript)? I...
  9. Spork52

    Update MySQL Query Cache once per day?

    I want queries and their results to cache, but get updated once per day. I was going to use PHP to add a sort of dummy date string to queries, so that they change every day: "start of query WHERE ".date("d") = date("d")." AND rest of query" But I don't want to kludge all my queries. There...
  10. Spork52

    Japanese characters display incorrectly (ASP, MySQL5)

    I've got an ASP page that retrieves and displays text from a MySQL5 DB. The text is in English and Japanese. Works fine on the production server. On the development server the Japanese displays as gibberish (E.g., €šã‚‚ç´?å¾—ã?®å“?ã?žã‚?ã?ˆã?¨ï¼“æ‹?å ?ã??ã‚?ã). The page uses the same connection...
  11. Spork52

    Loading CSS Style Sheet with XMLHTTP is erratic

    I'm using XMLHTTP to load the output of an ASP page that contains dynamically created CSS. The CSS modifies existing CSS that is imported to the head section via @import. The ASP page gets data from a MySQL database on a different host. JavaScript is the only scripting language available in the...
  12. Spork52

    MAMP Apache virtual directories not working for PHP

    I am using MAMP (version 1.7) to test PHP sites locally. I set up an alias in the Apache http.conf file. It works properly when I am browsing the directories, but includes in my PHP files don't work. E.g., if I set an alias like this Alias /mysite.com/website/aliasfolder/...
  13. Spork52

    Virtual directories for multiple sites with common code?

    I have several PHP sites which use common code (about 90% of the code is the same). All the sites are hosted on a dedicated Windows server. Is there any reason I can't put the common code in a single directory and then use virtual directories in each site to access the code? If so, where...
  14. Spork52

    session_start() error: No such file or directory

    My customer's host was bought out and the site was transferred to a new server. Since then, most of the time I get the following server error when session_start() is on the top of certain pages (this does not happen on all pages, and it does not happen every time on the affected pages)...
  15. Spork52

    Hash (#) symbol for commenting, or . . . ?

    Recently a hosting company tech who was trying to fix a server issue changed the code on one of my pages (without permission and without telling me!) from session_start() to #session_start() This change did not produce an error, and the effect seemed to be the same as commenting out the line...
  16. Spork52

    Is it possible to get bi-weekly subtotals using SQL?

    I have a table of dated invoices. I would like to display bi-weekly sub-totals of invoice amounts. E.g.: 1/1/9 - 1/14/9 $500 1/15/9 - 1/28/9 $392 etc. The starting date (1/1/9 in the example) is variable. Is this possible with a SQL query? Or, will I have to do the summing with, say...
  17. Spork52

    ASP session variable security question

    I was told by an MS engineer that every time the browser connects to the server the session variables are sent to the server from the browser (well, actually references to the session variables) and that the way to prevent session hijacking is to force an SSL connection at all times. So, I am...
  18. Spork52

    Code runs on ASP page but fails in vbs scheduled task

    I have some code which sends out emails. It runs fine if I put it in an ASP page and then browse to that page. But, when I put the code in a vbs file and try running it as a scheduled task, it generates this error: Microsoft VBScript runtime error: Object required: 'Server' The line generating...
  19. Spork52

    UTC to Local Datetime (how to update timezone table)

    Well, this may or may not be a SQL question but . . . I'm using the timezone functions referenced in the second post of this thread: thread183-1262278 (thanks bborissov) but I don't understand how to update the timezone table. The codeprojects post says: "The tbTimeZoneInfo table contains...
  20. Spork52

    While Wend vs. Do While Loop

    Am I correct that vbScript does not have a command for exiting a While Wend loop? Should I use a Do While Loop instead if I want to have an exit condition? Is there any functional difference that I should be aware of? I'm looping through record sets like this: While NOT rsSomeData.EOF . . ...

Part and Inventory Search

Back
Top