vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - Links and Downloads Manager (https://vborg.vbsupport.ru/showthread.php?t=119041)

PitchouneN64ngc 10-26-2007 11:00 AM

Problem fixed for me, many thanks, I'll review my French translation of your mod ;)

Just some little uncached templates:
- when you are in local_links_admin.php?set=mirrors, you have an uncached template named "links_admin_onemirror".
- when you looking an entry with template "links_linkbit_mtop" (or local_links_admin.php?set=linkbits), this template is uncached.

neopet001 10-26-2007 02:56 PM

I JUST want to play swf files as it! with original html embed code , I don't want to play flv or use the wimpy wsap ...swf player , just want to play swf directly!
Would you please show me how can I do this ?
Thank you so much!

itsblack 10-26-2007 03:32 PM

Thank you Andrew for the update.
Here is the updated chinese translation. 7 places has been changed. (2 phrases you changed in this edition, and 5 old phrases I modified recently.)

AndrewD 10-26-2007 04:25 PM

Quote:

Originally Posted by neopet001 (Post 1369130)
I JUST want to play swf files as it! with original html embed code , I don't want to play flv or use the wimpy wsap ...swf player , just want to play swf directly!
Would you please show me how can I do this ?
Thank you so much!

Well, if you install the versin of the code a few posts back (https://vborg.vbsupport.ru/showpost....postcount=2560), then there's a 'extra' provided that uses Jeroen van Wijering's general flash media player. This will handle swfs, although it implements the javascript-based player rather than a straight embed.

Just to spell it out
- install ldm 2.2.8 post 1
- go to vbulletin/admin/attachments/filetypes and add a filetype plus corrent mimetype info for swf (Content-type: application/x-shockwave-flash). Alternatively install the LDM add-mimetypes extra which will do the job for you
- read the instructions in the extras/jwplayer directory, upload the required files and install the required plugins

jGas 10-26-2007 06:37 PM

Quote:

Originally Posted by AndrewD (Post 1368060)
Three ideas:

- An 'extra' based on the LDM favourites system, so that users' favourites were treated as nominations for 'entry of the month'. Currently, the favourites table does not keep track of the date/time the item was marked as a favourite, so this would have to be modified.

- Ditto, an 'extra' based on the LDM ratings system.

Both approaches would be quite straighttforward to implement, but might have some compromises - not sure.

- A completely new 'entry of the month' system, running in parallel to ratings and favourites.

I'm assuming that, when you say 'which songs posted on a month the users like more' that this feature only needs to work with new entries in the month. Can someone nominate an old entry this month? If so, what do we do at the end of the month - do we discard the old ratings and start again, or is the system supposed to keep track of the historic winners also?


i've noticed that my users do not use the favourite system so much...but they often rate them...so i think that the 'extra' based on the LDM ratings system would be the best solution.

you have reached the point: at the beginning of the month we, the admins, have to look only for the ratings given in the last month (an old entry can't be nominated) but the system i supposed to keep track of the historic winner and also of the rating given the month before.

when you have some time, can you give it a look? thanks :D :D

obmob 10-27-2007 02:46 AM

Quote:

Originally Posted by AndrewD (Post 1368861)
Sorry about this - you've both been hit by the bug I reported in the starter post to this thread - handling open_basedir.

Attached to this post is, I hope, a fixed version of 2.2.8. At least, I've tried all the possible combinations of operating systems I can get my hands on.

This version has these fixes/extensions:

- Fixed the code for checking directory pathways against server operating system (this is the one that I believe is causing the problems)
- Fixed spurious *rename* error message if the name of an uploaded file contains characters that are invalid on some operating systems (I think this is pspcrazy's problem)
- Modified the number of "My Recent LDM Entries" and "What's Viewed" displayed in user profile to 15 (was 50 and 10 respectively)
- Admin settings/permissions pages highlight all parameters that can be over-ridden within categories, not just those that have been over-ridden
- Trap seriously malformed urls such as http:// with no site (FlexXy's report)
- Tidied up look of Filmstrip extra (arrows) (eFil)
- Added new extra to use Jeroen Wijering's generalised mp3/swf/flv media player

and of course included the new Spanish translation

Please test and report, so that I can clear this problem up for everyone.

As an aside, I'm rather concerned that this problem was not detected during the beta testing. The range of systems that we need to work with (at least three fundamentally different flavours of operating systems for the user, several web servers, at least two web server operating systems, and all the added complexities of utf-8 and standard ascii character sets) makes testing a nightmare. How could we address this?

Well, this time i was able to save my path, now i'll test how it works.

Well, for me, i guess i'll have to make a test installation under my server and test new ldm in there... cause i used to test in my local server using XAMPP, from apache friends.

I guess this one is too friendly. If there is anything you have in mind and i can help, will be glad to.

Thank you for the quick support Andrew! :D

AndrewD 10-27-2007 08:37 AM

I think there's enough evidence that the main bug in 2.2.8 is fixed, so I've replaced the main release with the bugfix.

Concerning future development, I can realistically do some testing with the following combinations of server/browser/opsys

- Apache 2.2 on Windows server
- Limited Apache/Linux web server (VMware + LAMP)
- Windows for user PC, with limited testing with Ubuntu Linux
- English version of the hack
- Firefox 2 and IE7

I cannot test Mac servers or user systems, nor do much testing of the language translations.

Nam 10-29-2007 03:51 AM

Andrew, when I turned on SEO friendly on Admin, the links are become inaccessible. I guess I have to do some code with .htaccess right? Not sure if I've missed anything. thanks.

AndrewD 10-29-2007 06:06 AM

Quote:

Originally Posted by Nam (Post 1370858)
Andrew, when I turned on SEO friendly on Admin, the links are become inaccessible. I guess I have to do some code with .htaccess right? Not sure if I've missed anything. thanks.

Absolutely - as the parameter description says on the LDM admin/settings page:

"If set, LDM creates search engine friendly urls for entries and categories (yoursite/links/catid/linkid, etc). If set, you must configure your web server (Apache) to recognise the urls that LDM creates - see the online LDM manual for details."

When you go to the online manual, there's a menu item labelled Search Engine Optimisation which explains what to do

Nam 10-29-2007 08:50 PM

Thanks, another question, it is possible to turn off the link protections on some files/categories so I can link to remote server without using bandwidth on both? I just bought a new server and don't really care about leeching. Thank you.

CamJM 10-30-2007 02:08 AM

Quote:

Originally Posted by AndrewD (Post 1363100)
If you want to put something in each entry, then you have to edit one/several of the links_linkbit templates. There are several of these, depending on which layout you are using. Each of them takes the form of a table row definition, looking like this:
PHP Code:

<tr id="linkid$linkid">
<
td colspan="2">
...
</
td>
</
tr


For patching the main layout, above/below the list of entries, it's the links_main template. In fact that template already has some placeholder variables, via an array variable, $includeinmain. Set one of these array elements: precat, postcat, prefeat, postfeat, prelink, postlink, prestats, poststats, e.g. using the ldm_maindisplay_end hook.

Hi Andrew, sorry to say this but I'm a bit of a coding novice, how would I use the ldm_maindisplay_end hook within the place holders? All I really intend on doing is placing a line of text in there if that makes it simpler at all. Thanks.

AndrewD 10-30-2007 05:43 AM

Quote:

Originally Posted by CamJM (Post 1371622)
Hi Andrew, sorry to say this but I'm a bit of a coding novice, how would I use the ldm_maindisplay_end hook within the place holders? All I really intend on doing is placing a line of text in there if that makes it simpler at all. Thanks.

Here's a couple of examples. Suppose you want to put a box saying "Hello Hello Hello" on all category pages, placed immediately above the list of entries. You can do this in two ways - either write a plugin or edit a template.

You add the plugin by going to vbulletin->admincp->products and plugins->add new plugin.
Choose products=links and downloads manager, hook location=ldm_maindisplay_end, plugin is active=yes. Call the plugin (e.g.) 'annotate' and add the following code:
Code:

if ($viewcatid>0) {
$includeinmain['postcat'] .= '
<table width="100%" class="tborder">
<tr><td class="alt1" align="center">
Hello Hello Hello
</td></tr>
</table>
';
}

This adds a boxed table on all category content pages immediately above the list of entries.

You can achieve the same effect by editing the links_main template. Find the lines which read:
Code:

<if condition="$includeinmain[postcat]">
$includeinmain[postcat]
</if>

Immediately afterwards insert these lines:
Code:

<if condition="$viewcatid>0">
<table width="100%" class="tborder">
<tr><td class="alt1" align="center">
Hello Hello Hello
</td></tr>
</table>
</if>

If you want to add a similar line at the start of the description of each entry, you can also do this with a plugin or by editing a template. Plugin approach:

Again, call the plugin (e.g.) 'annotate', products=links and downloads manager, hook location=ldm_linkbit_create, plugin is active=yes, with the following code:
Code:

$linkdesc = '
Hello Hello Hello
<br />
<br />
' . $linkdesc;

This will work with all choices of linkbit - you don't need to repeat it for each of the available layouts.

Template approach. Edit the links_linkbit template (or the links_linkbit_table, etc templates, depending on your choice of linkbit) and insert the following right at the start:

Code:

<tr colspan="2">
<td align="center">
Hello Hello Hello
</td>
</tr>


hydn 10-30-2007 03:46 PM

I'm struggling with layout issues. I have a broken link that links to:
"ARG:4NDEFINED.php?catid=-8"

Also there's a "lone" statistics box on the bottom-right of all pages. How can I add other stats or anything to the left of it?

Any tips thanks.

hydn 10-30-2007 04:02 PM

Sorry about not much details.

Here's the current code for the stats box:
Code:

<if condition="$viewcatstats or $viewcathits">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<tr><td width="50%">&nbsp;</td>
<td>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
<tr align="center">
        <td class="tcat" align="center" colspan="2">
        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('hitparadebit')"><img id="collapseimg_hitparadebit" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_hitparadebit].gif" alt="" border="0" /></a>
        <strong>$vbphrase[ll_statistics]</strong>
        </td>
</tr>
</tbody>
<tbody id="collapseobj_hitparadebit" style="$vbcollapse[collapseobj_hitparadebit]">
<if condition="$viewcathits">
<tr><td class="alt1" colspan="2">
        <span class="smallfont"><strong>$viewcathitstitle</strong></span>
</td></tr>
        $viewcathits
</if>
<if condition="$viewcatstats">
        $viewcatstats

</if>
</tbody>
</table>
</td></tr>
</table>
<br />
</if>

<if condition="$includeinmain[poststats]">
$includeinmain[poststats]
</if>

I'll like to place an identical box to the left of this box with other stats such as. Last 10 downloaded by other users or random 10 downloads.

thanks

AndrewD 10-30-2007 04:11 PM

Quote:

Originally Posted by hydn (Post 1372064)
I'm struggling with layout issues. I have a broken link that links to:
"ARG:4NDEFINED.php?catid=-8"

Have you modified one of the LDM templates at some time in the past or got other hacks installed? A url pointing to catid=-8 is trying to display the most recent entries, and the current templates would construct this in terms of something like:
Code:

        <a href="$SEARCH_SCRIPT.php?action=find&amp;catid=$NEW_CAT">$vbphrase[ll_menu_shownew]</a>
Maybe if you switch on template titles on your vb admincp/options, you can check which template this link is within - I would expect it to be in the links_header template.

Quote:

Originally Posted by hydn (Post 1372064)
Also there's a "lone" statistics box on the bottom-right of all pages. How can I add other stats or anything to the left of it?

This is set up in the links_main template. There a set of code that looks like the following:

Code:

<if condition="$includeinmain[prestats]">
$includeinmain[prestats]
</if>

<if condition="$viewcatstats or $viewcathits">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td width="70%">&nbsp;</td>
<td>
...

You can add other material to the empty 70% cell. Alternatively, you can assign something to the $includinmain[prestats] variable by writing a plugin tied to the links_linkbit_create hook

PitchouneN64ngc 10-30-2007 04:14 PM

AndrewD, I can tell you the French translation is finished, i read it last time (fixing translations bugs and incoherences between phrases) and release it :)

CamJM 10-31-2007 02:29 AM

Awesome Andrew! Thanks for the help :)

obmob 10-31-2007 04:17 AM

Hello, playing again with the new vBa modules... I uploaded the ldm_new.module.

First i coudln't see it, then set clean code to "no" and it start showing.

Now, I made some changes on the template to show a thumbnail, this, because eveything i have has a thumb. :p

So, the code is working, there aren't errors so far, but i figured out a funny thing.

Entries 1,2,5 show a link in the title, but 3 and 4 are just plain text.

You can take a look at this in www.ositobarrigon.com or in the attached image. :D

There are no variables added, just deleted the filetype one and added the thumbnail.

Help! :confused:

Thanks!

CamJM 10-31-2007 05:09 AM

Quote:

Originally Posted by AndrewD (Post 1371706)

Template approach. Edit the links_linkbit template (or the links_linkbit_table, etc templates, depending on your choice of linkbit) and insert the following right at the start:

Code:

<tr colspan="2">
<td align="center">
Hello Hello Hello
</td>
</tr>


Hi Andrew, just one small question, if I set a condition so that only people who aren't logged in see it, it doesn't appear to work. here's what I edited, I have the condition working in other areas of the site..

Code:

<tr colspan="2">
<td align="center">
<if condition="$show['guest']">
Hello Hello Hello
</if>
</td>
</tr>


AndrewD 10-31-2007 05:11 AM

Quote:

Originally Posted by obmob (Post 1372519)
Hello, playing again with the new vBa modules... I uploaded the ldm_new.module.

First i coudln't see it, then set clean code to "no" and it start showing.

Now, I made some changes on the template to show a thumbnail, this, because eveything i have has a thumb. :p

So, the code is working, there aren't errors so far, but i figured out a funny thing.

Entries 1,2,5 show a link in the title, but 3 and 4 are just plain text.

You can take a look at this in www.ositobarrigon.com or in the attached image. :D

There are no variables added, just deleted the filetype one and added the thumbnail.

Help! :confused:

Thanks!

The two entries that are displayed with no link on the text are currently considered to be broken, i.e. LDM can't find the file. Not the best/clearest of signals, I agree.

AndrewD 10-31-2007 05:14 AM

Quote:

Originally Posted by CamJM (Post 1372542)
Hi Andrew, just one small question, if I set a condition so that only people who aren't logged in see it, it doesn't appear to work. here's what I edited, I have the condition working in other areas of the site..

Code:

<tr colspan="2">
<td align="center">
<if condition="$show['guest']">
Hello Hello Hello
</if>
</td>
</tr>


LDM doesn't (currently) set the $show array. You need another test, such as

Code:

<if condition="$vbulletin->userinfo['usergroupid'] > 1">
for logged in, and

Code:

<if condition="$vbulletin->userinfo['usergroupid'] <= 1">
for not

Willygsm 10-31-2007 01:17 PM

hi andrewD, after i change the sync path now it show this

Fatal error: Maximum execution time of 30 seconds exceeded in /home/XXXXXXX/public_html/forum/includes/local_links_include.php on line 3914

how to solve this??

AndrewD 10-31-2007 01:24 PM

Quote:

Originally Posted by Willygsm (Post 1372737)
hi andrewD, after i change the sync path now it show this

Fatal error: Maximum execution time of 30 seconds exceeded in /home/XXXXXXX/public_html/forum/includes/local_links_include.php on line 3914

how to solve this??

Directory synchronisation can be expensive, especially if you allow manual resyncs.

You must either allow php to spend more than 30 seconds running scripts or you must reduce the amount of time that LDM tries to spend on the task.

The first requires editing the server's php.ini configuration file, finding the *max_execution_time* parameter, increasing the value and restarting your web server.

The second requires visiting LDM/admin/settings and checking the sync_maxcpu_allowed and sync_maxcpu_allowed_manual settings, making sure that they are well below 30 seconds.

Willygsm 10-31-2007 01:32 PM

Quote:

Originally Posted by AndrewD (Post 1372739)
Directory synchronisation can be expensive, especially if you allow manual resyncs.

You must either allow php to spend more than 30 seconds running scripts or you must reduce the amount of time that LDM tries to spend on the task.

The first requires editing the server's php.ini configuration file, finding the *max_execution_time* parameter, increasing the value and restarting your web server.

The second requires visiting LDM/admin/settings and checking the sync_maxcpu_allowed and sync_maxcpu_allowed_manual settings, making sure that they are well below 30 seconds.

thanks for reply :)
ok, actually for 1st time i didnt set for more than 30 second and sync all the files and it work. after i change the sync path now it should this. can i delete the whole folder and resync? if yes, how to delete it?

AndrewD 10-31-2007 01:43 PM

Quote:

Originally Posted by Willygsm (Post 1372745)
thanks for reply :)
ok, actually for 1st time i didnt set for more than 30 second and sync all the files and it work. after i change the sync path now it should this. can i delete the whole folder and resync? if yes, how to delete it?

