I just leased a dedicated windows server with Plesk 10.4 installed. I assumed that php, etc would all be configured and that I could prot my sites over with no isses...
Turns out the default image didn't have pear installed...I believe i need pear so include statements work in php...so I used go-pear.bat to install it...
However, I'm still getting an error when including (you can follow the path to see the file exists)
Warning: include(Connections/SamConnection.php) [function.include]: failed to open stream: Operation not permitted in C:\Inetpub\vhosts\80stunes.com\httpdocs\index.php on line 3
Warning: include() [function.include]: Failed opening 'Connections/SamConnection.php' for inclusion (include_path='.;C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\PEAR;C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5;./includes;./pear') in C:\Inetpub\vhosts\80stunes.com\httpdocs\index.php on line 3
Any ideas on what I have done wrong? I can run pear commands from a command prompt when accessing my pleskphp5 directory
Sounds like you may have open_basedir enabled.
Related
I am running into an error while attempting to enable php-fpm so that I can have multiple versions of php running on several different domains on one Apache Ubuntu 20 server.
I initially followed these directions: https://www.digitalocean.com/community/tutorials/how-to-run-multiple-php-versions-on-one-server-using-apache-and-php-fpm-on-ubuntu-18-04
But it didn't seem to use php-fpm as seen by phpinfo(); Instead, it was still running php (the regular one).
Then I found these instructions: https://techexpert.tips/apache/apache-php-fpm-installation-ubuntu-linux/
This seemed to work (in theory) by disabling regular php.
But now even phpinfo(); doesn't work, which is in a file called 'info.php'. It contains contains only:
<?php
phpinfo();
?>
I get:
"
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required '/home/traini61/public_html/guacamole.org/wordfence-waf.php' (include_path='.:/usr/share/php') in Unknown on line 0
"
I don't understand the error. I tried disabling the 'wordfence' plugin referenced in the error then tried again but it failed in exactly the same way. I've had to run the 2nd set of directions backwards to restore the website.
Also, is there a simpler commandline program that can provide a text-GUI to more easily administer which versions of PHP are assigned to a specific domain in an apache multi-domain configuration?
Can't install wordpress the error after entering domain. the hosting PHP version is 5
Warning: require(DIR/cherry-framework/setup.php) [function.require]: failed to open stream: No such file or directory in /home/content/a/s/c/asclaw/html/wp-content/plugins/power-builder/tm-builder-core.php on line 42
Fatal error: require() [function.require]: Failed opening required 'DIR/cherry-framework/setup.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/a/s/c/asclaw/html/wp-content/plugins/power-builder/tm-builder-core.php on line 42
download CherryFramework. Extract cherry-plugin.zip files to wp-content/plugins/cherry-plugin directory replacing existing files. This should fix the issue.
I had the same issue. I discovered the site was running on PHP 5.3 even though their cpanel showed the server was running 5.4.
I added the following to the .htaccess and it got the site working:
AddHandler application/x-httpd-php54 .php
Check you PHP version, I'm sure that's the issue.
I've been trying to use a few PEAR packages for a few hours now to no avail. PEAR itself is functioning, and I believe I set all of the configuration variables correctly, but when I try to run any of my packages from the command line, I get PHP errors telling me the required file wasn't found. For example, with phpdoc:
$ phpdoc
PHP Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40
Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40
PHP Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40
Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40
I tried manually editing the files, inserting the absolute path to the files, but when I correct one require error a new one just comes up.
This is my pear.conf:
#PEAR_Config 0.9
a:15:{s:10:"__channels";a:2:{s:12:"pecl.php.net";a:0:{}s:5:"__uri";a:0:{}}s:15:"preferred_state";s:6:"stable";s:8:"temp_dir";s:35:"/Applications/MAMP/htdocs/pear/temp";s:7:"bin_dir";s:34:"/Applications/MAMP/htdocs/pear/bin";s:7:"php_dir";s:35:"/Applications/MAMP/htdocs/pear/PEAR";s:7:"doc_dir";s:40:"/Applications/MAMP/htdocs/pear/PEAR/docs";s:8:"data_dir";s:40:"/Applications/MAMP/htdocs/pear/PEAR/data";s:8:"test_dir";s:41:"/Applications/MAMP/htdocs/pear/PEAR/tests";s:9:"cache_dir";s:41:"/Applications/MAMP/htdocs/pear/PEAR/cache";s:9:"cache_ttl";i:300;s:12:"download_dir";s:44:"/Applications/MAMP/htdocs/pear/temp/download";s:10:"http_proxy";s:0:"";s:7:"ext_dir";s:74:"/Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20050922";s:7:"php_bin";s:37:"/Applications/MAMP/bin/php5.2/bin/php";s:10:"sig_keydir";s:39:"/Applications/MAMP/conf/php5.2/pearkeys";}
I'm using MAMP PRO v1.9.5 on Mac OS 10.7.5 with PHP v5.2.17. Also, I installed the packages with the PEAR web interface package manager. If any further information is required, please let me know and I'll post it.
Make sure that the include path contains the folder where PEAR installs php class files. Check your include_path ini setting. It should look like:
include_path=".:PEAR_CLASSES_PATH"
where PEAR_CLASSES_PATH is the pear class path
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.
I followed exactly what's in: How to use PHP_CodeSniffer with XAMPP? (no more no less)
But i encounter this error:
Warning: require_once(PEAR/Exception.php): failed to open stream: No such file or directory in C:\path\to\htdocs\php-codesniffer\CodeSniffer\Exception.php on line 17
Found out what's wrong. PEAR is not initially enabled in xampp.
include_path = ".;C:\Documents\xampp\php\PEAR"
Also consider this if your changing the include_path value in your php scripts via ini_set.