touch Unable to create file bulletproof-security.tmp No such file or directory

Home Forums BulletProof Security Free touch Unable to create file bulletproof-security.tmp No such file or directory

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #14176
    gopheradam
    Participant

    Hello All,

    Received an update prompt from word press about a BPS upgrade from ver .50 to .50.1. Upon activating the dashboard update prompt I get the following message.

    Warning: touch() [function.touch]: Unable to create file /tmp/bulletproof-security.tmp because No such file or directory in /home/randomsite/public_html/wp-admin/includes/file.php on line 155
    
    Warning: unlink(/tmp/bulletproof-security.tmp) [function.unlink]: Operation not permitted in /home/randomsite/public_html/wp-admin/includes/file.php on line 479
    
    Download failed. Could not open handle for fopen() to /tmp/bulletproof-security.tmp

    Tried all automatic update methods.  Next step is manual upgrade/install with FTP Before I create additional problems does any one have an idea of why the update has failed and what the simplest solution may be.  I should also add that I have very few plugins on a pretty stock WP install.

    Any Ideas are greatly appreciated, Thanks

    #14185
    AITpro Admin
    Keymaster

    The first thing to check is are you out of disk space for this hosting account.  tmp files are created first when you install something and after the installation completes the tmp file is automatically deleted.  If you are out of disk space or at the maximum disk space quota then you will see these types of errors.

    The next thing to check would be Ownership or Permissions problems.  What type of Server do you have?  CGI or DSO or something else?

    Or your tmp directory is not writable or the path is incorrect or is not configured correctly in your Server’s php.ini file. You would either contact your web host to do this for you or you would change this in your custom php.ini file if you have created a custom php.ini file for your website.

    http://www.php.net/manual/en/ini.core.php#ini.upload-tmp-dir

    Note:  The path needs to be your actual path for your particular /tmp directory on your particular/specific Host Server.

    upload_tmp_dir = "/tmp"

    An alternative is to override the default Server tmp folder path/location is to add this code in your wp-config.php file.  Then physically create that /tmp folder under your wp-content folder and set the /tmp folder permissions to 755.

    define( 'WP_TEMP_DIR', ABSPATH . 'wp-content/tmp/') ;

    Or you are using open_basedir on this site/Server and you will need to either fix the path information for the open_basedir directive or better yet just disable this directive by commenting it out in your php.ini file.

    Related/Similar or Exact Problem:  http://wordpress.org/support/topic/problem-updating-to-489?replies=12

    #14197
    gopheradam
    Participant

    Got in contact with my hosting provider and php.ini was stock with default values.  Inserted: upload_tmp_dir = "/tmp" and still no dice.

    Hesitant to try this: define( 'WP_TEMP_DIR', ABSPATH . 'wp-content/tmp/'); if I understand correctly this will internally handle the tmp files rather than the root tmp directory?  will it then process all future upgrades, uploads and installations as well?

    #14198
    AITpro Admin
    Keymaster

    What about Ownership?  What about Permissions? What about your Server Type?  CGI or DSO?  What about disk space?

    By adding that code to wp-config.php you are telling WordPress where to look for your tmp directory and where to upload and unpack files in that tmp directory.  Personally I would not do this and would instead fix whatever problem is occurring on your Server.  Didn’t your Host offer to help you?

    Also there is another very rare problem that can cause this: database damage or corruption.  You can try a database repair, but it has about 1% chance of fixing DB damage or corruption problems.  What I would do next is install a test site on the same Server in a new folder and see if the same problem occurs.  If it does then this is a Server problem.  If it does not occur on the test site then it is either database damage or something else that you have installed on the other site is causing this problem or this is a disk space problem or this is an Ownership or Permissions problem.

    #14202
    gopheradam
    Participant

    Everything seems to be in order, but problem persists. One item just surfaced the hosting support also referred me to this:

    Making your php.ini file affect all child folders as well is referred to as making the file “recursive”. To make your public_html/php.ini file recursive, edit (or create the file if it doesn’t exist) your public_html/.htaccess file and add the following code:

    suPHP_ConfigPath /home/username/public_html

    This line you entered is specifying the directory where the php.ini is located that you want to make recursive. Be sure to replace username with your cPanel username. How would I go about adding this custom code to htacess within BPS and where specifically does the code go?

    Thanks for all the help, I think we are getting close.

    #14204
    AITpro Admin
    Keymaster

    If your Host is guessing then this will crash your site or have no effect.  Let’s assume they are not guessing, but also be prepared for that they are guessing and this code does crash your website.  FTP to your website so that you have a connection open to your site in case your site crashes and you need to delete the root .htaccess file that contains this new php handler that you are going to add.

    You can get your Hosting account folder name on the BPS System Info page.
    Document Root Path: /home/xxxxx/public_html/
    php/php.ini handler .htaccess code goes in this Root Custom Code text box:  
    Click the Save Root Custom Code button.
    Go to the BPS Security Modes page and click the Root Folder BulletProof Mode Activate button.

    If your site does not crash then you can add directives in your custom php.ini file that you create in the root of your hosting account /public_html/. Every host is different for what you can and cannot add in a custom php.ini file so I cannot assist you any further with that since there are 1,000’s of different possibilites.  You would need to contact your Host to get that exact/specific custom php.ini information for your specific Host.

    #18260
    Jan
    Participant

    [Topic merged into this relevant Topic]

    Hi,

    I have an issue with updating the plugin.  It seems that the old url is still used instead of the new location of the site. Any idea how I can fix this? Thanks!

    Warning: touch() [function.touch]: Unable to create file /home/jera/domains/.../public_html/jeranew/wp-content/uploads/bulletproof-security.tmp because No such file or directory in/home/jera/domains/.../public_html/wp-admin/includes/file.php on line 155
    
    Warning: unlink(/home/jera/domains/.../public_html/jeranew/wp-content/uploads/bulletproof-security.tmp) [function.unlink]: No such file or directory in/home/jera/domains/.../public_html/wp-admin/includes/file.php on line 500
    #18270
    AITpro Admin
    Keymaster

    Please explain in detail what this means – “It seems that the old url is still used instead of the new location of the site”.  Did you move/migrate/clone this website?

    #18274
    Jan
    Participant

    Hi,
    The site has been moved from a subfolder to the root. There must something gone wrong why it still is looking at the old path.

    #18276
    AITpro Admin
    Keymaster

    http://codex.wordpress.org/Moving_WordPress

    Check that all your “WordPress move” steps were done correctly.  Check your site and home urls and database settings for those values.  Check your wp-config.php file for any path values.  If you changed your database table prefix then check your database for duplicate database tables using 2 different table prefixes.

    #18289
    Jan
    Participant

    Hi,

    Thank you very much for these guidelines!
    I found the issue inside the wp-config the path of WP_TEMP_DIR was not correct.

    #18290
    AITpro Admin
    Keymaster

    Great!  Thanks for sharing what the issue/problem was.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.