Page 1 of 1

Amateur night PHP FTL

Posted: Fri Feb 15, 2013 12:37 am
by just brew it!
Please don't assume that your web app will always be installed at the document root of the web server, or hard-code paths to system utilities that may be installed in a different location on servers other than the one you happen to be testing on.

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 8:44 am
by SecretSquirrel
just brew it! wrote:
Please don't assume that your web app will always be installed at the document root of the web server, or hard-code paths to system utilities that may be installed in a different location on servers other than the one you happen to be testing on.


Cleaning up someone else's mess, are we?

--SS

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 8:58 am
by Deanjo
just brew it! wrote:
Please don't assume that your web app will always be installed at the document root of the web server, or hard-code paths to system utilities that may be installed in a different location on servers other than the one you happen to be testing on.


Let me guess, debian based distro on the server?

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 9:02 am
by bthylafh
"Amateur" and "PHP" are tautological, no?

/languagebigot :wink:

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 9:15 am
by morphine
bthylafh wrote:
"Amateur" and "PHP" are tautological, no?

/languagebigot :wink:

*bitchslap*

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 9:16 am
by Kurotetsu
bthylafh wrote:
"Amateur" and "PHP" are tautological, no?

/languagebigot :wink:


As a PHP developer (though I am branching out) I take some offense. :P

I understand the pain of having to deal with the aftermath of crap/non-existent coding practices. It grants an unstoppable need to punch someone in the face with common sense.

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 10:04 am
by just brew it!
SecretSquirrel wrote:
Cleaning up someone else's mess, are we?

Bingo!

Deanjo wrote:
Let me guess, debian based distro on the server?

Double-bingo!

You guys do PHP web apps for a living? For me it's more of a sideline... in this case, a volunteer sideline, so I'm not getting paid for it. If I was billing by the hour, or if the site wasn't going live today, it would've been a lot less annoying!

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 10:08 am
by morphine
just brew it! wrote:
You guys do PHP web apps for a living?

Need a hand with something?

Also, if you're actually running Debian, I feel for you. The PHP version in there is probably from 1755 AD.

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 10:27 am
by just brew it!
morphine wrote:
just brew it! wrote:
You guys do PHP web apps for a living?

Need a hand with something?

No, immediate crisis averted; I was just curious. But thanks for offering.

morphine wrote:
Also, if you're actually running Debian, I feel for you. The PHP version in there is probably from 1755 AD.

Well... actually the test server was running Ubuntu LTS, so a bit newer. Probably at least from the late 1800s! :lol:

I think the production server is running some RHEL derivative. (Given this, we should've probably considered using CentOS for the test server instead of Ubuntu, but the Ubuntu server was already set up.)

No idea what the original developers of this train wreck used, but I can pretty much guarantee it was something that puts the Apache binaries in /usr/local/apache/bin!

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 10:41 am
by Deanjo
just brew it! wrote:
Deanjo wrote:
Let me guess, debian based distro on the server?

Double-bingo!

You guys do PHP web apps for a living? For me it's more of a sideline... in this case, a volunteer sideline, so I'm not getting paid for it. If I was billing by the hour, or if the site wasn't going live today, it would've been a lot less annoying!


Lets just say that I'm well aware of debian based distros highly annoying habit of saying "F*** YOU FHS!!!".

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 12:25 pm
by Flatland_Spider
just brew it! wrote:
I think the production server is running some RHEL derivative. (Given this, we should've probably considered using CentOS for the test server instead of Ubuntu, but the Ubuntu server was already set up.)

No idea what the original developers of this train wreck used, but I can pretty much guarantee it was something that puts the Apache binaries in /usr/local/apache/bin!


Oh man, good luck moving that thing. Check your dependencies. RHEL doesn't have the number of packages that Ubuntu or Debian does, so watch out for that. pkgs.org is a good place to see where the modules are available.

Hmm... After a couple of searches, I think it might be Solaris. The link below shows one of the install locations to be /usr/local/apache/bin.

http://www.softpanorama.org/Solaris/Pac ... ndex.shtml

Re: Amateur night PHP FTL

Posted: Fri Feb 15, 2013 12:43 pm
by just brew it!
Flatland_Spider wrote:
Oh man, good luck moving that thing.

The move actually went pretty smoothly. The hard-coded paths were apparently a misguided attempt at implementing a non-essential feature that was broken on multiple levels so we basically just ripped it out, and all other required packages were already present.

Re: Amateur night PHP FTL

Posted: Sun Feb 17, 2013 2:29 pm
by Flatland_Spider
That's good. It sounds like it wasn't doing anything crazy.