HOWTO Alfresco PHP Library and xUbuntu


I tried to install Alfresco PHP Library and install it on my kubuntu developing box and it’s really very easy to get it running! Instalation procedure for windows is described in Alfresco wiki, but there are some differencies.

To get it running it’s needed to install apache and php:

sudo apt-get install apache2 libapache2-mod-php5

Then you need to download PHP Library from Sourceforge. After that you can unpack it somewhere; good place is for example /usr/share/php/alfresco-php-library. Now it’s not bad to set virtual directory to that directory. So edit your /etc/apache2/conf.d/alias file and add something like this:

Alias /Alfresco/ /usr/share/php/alfresco-php-library/

<Directory /usr/share/php/alfresco-php-library/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Also including this directory automaticaly (/etc/php5/apache2/php.ini) should be cool:

include_path = „.:/usr/share/php/alfresco-php-library“

Now you need to restart apache:

/etc/init.d/apache2 restart

And edit configuration file in alfresco-php-library/Examples/config.php.

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

After all that you can try to open web browser and point it to http://localhost/Alfresco/Examples/SimpleBrowse/ and it should work 😎


Image and video hosting by TinyPic

5 komentářů: “HOWTO Alfresco PHP Library and xUbuntu”

  1. Dobrý den,
    je tento postup použitelný i s Alfresco Community version nebo musím mít Enterprise? Zkouším to nad Community, ale marně. Výsledkem je jen bílá obrazovka 🙁

  2. Dobry den,
    urcite to pouzitelne je, pouzivame pouze Community verzi, s Enterprise zkusenosti nemam.

  3. Prošel jsem váš návod znovu od začátku na linuxu, obdobně i na winXP, ale stále nic. Je mi hlavně podezřelé, že adresa kterou zadávám do configu http://localhost:8080/alfresco/api v prohlížeči negunguje. Hází mi to chybu:

    Axis HTTP Servlet
    Hi, you have reached the AXIS HTTP Servlet. Normally you would be hitting this URL with a SOAP client rather than a browser.

    In case you are interested, my AXIS transport name appears to be ‚http‘

    Můžete poradit? Předem velice děkuji.
    Kamil

  4. To bych rekl, ze je naprosto v poradku. Pozadavek musi byt typu POST, prohlizec posila GET. Potom staci autentikovat uzivatele a vytvorit session, napr. takhle to mam ja:

    $repository = new Repository($repositoryUrl);
    $ticket = $repository->authenticate($userName, $password);
    $session = $repository->createSession($ticket);
    $spacesStore = new SpacesStore($session);

Napsat komentář

Vaše e-mailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *