Component Install: Could not copy PHP install file

664 views
Skip to first unread message

Andrew Eddie

unread,
Mar 30, 2009, 5:34:24 AM3/30/09
to joomla-...@googlegroups.com, joomla-de...@googlegroups.com
Some of you may be encountering install problems (as alerted by grumpy
clients, etc, etc). The error is something like (kudos to the JFusion
guys and Marijke for bringing this up):

JInstaller::install: File
'/xxxx/tmp/install_49ce897371c92/jfusion.install.php' does not exist.
Component Install: Could not copy PHP install file.

This could be tripped by a few things but for some 3PD's using the
"upgrade" method in your XML manifest files AND are using a /admin/
sub-folder (for example), a slight change in 1.5.10 now causes this
error to be thrown.

The workaround is to prepend the install file tag with the full path,
for example:

<installfile>admin/install.qcontacts.php</installfile>

Unfortunately there is no choice but to rebuild your download
packages, so guess what yours truly is doing for the next few hours...

Regards,
Andrew Eddie
http://www.theartofjoomla.com/reference.html - the art of becoming a
Joomla developer

Andrew Eddie

unread,
Mar 30, 2009, 5:41:51 AM3/30/09
to joomla-...@googlegroups.com, joomla-de...@googlegroups.com
...and unfortunately the workaround doesn't work

It was not possible to copy the selected file.
JInstaller::install: Failed to copy file:
/Users/eddieajau/htdocs/joomla/1.5.10/tmp/install_49d08842640e2/admin/install/install.php
to /Users/eddieajau/htdocs/joomla/1.5.10/administrator/components/com_comments/admin/install/install.php


Component Install: Could not copy PHP install file.

Oh it's going to be a long night ...

Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer


2009/3/30 Andrew Eddie <mamb...@gmail.com>:

akede

unread,
Mar 31, 2009, 5:03:15 AM3/31/09
to Joomla! General Development
Within Joom!Fish we have luckily only one file. So the suggested work
around with the admin file was working.

What was totally confusing is that the SQL installation files still
needed to be within the admin directory. Only after I installed the
SQL files using the admin/install folder the whole installation
worked. Basically my only two files in the /install directory of the
package are the install.php and uninstall.php file. All other files
are still in the admin/install directory.

One thought:
* let's be consequent and move the path of all relevant files (also
database scripts and others) to the new location

Alex

On 30 Mrz., 11:41, Andrew Eddie <mambob...@gmail.com> wrote:
> ...and unfortunately the workaround doesn't work
>
> It was not possible to copy the selected file.
> JInstaller::install: Failed to copy file:
> /Users/eddieajau/htdocs/joomla/1.5.10/tmp/install_49d08842640e2/admin/insta ll/install.php
> to /Users/eddieajau/htdocs/joomla/1.5.10/administrator/components/com_comments /admin/install/install.php
> Component Install: Could not copy PHP install file.
>
> Oh it's going to be a long night ...
>
> Regards,
> Andrew Eddiehttp://www.theartofjoomla.com- the art of becoming a Joomla developer
>
> 2009/3/30 Andrew Eddie <mambob...@gmail.com>:
>
> > Some of you may be encountering install problems (as alerted by grumpy
> > clients, etc, etc).  The error is something like (kudos to the JFusion
> > guys and Marijke for bringing this up):
>
> > JInstaller::install: File
> > '/xxxx/tmp/install_49ce897371c92/jfusion.install.php' does not exist.
> > Component Install: Could not copy PHP install file.
>
> > This could be tripped by a few things but for some 3PD's using the
> > "upgrade" method in your XML manifest files AND are using a /admin/
> > sub-folder (for example), a slight change in 1.5.10 now causes this
> > error to be thrown.
>
> > The workaround is to prepend the install file tag with the full path,
> > for example:
>
> > <installfile>admin/install.qcontacts.php</installfile>
>
> > Unfortunately there is no choice but to rebuild your download
> > packages, so guess what yours truly is doing for the next few hours...
>
> > Regards,
> > Andrew Eddie
> >http://www.theartofjoomla.com/reference.html- the art of becoming a
> > Joomla developer

Andrew Eddie

