Search

Hi all, after a few months, i got back to my little project. So, everything went fine in my local wamp server. Then i uploaded to a live test site, and i have a problem :-)

I'm pretty sure that the problem i'm facing is not a symphony related one, but i'm helpless at the moment, and have noone else to ask for help :-) Actually, nickdunn had helped me before when i first started this project to setup the workflow, so first a 'thank you' to him.

Let me first explain what i'm after:

I have a 'projects' folder under the workspace/uploads. The video file and the thumbnail image are uploaded to a related folder in this 'projects' folder.

+workspace/uploads/projects
  +project1
    -video_for_project1
    -thumbnail_for_project1
  +project2
    -video_for_project2
    -thumbnail_for_project2
  ...

The 'works' section has a field called 'path' for the user to enter the related 'project' folder only. The works page xsl is like this:

<xsl:template match="entry">
<xsl:variable name="current-path" select="path"/>
<xsl:variable name="current-work" select="document(concat('workspace/assets/contents.php?path=', $current-    path))" />
<div class="work">
<a class="flowplayer" href="{$workspace}/uploads/projects/{$current-path}/{$current-work/uploads/movie}"><img src="{$root}/image/1/72/67/uploads/projects/{$current-path}/{$current-work/uploads/thumb}" /> </a>
</div>
</xsl:template>

The template gets the 'path' value, runs a php script with a GET variable set to the path value. The contents.php script gets the folder path, gets the contents of this folder and outputs an xml file. Here is the php code:

<?php
header("Content-Type: text/xml");
$xmlstr = <<<XML
<uploads></uploads>
XML;
require_once('scandirectory.php');
$dir_to_scan= "../uploads/projects/" . $_GET['path'];
$files = scan_directory_recursively($dir_to_scan);
$xml = new SimpleXMLElement($xmlstr);
foreach ($files as $dir)
    {
                $ext = pathinfo($dir['name'], PATHINFO_EXTENSION);
                if ($ext != 'mp4')
                    {
                        $thumb = $xml->addChild('thumb',$dir['name']);
                    }
                else
                    {
            $movie = $xml->addChild('movie',$dir['name']);    
                    }
    }
echo $xml->asXML();
?>

Then, this xml file is transformed to print out a thumbnail and a link for the video. As i said, this setup worked perfecetly on my local server. But when i uploaded this to my live server to test it, it gives me an error:

XSLTProcessor::transformToXml(): I/O warning : failed to load external entity   "/home/makina/public_html/v2/workspace/pages/workspace/assets/contents.php?path=0009_hokkabaz"

If i change the link to the php script to an absolute url, the server throws another error saying:

XSLTProcessor::transformToXml(): URL file-access is disabled in the server configuration
XSLTProcessor::transformToXml(http://makinafx.com/v2/workspace/assets/contents.php?path=0009_hokkabaz):    failed to open stream: no suitable wrapper could be found
XSLTProcessor::transformToXml(): I/O warning : failed to load external entity    "http://makinafx.com/v2/workspace/assets/contents.php?path=0009_hokkabaz"

I wanted to ask whether i'm doing something silly, or is this a server configuration issue.

Thank you,

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details