WordPress Importer 0.5 - php

I can't install WordPress Importer 0.5 on Boldy theme.
the message i get when installing the plugin is this:
Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is 10736 is not allowed to access /tmp owned by uid 0 in /var/www/vhosts/griffedecorazioni.it/httpdocs/wp-admin/includes/file.php on line 177
Warning: unlink() [function.unlink]: SAFE MODE Restriction in effect. The script whose uid is 10736 is not allowed to access /tmp owned by uid 0 in /var/www/vhosts/griffedecorazioni.it/httpdocs/wp-admin/includes/file.php on line 489
Download failed. Destination directory for file streaming does not exist or is not writable.
............

Try setting the constant WP_TEMP_DIR which should change the directory downloaded packages are saved to. Put something like this in your wp_config.php:
define('WP_TEMP_DIR', ABSPATH . 'wp-content/');

Related

laravel on cpanel raise error for autoload_real.php on line 66

I am new to laravel and I run my website on localhost. It runs correctly but when I upload it on cpanel, it raises these errors :
Warning:
require(/home/didfilei/public_html/app/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in
/home/didfilei/public_html/app/vendor/composer/autoload_real.php on
line 66
Warning:
require(/home/didfilei/public_html/app/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in
/home/didfilei/public_html/app/vendor/composer/autoload_real.php on
line 66
Fatal error: require(): Failed opening required
'/home/didfilei/public_html/app/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php'
(include_path='.:/opt/cpanel/ea-php71/root/usr/share/pear') in
/home/didfilei/public_html/app/vendor/composer/autoload_real.php on
line 66
I solved it. I realized that after extracting the zip file with cpanel, some folders were deleted (eg '/ symfony'), so I got more space from the hosts, then my project extract correctly
Since you do not have access to SSH, you should upload the vendor files along with the rest of your project.
Be careful that if your dev machine is windows, you might face some issues with paths and case sensitivity.
You also need to check how php is executed in your host. You might have to fiddle around with file ownership and access rights.
Especially if suphp is used, your user must be the owner of everything in your folder, all files must be set to 644 and all folders to 755
SSH into your server and run composer update in the root of your project. This will pull in the required vendor files that you are missing.

php Set tmp directory

I have an Apache server running on RHEL 6.5. For the past few days I have been trying to install OSticket, an open source ticket system, and keep getting this error when trying to access the setup directory with my browser.
Warning: session_start() [function.session-start]: open_basedir
restriction in effect. File(/tmp) is not within the allowed path(s):
(/u00/apache_homes/sdm/:.:/u00/app/php/lib/php/) in
/u00/apache_homes/sdm/htdocs/support/setup/setup.inc.php on line 53
Fatal error: session_start() [function.session-start]: Failed to
initialize storage module: files (path: ) in
/u00/apache_homes/sdm/htdocs/support/setup/setup.inc.php on line 53
Now I know the issue is that the page dose not have permission to access the /tmp directory. I cannot give it access for security reasons according to the server admin. We do have another tmp directory set up under the Apache folder.
My question is this. Is it possible to specify a override to use this new directory globally as the tmp directory? Is it upload_tmp_dir in the php.ini what I am looking for?

File system is not writable

I installed Drupal 7 in a web host successfully.
After installing a module, I got an error errors and and status report gave me this error message:
File system Not writable
The directory /Applications/MAMP/tmp/php does not exist.
You may need to set the correct directory at the file system settings page or
change the current directory's permissions so that it is writable.
I check the permissions for (sites/default/files) and it has 755 permissions and I change it to 777 but nothing happened so I return it back.
I have the following setting for (Home » Administration » Configuration » Media):
Public file system path
sites/default/files
Temporary directory
/Applications/MAMP/tmp/php
and here is the error I am getting:
Warning: file_put_contents(temporary://fileDyFbDg) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1898 of /home/imamus/public_html/includes/file.inc).
The file could not be created.
Warning: file_put_contents(temporary://fileeTFMpl) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1898 of /home/imamus/public_html/includes/file.inc).
The file could not be created.
Warning: file_put_contents(temporary://fileuB8Tdu) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1898 of /home/imamus/public_html/includes/file.inc).
The file could not be created.
Warning: file_put_contents(temporary://filea1KYXG) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_save_data() (line 1898 of /home/imamus/public_html/includes/file.inc).
The file could not be created.
Please advice.
I check the permissions for (sites/default/files) and it has 755 permissions and I change it to 777 but nothing happened so I return it back.
do the same for /Applications/MAMP/tmp/php
This reply is for non-windows sites :
In my case, the sites/default/files/ folder was set to 775 ( not a good idea to have it set to 777 )
I had to delete the following folder :
rm -rf /tmp/devel_themer/
Then it worked !
The error happens, because your temporary directory is not writable by your web server user.
You may check that in admin panel by going to Reports and Status report at: /admin/reports/status.
To fix it, you've to got to File system in Configuration (at /admin/config/media/file-system), then change your temporary directory to point to your writable directory. If that's correct, then make you set the right permission on it, e.g.
sudo chmod -R 777 /Applications/MAMP/tmp/php
and the same for default files folder:
sudo chmod -R 777 sites/default/files
Drush
If you're using drush, check which folder is set currently by:
drush vget file_temporary_path
Then to fix it, try:
drush vset file_temporary_path /tmp
Here are default temporary directories:
OS X: /private/tmp, for MAMP: /Applications/MAMP/tmp/php
Linux/Unix: /tmp

pear include_path data folder is no longer valid

I have a vps with centOS LAMP stack, and multiple domains/ips. A long time ago I had someone more familiar with SSH install pear on the vps, and I believe he configured it for a specific user/domain, which no longer exists, and now pear is throwing errors.
The old user/domain which no longer exists is "ljsspin" but when I look at my php.ini, the include path is:
include_path = ".:/usr/share/pear/:/usr/share/php:/var/www/ljsspin/data/pear/:"
I can execute pear commands in ssh, but I'm assuming the fact that the last portion of that include path no longer exists is the reason for the error.
So my question is how do I install the necessary /data/pear files into a new directory? I've tried upgrading pear, and that, too, produced an error (unable to unpackage a structure file).
Thanks for any guidance.
Exact error message I receive:
Warning: include() [function.include]: open_basedir restriction in effect. File(/usr/share/pear/Mail.php) is not within the allowed path(s): (/var/www/steve/data:.) in /var/www/steve/data/www/newdomain.com/admin/dashboard/includes/pdf.php on line 3
Warning: include(/usr/share/pear/Mail.php) [function.include]: failed to open stream: Operation not permitted in /var/www/steve/data/www/newdomain.com/admin/dashboard/includes/pdf.php on line 3
Warning: include() [function.include]: Failed opening 'Mail.php' for inclusion (include_path='.:/usr/share/pear/:/usr/share/php:/var/www/ljsspin/data/pear/:') in /var/www/steve/data/www/newdomain.com/admin/dashboard/includes/pdf.php on line 3
The open_basedir restriction in effect error message means that you've set a value for the open_basedir PHP directive so scripts are not allowed to read files from outside a given set of directories, which in your case are these:
/var/www/steve/data
.
Since PEAR packages are installed in some other directory:
/usr/share/pear/
... PHP prevents scripts from reading them, as it's been instructed to do.
If you intend to allow access to /usr/share/pear/, you'll obviously have to broaden the restriction.

php.ini.default not finding new path to cloudfusion on Mac OS X Snow Leopard

I'm trying to follow along with a book on Amazon EC2 and it says to include a new file path in php.ini in the etc folder to the cloudfusion sdk. So I uncommented the path variable in php.ini.default and set the new path to be:
include_path = ".:/php/includes:/Users/john/cloudfusion"
but yet when I try running my php script inside a folder named amazon, it keeps giving me the error:
Warning: require_once(sdk.class.php): failed to open stream: No such file or directory in /Users/john/amazon/create_bucket.php on line 26
Fatal error: require_once(): Failed opening required 'sdk.class.php' (include_path='.:') in /Users/john/amazon/create_bucket.php on line 26
Anybody have any ideas?
PHP doesn't read php.ini.default, it just defaults to the values in it internally, to make sure your changes are read, you can copy that file to php.ini and edit your values.
Alternatively you can use http://nl3.php.net/ini_set function to modify your include path on-the-fly. You need to use ini_set before the actual require_once.

Categories