I hate having the password for my database out in the open. Anyone who gets a look at my code has access to the password. What can I do to secure it so my PHP scripts can access it but it's harder to find? I thought about storing it in a file, but if you've got read access to the file you've got read access to the password. Encryption is the next thing I thought of, but my script would have to do the decryption. Once you have that info, what's to keep you from using it? How can I …

Member Avatar
Member Avatar
+0 forum 4

I'm working on a database install/configuration page where the page asks the user for the database credentials, his software credentials, and a few other options and then proceeds to attempt to create and/or populate the database. There are four main sections: Data entry, database table creation, database population (for certain defaults), and configuration file writing. My question is what would be the best way to proceed from section to section? If one section fails, should the install script detect the failure and then proceed from the beginning of that part, or if the install fails, should the script remove what …

Member Avatar
+0 forum 0

I had a bit of a problem with my PHP coding tonight, and after playing 3 hours of Wii and heading back to the computer, I figured out the problem. (Newbies: This is a sound troubleshooting technique. Not necessarily playing Wii, but doing something totally different.) I've got a question now: If one page calls another and the other page calls the first, what will the server do to prevent a D.O.S. situation? On my machine, Apache hits 100% CPU utilization and stays there until the cooling fan turns on and I shut it down.

Member Avatar
Member Avatar
+0 forum 2

I'd like a free tool that I can give different pieces of information and have it go and peruse my code base and generate a report. Is there such a tool out there? I'm thinking something along the lines of a spider that can fill in form data (when instructed) and give me the result, and produce a report of what it gets. The updates script on my webpage is based upon a weblog engine I'm writing, and it's getting large enough where it's hard to test every code path before release.

Member Avatar
Member Avatar
+0 forum 3

The Mozilla browser (and at least Netscape 4.8) has a feature where the bookmarks are accessible via a dropdown menu on the left side of the "bookmark bar" or "Personal Toolbar Folder." Firefox doesn't have this (by default), and I haven't found an option to enable it. I don't want it expanded all the time like pressing "Control-B" does, I just want it to expand when I click on it.

Member Avatar
+0 forum 0

I'm working on learning how to use regular expressions, and have found a conversion that has me stuck. Given the statements: [quote] 1. pi=3.14 and pie 2. pie and pi=3.14 [/quote] How do I match pi and turn it in to 3.14 without also catching pie? This is user input, so I can't rely on position in the string. My attempt was: s/pi\W/3.14/g That almost worked, but the \W ate the equals sign so I got: 3.143.14 and pie Thanks in advance for any help. (This is not homework, but it is school related.)

Member Avatar
Member Avatar
+0 forum 3

When viewing the index page of the code snippet library, I usually find the title of the snippet the most useful description of what it does. However, the title is not emphasised, so it's not always easy to locate it. By increasing the size of the font for the snippet title, it would decrease the amount of time spent searching (looking) for the title which is a good thing. After the change, some titles would likely need multiple lines that didn't before, but there are some that already need the multiple lines and Mozilla at least doesn't expand the box …

Member Avatar
Member Avatar
+0 forum 3

How do I change the table background color with valid HTML 3.2 code? The browsers I use (the big four--IE, FF, Opera, Netscape) had no problem with the BGCOLOR tag, but that's for HTML 4, not HTML 3.2. If at all possible I'd like to avoid CSS, nothing personal but it's just another layer to learn and screw up.

Member Avatar
Member Avatar
+0 forum 7

Hello, I installed PHP 5 on my Server 2003 machine with IIS and got that working properly. I want to connect to my school's MS-SQL student database, but PHP balks when it hits "mssql_connect" (or whatever the statement is). How can I set this up so I can actually connect to the database? Apparently I need a file that's included with SQL Server (which I don't have) in order to get PHP to do this. Is there a way to get this file (nwtdb--something) so I can connect the database? The whole motivation with this is being able to write …

Member Avatar
Member Avatar
+0 forum 11

I'm looking for more information for a research paper I've been working on. After finding about 20 sites, and one very interesting one yesterday ([url]http://www.osnews.com/story.php?news_id=6282[/url]) I'm still short much of the meat of the paper. Does anyone know of any good sites that references keyboard vs mouse (in terms of speed and/or throughput) or text vs graphical interfaces? I would love to find the results of an actual study done concerning typical OS-level tasks (file management and stuff like that) using the command line vs. the GUI. Suggestions? If anyone is interested, I'll be happy to share my bookmarks (and …

Member Avatar
Member Avatar
+0 forum 1

I'm working on a program where you find any path through a graph. When inputting the graph using an array, I found the number in position[0][8][9] gets set as 1 rather than 0 after position[0][9][1] is read in to memory. I've tried both gcc 3.3.2 and 4.0, and get the same result on both. Does anyone else get the same results? [code] #include <iostream> using namespace std; typedef char board[4][9][9]; board maze; //maze is global so we don't have to pass it in every recursive call. int main() { cout << "Position [0][8][9] should be a 0. It is a …

Member Avatar
Member Avatar
+0 forum 1

I've got a program to do for a class I'm taking. I've got most the code written but I can't get the two classes to play together like I want them to. Here is the relavent part of the assignment: [quote] A concordance is an alphabetical listing of all words in a text with a list associated with each word of the line numbers in which the word appears Design and implement two C++ classes for linked lists (see below). Design, code and test a C++ program using the linked lists that reads a text file (using file redirection) and …

Member Avatar
Member Avatar
+0 forum 3

Hello, I've been trying to write a program for a class I'm taking, and have gotten stuck on part of the assignment. The program is to: >9> Create a template for a safe array. The user will be able to designate the element type and the size of the array. The operations will ensure that no access is allowed outside the bounds of the array. Operations will include [], =, and ==. Instantiate several arrays of different types and sizes and show that the safety features work. I have the class and template set up, as shown here: template <class …

Member Avatar
Member Avatar
+0 forum 1

[url]http://perl.plover.com/Questions.html[/url] I found this several years ago. It's been one of my favorite sites to refer to when someone gets impatient about their question. This is from a perl standpoint, but if you've done some programming in any language you should be able to understand it.

Member Avatar
Member Avatar
+0 forum 1

I have a problem I can't seem to fix... (and when that happens, I doubt anyone else can fix it...) I have a Max IC Live 3600A video conferencing card hooked up to the S-Video on my TV. When using Windows default drivers, (and at boot) I get 16 colors. When I install the driver for it (I downloaded them off the Internet) I don't see any color on the screen. Also, (I assume this is related to the drivers) the display is off the left edge of the screen, with about an inch of space on the right. Before …

Member Avatar
Member Avatar
+0 forum 1

Klingon Society, that is... I was watching an episode of DS9 and noticed a female was awarded the award for the "Rite of the Bat'leth" (or whatever it was called). Are Klingon females given the same types of rights as males? Can they too become Warriors? DS9 has made the role of females in Ferengi society perfectly clear, but not Klingons.

Member Avatar
Member Avatar
+0 forum 7

The End.