nightmare

Inherited a PHP nightmare, where to start?

I've inherited a PHP project that's turning out to be a nightmare. Here are the salient points: All the original developers have left The code has no version control All development and testing was done on the live server by renaming and editing the PHP files. There are multiple copies of each file index.php, index2.php, index3.php etc...

unix shell nightmares

What are the worst/best unix shell nightmares? My favourites are: rm -rf / tmp/foo (deletes everything if you are root; typo :-( ) rm -rf .* (deletes everything if you are root; not just all hidden files) Files in * that are used as parameters, e.g. after touch -- -rf, rm * eventually evaluates to rm -rf foo bar cat foo | sed 's/foo/ba...

Sync nightmare - is it possible to use Merge Replication (or RDA) between 2 SQL CE instances without IIS?

Howdy all, We are faced with the following problem that involves keeping the following in sync: 1 Centralised Server (IIS / MSSQL 2005) Many Desktop WPF clients distributed by ClickOnce Many Mobile clients - (Windows CE) With these thorny constraints: all sync relationships are bi-directional the desktop & mobile nodes require o...

PHP magic_quotes_gpc vulnerability

I've been assigned to one of my company's legacy webapps, and after a day or two of poking around the source, I've found an SQL injection vector similar to the following: mysql_query("SELECT * FROM foo WHERE bar='" . $_GET['baz'] . "'"); I've tried to perform an SQL injection test against this, but it fails, due to PHP's magic_quotes_...

How would you start automating my job?

At my new job, we sell imported stuff. In order to be able to sell said stuff, currently the following things need to happen for every incoming shipment: Invoice arrives, in the form of an email attachment, Excel spreadsheet Monkey opens invoice, copy-pastes the relevant part of three columns into the relevant parts of a spreadsheet te...

How would you start automating my job? - Part 2

(Followup to this question) After surviving the first wave of incoming shipments (9 hours of copy/paste), I now believe I have all the requirements. Here is the updated workflow: Monkey collects email attachments (4 Excel spreadsheets, 1 PDF) Monkey creates central database, does complex calculations (right now this is also an Excel ...

C# Call function in a class from another class

I'll start of by saying I'm not a developer. Yes this is a c# nightmare. But this is a one time tool and thats it. Quick and Dirty it just needs to work and thats it. I have the following code: public string[] get_status(string local_fname) { var dts_doc = new HtmlAgilityPack.HtmlDocument(); dts_doc.Load(...