Search the web
Sign In
New User? Sign Up
keystone-users
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
PTS conversion   Message List  
Reply | Forward Message #2668 of 2694 |
Greeting keystone-users,

Can you offer a suggestion?

I have inherited a PTS 1.72.00 system used to track computer support.
It has never given us a problem and we are happy with the features,
but it runs on and out-of-date system. I am trying to port it to
an up-to-date system without success. Can you help?

The current PTS system runs on an old Linux box with:
PHP/FI 2.0.1
Apache 1.2.6
MySQL Ver 9.15 Distrib 3.21.30, for pc-linux-gnu (i686)

I want to port to a system with:
PHP 4.3.2
Apache 2.0.46
MySQL 3.23.59

The initial symptom is:
After entering the username and password on the Problem Tracking System
login screen, we receive this message:

Parse error: parse error in /var/www/html/pts/login.phtml on line 43

login.phtml is listed below. Judging by the surrounding lines, I would
guess line 43 could be prefixed by "$" and suffixed with ";".
Making this change yields a parsing error in line 46.
So I feel this would be the beginning of an elaborate process to
detect and change all instances of this type if indeed this were possible.

At this point, we are using all the the PHP/FI *.phtml code.
Last week, in an effort to get this to work, I had run the
PHP "convertor" (http://www.php.net/manual/en/print/migration.php)
to convert PHP 2/FI to PHP3. The "convertor" gave a parsing error
for eleven of the PHP scripts. The docs for the "convertor" caution
that syntax checking for the converter is more strict than that in
PHP/FI itself.

Here is the relevant PHP configuration and the
Apache/PHP configuration.

#
# date
Tue Jul 6 11:09:51 EDT 2004
#
# grep "global" /etc/php.ini
; Whether or not to register the EGPCS variables as global variables.
You may
; want to turn this off if you don't want to clutter your scripts'
global scope
; register_globals to be on; Using form variables as globals can
easily lead
#register_globals = Off
register_globals = On
; to initialize a session variable in the global scope, albeit
register_globals
#

# cat /etc/httpd/conf.d/php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter handle files with a .php extension.
# Added .phtml and .php3 for pts - 040708 - Dick Howard
#
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>

<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>

<Files *.phtml>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
#

# ls -gR /var/www/html/pts
/var/www/html/pts:
total 372
-rwxr-xr-x 1 users 1754 Aug 15 1997 addfollow.phtml
-rwxr-xr-x 1 users 3409 Jun 1 1998 add.phtml
-rwxr-xr-x 1 users 3349 Jun 1 1998 add.phtml.org
-rwxr-xr-x 1 users 20922 Mar 22 2002 browse.phtml
-rwxr-xr-x 1 root 19854 Mar 18 2002 browse.phtml.020318
-rwxr-xr-x 1 users 19597 Jul 14 1998 browse.phtml.Jul14
-rwxr-xr-x 1 users 19536 Jul 8 1998 browse.phtml.save
-rwxr-xr-x 1 users 19465 Jun 18 1998 browse.phtmly
-rwxr-xr-x 1 users 945 Aug 15 1997 chpwd.phtml
-rwxr-xr-x 1 users 1682 Aug 15 1997 close.phtml
-rwxr-xr-x 1 users 1917 Dec 23 1997 contadd.phtml
-rwxr-xr-x 1 users 1612 Dec 23 1997 contbrowse.phtml
-rwxr-xr-x 1 users 2764 Dec 8 1997 db.phtml
drwxr-xr-x 2 users 4096 Dec 29 1997 docs
-rwxr-xr-x 1 users 1141 Dec 23 1997 footer.phtml
-rwxr-xr-x 1 users 1166 Nov 20 1997 forcepw.phtml
drwxr-xr-x 2 users 4096 Dec 29 1997 graphics
-rwxr-xr-x 1 users 307 Aug 14 1997 grouplist.inc
-rwxr-xr-x 1 users 280 Jun 17 1997 hcell.phtml
-rwxr-xr-x 1 users 3656 Jul 3 03:20 header.phtml
-rwxr-xr-x 1 users 3652 May 6 1998 header.phtml.org
-rwxr-xr-x 1 users 3649 Aug 20 1998 header.phtml.orig
-rwxr-xr-x 1 users 1193 May 6 1998 index.html
-rwxr-xr-x 1 users 1193 May 6 1998 index.html.org
-rwxr-xr-x 1 users 1620 Aug 15 1997 indextic.html
-rwxr-xr-x 1 users 1186 May 6 1998 login.phtml
-rwxr-xr-x 1 users 1186 May 6 1998 login.phtml.org
-rwxr-xr-x 1 users 1446 May 15 1998 mailtest.phtml.save
-rwxr-xr-x 1 users 1631 Feb 5 1999 mailutils.phtml
-rwxr-xr-x 1 users 1574 May 7 1998 mailutils.phtml.org
-rwxr-xr-x 1 users 1945 Dec 23 1997 maintenance.phtml
-rwxr-xr-x 1 users 1877 Jul 8 1997 mbrowse.phtml
-rwxr-xr-x 1 users 771 Jul 8 1997 mdelete.phtml
-rwxr-xr-x 1 users 2135 Jul 8 1997 medit.phtml
-rwxr-xr-x 1 users 973 Jun 17 1997 memview.phtml
-rwxr-xr-x 1 users 4209 Jul 27 1998 modify.phtml
-rwxr-xr-x 1 users 4048 Jun 1 1998 modify.phtml.org
-rwxr-xr-x 1 users 733 Jul 8 1997 mpdelete.phtml
-rwxr-xr-x 1 users 1537 Jul 8 1997 mpost.phtml
-rwxr-xr-x 1 users 1942 Dec 8 1997 msql.phtml
-rwxr-xr-x 1 users 1917 Dec 8 1997 mysql.phtml
-rwxr-xr-x 1 users 3049 Aug 15 1997 newticket.phtml
-rwxr-xr-x 1 users 3706 Jun 1 1998 padd.phtml
-rwxr-xr-x 1 users 3646 Jun 1 1998 padd.phtml.org
-rwxr-xr-x 1 users 760 Aug 15 1997 pclose.phtml
-rwxr-xr-x 1 users 4829 Dec 23 1997 pmodify.phtml
-rwxr-xr-x 1 users 2521 Jun 17 1998 postadd.phtml
-rwxr-xr-x 1 users 1497 Dec 23 1997 postcadd.phtml
-rwxr-xr-x 1 users 2183 Aug 15 1997 postclose.phtml
-rwxr-xr-x 1 users 1027 Jun 17 1997 postfoll.phtml
-rwxr-xr-x 1 users 3749 Dec 8 1997 postgres.phtml
-rwxr-xr-x 1 users 2417 Dec 23 1997 postmod.phtml
-rwxr-xr-x 1 users 1562 Jul 7 1997 postpadd.phtml
-rwxr-xr-x 1 users 2074 Aug 15 1997 postpmod.phtml
-rwxr-xr-x 1 users 976 Aug 15 1997 postprefs.phtml
-rwxr-xr-x 1 users 2129 Aug 15 1997 prefs.phtml
-rwxr-xr-x 1 users 8881 Dec 23 1997 preview.phtml
-rwxr-xr-x 1 users 653 Jun 17 1997 projlist.inc
-rwxr-xr-x 1 users 794 Jul 10 1998 rdelete.phtml
-rwxr-xr-x 1 users 5165 Jul 7 1998 review.phtml
-rwxr-xr-x 1 users 5165 Jul 14 1998 review.phtml.Jul14
-rwxr-xr-x 1 users 683 Jul 10 1998 rpdelete.phtml
-rwxr-xr-x 1 users 417 Aug 14 1997 statlist.inc
drwxr-xr-x 2 users 4096 Dec 29 1997 struct
-rwxr-xr-x 1 users 660 Jul 14 1998 tasklist.inc
-rwxr-xr-x 1 users 644 Jul 14 1998 tasklist.inc.Jul14

/var/www/html/pts/docs:
total 48
-rwxr-xr-x 1 users 4301 Jun 17 1997 convert
-rwxr-xr-x 1 users 5283 Dec 29 1997 faq
-rwxr-xr-x 1 users 9440 Dec 29 1997 history
-rwxr-xr-x 1 users 5044 Dec 29 1997 install
-rwxr-xr-x 1 users 1675 Jun 20 1997 packinglist
-rwxr-xr-x 1 users 3196 Jun 17 1997 prefs
-rwxr-xr-x 1 users 1491 Jun 20 1997 README

/var/www/html/pts/graphics:
total 60
-rwxr-xr-x 1 users 187 Dec 23 1997 add.gif
-rwxr-xr-x 1 users 211 Jun 17 1997 addtask.gif
-rwxr-xr-x 1 users 208 Dec 23 1997 browse.gif
-rwxr-xr-x 1 users 193 Jun 17 1997 close.gif
-rwxr-xr-x 1 users 211 Dec 23 1997 contacts.gif
-rwxr-xr-x 1 users 210 Jun 17 1997 followup.gif
-rwxr-xr-x 1 users 199 Jun 17 1997 logout.gif
-rwxr-xr-x 1 users 193 Jun 17 1997 maint.gif
-rwxr-xr-x 1 users 203 Jun 17 1997 modify.gif
-rwxr-xr-x 1 users 230 Jun 17 1997 newproject.gif
-rwxr-xr-x 1 users 214 Jun 17 1997 newtask.gif
-rwxr-xr-x 1 users 181 Jun 17 1997 post.gif
-rwxr-xr-x 1 users 191 Jun 17 1997 prefs.gif
-rwxr-xr-x 1 users 201 Jun 17 1997 return.gif
-rwxr-xr-x 1 users 209 Jun 17 1997 update.gif

/var/www/html/pts/struct:
total 100
-rwxr-xr-x 1 users 434 Dec 23 1997 contacts.mysql
-rwxr-xr-x 1 users 450 Aug 14 1997 followups.mysql
-rwxr-xr-x 1 users 391 Aug 14 1997 followups.psql
-rwxr-xr-x 1 users 406 Aug 14 1997 followups.struct
-rwxr-xr-x 1 users 377 Aug 14 1997 groups.mysql
-rwxr-xr-x 1 users 443 Aug 14 1997 groups.psql
-rwxr-xr-x 1 users 454 Aug 14 1997 groups.struct
-rwxr-xr-x 1 users 666 May 6 1998 master.mysql
-rwxr-xr-x 1 users 515 Aug 14 1997 master.psql
-rwxr-xr-x 1 users 515 Aug 14 1997 master.struct
-rwxr-xr-x 1 users 668 Dec 23 1997 people.mysql
-rwxr-xr-x 1 users 690 Aug 14 1997 people.psql
-rwxr-xr-x 1 users 686 Aug 20 1997 people.struct
-rwxr-xr-x 1 users 1353 Dec 2 1997 prefs.mysql
-rwxr-xr-x 1 users 1729 Dec 2 1997 prefs.psql
-rwxr-xr-x 1 users 1718 Dec 2 1997 prefs.struct
-rwxr-xr-x 1 users 630 Aug 14 1997 projects.mysql
-rwxr-xr-x 1 users 582 Aug 14 1997 projects.psql
-rwxr-xr-x 1 users 606 Aug 14 1997 projects.struct
-rwxr-xr-x 1 users 652 Aug 14 1997 status.mysql
-rwxr-xr-x 1 users 652 Aug 14 1997 status.psql
-rwxr-xr-x 1 users 652 Aug 14 1997 status.struct
-rwxr-xr-x 1 users 680 Aug 14 1997 tasks.mysql
-rwxr-xr-x 1 users 632 May 28 1998 tasks.psql
-rwxr-xr-x 1 users 623 May 28 1998 tasks.struct
#

# date
Tue Jul 6 11:12:15 EDT 2004
# cat /var/www/html/pts/login.phtml
<?

include "db.phtml";

/* Connect up and get some values */

db_connect($dbhost);

$n = db_query("select * from people where
login='$login'");
$nr = db_numrows($n);

$s = db_query("select cvalue from master where
flag='serverkey'");
$serverkey = db_result($s,0,"cvalue");

if ($nr <= 0) {
setcookie("ptsuser","",time());
echo "<center><h2>Login incorrect</h2>\n";
echo "<a href=\"index.html\">Return</a></center>";
exit;
} else {
$dbpw = db_result($n,0,"password");
$dbuser = db_result($n,0,"login");
$dbfull = db_result($n,0,"fullname");
$hpw = md5($password);
if ((strlen("$password") == 0) && ($dbuser == "guest")) {
$ptsuser=$login;
} else {
if ($dbpw != $hpw) {
setcookie("ptsuser","",time());
echo "dbpw is $dbpw<br>hpw is
$hpw<br>dbuser is $dbuser<br>strlen of password is";
echo strlen("$password");
echo "<center><h2>Login incorrect</h2>\n";
echo "<a
href=\"index.html\">Return</a></center>";
exit;
} else {
$ptsuser=$login;
}
}
}

$clkey = "$login"+"_"+md5("$login:$serverkey:$dbpw");
setcookie("ptsuser",$clkey,time()+36000)
$ptsuser="$clkey";
$curruser=$login;
>
<? include "browse.phtml" >

# date
Tue Jul 6 11:12:38 EDT 2004

Thanks,
Dick




Tue Jul 6, 2004 6:10 pm

hickdoward
Offline Offline
Send Email Send Email

Forward
Message #2668 of 2694 |
Expand Messages Author Sort by Date

Greeting keystone-users, Can you offer a suggestion? I have inherited a PTS 1.72.00 system used to track computer support. It has never given us a problem and...
hickdoward
Offline Send Email
Jul 6, 2004
9:35 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help