cancel
Showing results for 
Search instead for 
Did you mean: 

Error in BaseObject.php (Urgently)

maqsood
Confirmed Champ
Confirmed Champ
Hi

I am trying to execute the below PHP script but getting error on browser
Fatal error: Cannot redeclare class AlfBaseObject in C:\xampp\htdocs\Alfresco\Alfresco\Service\BaseObject.php on line 27

not able to figure out whats the actual error.
Any help appreciated!!


<?php
include ("Repository.php");
include ("Session.php");

   $repositoryUrl = "http://localhost:8080/alfresco/api";
   $userName = "admin";
   $password = "admin";

   $repository = new Repository($repositoryUrl);

    $ticket = $repository->authenticate($userName, $password);

   $session = $repository->createSession($ticket);
?>
<html>
   <head>
   <title>Basic Tutorial One - Authentication</title>
   </head>

   <body>
       <big>Basic Tutorial One - Authentication</big>
      <p>
              Connected to repository <?php echo $repositoryUrl ?>
              as user <?php echo $userName ?>
              with ticket <?php echo $ticket ?>
           </p>
   </body>
   </html>
2 REPLIES 2

gyro_gearless
Champ in-the-making
Champ in-the-making
Maybe try 'require_once' instead of 'include' - should work this way.

If not, what is your PHP include path?

Cheers
Gyro

maqsood
Confirmed Champ
Confirmed Champ
Thanks Gyro for your reply.

have resolved the issue, i got a wrong class name in the BaseObject file thats why it was throwing error.