Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (21)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (6548)

  • Why X.Org's X Server has stopped working on Google Colab ?

    20 février 2021, par Rahul

    I am Using X server for the virtual screen on Google Colab and capturing that screen with ffmpeg to record it and live stream it to twitch. (for the reinforcement learning project)

    


    


    The above process was completely working till my last use of my Colab notebook (on mid-January 2021), but now (on 19th February 2021) I am using the same notebook and the streaming code has stopped working.

    


    


    I am adding config and log file data below. (I have never seen these files before because it was working, now it's not so I don't have any idea what wrong)

    


    The config file stored at /etc/X11/xorg.conf have the following data :

    


    # nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 418.67

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/mouse"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "Tesla T4"
    BusID          "PCI:0:4:0"
    MatchSeat      "seat-1"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Virtual     1920 1080
        Depth       24
    EndSubSection
EndSection


    


    The log file stored at /var/log/Xorg.0.log have the following data :

    


    [   464.605] 
X.Org X Server 1.19.6
Release Date: 2017-12-20
[   464.605] X Protocol Version 11, Revision 0
[   464.605] Build Operating System: Linux 4.15.0-124-generic x86_64 Ubuntu
[   464.605] Current Operating System: Linux 9d3fe3949671 4.19.112+ #1 SMP Thu Jul 23 08:00:38 PDT 2020 x86_64
[   464.605] Kernel command line: BOOT_IMAGE=/syslinux/vmlinuz.A init=/usr/lib/systemd/systemd boot=local rootwait ro noresume noswap loglevel=7 noinitrd console=ttyS0 security=apparmor virtio_net.napi_tx=1 systemd.unified_cgroup_hierarchy=false systemd.legacy_systemd_cgroup_controller=false csm.disabled=1 dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=1 i915.modeset=1 cros_efi loadpin.enabled=0 root=/dev/dm-0 "dm=1 vroot none ro 1,0 4077568 verity payload=PARTUUID=555BDB75-CBD7-CD4A-B24E-29B13D7AC0DF hashtree=PARTUUID=555BDB75-CBD7-CD4A-B24E-29B13D7AC0DF hashstart=4077568 alg=sha256 root_hexdigest=42104d547ac104fb7061529e78f53e4f3e8c3d3cbb040dc6e0f84aad68491347 salt=9dc7f3acc4e2ce65be16356e960c2b21b51a917fa31d2e891fd295490c991e41" mitigations=off
[   464.605] Build Date: 30 November 2020  08:01:56PM
[   464.605] xorg-server 2:1.19.6-1ubuntu4.8 (For technical support please see http://www.ubuntu.com/support) 
[   464.605] Current version of pixman: 0.34.0
[   464.605]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   464.605] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   464.605] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Feb 20 03:10:44 2021
[   464.606] (==) Using config file: "/etc/X11/xorg.conf"
[   464.606] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   464.607] (==) ServerLayout "Layout0"
[   464.607] (**) |-->Screen "Screen0" (0)
[   464.607] (**) |   |-->Monitor "Monitor0"
[   464.607] (**) |   |-->Device "Device0"
[   464.607] (**) |-->Input Device "Keyboard0"
[   464.607] (**) |-->Input Device "Mouse0"
[   464.607] (==) Automatically adding devices
[   464.607] (==) Automatically enabling devices
[   464.607] (==) Automatically adding GPU devices
[   464.607] (==) Automatically binding GPU devices
[   464.607] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   464.607] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[   464.607]    Entry deleted from font path.
[   464.607] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[   464.607]    Entry deleted from font path.
[   464.607] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[   464.607]    Entry deleted from font path.
[   464.607] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist.
[   464.607]    Entry deleted from font path.
[   464.607] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[   464.607]    Entry deleted from font path.
[   464.607] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[   464.607]    Entry deleted from font path.
[   464.607] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    built-ins
[   464.607] (==) ModulePath set to "/usr/lib/xorg/modules"
[   464.607] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[   464.607] (WW) Disabling Keyboard0
[   464.607] (WW) Disabling Mouse0
[   464.607] (II) Loader magic: 0x556eb77b8020
[   464.607] (II) Module ABI versions:
[   464.607]    X.Org ANSI C Emulation: 0.4
[   464.607]    X.Org Video Driver: 23.0
[   464.607]    X.Org XInput driver : 24.1
[   464.607]    X.Org Server Extension : 10.0
[   464.607] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory)
[   464.609] (--) PCI: (0:0:4:0) 10de:1eb8:10de:12a2 rev 161, Mem @ 0xc0000000/16777216, 0x380000000/268435456, 0x390000000/33554432
[   464.609] (II) no primary bus or device found
[   464.609] (II) LoadModule: "glx"
[   464.609] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   464.610] (II) Module glx: vendor="X.Org Foundation"
[   464.610]    compiled for 1.19.6, module version = 1.0.0
[   464.610]    ABI class: X.Org Server Extension, version 10.0
[   464.610] (II) LoadModule: "nvidia"
[   464.610] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[   464.610] (II) Module nvidia: vendor="NVIDIA Corporation"
[   464.610]    compiled for 4.0.2, module version = 1.0.0
[   464.610]    Module class: X.Org Video Driver
[   464.610] (II) NVIDIA dlloader X Driver  418.67  Sat Apr  6 02:51:17 CDT 2019
[   464.610] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   464.610] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[   464.610] (II) Loading sub module "fb"
[   464.610] (II) LoadModule: "fb"
[   464.611] (II) Loading /usr/lib/xorg/modules/libfb.so
[   464.611] (II) Module fb: vendor="X.Org Foundation"
[   464.611]    compiled for 1.19.6, module version = 1.0.0
[   464.611]    ABI class: X.Org ANSI C Emulation, version 0.4
[   464.611] (II) Loading sub module "wfb"
[   464.611] (II) LoadModule: "wfb"
[   464.611] (II) Loading /usr/lib/xorg/modules/libwfb.so
[   464.611] (II) Module wfb: vendor="X.Org Foundation"
[   464.611]    compiled for 1.19.6, module version = 1.0.0
[   464.611]    ABI class: X.Org ANSI C Emulation, version 0.4
[   464.611] (II) Loading sub module "ramdac"
[   464.611] (II) LoadModule: "ramdac"
[   464.611] (II) Module "ramdac" already built-in
[   464.637] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[   464.637] (EE) NVIDIA:     system's kernel log for additional error messages and
[   464.637] (EE) NVIDIA:     consult the NVIDIA README for details.
[   464.662] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[   464.662] (EE) NVIDIA:     system's kernel log for additional error messages and
[   464.662] (EE) NVIDIA:     consult the NVIDIA README for details.
[   464.662] (EE) No devices detected.
[   464.662] (==) Matched modesetting as autoconfigured driver 0
[   464.662] (==) Matched fbdev as autoconfigured driver 1
[   464.662] (==) Matched vesa as autoconfigured driver 2
[   464.662] (==) Assigned the driver to the xf86ConfigLayout
[   464.662] (II) LoadModule: "modesetting"
[   464.662] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   464.663] (II) Module modesetting: vendor="X.Org Foundation"
[   464.663]    compiled for 1.19.6, module version = 1.19.6
[   464.663]    Module class: X.Org Video Driver
[   464.663]    ABI class: X.Org Video Driver, version 23.0
[   464.663] (II) LoadModule: "fbdev"
[   464.663] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[   464.663] (II) Module fbdev: vendor="X.Org Foundation"
[   464.663]    compiled for 1.19.3, module version = 0.4.4
[   464.663]    Module class: X.Org Video Driver
[   464.663]    ABI class: X.Org Video Driver, version 23.0
[   464.663] (II) LoadModule: "vesa"
[   464.663] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[   464.663] (II) Module vesa: vendor="X.Org Foundation"
[   464.663]    compiled for 1.19.3, module version = 2.3.4
[   464.663]    Module class: X.Org Video Driver
[   464.663]    ABI class: X.Org Video Driver, version 23.0
[   464.663] (II) NVIDIA dlloader X Driver  418.67  Sat Apr  6 02:51:17 CDT 2019
[   464.663] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   464.663] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   464.663] (II) FBDEV: driver for framebuffer: fbdev
[   464.663] (II) VESA: driver for VESA chipsets: vesa
[   464.663] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[   464.663] (EE) open /dev/dri/card0: No such file or directory
[   464.663] (WW) Falling back to old probe method for modesetting
[   464.663] (EE) open /dev/dri/card0: No such file or directory
[   464.663] (WW) Falling back to old probe method for fbdev
[   464.663] (II) Loading sub module "fbdevhw"
[   464.663] (II) LoadModule: "fbdevhw"
[   464.663] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[   464.663] (II) Module fbdevhw: vendor="X.Org Foundation"
[   464.663]    compiled for 1.19.6, module version = 0.0.2
[   464.663]    ABI class: X.Org Video Driver, version 23.0
[   464.664] (EE) open /dev/fb0: No such file or directory
[   464.664] (WW) Falling back to old probe method for vesa
[   464.664] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   464.664] (EE) Screen 0 deleted because of no matching config section.
[   464.664] (II) UnloadModule: "modesetting"
[   464.664] (EE) Device(s) detected, but none match those in the config file.
[   464.664] (EE) 
Fatal server error:
[   464.664] (EE) no screens found(EE) 
[   464.664] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[   464.664] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   464.664] (EE) 
[   464.664] (EE) Server terminated with error (1). Closing log file.



    


    I am using this github repo to setup the video-streamer

    


    If anyone wants the colab notebook for the example then I will add it over here.

    


    For this problem I am really not sure where to file an issue for this so that's why I am writing this here.

    


  • Safari on Mac and IOS 14 Won't Play HTML 5 MP4 Video

    10 mars 2021, par Glen Elkins

    So i have developed a chat application that uses node for the back-end. When a user selects a video on their iphone it usually is .mov format so when it's sent to the node server it's then converted to mp4 with ffmpeg. All that works fine, then if i load up my chat again in Chrome on my mac the video plays just fine as the mp4.

    


    enter image description here

    


    This screenshot shows the video embed is there, set to mp4 yet it won't play in Safari on my mac or my phone, in fact it just shows the video as 0 seconds long yet i can play it in chrome and also download the mp4 file by accessing the embed url directly.

    


    Any ideas ? I had it convert to mp4 to prevent things like this, but safari doesn't seem to even like mp4 files.

    


    The back-end part that serves the private file is in Symfony 4 (PHP) :

    


    /**
     * @Route("/private/files/download/{base64Path}", name="downloadFile")
     * @param string $base64Path
     * @param Request $request
     * @return Response
     */
    public function downloadFile(string $base64Path, Request $request) : Response
    {


        // get token
        if(!$token = $request->query->get('token')){
            return new Response('Access Denied',403);
        }



        /** @var UserRepository $userRepo */
        $userRepo = $this->getDoctrine()->getRepository(User::class);

        /** @var User $user */
        if(!$user = $userRepo->findOneBy(['deleted'=>false,'active'=>true,'systemUser'=>false,'apiKey'=>$token])){
            return new Response('Access Denied',403);
        }



        // get path
        if($path = base64_decode($base64Path)){

            // make sure the folder we need exists
            $fullPath = $this->getParameter('private_upload_folder') . '/' . $path;



            if(!file_exists($fullPath)){
                return new Response('File Not Found',404);
            }

        

            $response = new Response();
            $response->headers->set('Content-Type', mime_content_type($fullPath));
            $response->headers->set('Content-Disposition', 'inline; filename="' . basename($fullPath) . '"');
            $response->headers->set('Content-Length', filesize($fullPath));
            $response->headers->set('Pragma', "no-cache");
            $response->headers->set('Expires', "0");
            $response->headers->set('Content-Transfer-Encoding', "binary");

            $response->sendHeaders();

            $response->setContent(readfile($fullPath));

            return $response;
        }

        return new Response('Invalid Path',404);
    }


    


    This works fine everywhere except safari when trying to embed the video. It's done like this because the videos are not public and need an access token.

    


    UPDATE : Here is a test link of an mp4, you'll have to allow the insecure certificate as it's on a quick test sub domain. If you open it in chrome, you'll see a 3 second video of my 3d printer curing station, if you load the same link in safari, you'll see it doesn't work

    


    https://tester.nibbrstaging.com/private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032

    


    The server runs on cPanel with Apache and i think it might be something to do with the video needs streaming ?

    


    UPDATED CODE THAT WORKS IN SAFARI BUT NOW BROKEN IN CHROME :

    


    Chrome is now giving Content-Length : 0 but it's working fine in safari.

    


    public function downloadFile(string $base64Path, Request $request) : ?Response
    {

        ob_clean();

        // get token
        if(!$token = $request->query->get('token')){
            return new Response('Access Denied',403);
        }


        

        /** @var UserRepository $userRepo */
        $userRepo = $this->getDoctrine()->getRepository(User::class);

        /** @var User $user */
        if(!$user = $userRepo->findOneBy(['deleted'=>false,'active'=>true,'systemUser'=>false,'apiKey'=>$token])){
            return new Response('Access Denied',403);
        }



        // get path
        if($path = base64_decode($base64Path)){

            // make sure the folder we need exists
            $fullPath = $this->getParameter('private_upload_folder') . '/' . $path;



            if(!file_exists($fullPath)){
                return new Response('File Not Found',404);
            }


            $filesize = filesize($fullPath);
            $mime = mime_content_type($fullPath);

            header('Content-Type: ' . $mime);

            if(isset($_SERVER['HTTP_RANGE'])){

                // Parse the range header to get the byte offset
                $ranges = array_map(
                    'intval', // Parse the parts into integer
                    explode(
                        '-', // The range separator
                        substr($_SERVER['HTTP_RANGE'], 6) // Skip the `bytes=` part of the header
                    )
                );



                // If the last range param is empty, it means the EOF (End of File)
                if(!$ranges[1]){
                    $ranges[1] = $filesize - 1;
                }

                header('HTTP/1.1 206 Partial Content');
                header('Accept-Ranges: bytes');
                header('Content-Length: ' . ($ranges[1] - $ranges[0])); // The size of the range

                // Send the ranges we offered
                header(
                    sprintf(
                        'Content-Range: bytes %d-%d/%d', // The header format
                        $ranges[0], // The start range
                        $ranges[1], // The end range
                        $filesize // Total size of the file
                    )
                );

                // It's time to output the file
                $f = fopen($fullPath, 'rb'); // Open the file in binary mode
                $chunkSize = 8192; // The size of each chunk to output

                // Seek to the requested start range
                fseek($f, $ranges[0]);

                // Start outputting the data
                while(true){
                    // Check if we have outputted all the data requested
                    if(ftell($f) >= $ranges[1]){
                        break;
                    }

                    // Output the data
                    echo fread($f, $chunkSize);

                    // Flush the buffer immediately
                    @ob_flush();
                    flush();
                }
            }else{

                // It's not a range request, output the file anyway
                header('Content-Length: ' . $filesize);

                // Read the file
                @readfile($filesize);

                // and flush the buffer
                @ob_flush();
                flush();



            }

        }else {

            return new Response('Invalid Path', 404);
        }
    }


    


    I have notice in chrome that it's sending the range header like this :

    


    Range : bytes=611609-

    


    Where safari sends

    


    Range : bytes=611609-61160

    


    So for some reason chrome is missing the second range amount, that obviously means my code can't find a range number for the second one.

    


    Doesn’t matter what I do I can’t get it working in both chrome and safari. Safari wants the byte range part , chrome seems to request it then sends a new request for the full file but even the full file part of the code gives a 500 error. If I take out the byte range bit then it works fine in chrome but not safari.

    


    UPDATE :

    


    Here is some strange things going on in chrome :

    


    For the video i am testing with it makes 3 range requests :

    


    REQUEST 1 HEADERS - asking for bytes 0- (to the end of the file)

    


    GET /private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032 HTTP/1.1

Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Accept-Encoding: identity;q=1, *;q=0
Accept: */*
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: video
Referer: https://gofollow.vip/
Accept-Language: en-US,en;q=0.9
Range: bytes=0-


    


    RESPONSE GIVES IT BACK ALL THE BYTES IN THE FILE AS THAT'S WHAT WAS ASKED FOR BY CHROME :

    


    HTTP/1.1 206 Partial Content
Date: Wed, 10 Mar 2021 12:35:54 GMT
Server: Apache
Accept-Ranges: bytes
Content-Length: 611609
Content-Range: bytes 0-611609/611610
Vary: User-Agent
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: video/mp4


    


    SECOND REQUEST HEADERS : NOW IT'S ASKING FOR 589824 to the end of the file :

    


    Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Accept-Encoding: identity;q=1, *;q=0
Accept: */*
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: video
Referer: https://gofollow.vip/
Accept-Language: en-US,en;q=0.9
Range: bytes=589824-


    


    RESPONSE OBLIGES :

    


    HTTP/1.1 206 Partial Content