Actually, you shouldn't need to do/delete anything - it should work everything out for itself. But how many files are there in the directory that it is trying to read?

You can empty and delete entire folders (categories) in LDM by going to LDM/admin/categories, select the categor(y/ies) you want rid of, then select empty or delete

Willygsm 10-31-2007 01:50 PM

Quote:

Originally Posted by AndrewD (Post 1372750)
Actually, you shouldn't need to do/delete anything - it should work everything out for itself. But how many files are there in the directory that it is trying to read?

You can empty and delete entire folders (categories) in LDM by going to LDM/admin/categories, select the categor(y/ies) you want rid of, then select empty or delete

hi AndrewD, it have 14179 files and near 400GB.

i cant delete the categories coz when i click on categories, it show this
Fatal error: Maximum execution time of 30 seconds exceeded in /home/XXXXXXX/public_html/forum/includes/local_links_include.php on line 961

AndrewD 10-31-2007 02:16 PM

Quote:

Originally Posted by Willygsm (Post 1372753)
hi AndrewD, it have 14179 files and near 400GB.

i cant delete the categories coz when i click on categories, it show this
Fatal error: Maximum execution time of 30 seconds exceeded in /home/XXXXXXX/public_html/forum/includes/local_links_include.php on line 961

Ouch...

Perhaps the directory structure that you are scanning is simply too complex to process in the cpu time allowed. The problem is how to regain control.

