Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  parse error on line 54

phpMyEdit Configuration     parse error on line 54
Odoslať novú tému   Odpovedať na tému    
 
tim2099     Založený: 17.05.2004   Príspevky: 3  
Príspevok Zaslal: 2004-05-17 20:45
Návrat hore  Odpovedať s citátom     

I am getting a parse error on line 54 when I run the file generated by phpMyEdit. Also phpMyEdit is unable to write the file directly due to permissions. Please help, for I am a lowly newbie.

The file is listed below:




<style type="text/css">
table { border: #004d9c 1px solid; border-collapse: collapse; border-spacing: 0px; width: 100%; }
th { border: #004d9c 1px solid; padding: 4px; background: #add8e6; }
td { border: #004d9c 1px solid; padding: 3px; }
hr { border: 0px solid; padding: 0px; margin: 0px; border-top-width: 1px; height: 1px; }
</style><?php

/*
* IMPORTANT NOTE: This generated file contains only a subset of huge amount
* of options that can be used with phpMyEdit. To get information about all
* features offered by phpMyEdit, check official documentation. It is available
* online and also for download on phpMyEdit project management page:
*
* http://www.platon.sk/projects/main_page.php?project_id=5
*/

// MySQL host name, user name, password, database, and table
$opts['hn'] = 'localhost';
$opts['un'] = 'cdrake';
$opts['pw'] = 'xxxxxxxx';
$opts['db'] = 'Fantasygolf';
$opts['tb'] = 'players';

// Name of field which is the unique key
$opts['key'] = 'tblid';

// Type of key field (int/real/string/date etc.)
$opts['key_type'] = 'int';

// Sorting field(s)
$opts['sort_field'] = array('tblid');

// Number of records to display on the screen
// Value of -1 lists all records in a table
$opts['inc'] = 15;

// Options you wish to give the users
// A - add, C - change, P - copy, V - view, D - delete,
// F - filter, I - initial sort suppressed
$opts['options'] = 'ACPVDF';

// Number of lines to display on multiple selection filters
$opts['multiple'] = '4';

// Navigation style: B - buttons (default), T - text links, G - graphic links
// Buttons position: U - up, D - down (default)
$opts['navigation'] = 'DB';

// Display special page elements
$opts['display'] = array(
'form' => true,
'query' => true,
'sort' => true,
'time' => true,
'tabs' => true
);

/* Get the user's default language and use it if possible or you can
specify particular one you want to use. Refer to official documentation
for list of available languages. */
$opts['language'] = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];

/* Table-level filter capability. If set, it is included in the WHERE clause
of any generated SELECT statement in SQL query. This gives you ability to
work only with subset of data from table.

$opts['filters'] = "column1 like '%11%' AND column2<17";
$opts['filters'] = "section_id = 9";
$opts['filters'] = "PMEtable0.sessions_count > 200";
*/

/* Field definitions

Fields will be displayed left to right on the screen in the order in which they
appear in generated list. Here are some most used field options documented.

['name'] is the title used for column headings, etc.;
['maxlen'] maximum length to display add/edit/search input boxes
['trimlen'] maximum length of string content to display in row listing
['width'] is an optional display width specification for the column
e.g. ['width'] = '100px';
['mask'] a string that is used by sprintf() to format field output
['sort'] true or false; means the users may sort the display on this column
['strip_tags'] true or false; whether to strip tags from content
['nowrap'] true or false; whether this field should get a NOWRAP
['required'] true or false; if generate javascript to prevent null entries
['select'] T - text, N - numeric, D - drop-down, M - multiple selection
['options'] optional parameter to control whether a field is displayed
L - list, F - filter, A - add, C - change, P - copy, D - delete, V - view
Another flags are:
R - indicates that a field is read only
W - indicates that a field is a password field
H - indicates that a field is to be hidden and marked as hidden
['URL'] is used to make a field 'clickable' in the display
e.g.: 'mailto:$value', 'http://$value' or '$page?stuff';
['URLtarget'] HTML target link specification (for example: _blank)
['textarea']['rows'] and/or ['textarea']['cols']
specifies a textarea is to be used to give multi-line input
e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10
['values'] restricts user input to the specified constants,
e.g. ['values'] = array('A','B','C') or ['values'] = range(1,99)
['values']['table'] and ['values']['column'] restricts user input
to the values found in the specified column of another table
['values']['description'] = 'desc_column'
The optional ['values']['description'] field allows the value(s) displayed
to the user to be different to those in the ['values']['column'] field.
This is useful for giving more meaning to column values. Multiple
descriptions fields are also possible. Check documentation for this.
*/

$opts['fdd']['tblid'] = array(
'name' => 'Tblid',
'select' => 'T',
'options' => 'AVCPDR', // auto increment
'maxlen' => 11,
'default' => '0',
'sort' => true
);
$opts['fdd']['player'] = array(
'name' => 'Player',
'select' => 'T',
'maxlen' => 33,
'required' => true,
'sort' => true
);
$opts['fdd']['tour'] = array(
'name' => 'Tour',
'select' => 'T',
'maxlen' => 15,
'required' => true,
'sort' => true
);
$opts['fdd']['id'] = array(
'name' => 'ID',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week1'] = array(
'name' => 'Week1',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week2'] = array(
'name' => 'Week2',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week3'] = array(
'name' => 'Week3',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week4'] = array(
'name' => 'Week4',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week5'] = array(
'name' => 'Week5',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week6'] = array(
'name' => 'Week6',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week7'] = array(
'name' => 'Week7',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week8'] = array(
'name' => 'Week8',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week9'] = array(
'name' => 'Week9',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week10'] = array(
'name' => 'Week10',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week11'] = array(
'name' => 'Week11',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week12'] = array(
'name' => 'Week12',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week13'] = array(
'name' => 'Week13',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week14'] = array(
'name' => 'Week14',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week15'] = array(
'name' => 'Week15',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week16'] = array(
'name' => 'Week16',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week17'] = array(
'name' => 'Week17',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week18'] = array(
'name' => 'Week18',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week19'] = array(
'name' => 'Week19',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);
$opts['fdd']['week20'] = array(
'name' => 'Week20',
'select' => 'T',
'maxlen' => 11,
'default' => '0',
'required' => true,
'sort' => true
);

// Now important call to phpMyEdit
require_once 'phpMyEdit.class.php';
new phpMyEdit($opts);

?>

 
tim2099     Založený: 17.05.2004   Príspevky: 3  
Príspevok Zaslal: 2004-05-17 21:31
Návrat hore  Odpovedať s citátom     

I used ssh to ftp. I tried your suggestions but I still get the parse error.


doug Napísal:
I copied the posted code to my PC's development environment and did not get any parse error.

You probably need to set your file and/or folder settings (properties) to 777 or 755 depending on the server configuration. Hopefully you have an FTP client that will let you change file permissions using CHMOD.

Many hosting companies do not allow 777. Try 777 on one file (as a test) and see if it accepts it. If not, then try 755.

What is the name of your FTP client software?


 
tim2099     Založený: 17.05.2004   Príspevky: 3  
Príspevok Zaslal: 2004-05-17 23:08
Návrat hore  Odpovedať s citátom     

Yes. The file name is players.php. The error message is as follows:

Parse error: parse error in /home/cdrake/public_html/players.php on line 54


doug Napísal:
So, do you now have the correct file permissions set, or are you guessing?

Are you _positive_ the file name specified in the error message is exact same filename as your phpMyEdit script (and not the included class file or language file)?


 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2004-05-20 09:14
Návrat hore  Odpovedať s citátom     

Is this a line ending problem? Have you binary ftp'ed a file to a *ix server? If so, try re ftp'ing it in ascii mode. Windows line endings are different from *ix ones, so your server might be having problems interpreting the files.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov