Ik denk dat programmeren wel oke is... Dit topic is lastig om onder 1 noemer te stoppen vind ik
Anyhow, heb je elke stap gedaan van: http://php4flicks.sourceforge.net/README ?
Dus ook bijv. config.php aanpassen...
Dit zijn de stappen die ik zowiso heb gedaan.
* unzip/untar the received files to a web accessible directory (gedaan - Dus unzipped en rest van de mappen en bestanden massaal gekopieerd naar /var/www directory)
* create the necessary mySQL tables using the file docs/db_defs.sql ( gedaan - phpmyadmin geinstalleerd, vervolgens via web (
http://localhost/phpmyadmin) ingelogd en nieuwe database aangemaakt genaamd "flicks" vervolgens db_defs.sql in tabblad SQL deze code vervolgens uitgevoerd. Nu heb ik allemaal tabellen in database "flicks")
* edit the config.php file in the config-folder. the various options are described
there. (gedaan - config.php met gedit geopend en vervolgens dingen gewijzigd die gewijzigd moesten worden dus ook md5 password gemaakt en mysql spul gewijzigd. bekijk hier onder de config file)
especially, make sure to enter your user name and the md5-value of your
password and change the db settings to the correct values.
(see also the notes on user management below)
* for the pdf export, you can either use: (deze stap heb ik
NIET UITGEVOERD is volgens mij NOG NIET nodig)
- ezpdf (
http://www.ros.co.nz/pdf/, free):
set $cfg['pdfout'] to 'ezpdf'.
you don't need to change anything else, since the required php classes are
included in the download. there are some options you can edit, see the
config file.
- htmldoc (
http://htmldoc.org, GPL license):
set $cfg['pdfout'] to 'htmldoc'.
c-based html->pdf converter, available for *nix and win.
it is faster than ezpdf and the outputted pdf (currently?) looks much nicer.
download the source and compile it; if you install it in a directory other then
'print', also change the path information in the file print/index.php
(it's easy to find where)
you can remove the ezpdf class files and the 'fonts' folder if you don't need ezpdf.
please read the respective documentation if you have questions or problems
regarding the pdf generation.
-- * please note that magic_quotes must be switched off! (php.ini: magic_qoutes = off)
otherwise you'll get SQL error messages. (deze zijn ook uit magic_quotes_gpc Off Off
magic_quotes_runtime Off Off
magic_quotes_sybase Off als ik phpinfo bestandje bekijk)
-------------
Wat ik trouwens ook nog gedaan heb is mij zelf eigenaar gemaakt van /var/www directory met chown omdat ik eerst constant sudo nodig had om te schrijven.
config.php
<?
/* 'main' configuration ******************************************************
** various options for the script **
******************************************************************************/
$cfg['mysql_host'] = 'localhost'; // mysql host
$cfg['mysql_user'] = 'root'; // mysql user
$cfg['mysql_pass'] = '<pass weggehaald>'; // mysql password
$cfg['mysql_db'] = 'flicks'; // database name
$cfg['pagetitle'] = 'php4flicks'; // the browser window title
$cfg['nofflicks'] = 25; // # movies per page (main window)
// default sort order; must NOT be empty! the max # of rows by which can be sorted is the size of this array.
// ASC/DESC MUST be specified!
$cfg['defaultsort'] = array('name ASC','nr ASC','year DESC');
// define any number of users here; users[i][md5pass] must contain the md5-encrypted password
$cfg['users'][0]['user'] = 'admin';
$cfg['users'][0]['md5pass'] = '<passweggehaald>';
$cfg['version'] = 'version 0.4';
$cfg['old_browsers'] = false; // if set to true, javascript/DOM will not be used in the edit mode
// for compatibility with older browser
/* imdb scripts configuration ************************************************
** configures fetching of data from imdb **
******************************************************************************/
$cfg['actorLimit'] = 10; // how many actors per movie?
$cfg['searchLimit'] = 25; // max # of search results per catecory
$cfg['actSearchLimit'] = 25; // max # of search results for people
// which categories to search for people:
$cfg['actCats'] = array('actors','actresses','directors','writers');
// possible categories include: Actor, Actress, Cinemathographer, Composer, Director,
// Writer, Editor, Producer, Stunts, and a whole lot of others
// independent of $actCats and $actSearchLimit, all 'most popular' matches will always be shown
$cfg['cache'] = true; // whether or not to cache last search results
$cfg['http_cache_size'] = 0;
// number of html-pages kept in session cache.
// should be switched off in general, useful when testing app since it reduces traffic from imdb
$cfg['http_compress'] = true;
// whether or not to use gzipped html.
// set to false if you have problems fetching data from imdb (php versions <4.3.x)
/* media configuration ********************************************************
** languages, media, etc... **
******************************************************************************/
$cfg['cats'] = array(
// an array to automatically choose category depending on medium. leave empty if not desired.
// max length for category name is 10 chars.
'dvd' => 'C',
'vhs' => 'A',
'svhs' => 'B',
'divX/Xvid' => 'D',
'vcd/Svcd' => 'E',
'dvd-r' => 'C'
);
/* print PDF configuration*****************************************************
** configures pdf output generation **
******************************************************************************/
// pdf page size ('A4' | 'LETTER')
$cfg['pagesize'] = 'A4';
// choose html->pdf converter. at this time, allowed values are 'htmldoc' and 'ezpdf'.
// ezpdf is included in the distribution, htmldoc must be compiled
// however, htmldoc is faster and generates a somewhat nicer output
$cfg['pdfout'] = 'ezpdf';
// HTMLDOC options
$cfg['htmldoc_path'] = 'c:/programme/apache2/htdocs/movies/print'; // the data directory for htmldoc
$cfg['htmldoc_fname'] = 'movies.pdf'; // name of pdf file outputted by htmldoc
// end HTMLDOC options
// EZPDF options
// Table Category Titles... <b>=bold, <i>=italic, <b><i>=bolditalic
// (this array determines what data will be shown)
$cfg['tablecat'] = array(
'nr' =>'<b>CAT#</b>',
'name' =>'<b>TITLE</b>',
'year' =>'<b>YEAR</b>',
'runtime' =>'<b>TIME</b>',
'ratio' =>'<b>RATIO</b>',
);
// Main Title of PDF document
$cfg['tabletitle'] = 'php4flicks';
// Put a link BACK on PDF printout(overcome redirect) 0=No 1=Yes
$cfg['backlink'] = 0;
// end EZPDF options
/* ****************************************************************************
** do not edit below this line **
******************************************************************************/
// get available options for media, language, etc directly from mysql table definition.
// DO NOT CHANGE config below this line. to change options, directly edit mysql definitions.
mysql_connect($cfg['mysql_host'],$cfg['mysql_user'],$cfg['mysql_pass']) or die(mysql_error());
mysql_select_db($cfg['mysql_db']) or die(mysql_error());
set_magic_quotes_runtime(0); // get rid of that plague
// option columns must be of type set or enum
$options = array('medium','lang','format','ratio','sound','genre');
foreach($options as $o){
$result = mysql_query("describe movies $o") or die(mysql_error());
$row = mysql_fetch_array($result);
$type = $row['Type'];
preg_match_all("#\'([^,\']{1,})\'#",$type,$matches,PREG_PATTERN_ORDER);
$cfg[$o] = $matches[1];
}
?>
Weten jullie misschien waar het probleem ligt??