imgupload & img browse for ckeditor on JBoss server

Place for comments, problems, questions, or any issue related to the JavaScript / PHP scripts from this site.
Posts: 2

imgupload & img browse for ckeditor on JBoss server

Hi, I am working with plugins for ckeditor developed by you. And I got stuck with a little problem. The plugins are imgupload.php and imgbrowse.php.
I am working in a Java Spring project and JBOSS server, so I generate a war file which is deployed by the Jboss, what the server does consist in uncompress the war file into a temp directory where it read the files.
Once I configure the ckeditor and the plugins everything works fine while I am saving the images into a folder inside the war file, the problem is, everytime jboss need to deploy the war or be restarted, because it overwrite the files previously deployed so I lose every image which has been upload. So I am trying to set a path outside the war file and into a JBOSS directory/folder but I am not getting what I am looking for.
I dont know what is the problem because I am getting no error. But what I know, is the imgupload.php does not upload anything and the imgbrowser.php does no show any image.
So my question is, how can I change the path and the directory to save my images from the war file to a Jboss server directory/folder?

Thank you for your help!!

1. For the imgupload addon, the php script needs the absolute /complete path to the folder where to save the files.
In the imgupload.php file, replace the line:

Code: Select all

$uploadpath = $_SERVER['DOCUMENT_ROOT'] .'/'. $upload_dir . $img_name;
With something like this:

Code: Select all

$uploadpath = 'absolute_path/to_folder/'. $img_name; 
- Now you just have to write the correct "absolute_path/to_folder/", according to your system and server.
I know nothing about jboss server, neither if it's running on windows or unix system, so i don't know how is its absolute path to a folder.

2. For the image-browse plugin I not know how to solve the problem because the folder must be in "www" (in a public folder) so the images can be accessed from browser.


Thank you for you answer, I tried the change you suggest and sadly it doesn't work. I get imgbrowe.php to show the images placed in the Jboss server outside the war file, but I cannot get the imgupload.php to uploas any image to the that path. The destination folder has all permissions to write, read and modify, but I always get the same result, "The image cannot be upload". Do you have any other suggestion??

Thank you so much!!!

Can you post here the full/absolute path of the imgupload.php file starting from server root, and the location of the upload folder? So, to know the location of the upload folder relatively to the imgupload.php, and to the server root.
- In php you can output the absolute pathname of the currently executing script with:

Code: Select all


Similar Topics