Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #13424

Re: 404 error

From Ed Mullen <ejEVOMER@edmullen.net>
Newsgroups comp.lang.php
Subject Re: 404 error
Date 2014-04-22 13:32 -0400
Organization Altopia Corp. - Usenet Access - www.altopia.com
Message-ID <7f2ul5.eek.17.1@news.alt.net> (permalink)
References <7f2rl4.2fb.17.1@news.alt.net> <lj6738$bt5$1@dont-email.me> <7f2u7e.9ba.19.1@news.alt.net>

Show all headers | View raw


Ed Mullen wrote:
> Jerry Stuckle wrote:
>> On 4/22/2014 12:41 PM, Ed Mullen wrote:
>>> I have two sites on different hosts.
>>>
>>> Both use identical code to display a "last modified" message.  The code
>>> is in a standard footer which is included (via PHP) on ever site page.
>>>
>>> I just noticed something odd.  At my site <http://edmullen.net> it works
>>> just fine.  The first link below shows a standard page with the footer
>>> message.  The second will produce an error page since the link doesn't
>>> exist on the site.  On the error page the date info is simply not
>>> displayed.
>>>
>>> <http://edmullen.net/index.php>
>>>
>>> <http://edmullen.net/bogus.php>
>>>
>>> Fine so far.  The other site has different results.
>>>
>>> <http://guitarsnotguns.org/>
>>>
>>> <http://guitarsnotguns.org/rot.php>
>>>
>>> Notice the error message and incorrect date in the footer.
>>>
>>> I'm guessing it's a server configuration issue.  Any thoughts?
>>>
>>> BTW, here's the PHP I use on both sites:
>>>
>>> <?php
>>> $current_file_name = ($_SERVER['REQUEST_URI']);
>>> $current_path = ($_SERVER['DOCUMENT_ROOT']);
>>> $full_name = $current_path.$current_file_name;
>>> $last_modified = filemtime($full_name);
>>> print("This page last changed: ");
>>> print(date("F j, Y - h:i A", $last_modified));
>>> ?>
>>>
>>> Thanks.
>>>
>>
>> If the file doesn't exist, how can you get its time?
>>
>
> Agreed.  Not expecting to.
>
>> It looks like you're including your footer in the failing page, but not
>> in the working one.  This is not a PHP issue.
>>
>>
>
> The footer is in the two good links above. The failing pages above do
> not exist:  They're links to a non-existant file.  Hence the 404 result.
>
> What I'm asking about is how the two hosts' servers handle it.  The
> first displays the custom 404 page WITHOUT showing the date in the
> footer.  No idea why.
>
> The second host shows the 404 page but throws an error where the "date
> modified" info should be.  Obviously
>

Oops. Hit send too fast.

I was going to say that obviously there is something different about the 
servers set up.

I agree, it's probably not a PHP issue.  Just thought the smart folks 
here might have an idea.


-- 
Ed Mullen
http://edmullen.net/
"A conscience is like a boat or a car. If you feel you need one, rent 
it." - J.R. Ewing

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

404 error Ed Mullen <ejEVOMER@edmullen.net> - 2014-04-22 12:41 -0400
  Re: 404 error Jerry Stuckle <jstucklex@attglobal.net> - 2014-04-22 12:58 -0400
    Re: 404 error Ed Mullen <ejEVOMER@edmullen.net> - 2014-04-22 13:25 -0400
      Re: 404 error Ed Mullen <ejEVOMER@edmullen.net> - 2014-04-22 13:32 -0400
        Re: 404 error Jerry Stuckle <jstucklex@attglobal.net> - 2014-04-22 14:35 -0400
        Re: 404 error Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2014-04-22 14:42 -0400
          Re: 404 error Jerry Stuckle <jstucklex@attglobal.net> - 2014-04-22 14:56 -0400
            Re: 404 error Anders Wegge Keller <wegge@wegge.dk> - 2014-04-23 08:56 +0200
              Re: 404 error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-04-23 13:12 +0200
                Re: 404 error Anders Wegge Keller <wegge@wegge.dk> - 2014-04-23 13:23 +0200
                Re: 404 error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-04-23 13:36 +0200
                Re: 404 error Jerry Stuckle <jstucklex@attglobal.net> - 2014-04-23 08:09 -0400
              Re: 404 error Jerry Stuckle <jstucklex@attglobal.net> - 2014-04-23 08:08 -0400
          Re: 404 error Ed Mullen <ejEVOMER@edmullen.net> - 2014-04-23 13:12 -0400
            Re: 404 error Jerry Stuckle <jstucklex@attglobal.net> - 2014-04-23 14:50 -0400
              Re: 404 error Ed Mullen <ejEVOMER@edmullen.net> - 2014-04-23 20:19 -0400
  Re: 404 error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-04-22 23:26 +0200
    Re: 404 error Christoph Michael Becker <cmbecker69@arcor.de> - 2014-04-23 14:21 +0200
      Re: 404 error Jerry Stuckle <jstucklex@attglobal.net> - 2014-04-23 09:12 -0400
        SCRIPT_NAME (was: 404 error) Christoph Michael Becker <cmbecker69@arcor.de> - 2014-04-23 21:46 +0200
          Re: SCRIPT_NAME Jerry Stuckle <jstucklex@attglobal.net> - 2014-04-23 16:36 -0400
          Re: SCRIPT_NAME Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-04-24 00:27 +0200
            Re: SCRIPT_NAME Christoph Michael Becker <cmbecker69@arcor.de> - 2014-04-25 00:35 +0200
      Re: 404 error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-04-23 15:56 +0200
        Re: 404 error Christoph Michael Becker <cmbecker69@arcor.de> - 2014-04-23 18:00 +0200
          Re: 404 error Christoph Michael Becker <cmbecker69@arcor.de> - 2014-04-23 21:38 +0200
  Re: 404 error Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-04-22 22:04 +0000
    Re: 404 error The Natural Philosopher <tnp@invalid.invalid> - 2014-04-23 00:11 +0100
    Re: 404 error Ed Mullen <ejEVOMER@edmullen.net> - 2014-04-22 20:22 -0400
  Re: 404 error Ed Mullen <ejEVOMER@edmullen.net> - 2014-04-23 12:39 -0400
    Re: 404 error Ed Mullen <ejEVOMER@edmullen.net> - 2014-04-23 14:22 -0400
      Re: 404 error Denis McMahon <denismfmcmahon@gmail.com> - 2014-04-23 21:28 +0000

csiph-web