Go to LDM/admin/settings and turn off category_jump_menu and turn off sync_enabled.

Then try to go to admin/categories again.

Is this a production site, or are you still trying to get things set up?

By the way, are you running the latest (2.2.8-post 1) version of LDM or an older version? (Just so that I know which code to look at.)

voter 10-31-2007 02:33 PM

Is there a way a SQL query, to generate a copy of entries of LDM as a threads of a forum?

Willygsm 10-31-2007 02:41 PM

Quote:

Originally Posted by AndrewD (Post 1372764)
Ouch...

Perhaps the directory structure that you are scanning is simply too complex to process in the cpu time allowed. The problem is how to regain control.

Go to LDM/admin/settings and turn off category_jump_menu and turn off sync_enabled.

Then try to go to admin/categories again.

Is this a production site, or are you still trying to get things set up?

By the way, are you running the latest (2.2.8-post 1) version of LDM or an older version? (Just so that I know which code to look at.)

hi andrewD thanks for reply, after i off the categories now i can go to here
http://www.sw-box.com/forum/local_links.php?catid=1365

but it show 2 folder now and when i go admin setting still cant go the categories setting there
Fatal error: Maximum execution time of 30 seconds exceeded in /home/XXXXXXXX/public_html/forum/includes/local_links_include.php on line 975

