Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8969909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:39:36+00:00 2026-06-15T17:39:36+00:00

I have a rather interesting problem. I use FileZilla and Notepad++ to edit my

  • 0

I have a rather interesting problem. I use FileZilla and Notepad++ to edit my PHP scripts. One script, called functions.php, is edited and changed a lot. Unfortunately, everytime I edit it and reupload it, I check my error log and find that about 5 errors were thrown across my site every time I reupload. It only takes a few seconds, but since the script is included in about every page on my website, that few seconds is enough to throw errors.

I was thinking that, perhaps, I could have a functions2.php that would be basically the same. Would there be a way for the scripts on my site to grab functions2.php if functions.php is not available? Thanks.

EDIT: The error I get is usually something like “Parse error: syntax error, unexpected $end…” which I believe implies that the script is just partially uploaded. This might make file_exists not the best solution, since the file is THERE but it is only ‘halfway’ there.

Uploading and renaming seems like a good solution, but it is a bit tedious for every upload 🙂 I reupload and test a lot.

Is there a way to check a php file for PHP syntax errors? This would be quite handy in thise case…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:39:37+00:00Added an answer on June 15, 2026 at 5:39 pm

    Instead of using FTP, consider a PHP / Perl / Ruby script that will take a POST of the file being uploaded, along with the file name and a MD5 / SHA of the file to be replaced (to make sure you have everything in the post). You need to add some security as well, such as behind an Apache Login.

    Once the posted file is accepted by the PHP / Perl / Ruby script, the md5 checked (and the security passed too), the server will overwrite the “old” with the “new” version. This should be a lot quicker than FTP and reduce the errors.

    Only possible issue is the file permission on the server will need to be set to allow write access from the web server.

    Just an idea.

    Another idea…

    • Upload to a staging dir
    • Login with ssh and perform mv /staging/<file> ./

    You could have a cron job perform this once an hour too, maybe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rather interesting problem, and wondered if it could be done purely
I have a rather interesting problem. I have a parent page that will create
I'm fairly new to Powershell but I've got a rather interesting problem. I have
I have a rather interesting issue with SVG animation. I am animating along a
Have a rather simple question. Does anyone knows if i can use jparallax both
I have met an interesting problem while implementing the Observer pattern with C++ and
Run into a rather interesting problem. An element generated as html and inserted into
I can't seem to find an answer to this rather interesting problem. In google
I have a rather intriguing problem I am working on currently. Some backstory: Prerequisites:
I have rather weird problem with paperclip gem. You know it defines Attachment class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.