Can't create a community

  • Hi again,

    I now have fez up and running, but I can't create a community.
    After entering all the metadata about the community I get this screen.

    Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Empty string supplied as input in /var/www/fez/include/class.fedora_api.php on line 117

    Warning: sort() expects parameter 1 to be array, boolean given in /var/www/fez/include/class.fedora_api.php on line 493

    Warning: reset() [function.reset]: Passed variable is not an array or object in /var/www/fez/include/class.fedora_api.php on line 494

    Warning: Invalid argument supplied for foreach() in /var/www/fez/include/class.xsd_display.php on line 734

    Warning: Invalid argument supplied for foreach() in /var/www/fez/include/class.xsd_display.php on line 756

    Fatal error: Call to a member function getXSD_HTML_Match() on a non-object in /var/www/fez/include/class.record.php on line 1372

    Please forgive me if this has been asked before, but I can't find any trace of this question on the mailing list or forum...

    Fedora 2.1.1,
    Fez 1.2,
    Apache 1.3,
    Mysql 4.1.12,
    Ubuntu Breazy

    • Kyle Fenton
      Kyle Fenton

      I was getting the same error, but have been able to fix it. Assuming that Fedora and Fez are on the same machine, set up Fedora to use "no-ssl-authenticate-apim" (if currently set otherwise, back up your fedora.fcfg and see, and configure your firewall so that only Fez (localhost) can access the Fedora apis.

      Then, in Fez'
      //base fedora server domain - note SSL/HTTPS was only available from Fedora 2.1 onwards. Fedora 2.0 and previous only offered HTTP
      @define("APP_FEDORA_SETUP", "nosslapim");
      @define("APP_FEDORA_LOCATION", "localhost:8080/fedora"); // the location of your fedora server without the http or https protocol usually with port 8080
      @define("APP_FEDORA_SSL_LOCATION", ""); // the location of your fedora ssl server without the http or https protocol usually
      with port 8443
      @define("APP_FEDORA_APIA_PROTOCOL_TYPE", "http://");
      @define("APP_FEDORA_APIM_PROTOCOL_TYPE", "http://");

      For now, I've stopped trying to get Fez to use SSL to connect to Fedora, as I was never able to get it to work, but this provides a secure installation.

      If/when I need remote encrypted access to the Fedora api, I'll investigate making use of stunnel if Fedora ssl security is still a problem.

      Kyle Fenton
      Emory University
      Atlanta, Georgia

      • Christiaan

        Hi Kyle and James,

        You are correct that 1.2 has problems with Fedora using SSL. Mainly due to untrusted SSL certificates on the Fedora server making CURL return an error.

        Please see the Fez troubleshooting wiki on Fedora SSL problems for more information and a fix for this:


    • Christiaan

      Hi James,

      What version of PHP are you running? It needs to be PHP5, as version 4 will not suffice.

      Make sure you read the Fez installation instructions, especially the PHP5 configuration prerequites carefully. You will mostly likely need to compile PHP5 from source with those extra configure options. Pay special attention to the Tidy and JHOVE instructions.


    • Sorry it is PHP 5.1.4

      I think the issue might be something to do with setting up my fedora repository with ssl access to the management interface. I tried changing to @define("APP_FEDORA_APIM_PROTOCOL_TYPE", "https://");

      Now it doesn't error, but nothing happens...

      Could it be todo with this line in the install instruction.
      IMPORTANT: Make sure that whatever PID prefix namespace you choose is also in the "retainPIDS" set of namespaces. Eg if your PID namespace is "UQ" make sure "UQ" is in the list of retainPIDS in fedora.fcfg. If this is not set then Fez will not be able to create objects in Fedora.

      I'm not quite sure how to do that where do I set the PID namespace?

      • Christiaan


        Its all in your fedora.fcfg fedora config file. The retainPIDS and namespace variables are close to eachother in the fcfg. The default is 'changeme'.

        Did you compile PHP with the required configure options or install it from a breezy package?

    • I compiled php with following:
      php-5.1.4 # ./configure --with-gd --with-ldap --with-tidy --with-mysql
      --with-curl --with-zlib --with-apxs --with-xml --with-libxml
      --enable-xml --with-dom

      I had a bit of a mission getting apache to accept the compiled module, but it all seems fine now.

      My fedora.fcfg now looks like this:
      <param name="pidNamespace" value="UoW"/>
      <param name="retainPIDs" value="demo test UoW changeme fedora-bdef fedora-bmech tutorial"/>

      Fez still hangs when trying to create a community.

      • Christiaan

        That looks correct. Try installing Fez and Fedora without SSL to start with to make sure that is the problem. SSL can be tricky to configure properly.

    • Matthew Smith
      Matthew Smith

      I think you need php configured

      ./configure --with-openssl=/usr/local/ssl

      with all the other stuff to use ssl. But check that ssl is in /usr/local it might be in /usr


    • António

      I get the same error...
      Have you manage to solve the error?