unread,
Mar 31, 2009, 5:06:57 AM3/31/09
to joomla-de...@googlegroups.com
So what we've done is just repackage and put a duplicate copy of
/admin/install/install.php and /admin/install.uninstall.php in the
root /install/

That will work for <= 1.5.9 and >= 1.5.10 without us having to create
two packages or ask users to patch their Joomla.

Regards,
Andrew Eddie
http://www.theartofjoomla.com - the art of becoming a Joomla developer




2009/3/31 akede <alex.k...@gmail.com>:

Sam Moffatt

unread,
Mar 31, 2009, 5:38:28 AM3/31/09
to joomla-de...@googlegroups.com
On Tue, Mar 31, 2009 at 7:03 PM, akede <alex.k...@gmail.com> wrote:
> One thought:
> * let's be consequent and move the path of all relevant files (also
> database scripts and others) to the new location

I'm already working on this with the scriptfile tag for 1.6 however
1.5's installfile/uninstallfile will still behave the same way though
(so we don't break documented backwards compatibility). scriptfile
won't copy the files and will rely on the developer to do the right
thing. In this way it will be in line with the way the SQL files are
handled.

Changing this now would be wrong and would break stuff like printed
books that actually documented the feature properly which are harder
to change than our own documentation wiki (almost impossible really, a
major limitation I would say with the dead tree format).

Sam

akede

unread,
Mar 31, 2009, 3:33:33 PM3/31/09
to Joomla! General Development
I fully agree Sam. Having this changed in 1.6 is the best solution I
think.

Thx for the note

Alex

On 31 Mrz., 11:38, Sam Moffatt <pasa...@gmail.com> wrote:

Oli Griffiths

unread,
Apr 8, 2009, 7:54:19 AM4/8/09
to joomla-de...@googlegroups.com
Hi All,

 Ive come across a bug in the legacy plugin in the dbtable.php mosDBTable class.

 In the bind method of the old mosDBTable the data that was passed to the method was sanitized with mosBindArrayToObject however in the new bind method it is assumed that the data is already sanitized at it is retrieved from JRequest::get('post') for example.

To fix this ive overloaded the bind function as follows:


    /**
    *    binds a named array/hash to this object
    *
    *    can be overloaded/supplemented by the child class
    *    @param array $hash named array
    *    @return null|string    null is operation was satisfactory, otherwise returns an error
    */
    function bind($data = array()){
        
        if (get_magic_quotes_gpc()) {
            $data = JRequest::_stripSlashesRecursive( $data );
        }
        return parent::bind($data);        
    }


I hope this helps people out there struggling with legacy applications having slashes added to everything every time you save something.

Oli

Louis Landry

unread,
Apr 8, 2009, 12:59:38 PM4/8/09
to joomla-de...@googlegroups.com
Oli,

Great catch!

Would you mind generating a patch and attaching it to a new bug report in the 1.5 tracker?  That way we can get potentially get this fixed in the next maintenance release of 1.5.

Thanks,
Louis
--
Development Coordinator
Joomla! ... because open source matters.
http://www.joomla.org

Oli Griffiths

unread,
Apr 8, 2009, 1:14:03 PM4/8/09
to joomla-de...@googlegroups.com
Sure thing, 

Forgive me for not being up to speed on this but where do I do that?

Oli 


Ryan W. Ozimek

unread,
Apr 8, 2009, 1:32:28 PM4/8/09
to joomla-de...@googlegroups.com
Oli,
 
Thanks for putting this patch together.  Check out the 1.5 tracker here:
 
Joomla 1.5.x Bug Tracker
 
Best,
Ryan


From: joomla-de...@googlegroups.com [mailto:joomla-de...@googlegroups.com] On Behalf Of Oli Griffiths
Sent: Wednesday, April 08, 2009 1:14 PM
To: joomla-de...@googlegroups.com
Subject: Re: Joomla 1.5 Legacy DBTable Plugin bind method keeps slashes

Louis Landry

unread,
Apr 8, 2009, 1:47:32 PM4/8/09
to joomla-de...@googlegroups.com
Also,

If you haven't done anything like this before... some reading:


Perhaps some other things you might want to know:

Thanks,
Louis
Reply all
Reply to author
Forward
0 new messages