??

Willygsm 10-31-2007 03:19 PM

hi andrewD, how to delete whole categories? any code to modify?

Cannot delete a category which still contains entries or subcategories.

AndrewD 10-31-2007 05:14 PM

Quote:

Originally Posted by Willygsm (Post 1372813)
hi andrewD, how to delete whole categories? any code to modify?


Cannot delete a category which still contains entries or subcategories.

Try the following.

Go to your vb admincp, products and plugins.

Add new plugin

product - Links and Downloads manager

hook - ldm_admin_start

code: @ini_set('max_execution_time', 300);

plugin is active: yes

Now you should be able to get at ldm/admin/categories and tidy up.

Remember to turn off/delete the plugin when you've finished.

AndrewD 10-31-2007 05:16 PM

Quote:

Originally Posted by voter (Post 1372774)
Is there a way a SQL query, to generate a copy of entries of LDM as a threads of a forum?

You know that there's an facility to autocreate threads pointing to new entries in LDM, I suppose? (LDM/admin/settings/Controls on New Entry/Comment Announcements)

You want to be able to create threads, each corresponding to one entry in an LDM category?

obmob 10-31-2007 09:23 PM

Quote:

Originally Posted by AndrewD (Post 1372544)
The two entries that are displayed with no link on the text are currently considered to be broken, i.e. LDM can't find the file. Not the best/clearest of signals, I agree.

