When you transcode through OpenPackage.biz, the op_video field saves the absolute path to the video, as opposed to the relative path from Drupal (base_path). This is an issue because when you display the video, it outputs something like /var/www/drupal/sites/all/files/videos/video.flv instead of /drupal/sites/all/files/videos/video.flv.

This must be going on when it saves the file into the database.

Comments

reformatt’s picture

it seems to combine 2 paths the relative path + absolute path + file name

jbrown’s picture

Assigned: Unassigned » jbrown

This is related to _op_video_canonical_filepath() and similar (but different) to this bug: #235950: filepath is not correct!

See this: http://uk2.php.net/manual/en/function.realpath.php#78514

I was relying on realpath() not appending '/'. This is what happens on my 5.2.3-1ubuntu6.3. This contradicts the posting linked above.

It seems some php5s do append the '/'. See here: #238675: still not working

Could everyone post their php versions.

I don't think this is related to the transcoding method.

jbrown’s picture

I have released 5.x-3.4 with a fix. Please try it out.

robloach’s picture

Although it does output the correct URL paths (not the absolute video path), there seems to be a couple things wrong:

  1. Stores the absolute path to the video in the op_video_files table. This could cause potential problems when changing servers.
  2. When viewing the videos, it seems to display a previously uploaded video. I looked through the database and it is referencing the correct video id, it's just not using it. Very strange...
jbrown’s picture

Could you try it on a fresh install of Drupal?

reformatt’s picture

Version: 5.x-3.x-dev » 5.x-3.4

Hi Jonathan,

The issue still persists. The absolute & relative paths are still an issue and for some reason it only plays the first uploaded video.
I am trying a bunch of scenario's with fresh installs and I seem to be running into these problems, maybe I am doing something wrong but I will keep hammering at it in order to give you more specifics.

Great job on the module so far, it is a fantastic tool.

~Matty

reformatt’s picture

the path it sends to flash basically is the webpath+systempath for instance: http://www.site.com/drupal/C:/htdocs/drupal/videos/3.flv

jbrown’s picture

I have released 5.x-3.5, which should fix your problems. _op_video_canonical_filepath() is now less anal.

Rob: is your files dir a symlink?

reformatt: I don't know how well my module works on windows - please let me know how this release goes.

Thanks

robloach’s picture

Version: 5.x-3.4 » 5.x-3.5
Status: Active » Fixed

Confirmed works in 3.5! Great job, Jon. Matt and I are running on a Windows server.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.