PDA

View Full Version : relative links to php file


sandy259886
02-03-2010, 10:50 AM
When I upload my php files to the file directory...I try setting a relative link to them. The php files do not show up when I browse the server to link to them. the Html files do. I added 'php' to the php/config.php file list, but they still aren't showing up to link to them.

Jason Byrnes
02-03-2010, 03:57 PM
In the HTMLEditor/fckconfig.js file, you need to add php to the FCKConfig.LinkUploadAllowedExtensions:

FCKConfig.LinkUploadAllowedExtensions = ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip| jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf| png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|sw f|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls |xml|zip|php)$" ;



You will need to clear your browsers cache, then close and restart the browser for the change to take effect.

sandy259886
02-03-2010, 04:48 PM
Did that ... didn't work. I also tried to upload a .php page using the file browser, but it said the filename wasn't valid. Hmmm...

sandy259886
02-04-2010, 03:23 AM
I added 'php' to the allowed extensions in the filemanager/connectorss/pphp/config.php file on line: 113.

I added 'php to the list of extensions in the HTMLEditor/fckconfig.js as follows:
FCKConfig.LinkUploadAllowedExtensions = ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip| jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf| png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|sw f|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls |xml|zip|php)$" ; // empty for all

I've cleaned out my cache 10 times.

I am still not seeing any .php pages in the relative links window. When I try to upload a .php file, the error message says that the filename is not allowed.

What next? I really need to get this resolved today. This should already have been an allowed option in the first place.

Eric Mittman
02-04-2010, 10:43 AM
Along with adding it to the allowed types you will also need to remove it from the banned types. This is in the KFM configuration.php file that is located at HTMLEditor > editor > plugins > kfm > configuration.php.

In here you need to find the variable name $kfm_banned_extensions around line 128. In here you need to remove the php entry so that it looks like this:


$kfm_banned_extensions = array('asp','cfm','cgi','php3','php4','php5','phtm ','pl','sh','shtm','shtml');


Keep in mind though that this can present a major security issue if anyone gains unauthorized access to your editor pages. If someone uploads a php file it can then be executed by going to the URL for it.

sandy259886
02-04-2010, 01:04 PM
That did it. I'm going to save all of these notes incase I have to do this again. Thank you so much! All of my website are php sites and this solves a huge problem.

Eric Mittman
02-04-2010, 04:56 PM
I was not aware of the banned files list myself until investigating this issue further. I'm glad that worked out for you.