OMG! I think I deleted those files while moving... :mad:

Thanks Andrew, now I know why it would happen :D

Wilhelm 10-31-2007 10:08 PM

hi, i have a problem with the hack when uploading has finished. It seems the file was submitted but then:
i use the german version and the text says:
"Fehler beim Hochladen - kann die hochgeladene Datei auf dem Server nicht verschieben."

engl. smth like that: Error while uploading - cannot move the uploaded file on the server.

I have an upload, thumb folder both set to 777, no error messages @LDM
using 2.8.8Post1, local_file_root Website local_file_root_prefix not set

whats the error on that?

btw awesome hack :eek:

edit: Tested with full path url, local url, both works, only upload i still get the error msg.

JtChurch925 11-01-2007 12:29 AM

I apologize if I have somehow missed these answers (...and I probably have), but...
  • If I am hosting the actual files to be downloaded on another server can I still use this by linking to those files as though they were hosted locally?
  • Will this plugin automatically update the files listed for the users if more files are dumped onto the remote site? i.e. a remote directory is set for the 'e-book' downloads, and more e-books are added, will I have to go and add each new link individually any time there is an update to the remote site?
  • Is it relatively simple to add adsense code to the basic template of the downloads pages?

I appreciate your answers and time. This plugin looks very promising!

