|
|
#1 |
![]() Join Date: Oct 2004
Posts: 4
![]() |
Hi everyone,
it seems that some servers cannot cope with a trailing backslash inside the directory path, therefore making it impossible to upload any Mambo component (see: http://forum.mamboserver.com/showthread.php?t=19038). Those servers simply report "Failed to create directory" and do also normally not allow manual (web-based) component installation either. Trying to solve this problem for a customer who cannot change his provider but needs components, I found a quick & dirty solution which might be helpful until this issue can be fixed. Directory creation happens through „component.class.php” in directory /administrator/components/com_installer/component. One possible solution is to disable directory creation completely. This can be done by modifying „component.class.php” as described: In Mambo 4.5.1.a stable locate these lines: if(!file_exists($this->elementDir()) && !mkdir($this->elementDir(),0777)) { $this->setError( 1, 'Failed to create directory "' . $this->elementDir() . '"' ); return false; } if(!file_exists($this->componentAdminDir()) && !mkdir($this->componentAdminDir(),0777)) { $this->setError( 1, 'Failed to create directory "' . $this->componentAdminDir() . '"' ); return false; } Delete them completely, resave the file and upload „component.class.php” back into /administrator/components/com_installer/component. In order to install components, you must now do the following: 1. Unzip component locally in order to see the directory/subdirectory structure 2. create the directory structure in the respective /component folder on the server 1:1 3. then upload the component via Mambo component installer Due to the removal of MKDIR command, no directories will be created or checked, simply the files are copied. DISCLAIMER: Whenever you try this at home, be sure to have a backup first. I am not responsible for any damage that might occur. The workaround described has been used successfully here, but I recommend to safely check first! Also be aware that this is modifying the core code, which you might not want! However, it saved me and my project for now :-) All the best, Tom |
|
|
|
|
|
#2 |
![]() Join Date: Mar 2004
Location: Niagara Falls, NY
Posts: 435
![]() |
If you're going to manually go in there and create the directory structure, you may as well just put the files up. I've done this where I manually upload all the files, strip the files section from the xml installer, then install the component (or module). Then you don't have to hack any core files and the component gets installed normally except for the file copy (and directory creation) part.
|
|
|
|
|
|
#3 |
![]() Join Date: Nov 2004
Posts: 13
![]() |
Is there a way to do a systemcall in PHP like in c
for example system("mkdir XYZ"); if so, and PHP can't be told to do this stuff without the trailing slash, this could be a better workaround ??? Greetings from 1XXXX Berlin / Germany |
|
|
|
|
|
#4 |
![]() Join Date: Nov 2004
Posts: 13
![]() |
If found a work around, with out this manual installing stuff.
I already patched two file and it's working great at least forthe template stuff, the other mkdir Problems I'll look for a workaround too. If somebody like to get those Files leave a not here ( STRATO-Users are welcome) !!! CU |
|
|
|
|
|
#5 |
![]() Join Date: Nov 2004
Posts: 13
![]() |
Since I was asked from synsongs what Files needs to be patched, I think I put it on the List for everyone who has Problems with the mkdir()-Routines in the Installation-part of Mambo.
there are 3 Files I changed: administrator/components/com_installer/template/template.class.php administrator/components/com_installer/admin.installer.php administrator/components/com_installer/component/component.class.php To install everythng just put the Mambo-patch.zip into the HOME-Dir of your Mambo login to your Server and do from there a tar -xzvf Mambo-patch.zip (It's realy a tar.gz File but not allowed to upload) that should do the Job. But don't point with Fingers at me, when you blowup every Server in your Town. IT's your respnsability to Check what you are doing. Have Fun with it. Greetings from 1XXXX Berlin / Germany P.S.: I'll try to build a nicer work around, to check at what System it's running, since I don't know what it is doing under Linux or Windoof !!! --------- EDIT ------------ for the download, please look a couple lines further down this thread (Nr. 8 ) !! --------- EDIT END -------- |
|
|
|
|
|
#6 |
![]() Join Date: Nov 2004
Posts: 13
![]() |
Hi,
its me again. I think every one is sleeping. What ever. If those Users who have the mkdir() Problem and the directory to create shows on the screen with a trailing slash, could do me a favor ?? Please download the attachment install it on your Server or Webspace and call it with your favorite Web-Browser and tell me write in this forum, what you see at the screen. Thanks in Advanced and Greetings from 1XXXX Berlin / Germany |
|
|
|
|
|
#7 |
![]() Join Date: Oct 2004
Posts: 4
![]() |
Hi akn99,
had to rename the file to .php4 since PHP5 is not yet available on VERIO servers. The output result was: FreeBSD Thanks! |
|
|
|
|
|
#8 |
![]() Join Date: Nov 2004
Posts: 13
![]() |
Hi, it's me again !!
Now I changed a few things, Now it's looking for SunOS or FreeBSD if this is a case, the trailing slashes are striped off. IT's a much nicer way to do this stuff. For other people here on the list. I included 2 extras, one .htaccess for those who don't know how to force your WEB-Server by a .php extension a PHP-Version YOU like to use. In my case php5. a shellscript, that looks for every directory underneath the current working directory und copy's th .htaccess from the current Dir to the des-Dir fond by the finde-Statement. Have fun with it. Greetings from the Dark Bäärlin P.S.: The reason why I post this stuff is, I was looking how to work around the Problem I've at STRATO (Please don't flame now just because I'm using it), but couldn't find any solution. Anything I found where those fine answers like : change your Provider learn this language Doit manualy (Bäää) etc. and with those little tricks I can dance a few steps further Mambo. And I hope other people from the Strato community who are afraid asking anything just because of those nice Flames, can just silently download this stuff and get that thing going. By the Way a tried every install Mod, MamBot,Com, Template and I screwd up my Mambo that much, I had to delete some stuff by Hand inside the Dirs and per PHPMyAdmin inside the Database !! So enoug for tonight. |
|
|
|
|
|
#9 |
![]() Join Date: Nov 2004
Posts: 1
![]() |
I would like to give you a big THANK YOU for you patch. It worked flawlessly allowing me to finally install SimpleBoard on my mambo install.
|
|
|
|
|
|
#10 |
![]() Join Date: Nov 2004
Posts: 1
![]() |
After a week of frustation tryng to find the solution I just happens to look
here.... and it WORKED!!!!! big Thanks to you ![]() |
|
|
|
|
|
#11 |
![]() Join Date: Nov 2004
Posts: 13
![]() |
Hi,
13 Reviews for the Patch is not bad. Are most of the Users here Beginners in PHP like me ?? Or does nobody like User who are still with STRATO etc. ? But anyway, with this patch I installed 20 Components 66 Modules 38 Templates What I like to know is, does anybody had the problem, that the Website didn't work one Day where it worked perfectly the day before ?!?!? I figured out, that my "Space-Provider" is using linked Directories and from time to Time the Directory you receive per MAMBO-CONFIGURATION is all of the sudden diffent. I changed the Configfile with a little trick, where I first of try to figure out, where my htdocs(Document-ROOT)-Directory is an then callup a function to convert it to the real-dircetory. Who like to use this, send a Post and I'll update the Patch ;-) Greeting from 1XXXX Berlin - Germany |
|
|
|
|
|
#12 | |
![]() Join Date: Nov 2004
Posts: 4
![]() |
Quote:
The server I am working on shows safemode OFF, but mkdir is not possible. So I uploaded all the files to the dir they should be. However, even when I strip the <files> tag from the xml file, it gives me an error on the copying of that file to the component directory when trying to upload the module zip (only containing that one, stripped down, xml file). All in all, the component does get added [finally!], but these errors... ? |
|
|
|
|
|
|
#13 | |
![]() Join Date: Nov 2004
Posts: 13
![]() |
Quote:
It seems you have one of those funny Systems, where at the and of a mkdir command-Option youre Server don't like slashes. Those Patches are not special for the safemode Problem and it should not solve this. Greeting from 1XXXX Berlin - Germany |
|
|
|
|
|
|
#14 |
![]() Join Date: Nov 2004
Posts: 4
![]() |
Added your patches, safe mode being OFF, not ON, uploading a component still results in this error:
Warning: mkdir(/var/www/web261/html/mambots/editors/htmlarea2) [function.mkdir]: Permission denied in /var/www/web261/html/administrator/components/com_installer/admin.installer.php on line 191 |
|
|
|
|
|
#15 | |
![]() Join Date: Nov 2004
Posts: 13
![]() |
Quote:
and add the following lines to it: ********************SNIP ***************** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <?php phpinfo(); mkdir ( (/var/www/web261/html/mambots/editors/htmlarea2, 755); ?> </body> </html> ************** SNIP ************** take alook if the dir : /var/www/web261/html/mambots/editors/htmlarea2 exist and post all the results here ;-) Greeting from 1XXXX Berlin - Germany |
|
|
|
|
|
|
#16 |
![]() Join Date: Nov 2004
Posts: 4
![]() |
|
|
|
|
|
|
#17 |
![]() Join Date: Nov 2004
Posts: 4
![]() |
Ok, found a fix. Had to change the permissions on the directory where the module or component is getting installed. (editors). Now it works, so far.
|
|
|
|
|
|
#18 |
![]() Join Date: Nov 2004
Posts: 13
![]() |
Nice to know. Congratulations, but where is the Link ???
Greeting from 1XXXX Berlin - Germany |
|
|
|
|
|
#19 | |
![]() Join Date: Dec 2004
Posts: 7
![]() |
Quote:
I am another entirely satisfied Strato customer, unfortunately, unlike you, I dont have a clue what Im doing! A couple of questions, which should you be able to answer would possibly make me a very happy teddy bear. When you say install the file to the HOME directory of your mambo login, is that the administrator folder or its parent? How do I "install" it, just copy the files to there? How do I "do from there a tar -xzvf Mambo-patch.zip" Thanks for any help you or anyone can offer. Id like to Mambo, but the Strato bouncers won't let me in Taff |
|
|
|
|
|
|
#20 |
![]() Join Date: Jan 2005
Posts: 1
![]() |
A solution !! :-D
Thank you so much ! You just saved my day ! I tried for 3 days and could not upload any new component although i searched the forum for hours and now this ! This post is golden ! Wow now i was at the edge of switching to another CMS (i tried phpNuke and PN already hahaha i am happy now EDIT: Greetings from Hannover/Germany |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|