Welcome to WebmasterWorld Guest from 54.160.221.82

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Main causes of an old script to stop working?

A script of mine stopped working and I have no idea why.

     
6:00 pm on Mar 31, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 30, 2004
posts:1148
votes: 0


Hey All,

I have a problem. I have a website that displays information from a database using php / mysql. The script was working fine for months untill it stopped not long ago.

I have never touched the files or the database or anything so I am sure it wasn't me that done it.

The weird thing is only two pages do not work any more (they list the latest records in my database) and its for my home page however the main pages all work fine and they are all also from the database.

So what could the problem have been? Is there code I can use to find out why its stopped displaying the records? I don't think it has anything to do with database connections as the other parts of the site work.

Any ideas?

RJ

9:16 pm on Mar 31, 2008 (gmt 0)

Preferred Member

5+ Year Member

joined:Dec 10, 2007
posts:507
votes: 0


Has your host recently updated/upgraded php or the server settings?
9:32 pm on Mar 31, 2008 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts: 4388
votes: 2


The weird thing is only two pages do not work any more

Any error message
did you try adding error reporting on those two pages

As surrealillusions suggests load a php_info()
and report on php version

look at your (new) php.ini and let us know about your settings such as register global etc...

it's not a bad idea to keep handy a php.ini copy
so you may later figure if any change occured.

9:35 pm on Mar 31, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member marcia is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 29, 2000
posts:12095
votes: 0


>>Has your host recently updated/upgraded php or the server settings?

Exactly. I've had it happen 3 times, and as of last night, 4 times. :)

Upgrade to 5.2.5 and to 4.4.8 which is probably the last ever because PHP4 is no longer supported, as of 12/31/07

11:01 pm on Mar 31, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 30, 2004
posts:1148
votes: 0


I think my host did change the php version a while back it may be that. I ran phpinfo() and it says I am on PHP Version 5.2.4.

I don't get any errors on my pages just no information displays on them. So is there any php code I can insert that will help me figure this out?

I can read PHP and write a little however this was coded by someone who by the looks of things was worse than me so its hard to tell whats what!

Thanks for the help so far!

RJ

8:04 am on Apr 1, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 27, 2005
posts:112
votes: 0



If the php version has changed recently and no you're suddenly getting nothing showing at all I would suggest that php tags have been set to required.

There are two ways to indicate a block of php is starting in a file:

<?
and
<?php

When a fresh install of php is done is expects that scripts will all start with the <?php version of the above. I would hazard a guess that all your scripts currently start with <?

That should probably be your first port of call.

Steerpike.

11:43 am on Apr 1, 2008 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts: 4388
votes: 2


Steerpike might be on something here :)
further as soon as php6 will start to run short tags will not be allowed, so anyway it's time for all to look at our old scripts

if the script is not that long could you post it (at least part of)

12:36 pm on Apr 1, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member marcia is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 29, 2000
posts:12095
votes: 0


I don't get any errors on my pages just no information displays on them. So is there any php code I can insert that will help me figure this out?

I went through two servers being updated this week within a couple of days {same host, 2 different servers). When the includes weren't working at all - with no information displaying - it was explained to me that when they updated Apache the AddHandler (for php on html pages) was disabled by default. They enabled on their end and it all started working fine again.

Contact tech support, tell them what's happening and ask them to enable for PHP includes - or whatever your need is - and let you know for sure what you might need to put in your .htaccess. See if that works for you, they should know.

[edited by: Marcia at 12:39 pm (utc) on April 1, 2008]

System

3:29 am on Apr 4, 2008 (gmt 0)

redhat

 
 


The following message was cut out to new thread by coopster. New thread at: php/3619840.htm [webmasterworld.com]
8:16 am on April 5, 2008 (utc -6)