Images not showing

I just installed TAO 3.3-RC2 and imported QTI's from 3.2. Worked like a charm!
But images are not showing when test takers take the test. They are visible in the back end.
I get a HTTP ERROR 404: - e.g. when trying to see this image:*/en-US/boy at museum_bred.jpg

The file getFileFlysystem.php is at the expected place.

Any idea what could be wrong?
Best regards,


  • If you set the system debug is there any more information? Also what version of PHP are you running?

  • I am using PHP 7.3.
    I have debug mode set to true, but I don't get anything in the apache-error-log. In the browser console, I get: "Failed to load resource: the server responded with a status of 404 (Not Found)".
    Should I look somewhere else for the error-information?

  • I looked for the image to find out if it was copied as part of the export/import, and I found it in a subfolder to this new 3.3-installation ("./data/tao/public/6/f/f/bb7abd4b13c8bb8b68c67f60c7b1e/en-US"), so it seems that the images are copied as part of the import (and when I see the image in the backend, it also seems to point to a folder in this installation). It is strange!

  • I tried to replace an image and make a new delivery to see if it was connected to the import, but the same problem appears. So it seems like the problem is viewing of images in general.

    Could this be connected to that this instance has a default en-US-language setting, and testers are da-DK?

    Is it possible to change the default to da-DK? (I tried to do that in the generis-settings-file, but that made all items get an "unknown" name (or something like that), so I changed it back).

  • amyamy
    edited July 31

    Can you downgrade to PHP 7.2 which is the version for this release? And can we get a copy of your .htaccess?

  • Downgrading didn't help (I thought I saw somewhere that php7.3 was the one for this release, but I guess I remembered wrong).

    Options +FollowSymLinks
    <IfModule mod_rewrite.c>
    RewriteEngine On
    #don't match resources and tests
    RewriteCond %{REQUEST_URI}      !/views/        [NC]
    RewriteCond %{REQUEST_URI}      !/tao/install/  [NC]
    RewriteCond %{REQUEST_URI}  !/tao/getFileFlysystem.php [NC]
    #call entry point for url resolving and framework bootstrap
    RewriteRule ^(.*)$ index.php [L]
    #required by token based access system
    RewriteCond %{REQUEST_URI} (.*)/tao/getFileFlysystem.php/  [NC]
    RewriteRule ^(.*)$ tao/getFileFlysystem.php [L]

    Thanks for helping me!

  • I managed to set up the debug logger. I get this:

    [2019-07-31 16:23:29] tao.INFO: File 2/0/b/a3cace62d8d8f0718b0d001500eb4/en-US/aee651835d4142e0151c1.jpeg not found {"0":"tao_models_classes_FileNotFoundException","file":"/var/www/tao33/tao/models/classes/websource/BaseWebsource.php","line":112} {"uid":"7ad3669d75a8835759869fea"}

    I also get this:

    [2019-07-31 16:23:29] tao.INFO: File 2/0/b/a3cace62d8d8f0718b0d001500eb4/en-US/tao-user-styles.css not found {"0":"tao_models_classes_FileNotFoundException","file":"/var/www/tao33/tao/models/classes/websource/BaseWebsource.php","line":112} {"uid":"5c4d8130e5c93920f39b0411"}

    I guess it is not relevant to this error? But maybe something I should find a way to remove?

  • I managed to find the file in the file system: data/tao/public/2/0/b/a3cace62d8d8f0718b0d001500eb4/en-US/aee651835d4142e0151c1.jpeg - so I guess the problem is in a path somewhere?

  • Hi Amy,
    Great to see that TAO 3.3 is now released. I am still struggling with this error. By looking a little more into the error messages and the script referred to, BaseWebsource.php, it seems that the two error messages are indeed connected, and that the problem is with a filesystem setting somewhere. I really would appreciate a suggestion on where to look.
    I am using Ubuntu 18.04, apache 2.4.29, php 7.2, and TAO 3.3-RC2.

  • Cen you try to re-add the image within TAO to the item?

  • Yes. I tried to replace the image with a new one. Now I also tried to create a new item, insert an image from the media gallery, and deliver. Then I created another item, inserted an image that I uploaded, created a new test and delivered.
    It is all the same.
    The problem is with all custom file reads, actually - I also tried to upload a custom stylesheet. It succeded:

    Writting in i15646614561971272/itemContent/en-US/style/custom/battery-matrix.css {"file":"/var/www/tao33/generis/common/oatbox/filesystem/File.php","line":188} {"uid":"df3bc1e5da3


    But when it should be read:

    tao.INFO: File style/custom//battery-matrix.css not found {"0":"tao_models_classes_FileNotFoundException","file":"/var/www/tao33/taoItems/models/classes/media/LocalItemSource.php","line":27

    3} {"uid":"52a005acc147613c39b11edd"}

    So the problem is a path somewhere, I think... I just cannot find out where to look...

  • Look in config/generis.conf.php that's where most configuration changes are made.

  • I looked there. The only path I could see as possibly related was FILES_PATH which was just data/. I tried to install tao3.3 locally and there the path was from the root dir, so I tried to change that in my production tao instance (to: /var/www/tao33/data/). But that didn't help. Most of the remaining settings are the same.

    Just to sum up: When seeing the items in preview, they appear just fine with images.
    When seeing them as a test-taker, the images aren't shown, and I get the errors "File **** not found" - both for images and custom css-files. And "Failed to load resource: the server responded with a status of 404 " in the console.

  • I just installed tao in another subdomain on the same server. It worked!
    I looked into the apache-directives - everything was the same. So I guess something is wrong with the install, not with the server.

    So now I need a good advice on how to replace the tao-version at the right subdomain with a clean version - preferably without having to export everything and import again. Is there a simple way to do that?

  • Okay... Solved. I took a bite of the sour apple, as we say in Danish, and reinstalled and re-imported my items. Now I see the images...
    I guess we will have to live without knowing the reason for this strange behavior...

  • I have been thinking. I started out with php7.3, and later downgraded to 7.2. Maybe the problem was something related to php7.3. So if someone is having the same type of problem, maybe look for problems related to that... I don't know.
    I would like to mark this thread as [Solved] - how do I do that?

  • No need to:)

  • edited October 14

    I am using PHP 7.2.23 and I have the exact same issue. So I don't think its just the PHP version, unless the documentation is incorrect and should say 7.2.0?

    I followed the install guide here.. it all appears to be working so far except for images.

    This is the link to the image it's returning.*/en-US/phantom-playbook.png

  • I have PHP 7.2.19 on CentOS 6. Can you be more specific on the error from your logs?

Sign In or Register to comment.

We use cookies on our website to support technical features that enhance your user experience. Cookie Policy Privacy Policy