Changes between Version 1 and Version 2 of rdfhomepage2


Ignore:
Timestamp:
07/13/10 13:41:52 (14 years ago)
Author:
michael.kraus
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rdfhomepage2

    v1 v2  
    3434   * Maybe adapt the "install script" 
    3535   * Set up other rdfh2 instances... until this process works without any erros 
     36 
     37 
     38== From a downloaded rdfhomepage2-package to a working installation == 
     39 
     40These are the problems that occured and the ways how to solve them: 
     41 
     42 * Checkout the rdfhomepage2 package to a folder of your choice 
     43 * While first running the following error occurs:[[BR]] 
     44   Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING in rdfhomepage2/rdfapi-php-0.95/api/ontModel/RdfsVocabulary.php on line 127 
     45 * Cause: On line 127 there is a function named „NAMESPACE“ declared. This is an illegal name for a function since PHP 5.3 
     46 * Solution: Change the function's name to „RDFHNAMESPACE“, and every call of it in every PHP-script! [[BR]] 
     47   Python Script for this task: 
     48   {{{ 
     49 
     50import os 
     51import re 
     52 
     53startdir = "/opt/lampp/htdocs/rdfhomepage2/" 
     54for root, dirs, files in os.walk(startdir): 
     55    for file in files: 
     56        if file[-4:] == ".php": 
     57            fopen = open(root+"/"+file,"r") 
     58            read = fopen.read() 
     59            oldread = read 
     60            read = re.sub("([\W])*NAMESPACE[\W]*\([\W]*\)",r"\1"+"RDFHNAMESPACE()",read) 
     61            fopen.close() 
     62            if read != oldread: 
     63                fopen = open(root+"/"+file,"w") 
     64                fopen.write(read) 
     65                fopen.close()  
     66                print root+"/"+file 
     67 
     68}}}