Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001213 [SysCP] Adminpanel major have not tried 2009-03-31 17:34 2009-12-24 07:40
Reporter carsten View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 1.4.1
Summary 0001213: APS class_apsinstaller.php on line 510 - error installing different apps
Description Error message when executing the appinstall cronjob:

Warning: fopen(/var/kunden/webs/testweb/install_scripts//configure): failed to open stream: No such file or directory in /var/www/syscp2/lib/class_apsinstaller.php on line 510
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000386)
sergioag (reporter)
2009-04-21 18:47

The cause is that some zip extensions don't report directories correctly. The following code should be added: (around line 506)

                                                if(zip_entry_open($ZipHandle, $ZipEntry))
                                                {
                                                        // handle new directory, in case not reportes above
                                                        $dir = dirname($Destination.$NewPath);
                                                        if (!file_exists($dir)) {
                                                                mkdir ($dir, 0777, true);
                                                        }

                                                        $File = fopen($Destination . $NewPath, "wb");

This added piece of code will check if the directory exists and if doesn't then it will create it.
(0000387)
monotek (reporter)
2009-04-22 07:28

Please update to Syscp version 1.4.2.1 and try again.
(0000388)
sergioag (reporter)
2009-04-22 07:42

I got that error too with 1.4.2.1, the patch there solves it.
(0000389)
monotek (reporter)
2009-04-22 07:56

Does this patch create the dir as root?

If so, you chould make a chown to the correct user....
(0000391)
sergioag (reporter)
2009-04-22 14:59

Yes it creates the directories as root, with mode 0777. However, fixing that would be another issue, as the original code does it that way (see the mkdir around line 500~505). Anyway, i'll look at it.
(0000455)
matters (reporter)
2009-12-24 07:40

I could reproduce this bug in 1.4.2.1 on Debian Lenny (32bit).

The patch from sergiogag worked.

Output of php -v:

PHP 5.2.6-1+lenny4 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 22 2009 02:38:03)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH

No SVN - commits yet

- Issue History
Date Modified Username Field Change
2009-03-31 17:34 carsten New Issue
2009-04-21 18:47 sergioag Note Added: 0000386
2009-04-21 19:15 sergioag Issue Monitored: sergioag
2009-04-22 07:28 monotek Note Added: 0000387
2009-04-22 07:42 sergioag Note Added: 0000388
2009-04-22 07:56 monotek Note Added: 0000389
2009-04-22 14:59 sergioag Note Added: 0000391
2009-12-24 07:40 matters Note Added: 0000455
Footer