AndrewD 11-01-2007 06:48 AM

Quote:

Originally Posted by JtChurch925 (Post 1373125)
If I am hosting the actual files to be downloaded on another server can I still use this by linking to those files as though they were hosted locally?

Yes, although (depending on exectly how you set things up), this will be more expensive, both in terms of cpu (file reads over an http channel are more expensive than from the local server) and bandwidth (everything goes through your server twice, in then out). It's not a good idea to do this with (e.g.) video files, although it's quite ok with typical pdfs.

Quote:

Originally Posted by JtChurch925 (Post 1373125)
Will this plugin automatically update the files listed for the users if more files are dumped onto the remote site? i.e. a remote directory is set for the 'e-book' downloads, and more e-books are added, will I have to go and add each new link individually any time there is an update to the remote site?

No, LDM will not autosync with a second server, although it will sync with the local file system. I didn't add this for a couple of reasons - security and processing cost. (If you look back a few posts, you'll see that someone is having problems syncing a directory structure containing tens of thousands of files.)

Quote:

Originally Posted by JtChurch925 (Post 1373125)
Is it relatively simple to add adsense code to the basic template of the downloads pages?

I have not done this myself, but I think this is quite a common mod to the mod.

AndrewD 11-01-2007 07:05 AM

Quote:

Originally Posted by Wilhelm (Post 1373065)
hi, i have a problem with the hack when uploading has finished. It seems the file was submitted but then:
i use the german version and the text says:
"Fehler beim Hochladen - kann die hochgeladene Datei auf dem Server nicht verschieben."

engl. smth like that: Error while uploading - cannot move the uploaded file on the server.

