 | |  | | | Photopost Pro Installation & Upgrades If you're having install or upgrade problems |
January 8th, 2013, 06:49 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
| Error on upgrade
Photopost was working fine. Performed an upgrade and now receive message
"The file you uploaded was not an acceptable format" when attempting to upload anything. I did see the same issue here: Image Format Unacceptable error
However the cure there seemed to be a php upgrade and we are already running
5.2.17 as shown here: phpinfo()
any other thoughts?
|
| |
January 8th, 2013, 07:55 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
What version where you using before?
What version of PHP?
Basically the only difference between the functions now and before is instead of everything having to have yes or no declared we convert variables yes and no to 0 or 1 which is php true false elements so variables can be declared like $variable or !$variable instead of the old style $variable = "yes" or $variable = "no".
The error your noting is because the image is not coming back as an acceptible image type.
I can not replicate this error but will see if I can try and track things down. I do not expect a quick answer on this if there is an PHP issue maybe a PHP bug.
Literally in over a year we have had one person report an upload issue and he upgraded his PHP so there was never anything to investigate as a result.
|
| |
January 8th, 2013, 08:41 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
|
The previous version was 7.01
I think I'm going to try to upgrade PHP slightly just to see what shakes loose
|
| |
January 8th, 2013, 08:54 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Try this line 1049 of pp-inc.php in the function get_ext make the line this Code: Content visible to verified customers only.
there was an offset specified on the strrpos which is needed on PHP 5.3 I think or above and that is probally what caused your issue.
Last edited by Chuck S; January 8th, 2013 at 09:04 PM.
|
| |
January 8th, 2013, 09:06 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
|
I found the issue- the upgrade changed the permissions on the uploads folder. Still testing but it looks to be working now!
|
| |
January 8th, 2013, 09:10 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Let me know if you need anything else
|
| |
January 10th, 2013, 02:36 PM
|
#7 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Post 4 I included in our downloaded code as that should work for most all versions of PHP.
|
| |
January 19th, 2013, 12:21 PM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
|
Hi Chuck- Still having an issue here. I was able to successfully upload an image but it's not straightforward.
When I initially upload I get the error "The file you uploaded was not an acceptable format"
If I then go in to upload again and do the lower admin options section the photo is there but represented by a black x. If I click the black x another window opens that shows the picture. If I hit process from there it tells me Unable to read the format of file: C:/Inetpub/wwwroot/photopost/data/500/CIASA5505.jpg
This is on a windows server, I have opened up every permission I can find, phpinfo is at photopost.wdwinfo.com/phpinfo. I did download your new build and replaced pp-inc.php
|
| |
January 19th, 2013, 01:19 PM
|
#9 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Have you tried uploading the downloable code again because from what I see in this discussion you did not do what I suggested to do. If you download the code and reupload pp-inc.php you would not see not accessible format error.
Likewise if you set permissions correctly you would not see unable to read format of file.
Please try again after you upload from fresh download the file I noted and make sure your data and uploads folders at every level is set to READ WRITE EXECUTE. Your php must have safe mode off also to allow uploads.
|
| |
January 19th, 2013, 03:08 PM
|
#10 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
|
Chuck- Please check your new code. Line 1048 reads as follows:
function get_ext( $filename )
{
if ( PHP_VERSION >= '5.3.0' )
{
return substr( $filename, strrpos($filename,".",0) );
}
else
{
return substr( $filename, strrpos($filename,".") );
}
Shouldn't that be "if ( PHP_VERSION < '5.3.0' )"
They look backwards to me
|
| |
January 19th, 2013, 03:12 PM
|
#11 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
No not at all. It should be exactly what I wrote.
You can back down the 5.3.0 to say 5.2.8 or whatever to see what works for you but the gist of that if clause means if it is a newer PHP then use the ,0 arguement at the end and if its an older PHP use no arguement.
Newer PHP requires the absolute use of the default offset parameter which is what ,0 means where as older PHP versions did not require a default offset parameter and is what is causing your issue.
Just my observation as we upgraded our sites here and saw the error noted and we use PHP 4 here on this server the owner has not upgraded what is not broken so the code I added fixed the issue you note.
|
| |
January 19th, 2013, 03:16 PM
|
#12 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
|
OK I was confused because in Post 4 you suggest using
return substr( $filename, strrpos($filename,".") );
for php above 5.3.0 but the code says to use
return substr( $filename, strrpos($filename,".",0) );
if PHP >= 5.3.0
so for PHP version over 5.3 return substr( $filename, strrpos($filename,".",0) );
is correct?
|
| |
January 19th, 2013, 04:47 PM
|
#13 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Yes in post 4 I was saying just try replacing the line in there with the one I noted since you were having an issue with the line in the code using 5.2.17 PHP.
My updated code merely does a PHP check and applies the code to be the new one if php is newer and the old way if its older because both do not work for all versions of PHP. |
| |
January 19th, 2013, 10:33 PM
|
#14 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
|
Well that code came directly from the pp-inc.php file on the live server so it does have the correct file version and I'm still getting that error with the same sequence I described above, I have opened up every permission I can find, any ideas on what to try next?
|
| |
January 19th, 2013, 10:40 PM
|
#15 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
which error are you getting? You have meantioned more than one?
|
| |
January 19th, 2013, 11:32 PM
|
#16 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
|
When I initially upload I get the error "The file you uploaded was not an acceptable format"
If I then go in to upload again and do the lower admin options section the photo is there but represented by a black x. If I click the black x another window opens that shows the picture. If I hit process from there it tells me Unable to read the format of file: C:/Inetpub/wwwroot/photopost/data/500/CIASA5505.jpg
This is on a windows server, I have opened up every permission I can find, phpinfo is at photopost.wdwinfo.com/phpinfo. I did download your new build and replaced pp-inc.php
I can provide you with an admin login if you would like to see for yourself
|
| |
January 19th, 2013, 11:35 PM
|
#17 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
If you are using the new code right?
Your php is still having an issue has to be windows.
If you edit that function and instead of using a conditional Code: Content visible to verified customers only.
Just make that what is in post 4
Your host has upgraded your PHP again like a couple days ago it is 5.3.21 now
|
| |
January 20th, 2013, 12:09 AM
|
#18 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
|
It's a dedicated server, I have full control, I played around with a couple of different versions of PHP just to see if it makes a difference.
I have changed the codes as follows:
function get_filename($filename)
{
return str_replace( get_ext($filename), "", $filename );
}
function is_cat_protected( $cat, $password, $cattype = "c" )
Doesn't seem to make any difference same entire set of errors
|
| |
January 20th, 2013, 12:31 AM
|
#19 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
You can not make up your own code there you must do what I am saying to do.
The lines you are changing are in the get_ext function around line 1049 and if you do not follow what I am saying then you can send info for me to look at it as what I am saying to do will work.
|
| |
January 20th, 2013, 08:38 AM
|
#20 (permalink)
| | Member Verified Customer
Join Date: Sep 2005
Posts: 43
|
Think I hit the wrong line
So I replaced pp-inc.php with a brand new one from the download. It looks like this at line 1048:
function get_ext( $filename )
{
if ( PHP_VERSION >= '5.3.0' )
{
return substr( $filename, strrpos($filename,".",0) );
}
else
{
return substr( $filename, strrpos($filename,".") );
}
}
restarted IIS and still received the same errors
I then modified it so it looks like this:
function get_ext( $filename )
{
return substr( $filename, strrpos($filename,".") );
}
restarted IIS and received the same errors
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 02:10 AM. | |