Date: Wed, 10 Mar 2021 12:35:55 GMT
Server: Apache
Accept-Ranges: bytes
Content-Length: 21785
Content-Range: bytes 589824-611609/611610
Vary: User-Agent
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: video/mp4


    


    THEN IT'S MAKING THIS 3rd REQUEST THAT GIVES AN INTERNAL SERVER ERORR, THIS TIME IT'S LITERALLY ASKING FOR THE LAST BYTE :

    


    GET /private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032 HTTP/1.1

Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Accept-Encoding: identity;q=1, *;q=0
Accept: */*
Sec-Fetch-Site: same-site
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: video
Referer: https://gofollow.vip/
Accept-Language: en-US,en;q=0.9
Range: bytes=611609-


    


    RESPONSE - THE CONTENT LENGTH IS 0 BECAUSE THERE IS NO DIFFERENCE BETWEEN THE REQUESTED BYTES AND THE BYTES RETURNED :

    


    HTTP/1.1 500 Internal Server Error
Date: Wed, 10 Mar 2021 12:35:56 GMT
Server: Apache
Accept-Ranges: bytes
Cache-Control: max-age=0, must-revalidate, private
X-Frame-Options: DENY
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Referrer-Policy: origin
Strict-Transport-Security: max-age=31536000; includeSubDomains
Expires: Wed, 10 Mar 2021 12:35:56 GMT
Content-Length: 0
Content-Range: bytes 611609-611609/611610
Vary: User-Agent
Connection: close
Content-Type: text/html; charset=UTF-8


    


  • How Piwik uses Travis CI to deliver a reliable analytics platform to the community

    26 mai 2014, par Matthieu Aubry — Development, Meta

    In this post, we will explain how the Piwik project uses continuous integration to deliver a quality software platform to dozens of thousands of users worldwide. Read this post if you are interested in Piwik project, Quality Assurance or Automated testing.

    Why do we care about tests ?

    Continuous Integration brings us agility and peace of mind. From the very beginning of the Piwik project, it was clear to us that writing and maintaining automated tests was a necessity, in order to create a successful open source software platform.

    Over the years we have invested a lot of time into writing and maintaining our tests suites. This work has paid off in so many ways ! Piwik platform has fewer bugs, fewer regressions, and we are able to release new minor and major versions frequently.

    Which parts of Piwik software are automatically tested ?

    • Piwik back-end in PHP5 : we use PHPUnit to write and run our PHP tests : unit tests, integration tests, and plugin tests.
    • piwik.js Tracker : the JS tracker is included into all websites that use Piwik. For this reason, it is critical that piwik.js JavaScript tracker always works without any issue or regression. Our Javascript Tracker tests includes both unit and integration tests.
    • Piwik front-end : more recently we’ve started to write JavaScript tests for the user interface partially written in AngularJS.
    • Piwik front-end screenshots tests : after each change to Piwik, more than 150 different screenshots are automatically taken. For example, we take screenshots of each of the 8-step installation process, we take screenshots of the password reset workflow, etc. Each of these screenshot is then compared pixel by pixel, with the “expected” screenshot, and we can automatically detect whether the last code change has introduced an undesired visual change. Learn more about Piwik screenshot tests.

    How often do we run the tests ?

    The tests are executed by Travis CI after each change to the Piwik source code. On average all our tests run 20 times per day. Whenever a Piwik developer pushes some code to Github, or when a community member issues a Pull request, Travis CI automatically runs the tests. In case some of the automated tests started failing after a change, the developer that has made the change is notified by email.

    Should I use Travis CI ?

    Over the last six years, we have used various Continuous Integration servers such as Bamboo, Hudson, Jenkins… and have found that the Travis CI is the ideal continuous integration service for open source projects that are hosted on Github. Travis CI is free for open source projects and the Travis CI team is very friendly and reactive ! If you work on commercial closed source software, you may also use Travis by signing up to Travis CI Pro.

    Summary

    Tests make the Piwik analytics platform better. Writing tests make Piwik contributors better developers. We save a lot of time and effort, and we are not afraid of change !

    Here is the current status of our builds :
    Main build :
    Screenshot tests build :

    PS : If you are a developer looking for a challenge, Piwik is hiring a software developer to join our engineering team in New Zealand or Poland.