Amateur night PHP FTL

From Visual Basic to GNU C, this is the place to talk programming.

Moderators: SecretSquirrel, just brew it!

Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 12:37 am

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.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37475
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 8:44 am

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
SecretSquirrel
Gerbil Jedi
Gold subscriber
 
 
Posts: 1686
Joined: Tue Jan 01, 2002 7:00 pm
Location: The Colony, TX (Dallas suburb)

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 8:58 am

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?
Deanjo
Gerbil XP
 
Posts: 367
Joined: Tue Mar 03, 2009 11:31 am

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 9:02 am

"Amateur" and "PHP" are tautological, no?

/languagebigot :wink:
Think for yourself, schmuck!
i5-2500K@4.3|Asus P8P67-LE|8GB DDR3-1600|Powercolor R7850 2G|1.5TB 7200.11|1988 Model M|Saitek X-45 & P880|Logitech MX 518|Dell 2209WA|Sennheiser PC151|Asus Xonar DX
bthylafh
Grand Gerbil Poohbah
 
Posts: 3128
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 9:15 am

bthylafh wrote:"Amateur" and "PHP" are tautological, no?

/languagebigot :wink:

*bitchslap*
There is a fixed amount of intelligence on the planet, and the population keeps growing :(
morphine
Gerbil Khan
Silver subscriber
 
 
Posts: 9932
Joined: Fri Dec 27, 2002 8:51 pm
Location: Portugal (that's next to Spain)

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 9:16 am

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.
Under Construction Forever~~~
Kurotetsu
Gerbil Elite
 
Posts: 525
Joined: Sun Dec 09, 2007 12:13 pm

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 10:04 am

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!
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37475
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 10:08 am

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.
There is a fixed amount of intelligence on the planet, and the population keeps growing :(
morphine
Gerbil Khan
Silver subscriber
 
 
Posts: 9932
Joined: Fri Dec 27, 2002 8:51 pm
Location: Portugal (that's next to Spain)

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 10:27 am

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!
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37475
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 10:41 am

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!!!".
Deanjo
Gerbil XP
 
Posts: 367
Joined: Tue Mar 03, 2009 11:31 am

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 12:25 pm

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
Flatland_Spider
Gerbil Elite
 
Posts: 809
Joined: Mon Sep 13, 2004 8:33 pm
Location: The 918/539

Re: Amateur night PHP FTL

Postposted on Fri Feb 15, 2013 12:43 pm

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.
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37475
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Amateur night PHP FTL

Postposted on Sun Feb 17, 2013 2:29 pm

That's good. It sounds like it wasn't doing anything crazy.
Flatland_Spider
Gerbil Elite
 
Posts: 809
Joined: Mon Sep 13, 2004 8:33 pm
Location: The 918/539


Return to Developer's Den

Who is online

Users browsing this forum: No registered users and 2 guests