Jump to content

Recommended Posts

Hey everyone.

 

I've run into a problem working on a "live" update system for a website I'm working on. The idea is that I add/upload a zip file on a central host, with all the updated/new files for a running site, and then the admin of the running site can install the update.

 

I've got it so the zip is opened, running through the files in the archive. For each file it opens the existing version with fopen, replaces the content, then closes the file. That works pretty good, but the problem comes when a new file is found in the archive.

 

When I fopen() to create a new file, the ownership and permissions are different than for the files I uploaded manually via ftp. And I can't execute the scripts created this way. I've found that php Safe Mode is switched ON for my host, and I can't do anything to change that. Neither is a change of host possible at the moment.

 

Anyone here with a good suggestion on how I handle the updates if I can't get it to create new files?

 

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/66346-update-system/
Share on other sites

Ah, sorry, some more explanation.

 

No, I can't chmod/chgrp them to get the properly set on ownership and permission, so I can't execute them as scripts, or include them in other files. That is when I create new ones with fopen() or touch().

 

Also, to nail it all down, php version is 4.4 and the webserver Apache 1.3.37.

Link to comment
https://forums.phpfreaks.com/topic/66346-update-system/#findComment-332070
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.