[nmglug] myphpmoney - mass editing .php files

Tim Emerick timothyemerick at yahoo.com
Mon Dec 4 22:53:44 PST 2006


Hey gang.

I tried to install myphpmoney on my ubuntu server and it sure was a challenge.  Needless to say I got it mostly running but need a little help.  Apparently it was written for MySQL 4 but I have MySQL5 running.  I found a fix on google groups but I don't know how to implement it.  It involves changing all occurences of OUT to `OUT` in all of the php scripts since OUT is now a reserved word in mysql5. How do I do that?

Here are the citations I found

-----cause-----
Package: myphpmoney 
 Version: 1.3RC3+dfsg-1 
 Severity: important 
 After upgrading the mysql server to newer version 5, myphpmoney is unusable, it 
 compains that there is a error on the sql syntax, near 'OUT'. 
 
I went to another system, and tried to install it, and fails the same, but now 
 on another sql sentence. The output is: 
 
MySQL Error : 
 
1064(You
have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near 'OUT                            BLOB                           NOT NULL,        ' at line 13) 
 Database : 
 Invalid SQL: CREATE TABLE IF NOT EXISTS MPM_op 
 ( 
         OPID                           BIGINT(20)                     NOT NULL, 
         NUMID                          BLOB                           NOT NULL, 
         TEMPID                         INTEGER(1)                     NOT NULL, 
         VALID_OP                       INTEGER(1)                     NOT NULL, 
         USERID                         BIGINT(20)                     NOT NULL, 
         DATES                          DATE                           NOT NULL, 
         CAT                            BIGINT(20)                     NOT NULL, 
         THIRD                          BIGINT(20)                     NOT NULL, 
         COREL                          BIGINT(20)                     NOT NULL, 
         COMMENTS                       BLOB                           NOT NULL, 
         OUT                            BLOB                           NOT NULL, 
         IMP                            BLOB                           NOT NULL, 
         ACCOUNT                        BLOB                           NOT NULL, 
         BALANCE                        BLOB                           NOT NULL, 
         PERIOD                         INTEGER(1)                     NOT NULL, 
         UNIQUE KEY PK_MPM_op (OPID), 
         KEY FK_MPM_op (USERID) 
 )type = MyISAM 
 
I think the error is on a row named 'OUT' on the 'MPM_op' table, being OUT a 
 reserved word as stated in http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html 
 and not being quoted. 
 
Thanks 
 
David 


------solution------
The reason of the problem is the OUT column and OUT is now a keyword of 
 mysql syntax! 
 I replace all OUT with `OUT`  (backquotes) in 
 /var/lib/myphpmoney/public_html directory.... and now it works fine! 




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nmglug.org/pipermail/nmglug-nmglug.org/attachments/20061204/f0862565/attachment-0001.htm>


More information about the nmglug mailing list