I have some trouble with my PHPMyAdmin on dedicated server.
Directadmin was installed with system CentOS7 by soyoustart.com
Here is line with phpmyadmin error line from apatche error logs:
[Tue Jun 28 10:22:51.938070 2016] [:error] [pid 30558] [client 88.199.88.94:50300] PHP Fatal error: Unknown: Failed opening required '/var/www/html/phpMyAdmin/index.php' (include_path='.:/usr/local/lib/php') in Unknown on line 0, referer: https://xxx.xxx.xx.xx:2222/CMD_DB?domain=xxxxxxx.com
Could someone tell me how to reinstall PHPMyAdmin on CentoOS 7 or how to solve this problem?
Set session.save_path to /tmp in your php.ini file and restart httpd services to fix this issues.
Related
Title says what is my problem, and it would be great if anyone have any idea. I did everything I found online on this topic, but didn't helped.
I reinstalled vps and put debian instead of ubuntu, but same problem. Reinstalled again, but problem is still here, and affect only wordpress. So apache, php 7.2, mysql, everything is fresh.
Wordpress is just downloaded, and it's not about plugins because it's still not installed. Before reinstalling VPS I tried with plugins, themes, php.ini , wp-config and so on... Any idea what can cause this?
Error log:
[Fri Mar 15 15:07:20.921038 2019] [php7:error] [pid 2210] [client IP:PORT] PHP Fatal error: Unknown: Failed opening required '/var/www/html/myweb/index.php' (include_path='.:/usr/share/php') in Unknown on line 0 [Fri Mar 15 15:07:23.889563 2019] [php7:warn] [pid 2207] [client 185.220.101.27:44328] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
EDIT: Not affect only wordpress. I just tried to copy simple php file and get error. But I knew it's to php, not to wordpress error.
EDIT 2:
FIXED with : sudo chmod -R 755 ~/site root
When I get errors and saw it's permission problem, it's fixed by:
chmod -R 755 ~/site-root
In Symfony 4, I have one bug when I use:
php bin/console serve:run
[Thu Sep 27 19:11:00 2018] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
[Thu Sep 27 19:11:00 2018] PHP Fatal error: Unknown: Failed opening required 'C:\Users\user\Documents\Sites\Symfony4\vendor\symfony\web-server-bundle/Resources/router.php' (include_path='.;C:\php\pear') in Unknown on line 0
I use composer install before this command.
I am running Windows 10.
I discovered that Avast quarantined my file. And since I was using it in silent mode, I did not see the notification.
I am fairly new to Drupal.
I just got an already existing Drupal project and want to install it.
I copied it to: /var/www/html/myprojects/mydrupalproject
Then I got this error in my error.log from apache2:
[Thu May 03 17:55:41.603774 2018] [php7:notice] [pid 11604] [client
127.0.0.1:41930] PHP Notice: Constant DATE_RFC7231 already defined in /var/www/html/myprojects/mydrupalproject/includes/bootstrap.inc on
line 258, referer: http://127.0.0.1/myprojects/
[Thu May 03 17:55:41.604601 2018] [php7:error] [pid 11604] [client
127.0.0.1:41930] PHP Fatal error: require_once(): Failed opening required
'/var/www/html/myprojects/mydrupalproject/profiles/clusters_public/modules/contrib/apc/drupal_apc_cache.inc'
(include_path='.:/usr/share/php') in
/var/www/html/myprojects/mydrupalproject/includes/bootstrap.inc on
line 2632, referer: http://127.0.0.1/myprojects/
So I tried to use the original .htaccess info in case it was the problem but I still get exactly the same error in the log. Any help?
Failed opening required
'/var/www/html/myprojects/mydrupalproject/profiles/clusters_public/modules/contrib/apc/drupal_apc_cache.inc'
Does this file exist on your webserver and is it accessable? Are the correct file-rights set?
I have tried everything, but can't seem to simply get it to work.
I was using these scripts happily on a bluehost hosting, till I decided to move to digital ocean.
https://github.com/google/google-api-php-client/tree/1.1.4
https://github.com/asimlqt/php-google-spreadsheet-client/tree/2.3.5
I built a custom function to read spreadsheets and use it as a database for a client who needed the ability to edit the website texts himself.
I took a Digital Ocean Ubuntu 14.04 server, installed Sentora Panel on it, normal PHP code works, but specifically this Google API script is throwing this error.
[Fri Jul 29 05:21:24.569294 2016] [:error] [pid 2429] [client 14.139.122.50:53019] PHP Warning: file_exists(): open_basedir restriction in effect. File(/tmp/Google_Client/5f/5fa67135f8773ebac807e4dda0aa1084) is not within the allowed path(s): (/var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in:/var/sentora/temp/) in /var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in/process/google/google-api-php/src/Google/Cache/File.php on line 52
[Fri Jul 29 05:21:25.985927 2016] [:error] [pid 2429] [client 14.139.122.50:53019] PHP Warning: is_dir(): open_basedir restriction in effect. File(/tmp/Google_Client/5f) is not within the allowed path(s): (/var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in:/var/sentora/temp/) in /var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in/process/google/google-api-php/src/Google/Cache/File.php on line 148
[Fri Jul 29 05:21:25.986025 2016] [:error] [pid 2429] [client 14.139.122.50:53019] PHP Warning: mkdir(): open_basedir restriction in effect. File(/tmp/Google_Client/5f) is not within the allowed path(s): (/var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in:/var/sentora/temp/) in /var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in/process/google/google-api-php/src/Google/Cache/File.php on line 149
[Fri Jul 29 05:21:25.986373 2016] [:error] [pid 2429] [client 14.139.122.50:53019] PHP Fatal error: Uncaught exception 'Google_Cache_Exception' with message 'Could not create storage directory: /tmp/Google_Client/5f' in /var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in/process/google/google-api-php/src/Google/Cache/File.php:154\nStack trace:\n#0 /var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in/process/google/google-api-php/src/Google/Cache/File.php(139): Google_Cache_File->getCacheDir('ff3dffdeef0acdf...', true)\n#1 /var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in/process/google/google-api-php/src/Google/Cache/File.php(134): Google_Cache_File->getCacheFile('ff3dffdeef0acdf...', true)\n#2 /var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in/process/google/google-api-php/src/Google/Cache/File.php(95): Google_Cache_File->getWriteableCacheFile('ff3dffdeef0acdf...')\n#3 /var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in/process/google/google-api-php/src/Google/Auth/OAuth2.php(315): Google_Cache_File->set('ff3dffdeef0acdf...', '{"access_token"...')\n#4 /var/sentora/hostda in /var/sentora/hostdata/zadmin/public_html/test2_ipleaders_in/process/google/google-api-php/src/Google/Cache/File.php on line 154
This is the error log I am receiving. I have checked for file permissions, and have kept it 777 in many places and especially in the tmp folder as mentioned in the error log. I desperately seek help on this, any insight is helpful.
Just as the error message says, it appears that php's open_basedir setting is preventing the script from reading the files from /tmp path. You probably want to check with your hosting provider if you are able to change that setting, or alternatively, change the temporary path in your application/library settings to the directory you have access to.
I solved this one beautifully!
So as I was using Sentora, I searched for 'open_basedir Sentora' on Google, and found this: http://forums.sentora.org/showthread.php?tid=1674
I made a custom vhost entry:
Admin > Module Admin (on Sentora CP).
Apache Config (it's the very first option).
Scrolled Down to the end of the page and under the Override a Virtual
Host Setting I choose the website I wanted.
Now on the text area input: Custom Entry I entered the following:
php_admin_value open_basedir none
And now the Google Script is working fine! Thanks to #Unix-One's answer I was on the right track.
I'm having an issue where PHP is trying to use the default session directory (/var/lib/php/session) even though I have set it to something different in my php.ini file:
session.save_path = "/WEB/SESSIONS"
I have the exact ini file on another web server and no issue. I'm using PHP 5.5 with Apache. I have verified that PHP is trying to use /var/lib/php/session by looking at phpinfo and from the Apache error log:
[Mon Aug 04 14:32:18 2014] [error] [client x.x.x.x] PHP Warning:
Unknown: open(/var/lib/php/session/sess_e9bvjjf77tbpo40r86e5pegl80,
O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer:
https://x.x.com/
This is usually pretty straight forward for me but not sure why I'm having an issue. Would appreciate any advice! Thank you!