We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

File

Development and Programming

Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

Huh, is is still the same message? Can you copy/paste it again?

       
Scheffey's avatar
Scheffey
24 posts
18 years ago
Scheffey's avatar Scheffey

The plot thickens…

Yes, the same message (as above in my first post) HOWEVER, only here at our office! I asked another person (off site) to try publishing a new entry AND…no errors or warnings. Strange.

One thing that may be a hint. The location of this site (our client’s) is at the same hosting facility our own site (our business). Could that have anything to do with it?

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

Are you all using the same image files? Can you copy/paste the image error one more time for me so I can see if any of the minute details have changed? They should have.

       
Scheffey's avatar
Scheffey
24 posts
18 years ago
Scheffey's avatar Scheffey

Here is the error message we just got. It looks the same to me. Thanks for your help.

Warning: getimagesize(): open_basedir restriction in effect. File(/tmp/phpIokSwc) is not within the allowed path(s): (/vservers/hlwiker) in /vservers/hlwiker/htdocs/system/extensions/ext.file.php on line 492

Warning: getimagesize(/tmp/phpIokSwc): failed to open stream: Operation not permitted in /vservers/hlwiker/htdocs/system/extensions/ext.file.php on line 492

Warning: Cannot modify header information - headers already sent by (output started at /vservers/hlwiker/htdocs/system/extensions/ext.file.php:492) in /vservers/hlwiker/htdocs/system/core/core.functions.php on line 710

Warning: Cannot modify header information - headers already sent by (output started at /vservers/hlwiker/htdocs/system/extensions/ext.file.php:492) in /vservers/hlwiker/htdocs/system/core/core.functions.php on line 296
       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

it’s strange because you’re allowed paths (/vservers/hlwiker) haven’t changed even though you added them. i would think that the new /tmp directory would show up in the listing of allowed paths. have you restarted apache since updating php?

       
Scheffey's avatar
Scheffey
24 posts
18 years ago
Scheffey's avatar Scheffey

Since this problem is only appearing when using a browser from our location, we are just going to let it drop. Updates from our client’s location works fine. If necessary we can also use the gallery feature (although that isn’t ideal) since that upload seems to work fine. Thanks again for your help.

       
mhulse's avatar
mhulse
329 posts
18 years ago
mhulse's avatar mhulse

Hi,

This approach typically works for me (when open_basedir restrictions are in effect):

getimagesize($_SERVER['DOCUMENT_ROOT'].'/path/to/file.jpg');

Of course, I am sure you guys are way ahead of me on this one! :lol:

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

the only problem with that mhulse is that I’m checking the size of the file before I move it out of it’s tmp directory. i’m checking it there to be sure it fits the dimensions and file size requirements. I will try out your suggestion though, maybe I should move the file first and then check it and I won’t run into as may safe mode restrictions.

thanks for the tip mark.

       
mhulse's avatar
mhulse
329 posts
18 years ago
mhulse's avatar mhulse

Hi Mark, thanks for the reply and clarification. 😊

Ahh, I think I see what you are saying… I have never tried to get the image size on a temp file. Only reason why I brought it up was because my host has open_basedir restrictions… appending $_SERVER[‘DOCUMENT_ROOT’] to the file path usually does the trick.

Well, have a great day. 😊

Thanks again for the kick-butt extension!

Cheers, Micky

       
Daniel Walton's avatar
Daniel Walton
553 posts
18 years ago
Daniel Walton's avatar Daniel Walton

Edit - My bad, got the names mixed up :red:

       
Daniel Walton's avatar
Daniel Walton
553 posts
18 years ago
Daniel Walton's avatar Daniel Walton

Hmm, though another bug i’ve just stumbled on is if the image filename is similar to: “myimage.t.jpg” then no thumbnail is showing on the publish/edit screen. I guess the extension is looking at “.t.jpg” as being it’s extension?

       
Daniel Walton's avatar
Daniel Walton
553 posts
18 years ago
Daniel Walton's avatar Daniel Walton

For those trying to isolate just the filename you could try extract url plus.

I have it setup like so and it seems to be working as expected with the extension 😊

<ul>
 {pages_files}
  <li>{exp:extract_url_plus show='<a href="u;llurl">i;lename</a>'}{pages_file}{/exp:extract_url_plus}</li>
 {/pages_files}
</ul>
       
running with scissors's avatar
running with scissors
147 posts
18 years ago
running with scissors's avatar running with scissors

hey mark,

i used this extension on every new project i’ve had recently with no issue until now. i just ran into a problem on a recent project that is running on a windows server. i keep getting an error message when trying to upload an image to a custom field via your file extension. i’ve played with all the file related prefs both in the system and in the extension itself to no avail, oddly enough, however, the default system upload works fine. any insight?

i’m running latest release of both the extension and ee.

       
mhulse's avatar
mhulse
329 posts
18 years ago
mhulse's avatar mhulse

Running, just curious… what is error message?

       
running with scissors's avatar
running with scissors
147 posts
18 years ago
running with scissors's avatar running with scissors

i get the following error right above the publish tabs…

-error- there was a problem uploading ‘test_img’.

perhaps this a path issue. perhaps not. as i said in my initial post, this is the first time i’ve run into any kind of problem with this extension. could be related to the fact that this is install is running in a windows environment—something that i’ve never had the “pleasure” of dealing with before. i don’t know. is there some nuances related to that that i should be aware of?

       
First 9 10 11 12 13 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.