ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SOLVED: Multiple Sites Manager and Upload Patch

February 20, 2008 7:33am

Subscribe [1]
  • #1 / Feb 20, 2008 7:33am

    Joakim_

    33 posts

    Hey.

    I’ve been searching the forum for an answer but haven’t found anything so I try to post it here.

    I running two websites with the Multiple Sites Manager Module. I’ve a problem with the “Server Path to Upload Directory” for the second website. It works great with the first website.

    I want to have the path like this:

    /var/www/vhosts/mywebsite2.com/images/

    But I getting this error while trying uploading:

    The path specified in your image upload preferences is not correct

    However, it works when I put the path to the “Website 1” directory like this:

    /var/www/vhosts/mywebsite1.com/images/

    Anyway to fix this? Thank you for your help! 😊

  • #2 / Feb 20, 2008 10:09am

    Robin Sowell

    13255 posts

    Who is your host?  That might give us a hint- and you might check this kblog entry- if you put

    <?php echo realpath(dirname(__FILE__)); ?>

    All by itself in a text file, save it as mypath.php, stick it inside the image folder you want to use- what’s it show when you visit the page?

  • #3 / Feb 20, 2008 10:45am

    Joakim_

    33 posts

    Who is your host?  That might give us a hint- and you might check this kblog entry- if you put

    <?php echo realpath(dirname(__FILE__)); ?>

    All by itself in a text file, save it as mypath.php, stick it inside the image folder you want to use- what’s it show when you visit the page?

    Hi Robin. Thank you for your answer. I using “Virtual Dedicated Server” at MediaTemple. I will try your solution and let you know.

  • #4 / Feb 20, 2008 10:57am

    Joakim_

    33 posts

    Hi again.

    I tried to put the mypatch.php in the directory. I got the following:

    /var/www/vhosts/mywebsite2.com/httpdocs/images

    It dont work with the “httpdocs” either.

  • #5 / Feb 20, 2008 11:07am

    Robin Sowell

    13255 posts

    Try adding a trailing slash on the end- see if that gets us any love.

  • #6 / Feb 20, 2008 11:13am

    Joakim_

    33 posts

    Try adding a trailing slash on the end- see if that gets us any love.

    Tried, still says:

    The path specified in your image upload preferences is not correct
  • #7 / Feb 20, 2008 11:22am

    Robin Sowell

    13255 posts

    Argh- before I start searching around for mediatemplate quirks, let’s try this- create a blank template, turn php parsing ‘on’ for that template (it’s in the ‘Preferences’ for the template group).  Paste:

    <?php
    echo '<h2>Testing 1,2,3….</h2><p>';<br />
    $file = '/var/www/vhosts/mywebsite2.com/httpdocs/images/mypatch.php';<br />
    include($file);<br />
    ?>

    Do you get anything?

  • #8 / Feb 20, 2008 11:30am

    Joakim_

    33 posts

    Argh- before I start searching around for mediatemplate quirks, let’s try this- create a blank template, turn php parsing ‘on’ for that template (it’s in the ‘Preferences’ for the template group).  Paste:

    <?php
    echo '<h2>Testing 1,2,3….</h2><p>';<br />
    $file = '/var/www/vhosts/mywebsite2.com/httpdocs/images/mypatch.php';<br />
    include($file);<br />
    ?>

    Do you get anything?

    thank you for your help. I tried and it says:

    Testing 1,2,3….

    Does it mean it work?

  • #9 / Feb 20, 2008 11:37am

    Robin Sowell

    13255 posts

    Maybe- post this instead:

    <?php
    echo '<h2>Testing 1,2,3….</h2><p>';</p>
    
    <p>echo $booter;</p>
    
    <p>$file = '/var/www/vhosts/mywebsite2.com/httpdocs/images/mypatch.php';<br />
    include($file);<br />
    ?>

    If you have error reporting on- you should see:

    Notice: Undefined variable: booter in /www/pmh5041/public_html/cow-sys/core/core.functions.php(637) : eval()‘d code on line 4

    Which means errors are showing up and that the include is finding the file.  In which case, I’ll need to go poke a bit to figure out exactly what triggers the image error message.

    But- it’s possible you don’t have errors showing- so they’re there but we don’t know about them.  This will test that possibility.  If you don’t see an error?  Go to ‘Admin- System Prefs- Output and Debug’ and make sure php errors should show for superadmins.  Then check out this kblog entry- we really want errors showing while we debug this one.

    Make sense?

  • #10 / Feb 20, 2008 12:05pm

    Joakim_

    33 posts

    Maybe- post this instead:

    <?php
    echo '<h2>Testing 1,2,3….</h2><p>';</p>
    
    <p>echo $booter;</p>
    
    <p>$file = '/var/www/vhosts/mywebsite2.com/httpdocs/images/mypatch.php';<br />
    include($file);<br />
    ?>

    If you have error reporting on- you should see:

    Notice: Undefined variable: booter in /www/pmh5041/public_html/cow-sys/core/core.functions.php(637) : eval()‘d code on line 4

    Which means errors are showing up and that the include is finding the file.  In which case, I’ll need to go poke a bit to figure out exactly what triggers the image error message.

    But- it’s possible you don’t have errors showing- so they’re there but we don’t know about them.  This will test that possibility.  If you don’t see an error?  Go to ‘Admin- System Prefs- Output and Debug’ and make sure php errors should show for superadmins.  Then check out this kblog entry- we really want errors showing while we debug this one.

    Make sense?

    Thanks. I tried and it show no error message still “Testing 1,2,3….”. I’ve activated PHP/SQL error messages for super admins.

  • #11 / Feb 20, 2008 12:07pm

    Robin Sowell

    13255 posts

    Yep- you aren’t seeing errors, so we don’t know where it’s failing.  I’d really like to get errors showing up.  Read through the kblog entry and edit your path.php as directed.  It may be the server simply won’t allow it- but let’s try all we can to get an error.

  • #12 / Feb 20, 2008 12:43pm

    Joakim_

    33 posts

    Yep- you aren’t seeing errors, so we don’t know where it’s failing.  I’d really like to get errors showing up.  Read through the kblog entry and edit your path.php as directed.  It may be the server simply won’t allow it- but let’s try all we can to get an error.

    I tried it all and still no error messages. Do you think the problem is that the system is installed on mywebsite1.com? I using MSM. When I put the path to mywebsite1.com it works.

  • #13 / Feb 20, 2008 12:46pm

    Robin Sowell

    13255 posts

    I kinda suspect some sort of access restriction.  Or the path’s just wrong.  But it’s hard to tell w/out errors and it looks like the server isn’t going to give us any.

    Hang tight- let me go search around for mediatemplate quirks- I know some folks on the grid server have mentioned a few oddities.  Let me try to track those down, see if they give us a hint.

  • #14 / Feb 20, 2008 12:50pm

    Robin Sowell

    13255 posts

    OK- quick question.  Are both sites running fine- and it’s only in trying to setup the file upload- and have it go to a folder w/in the second sites subdomain folder that it borks?

    Did find this on setting up MSM on Mediatemple’s DV 3.0.  But you may already have that part licked.  Still- take a look while I search for something more on point.

  • #15 / Feb 20, 2008 12:51pm

    Joakim_

    33 posts

    I kinda suspect some sort of access restriction.  Or the path’s just wrong.  But it’s hard to tell w/out errors and it looks like the server isn’t going to give us any.

    Hang tight- let me go search around for mediatemplate quirks- I know some folks on the grid server have mentioned a few oddities.  Let me try to track those down, see if they give us a hint.

    Thank you so much!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases