Having trouble

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
matt1988
Forum Newbie
Posts: 3
Joined: Tue Jul 31, 2007 12:40 pm

Having trouble

Post by matt1988 »

I built a quick application quite a while ago for the museum I work at. I finally built a small server for them so that we can use this program at our museum, but I am having a few problems.

When I moved everything over to the new server some things stopped working. Some of them I fixed by slightly changing the code, but I have 2 big problems that I have not been able to fix.

Here is a mirror of the application http://lphm.awardspace.com

If you go to list, and click on view more, it shows you more information on that object. On the new server this page comes up completely blank.

my other problem is if you log into the admin page (user - admin pass- adminpass) and go to edit. if you search for an accession number it comes up with a form filled in with the object info to edit. On the new server it fills in with the code (Ie. <? echo $acc ?>).

any ideas on why? I am not sure what version of php I am using now, it is the rpath lamp appliance (http://www.rpath.org/rbuilder/project/lamp/).
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

Looks like you have short tags turned off on the new server. This means that <? ?> won't work, only <?php ?>.

You can either repleace all of the <? ?> with <?php ?> or change the php config file so that it allows short tags. Just open the config file and search around for short tags or something like that, then restart the web service.
matt1988
Forum Newbie
Posts: 3
Joined: Tue Jul 31, 2007 12:40 pm

Post by matt1988 »

That sounds like it could be true. Thank you so much, im going to give it a shot.
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

FYI, its good practice to use <?php instead of <? to prevent problems like this. To future proof your app and make it more portable it might be better to do a search and replace and get rid of the short tags and then start using the <?php ones.
matt1988
Forum Newbie
Posts: 3
Joined: Tue Jul 31, 2007 12:40 pm

Post by matt1988 »

Perfect! That worked. I just did the replace instead of enabling short tags. It is a really slow server (a 366 with 200mb of ram). wasnt sure if it would stress it more. Thanks again!
Post Reply