Skip to content

Commit

Permalink
Send log error's to webserver log file
Browse files Browse the repository at this point in the history
Added favicon
Update README file
  • Loading branch information
viniciusandrade committed Jul 31, 2012
1 parent 1ef621d commit ebf584a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 20 deletions.
36 changes: 24 additions & 12 deletions README.md
Expand Up @@ -8,9 +8,9 @@ The application work with PHP 5.3.3 or later.

## Instalation

1. Download the last version from **Downloads** link from github repository (zip or tar gz file) and
* Download the last version from **Downloads** link from github repository (zip or tar gz file) and
extract the file to your server.
Example: Creating a structure and deploy the application under /opt/ directory:
Example: Creating a structure and deploy the application under server **/opt/** directory:

```
$ cd /opt/
Expand All @@ -21,29 +21,41 @@ Example: Creating a structure and deploy the application under /opt/ directory:
$ mv bireme-isis-oai-provider-53c0abc/ isis-oai-provider
```

1. Create a VirtualHost for the web application (alternatively you can copy directories for a existing VirtualHost)
* Create a VirtualHost for the web application (alternatively you can copy directories for a existing VirtualHost)

```
<VirtualHost *:80>
ServerName isis-oai-provider.local
DocumentRoot /opt/isis-oai-provider/htdocs/
<Directory "/home/projects/isis-oai-provider/htdocs">
Options +FollowSymLinks
DocumentRoot /opt/bireme/isis-oai-provider/htdocs/
<Directory "/opt/bireme/isis-oai-provider/htdocs">
Options +FollowSymLinks
AllowOverride FileInfo
Options Indexes ExecCGI MultiViews FollowSymLinks
MultiviewsMatch Handlers
Order allow,deny
Allow from all
</Directory>
<Directory "/opt/projects/isis-oai-provider/cgi-bin">
Options +ExecCGI
AllowOverride None
Options FollowSymLinks MultiViews
Order deny,allow
<Directory "/opt/bireme/isis-oai-provider/cgi-bin">
Options +ExecCGI
AllowOverride None
Options FollowSymLinks MultiViews
Order deny,allow
</Directory>
ScriptAlias /cgi-bin/ /opt/isis-oai-provider/cgi-bin/
ScriptAlias /cgi-bin/ /opt/bireme/isis-oai-provider/cgi-bin/
LogLevel warn
CustomLog /var/log/apache2/isis-oai-provider.log combined
ServerSignature On
</VirtualHost>
```

* Rename configuration files

```
$ cd htdocs/isis-oai-provider/
$ mv oai-config-sample.php oai-config.php
$ mv oai-databases-sample.php oai-databases.php
```
Binary file added htdocs/isis-oai-provider/images/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions htdocs/isis-oai-provider/index.php
Expand Up @@ -23,6 +23,7 @@
<head>
<title>ISIS-OAI-PROVIDER Harvesting Interface</title>
<link rel="stylesheet" type="text/css" href="css/layout.css">
<link rel="shortcut icon" href="images/favicon.ico"/>
</head>
<script type="text/javascript" src="js/functions.js"></script>
<body marginheight="0" topmargin="0" leftmargin="0">
Expand Down
10 changes: 4 additions & 6 deletions htdocs/isis-oai-provider/lib/Log.php
Expand Up @@ -117,12 +117,12 @@ function logError($message)

$fp = @fopen ($this->directory . "logerror.txt", "a+b");
if ( !$fp ){
print ("Unable to open log file for update " . LOG_DIR . "logerror.txt");
error_log ("Unable to open log file for update " . LOG_DIR . "logerror.txt");
}else{
if ( !fwrite($fp, date("Y-m-d H:i:s") . LOG_SEPARATOR . $message . "\r\n") ){
print ("Unable to write in log file " . $this->directory . "logerror.txt");
error_log ("Unable to write in log file " . $this->directory . "logerror.txt");
}else{
print ("Log error message: " . $message);
error_log ("Log error message: " . $message);
}
}
return;
Expand Down Expand Up @@ -155,7 +155,5 @@ function logAccess()
$text = "[".date('d/m/Y h:i:s')."] - $host;$ip;$data\n";
$this->writeFile($text);
}

}

?>
?>
4 changes: 2 additions & 2 deletions htdocs/isis-oai-provider/lib/OAIServer.php
Expand Up @@ -249,8 +249,8 @@ private function ProcessGetRecord()
{

$ItemId = $this->DecodeIdentifier($this->Args["identifier"]);
#Create to show database-id
$ItemDatabaseId= $this->DecodeDatabaseIdentifier($this->Args["identifier"]);
#Create to show database-id
$ItemDatabaseId= $this->DecodeDatabaseIdentifier($this->Args["identifier"]);

}
else
Expand Down

0 comments on commit ebf584a

Please sign in to comment.