Web host admin techy question (long).

Reaching the limits of my understanding here. Sorry it's long, you can probably skip to the actual question and read the rest only if you are bored/procrastinating.

A php application I built for work has been moved to a new server with a nice PHP upgrade. It's also been switched from apache to nginx.

When it was on apache, I had an htaccess file that redirected error logging so that I could review it for errors and clean it every now and then. I did this because the default error log was read only and emails about changing that went unanswered. The htaccess also directed everything through index.php and that was the starting point of loading the app and handling requests blah blah, - this admin guy seems to have set up something similar for me in nginx because the app still works. - mostly.

Moving to nginx seemed alright but I'm getting a couple of puzzling errors that result in 404 pages. I'm in a position where I don't really know enough about this server to replicate it (and I don't want to) on my local machine and also nginx is totally new to me and while I'm always happy to learn stuff, I really need to get actual work done instead of stuffing around forever (I'm a team of one).

So the error logs are back to being read-only (I have asked for this to be changed). Worse, now it seems that if I try to write to the log from within my application (as a really shi*tty last-resort way of debugging/troubleshooting/find-
ing out wtf I'm actually dealing with and why I'm getting 404 pages), I get a different message to the error log that I think is basically saying it received a message from my app to log but couldn't. - Great. Oh, also the timestamp is several hours months and years out, so that is helpful too.

So my main question is (after all that):

Is there some reason why it's so hard to get this guy to just give me a writable error log? Is he being resistant for some actual security reason that I don't understand or is he just being difficult?

I've never been entirely happy with my front controller that routes the traffic but I have other things to get done before I re-write that and add a dedicated router and I think the problem is actually some misconfiguration in nginx, it only 404s when index.php is in the url (which it shouldn't be anyway). Plus it didn't do this under apache.

geek_-mung-, Mar 7, 8:30 pm

1st question would have to be WHY move away from Apache?

geek_mrfxit, Mar 7, 10:58 pm

A 404 error is basically a dead end msg
Ie: the script can't find the folder/file /other script inline because the end path has been altered.

It's not finding what it's been told should be there.
Could be a missing file or bad spelling/ grammer/ path location OF as simple as a missing or added DOT in the wrong place

geek_mrfxit, Mar 7, 11:01 pm

I know nothing about PHP but I would ask on stackoverflow, giving as much detail about your setup as possible, eg whether it's shared/dedicated hosting, what version of PHP & nginx, nginx conf file contents, PHP conf file contents, what the error message is in the error log etc.

geek_drsr, Mar 8, 8:16 am

Tl;dr Why not ask "the guy"?

geek_gibler, Mar 8, 8:42 am

It wasn't broken so we fixed. lol.

geek_black-heart, Mar 8, 9:14 am


I've been quite direct a couple of times, I don't always quite get the response I'm looking for and I'm trying to keep it friendly. Now I'm just asking for other people's opinions for more insight.

Oh yeah, also, I guess if I try to be a bit introspective about it, I'm self taught. I have yet to actually work in a company that does web development as a core business. I'm confident in my ability to learn and understand things quickly and have refactored the code as various concepts and design patterns have become apparent through reading etc. Not so confident that I do know all the norms of this industry and don't want to make an arse of myself by asking for something that anyone with even a small amount of relevant experience should know. There are two kinds of self-taught people in this world, and I don't want to be considered like the 'other' kind.

geek_-mung-, Jun 5, 5:31 am

Share this thread