homepage Welcome to WebmasterWorld Guest from 54.234.225.23
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Main causes of an old script to stop working?
A script of mine stopped working and I have no idea why.
rj87uk




msg:3615541
 6:00 pm on Mar 31, 2008 (gmt 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

 

surrealillusions




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

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

henry0




msg:3615676
 9:32 pm on Mar 31, 2008 (gmt 0)

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.

Marcia




msg:3615681
 9:35 pm on Mar 31, 2008 (gmt 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

rj87uk




msg:3615747
 11:01 pm on Mar 31, 2008 (gmt 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

Steerpike




msg:3616013
 8:04 am on Apr 1, 2008 (gmt 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.

henry0




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

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)

Marcia




msg:3616143
 12:36 pm on Apr 1, 2008 (gmt 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
redhat



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

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)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved