PhP Zip

Status
Not open for further replies.

igpwdx10

New Member
Messages
8
Reaction score
0
Points
1
HI, I have been waiting after the recent troubles, but in my page there are still some problems. It says that php zip is not installed:
"PHP module zip not installed.
Please ask your server administrator to install the module."
In addition, when I log in, it show me the x10hosting basic page and if I click to change to cPanel and confirm it when I'm asked, it shows me a page with a simply "1"
Thanks for solving it.
Kind Regards.
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi igpwdx10,

I've temporarily switched your cPanel over to the standard cPanel x3 theme, as the self-switcher is currently having problems.

As for the PHP zip issue, I don't really see a reason for it being installed. Why do you need it?

Thank you
 

igpwdx10

New Member
Messages
8
Reaction score
0
Points
1
Hi, thanks for the cPanel.
About PHP zip, I need it because I have a page about one project I'm developing (Interfaz Gráfica Para Windows Desktop= IGPWD). This project is a Windows application and I provide users the installer, the source code and the documentation. When I'm not at home, but I make changes on it, I have to upload it from mobile network and its very hard to do that if it is not in one single package (mainly the source code that is very distributed in a lot of files inside a lot of folders), so I zip it before upload it, and with php zip, I have the web configured so that any user can choose if download it all in one single zip package or download only what they want (for example only the installer or installer + manual), so the page zip or unzip the elements that the user wants to download and I can upload it easiest and faster. I must clarify that the page is not being used as storage system, the page is about this application and it stores only the elements it needs store to provide them to the world. Well, I have some test files too (as for example moon images where should be screenshots of the application), but this is because the page is still under construction (I'm so slow finishing it because the real project, the application, is more important for me, but when I finish it, It should work propperly on doing that, and if pHp zip is not installed, I should make a way to do that manually and is very hard.).
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
PHP:
<?php
$zip = new ZipArchive;
$res = $zip->open('test.zip', ZipArchive::CREATE);
if ($res === TRUE) {
    $zip->addFromString('test.txt', 'file content goes here');

    $zip->close();
    echo 'ok';
} else {
    echo 'failed';
}

$zipName = "anchor-cms-0.9.2.zip";  // SUBSTITUTE YOUR OWN .ZIP FILE NAME

$zipp = zip_open($zipName);

if (is_resource($zipp)) {
  echo "\nzip open ok";
} else {
  echo "\nzip open error";
}
?>

This runs fine on xo2 . Does it run on your server?
 

igpwdx10

New Member
Messages
8
Reaction score
0
Points
1
it doesn't:
"Fatal error: Class 'ZipArchive' not found in /home/igpwdx10/public_html/probandozip.php on line 2"
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
So, it seems that the servers are configured differently. The Admins should make them all the same (hope they don't kill Zip on xo2 but rather enable Zip on yours).

Not sure if scripts like Drupal depend on the Zip module (Drupal uploads and installs modules and themes that are in .zip files).
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,929
Reaction score
118
Points
63
I'll look into this in a few days when I make a sweep to ensure all the free servers have the same php configuration. The likely end result is that zip will end up being disabled on xo2 however, as zipping/unzipping files uses a large amount of system resources, and would likely cause websites to be taken down for High Resource Usage with even a moderate amount of usage of the zip extension, however I'll confer with the other admins before making any final decisions on that.
 

marshalm

New Member
Messages
9
Reaction score
0
Points
1
Just to add to this discussion that Moodle 2.8 (not sure how much lower it goes) won't run without this extension installed - been quite a journey and this is my latest challenge :)
 

Michael

Administrator
Staff member
Messages
27
Reaction score
4
Points
3
I have checked all the servers. It seems only 2 have this module enabled. There will be a decision made today if it will or will not be allowed. Like Skizzerz said it can be a high usage problem especially when abused.
 

Michael

Administrator
Staff member
Messages
27
Reaction score
4
Points
3
I was able to add the zip module to all free hosting servers. Please confirm it is working. Enjoy!
 

marshalm

New Member
Messages
9
Reaction score
0
Points
1
Moodle still claims it can't find the zip module - wonder if I need to strip it all out and start again to test it properly.
 

Michael

Administrator
Staff member
Messages
27
Reaction score
4
Points
3
I enabled it on all servers but I did not force existing accounts to update to it. I just did that today. ZIP module for all!
 

marshalm

New Member
Messages
9
Reaction score
0
Points
1
OK - it's now detecting the zip plug-in - many thanks. It's going onto generate another error, but that probably needs a new thread:


Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at corey@x10hosting.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
 

marshalm

New Member
Messages
9
Reaction score
0
Points
1
Just to say the instance of Moodle 2 I uploaded now seems to be running - I've not tried adding courses yet, but it's looking good. Thanks for all your help :)
 
Status
Not open for further replies.
Top