Hi forum, I hope someone has experience with this problem before and can help out.
An old client informed our company that they're unable to upload files to the CMS. FTP works fine, but when attempting to upload a file through the admin, an error message saying "You are not allowed to modify files outside the uploads-dir! (That requires the Advanced File Management permission)" This happens whether or not I have Advanced Mode enabled.
Notes that might help:
*Using CMSMS 1.10.2 "Casa Pilote"
*PHP 5.3.10-1
*The permission style of the folder and files are 755. Confirmed in CMSMS and also in FTP.
*I couldn't upload files of any type. Image, text, pdf, etc.,
* I tried logging in as different users (admin/client accounts) and with different roles (admin/editor/etc)
* I tried searching the forums for similar issues. The two potential solutions I found did not work for me. The solutions I found were 1) Change file permissions to 755, and 2) change the paths in the config to have the function "realpath" around the path, to prevent issues of symbolic links. This second solution gave a different error, but still did not allow uploading. That error was 1 file(s) failed to upload (or possibly unpack) successfully
* I tried to investigate the code to learn more about *why* the error was happening, but couldn't locate which specific file was calling the ShowError function (56 files call the function, and none of them looked obvious to me that dealt with uploading files).
Any advice would be a colossal help. Let me know if I need to include more information.
Thank you.
Unable to upload files through CMS
Re: Unable to upload files through CMS
The information is too less.
Activate debug option in config.php and PHP error messages and post the results.
By the way - the CMSMS install is too old and out of support. You should force your client to book an update - for security reasons.
Activate debug option in config.php and PHP error messages and post the results.
By the way - the CMSMS install is too old and out of support. You should force your client to book an update - for security reasons.
Re: Unable to upload files through CMS
Thanks for your response.
And you're right about needing a new install. If we end up not providing a solution to the client, we will recommend updating the installation in hopes that it will fix it. Worst case they will have the latest & greatest version.
Anyway, here's what the debug message showed after I tried to upload a file. Nothing leaps out to me as the root cause, but maybe you can spot something.
And you're right about needing a new install. If we end up not providing a solution to the client, we will recommend updating the installation in hopes that it will fix it. Worst case they will have the latest & greatest version.
Anyway, here's what the debug message showed after I tried to upload a file. Nothing leaps out to me as the root cause, but maybe you can spot something.
Code: Select all
Debug: (2.2000000000022E-5) - (usage: 1751192) - (peak: 1790840)
done loading required files
Debug: (0.00014700000000001) - (usage: 1753040) - (peak: 1805048)
loading adodb
Debug: (0.001208) - (usage: 1907592) - (peak: 1942120)
loading page functions
Debug: (0.002798) - (usage: 2195640) - (peak: 2298464)
loading content functions
Debug: (0.003156) - (usage: 2236376) - (peak: 2298464)
loading translation functions
Debug: (0.004244) - (usage: 2416752) - (peak: 2456448)
loading php4 entity decode functions
Debug: (0.005468) - (usage: 2778872) - (peak: 3094504)
done loading files
Debug: (0.005515) - (usage: 2779440) - (peak: 3094504)
Initialize Database
Debug: (0.010807) - (usage: 3845832) - (peak: 3869320)
Done Initializing Database
Debug: (0.010924) - (usage: 3846248) - (peak: 3910896)
Initialize Smarty
Debug: (0.017182) - (usage: 4653008) - (peak: 4665240)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.Smarty_CMS.php = 804992 bytes for an approximate total of 804992
Debug: (0.017627) - (usage: 4712544) - (peak: 4736064)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.cms_siteprefs.php = 33584 bytes for an approximate total of 838576
Debug: (0.017921) - (usage: 4713320) - (peak: 4766704)
(mysql): SELECT sitepref_name,sitepref_value FROM cms_siteprefs
Debug: (0.02338) - (usage: 4850720) - (peak: 4964064)
Done Initialiing Smarty
Debug display of 'Loading Modules':(0.023503) - (usage: 4852768) - (peak: 4973816)
Debug: (0.025451) - (usage: 5212656) - (peak: 5291192)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.moduleoperations.inc.php = 358176 bytes for an approximate total of 1196752
Debug: (0.02565) - (usage: 5214408) - (peak: 5320584)
(mysql): SELECT * FROM cms_modules ORDER BY module_name
Debug: (0.02843) - (usage: 5545704) - (peak: 5588344)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.contentoperations.inc.php = 293664 bytes for an approximate total of 1490416
Debug: (0.029232) - (usage: 5615488) - (peak: 5668464)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.module_meta.php = 56352 bytes for an approximate total of 1546768
Debug: (0.036374) - (usage: 5814360) - (peak: 5840632)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.cms_utils.php = 39520 bytes for an approximate total of 1586288
Debug: (0.036842) - (usage: 5870352) - (peak: 5897048)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.cms_userprefs.php = 55856 bytes for an approximate total of 1642144
Debug: (0.037054) - (usage: 5872976) - (peak: 5926640)
(mysql): SELECT preference,value FROM cms_userprefs WHERE user_id = '6'
Debug: (0.04452) - (usage: 7052096) - (peak: 7117280)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.CMSModule.php = 569192 bytes for an approximate total of 2211336
Debug: (0.04465) - (usage: 7121064) - (peak: 7171592)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/Calendar/Calendar.module.php = 879816 bytes for an approximate total of 3091152
Debug: (0.045171) - (usage: 7155216) - (peak: 7212952)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.CmsRoute.php = 24896 bytes for an approximate total of 3116048
Debug: (0.045584) - (usage: 7200552) - (peak: 7260840)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.cms_route_manager.php = 43952 bytes for an approximate total of 3160000
Debug: (0.047165) - (usage: 7526160) - (peak: 7571704)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/CMSMailer/CMSMailer.module.php = 322488 bytes for an approximate total of 3482488
Debug: (0.048145) - (usage: 7686000) - (peak: 7725384)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/CMSPrinting/CMSPrinting.module.php = 154264 bytes for an approximate total of 3636752
Debug: (0.051275) - (usage: 8127176) - (peak: 8186752)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/FileManager/FileManager.module.php = 343848 bytes for an approximate total of 3980600
Debug: (0.052646) - (usage: 8354672) - (peak: 8383440)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/MenuManager/MenuManager.module.php = 222200 bytes for an approximate total of 4202800
Debug: (0.054463) - (usage: 8522712) - (peak: 8553008)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/ModuleManager/ModuleManager.module.php = 116832 bytes for an approximate total of 4319632
Debug: (0.055887) - (usage: 8782264) - (peak: 8810088)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/News/News.module.php = 254192 bytes for an approximate total of 4573824
Debug: (0.058681) - (usage: 9034456) - (peak: 9104688)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/Printing/Printing.module.php = 144608 bytes for an approximate total of 4718432
Debug: (0.06128) - (usage: 9387360) - (peak: 9470664)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/Search/Search.module.php = 311672 bytes for an approximate total of 5030104
Debug: (0.062966) - (usage: 9539152) - (peak: 9581480)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/SimpleGoogleMap/SimpleGoogleMap.module.php = 108152 bytes for an approximate total of 5138256
Debug: (0.064562) - (usage: 9687744) - (peak: 9726576)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/ThemeManager/ThemeManager.module.php = 113744 bytes for an approximate total of 5252000
Debug: (0.066918) - (usage: 10141840) - (peak: 10175560)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/modules/TinyMCE/TinyMCE.module.php = 448592 bytes for an approximate total of 5700592
Debug display of 'End of Loading Modules':(0.067166) - (usage: 10141336) - (peak: 10211056)
Debug: (0.067573) - (usage: 10186504) - (peak: 10227056)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.CmsRegularTaskHandler.php = 43688 bytes for an approximate total of 5744280
Debug: (0.06768) - (usage: 10098840) - (peak: 10259600)
Session found. Moving on...
Debug: (0.067728) - (usage: 10099288) - (peak: 10259600)
Session found. Moving on...
Debug: (0.07126) - (usage: 10868984) - (peak: 11121344)
Session found. Moving on...
Debug: (0.071327) - (usage: 10869768) - (peak: 11121344)
Session found. Moving on...
Debug: (0.071369) - (usage: 10869888) - (peak: 11121344)
before theme load
Debug: (0.07329) - (usage: 11185264) - (peak: 11216048)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.useroperations.inc.php = 132648 bytes for an approximate total of 5876928
Debug: (0.073532) - (usage: 11189536) - (peak: 11245920)
(mysql): SELECT ug.user_id FROM cms_user_groups ug
WHERE ug.user_id = '6' AND ug.group_id = 1 LIMIT 1
Debug: (0.073778) - (usage: 11190768) - (peak: 11249032)
(mysql): SELECT DISTINCT permission_name FROM cms_user_groups ug INNER JOIN cms_group_perms gp ON gp.group_id = ug.group_id INNER JOIN cms_permissions p ON p.permission_id = gp.permission_id INNER JOIN cms_groups gr ON gr.group_id = ug.group_id WHERE ug.user_id = '6' AND gr.active = 1
Debug: (0.075) - (usage: 11352216) - (peak: 11371952)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.globalcontentoperations.inc.php = 153904 bytes for an approximate total of 6030832
Debug: (0.075201) - (usage: 11355008) - (peak: 11407984)
(mysql): SELECT htmlblob_id FROM cms_additional_htmlblob_users WHERE user_id = '6'
Debug: (0.0754) - (usage: 11358512) - (peak: 11412352)
(mysql): SELECT group_id FROM cms_user_groups WHERE user_id = '6'
Debug: (0.075605) - (usage: 11357312) - (peak: 11418264)
(mysql): SELECT htmlblob_id FROM cms_additional_htmlblob_users WHERE user_id IN (-4,-1)
Debug: (0.07584) - (usage: 11356648) - (peak: 11420168)
(mysql): SELECT content_id FROM cms_content WHERE owner_id = '6'
Debug: (0.076019) - (usage: 11355176) - (peak: 11420616)
(mysql): SELECT user_id,content_id FROM cms_additional_users
Debug: (0.076571) - (usage: 11357304) - (peak: 11420616)
after theme load
Debug: (0.076654) - (usage: 11358488) - (peak: 11421496)
before populate admin navigation
Debug: (0.076696) - (usage: 11358840) - (peak: 11422448)
before menu items
Debug: (0.087229) - (usage: 11443280) - (peak: 11460888)
after menu items
Debug: (0.087692) - (usage: 11447152) - (peak: 11523448)
before syste modules
Debug: (0.087951) - (usage: 11460600) - (peak: 11564624)
before module menu items
Debug: (0.088166) - (usage: 11467976) - (peak: 11565088)
after module menu items
Debug: (0.090098) - (usage: 11522184) - (peak: 11611944)
after populate admin navigation
Debug: (0.090142) - (usage: 11522544) - (peak: 11652960)
before theme-y stuff
Debug: (0.091277) - (usage: 11523320) - (peak: 11656880)
after theme-y stuff
Debug: (0.091332) - (usage: 11524384) - (peak: 11657584)
before notifications
Debug: (0.09149) - (usage: 11526920) - (peak: 11657584)
(mysql): SELECT version from cms_version LIMIT 1
Debug: (0.091784) - (usage: 11528072) - (peak: 11657784)
after notifications
Debug: (0.092613) - (usage: 11599048) - (peak: 11693864)
Loading /var/www/vhosts/domain_ftp/domain.org/httpdocs/lib/classes/class.bookmarkoperations.inc.php = 69104 bytes for an approximate total of 6099936
Debug: (0.092817) - (usage: 11602832) - (peak: 11722520)
(mysql): SELECT bookmark_id, user_id, title, url FROM cms_admin_bookmarks WHERE user_id = '6' ORDER BY title
Debug: (0.095829) - (usage: 11708000) - (peak: 11869472)
Session found. Moving on...
Re: Unable to upload files through CMS
What about folder permissions of 777?
Re: Unable to upload files through CMS
I had already tried that, forgot to mention that in the first post.