Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > SubNewb: How do I 'comment out' a line of php?

SubNewb: How do I 'comment out' a line of php?
Thread Tools
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jun 18, 2003, 01:57 PM
 
Hi,

This should be an easy one...

I'm trying to get 'moregroupware' set up.

I'm getting an error saying that the Database isn't empty, upgrades aren't supported yet.

In the archives of the users support mailing list there is the following message: "I get this annoying message when I try to install the new 0.6.7 build...

following errors occurred: - There are tables from a previous version
in the database. Upgrade is not supported at the moment. *

Reply: " The error is produced by this piece of code in
setup/inc/save_settings.inc.php

/* check if the database is empty */
if (count($conn->MetaTables())>0) {
$dberrorarray[] = getLanguageString("err_oldtable");
}

Clearly /* and */ comment out but where do I put the /* and the*/? Whatever I try messes up the script.

Thanks!

Simon
London Uk
     
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Jun 18, 2003, 07:31 PM
 
try:

/* check if the database is empty
if (count($conn->MetaTables())>0) {
$dberrorarray[] = getLanguageString("err_oldtable");
} */


/* is the start of a multi line comment
*/ will end a comment (if this were in a script it would be executed)
// comments out the rest of the line

--will
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jun 19, 2003, 03:49 AM
 
Originally posted by clam2000:
try:

/* check if the database is empty
if (count($conn->MetaTables())>0) {
$dberrorarray[] = getLanguageString("err_oldtable");
} */


/* is the start of a multi line comment
*/ will end a comment (if this were in a script it would be executed)
// comments out the rest of the line

--will
clam2000,

Thanks again for coming to the rescue.

As soon as I get mySQL sorted out, I'll try this.

Simon
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jun 19, 2003, 05:35 AM
 
Originally posted by clam2000:
try:

/* check if the database is empty
if (count($conn->MetaTables())>0) {
$dberrorarray[] = getLanguageString("err_oldtable");
} */


/* is the start of a multi line comment
*/ will end a comment (if this were in a script it would be executed)
// comments out the rest of the line

--will
clam2000,

This worked! Thanks.

I now have moregroupware running. Only took 2 - 3 days... :-)

Thanks for all your help. Owe you one.

Simon
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:43 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2