I have an upload, thumb folder both set to 777, no error messages @LDM
using 2.8.8Post1, local_file_root Website local_file_root_prefix not set

whats the error on that?

btw awesome hack :eek:

edit: Tested with full path url, local url, both works, only upload i still get the error msg.

Check if the php security setting open_basedir and safe_mode are set (vb/admin/maintenance/phpinfo), and whether your upload directory is within the space allowed by open_basedir - LDM is supposed to be aware of open_basedir, but perhaps there's a problem in the code that I've missed.

If that doesn't point you in the right direction, here's a quick debugging check. Go to vb/admincp/products and plugins and add a new plugin, called, e.g. debug, attached to the hook ldm_upload_filesave, and make sure it's active, with the following code:

Code:

echo 'open_basedir '.ini_get('open_basedir').'<br />';
echo 'safe_mode '.ini_get('safe_mode').'<br />';
echo $fullfile.'<br />';
if (file_exists($fullfile)) {
echo 'file exists<br />';
exit;
}
if (move_uploaded_file($GPC['tmp_name'], $fullfile)) {
echo 'move ok<br />';
}
exit;

then try uploading a file, take a look at the error messages and post them back here. Remember to disable the debug plugin after you've run it.

Wilhelm 11-01-2007 02:49 PM

Hi AndrewD, thanks alot for your time and help. I figured out the phpinfo(), safemode is local and global set, open_basedir is only local set.

the error msg is recieve with your debug code:
PHP Code:

open_basedir /home/httpd/vhosts/***myURLNAME***/httpdocs:/tmp
safe_mode 1
/home/httpd/vhosts/***myURL***/httpdocs/forums/upload/1/290811939309968307.zip

Warnung
move_uploaded_file(): SAFE MODE Restriction in effectThe script whose uid is 10001 is not allowed to access /home/httpd/vhosts/***myURL***/httpdocs/forums/upload/1 owned by uid 30 in /local_links_actions.php(343) : eval()'d code (Zeile 8) 

I have no clue what settings to change to get the upload working. I dont have access to php.ini, only .htaccess i could work with. Would the problem be solved by disabling SAFE_MODE AND open_basedir? Or just one of them?
Maybe i can do something in Plesk file manager editing some file in the root directory? Im not that strong with server settings.

AndrewD 11-01-2007 04:10 PM

Quote:

Originally Posted by Wilhelm (Post 1373485)
Hi AndrewD, thanks alot for your time and help. I figured out the phpinfo(), safemode is local and global set, open_basedir is only local set.

the error msg is recieve with your debug code:
PHP Code:

open_basedir /home/httpd/vhosts/***myURLNAME***/httpdocs:/tmp
safe_mode 1
/home/httpd/vhosts/***myURL***/httpdocs/forums/upload/1/290811939309968307.zip

Warnung
move_uploaded_file(): SAFE MODE Restriction in effectThe script whose uid is 10001 is not allowed to access /home/httpd/vhosts/***myURL***/httpdocs/forums/upload/1 owned by uid 30 in /local_links_actions.php(343) : eval()'d code (Zeile 8) 

I have no clue what settings to change to get the upload working. I dont have access to php.ini, only .htaccess i could work with. Would the problem be solved by disabling SAFE_MODE AND open_basedir? Or just one of them?
Maybe i can do something in Plesk file manager editing some file in the root directory? Im not that strong with server settings.

I think the problem will be solved by turning off safe_mode, but I've not experienced this before. Your open_basedir setting is ok.

VBulletin itself gets round this problem with some slightly contorted file movements, which I have not implemented in LDM.

*Edit*

I've run a quick test with safe_mode on and open_basedir set, and can reproduce your problem. Turning off safe_mode corrects the problem. So (at least for me) does turning on safe_mode_gid

PitchouneN64ngc 11-01-2007 06:21 PM

Hey AndrewD, there is the French translation with this post ;)


All times are GMT. The time now is 08:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04414 seconds
  • Memory Usage 1,939KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (14)bbcode_code_printable
  • (3)bbcode_php_printable
  • (25)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete