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!!
imgupload & img browse for ckeditor on JBoss server
-
- Posts:2
imgupload & img browse for ckeditor on JBoss server
Admin
Posts:805
Hello
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:
With something like this:
- 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.
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;
Code: Select all
$uploadpath = 'absolute_path/to_folder/'. $img_name;
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.
jod
Posts:2
Hi,
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!!!
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!!!
Admin
Posts:805
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:
- In php you can output the absolute pathname of the currently executing script with:
Code: Select all
echo $_SERVER['SCRIPT_FILENAME'];
Similar Topics
- XAMPP-server not online
General Forum First post
Pleassant Coursesweb,Last post
Finaly after some years also because covid-lock-down I shared my documment-file with the first lawyer.
But 2 hours after...
Marplo thanks for the quick answer....
Normaly I`m carefull with extern memory, but even this were also in my USB
with result parts from website... - XAMPP-server only local host working
General Forum First post
Dear Coursesweb,Last post
I have a problem after round 10 hours searching I come to you for suport.
Only the local host is working: //127.0.0.1
But I...
OK thanks MarPlo.... Wishing overseas nice weekend