Moodle 3.4 installation on Centos 7 - apache

Installing a test Moodle (3.4.1) using the instructions on Moodle site but only got blank page when accessing it. I put the moodle installation on /var/www/html/moodle. The install.php script returns with success.
I am using PHP 7.0 on the ius repository.
httpd error log has these entries:
[Thu Jan 18 10:45:24.626059 2018] [:error] [pid 29857] [client ::1:41946] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Thu Jan 18 10:21:39.114019 2018] [:error] [pid 28769] [client ::1:41930] PHP Fatal error: Unknown: Failed opening required '/var/www/html/moodle/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
I have tried to chmod to 755 and still the same problem.
Am I missing some php libraries?
Thanks,
Alex

try to give all the rights
sudo chmod -R 777 /path/to/moodle

Probably I did something wrong during the first install. Redid a clean install and everything works fine.

Related

Unable to start Apache 2.4.18 on Windows

I try to start up my HTTP service by the following procedure:
Startup easyPHP DevServer 16.1
Open Dashboard
Opens on the local machine 127.0.0.1:1111
Try to start the HTTP server using Apache 2.4.18
opens Apache page with VC11 compiler and server with
php version 5.6.17 listening on port 80.
Clicking on the Start button results in a short execution
and then no result. Both the error and access logs are empty.
Any suggestions are appreciated.
In order to properly execute PHP7 you must allready install the Redistribuable Visual C++ V14 (as shown in the PHP7 information detail on easyphp dashboard)
You can find it out here https://www.microsoft.com/download/details.aspx?id=48145
Currently PHP7 is only available in easyPHP in 32bits version, so install the compatible version of VC14.
But soon I hope we can use the x64 PHP7 version, and then you must install the x64 VC14 version
Windows 7 SP1 box, EasyPhp-DevServer-16.1.
Since I have a website to migrate, I decided to update EasyPHP on my computer to start with fresh-up-to-date versions of PHP, Apache, MySQL. Maybe I shouldn't have... the TaskBar icon and admin interface have changed, nothing works like before.
But I am stubborn, and I want it to work. So I try to run something, and it is not. Here are the symptoms, very close to Richard's:
Trying to start Apache 2.4.18, choosing PHP 7.0.2. Click on green "Start" button, it turns into a red "Stop" button. Everything is OK? Nope. Clicking on the "Error log" button, the page comes back to previous state with green "Start" button and nothing in the error log textarea.
OK, so I choose PHP 5.6.17 and click on "Start". I have popups claiming for instance "bz2: Unable to initialize module. Module compiled with module API=20131226. PHP compiled with module API=20121212. These options need to match."
The button turns to red "Stop", and clicking on "Error log" button produces this output:
PHP Warning: PHP Startup: bz2: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: gd: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: mbstring: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: mysql: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: mysqli: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: pdo_mysql: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: pdo_sqlite: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: sockets: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: sqlite3: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: xsl: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0
[Mon Feb 22 16:51:45.788809 2016] [mpm_winnt:notice] [pid 3292:tid 236] AH00455: Apache/2.4.18 (Win32) PHP/5.6.17 configured -- resuming normal operations
[Mon Feb 22 16:51:45.789809 2016] [mpm_winnt:notice] [pid 3292:tid 236] AH00456: Apache Lounge VC11 Server built: Dec 11 2015 11:26:53
[Mon Feb 22 16:51:45.789809 2016] [core:notice] [pid 3292:tid 236] AH00094: Command line: '..\\eds-binaries\\httpserver\\apache2418x160222160722\\bin\\eds-httpserver.exe -d C:/BIN/EasyPHP-Devserver-16.1/eds-binaries/httpserver/apache2418x160222160722'
[Mon Feb 22 16:51:45.797809 2016] [mpm_winnt:notice] [pid 3292:tid 236] AH00418: Parent: Created child process 2568
Xdebug requires Zend Engine API version 220131226.
The Zend Engine API version 220121212 which is installed, is outdated.
Since Apache seems to be running, I then launch MySQL. Then I try to run PHPMyAdmin. Here is the resulting message:
phpMyAdmin - Error
The mbstring extension is missing. Please check your PHP configuration.
Of course, since this extension didn't manage to be initialized!
So, here are my complementary questions to Richard's:
What can cause Apache to neither launch nor write any log when choosing PHP 7.0.2?
What can cause Apache to not initialize modules when launching with PHP 5.6.17?
Thanks for any clue,
Seagram
Hello again,
I found out an answer to myself for question 2. that may interest others:
When I installed EasyPHP-DevServer-16.1, I didn't uninstall EasyPHP-DevServer-14.1VC11. In order to have another development working months ago, I have modified my PATH environment variable to point to the php executable in this version.
Now I have removed this path reference in the PATH variable. I also exited from EasyPHP TaskBar icon. THIS IS IMPORTANT in order for this tool to forget the old PATH value. Then I restarted it, clicked on DashBoard again and launched Apache.
Now Apache starts smoothly with PHP 5.6.17 and the error log file contains only:
[Mon Feb 22 17:16:20.295146 2016] [core:warn] [pid 6652:tid 236] AH00098: pid file C:/BIN/EasyPHP-Devserver-16.1/eds-binaries/httpserver/apache2418x160222160722/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Mon Feb 22 17:16:20.313147 2016] [mpm_winnt:notice] [pid 6652:tid 236] AH00455: Apache/2.4.18 (Win32) PHP/5.6.17 configured -- resuming normal operations
[Mon Feb 22 17:16:20.313147 2016] [mpm_winnt:notice] [pid 6652:tid 236] AH00456: Apache Lounge VC11 Server built: Dec 11 2015 11:26:53
[Mon Feb 22 17:16:20.313147 2016] [core:notice] [pid 6652:tid 236] AH00094: Command line: '..\\eds-binaries\\httpserver\\apache2418x160222160722\\bin\\eds-httpserver.exe -d C:/BIN/EasyPHP-Devserver-16.1/eds-binaries/httpserver/apache2418x160222160722'
[Mon Feb 22 17:16:20.321147 2016] [mpm_winnt:notice] [pid 6652:tid 236] AH00418: Parent: Created child process 4052
[Mon Feb 22 17:16:20.895180 2016] [mpm_winnt:notice] [pid 4052:tid 316] AH00354: Child: Starting 64 worker threads.
However, with PHP 7.0.2., Apache keeps on not starting and doesn't trace anything in error log.
Something else is missing...

Can not commit to SVN (Path ... already exists)

I installed subversion on an ubuntu server following this guide (I only use svn through webdav) : https://help.ubuntu.com/community/Subversion
I created some repositories and initialized them with initial structure (branches/tags/trnuk).
Then I started working with my python code (using PyCharm), after 2 commits I could not commit anymore, each time I want to commit now it says :
svn: E175005: Commit failed (details follow):
svn: E175005: Path '/svn/backend/trunk/libs' already exists
And this happens with any repository (even new ones) and the files and directories are new and never existed before (I even tried to create new project but same thing happens), I am stuck, anyone has an idea of what is happening ?
EDIT
I created the the libs directory using the command (in the server):
svn mkdir file:///home/svn/backend/trunk/libs -m "Libs" --parents
Everything went fine :
Committed revision 2.
But when I wanted to commit a file from Pycharm into directory libs, I got:
svn: E160007: Commit failed (details follow):
svn: E160007: No such transaction ''
svn: E175002: MERGE of '/svn/backend/trunk/libs': 500 Internal Server Error
I checked the Apache logs in the server, this is what is in it:
[Wed May 21 18:30:51.930864 2014] [dav:error] [pid 17997] [client xx.xx.xx.xx:35834] Could not MERGE resource "/svn/backend/!svn/act/0ada9e1f-4601-0010-b475-91cd296adad5" into "/svn/backend/trunk/libs". [500, #0]
[Wed May 21 18:30:51.930904 2014] [dav:error] [pid 17997] [client xx.xx.xx.xx:35834] The transaction specified by the activity does not exist [500, #160007]
[Wed May 21 18:30:51.930908 2014] [dav:error] [pid 17997] [client xx.xx.xx.xx:35834] No such transaction '' [500, #160007]
Thanks again for your help
EDIT 2
I forgot to mention that SVN updates from PyCharm seems to work perfectly.
EDIT 3
Just tried committing from Netbeans, and it works perfectly, so this seems a PyCharm issue, I will keep investigating
I recently got the same error message trying to import a directory into a repo.
After a while, I noticed that I was trying to import a symlink, instead of the actual directory. Replacing the symlink with the actual directory fixed the issue.
Check that you are not trying to commit a symlink

Centos | Yiiframework | Permission Denied

I am facing permission denied error while trying to deploy an Yii based application on Apache Httpd server, following are logs of same.
require_once(): Failed opening required
'/home/tarun/scripts/yii-1.1.13/framework/yii.php'
(include_path='.:/usr/share/pear:/usr/share/php') in
/var/www/hellouttarakhand.com/index.php on line 12 [Sat Apr 06
14:49:03 2013] [error] [client ::1] PHP Warning:
require_once(/home/tarun/scripts/yii-1.1.13/framework/yii.php): failed
to open stream: Permission denied in
/var/www/hellouttarakhand.com/index.php on line 12
Due to above error, application page always appears blank as script is not able to execute.
I have given chmod 777 to yii root folder as well executed following command
chcon -Rv --type=httpd_user_content_rw_t
/home/tarun/scripts/yii-1.1.13/
but still no luck with this error.
Any pointers will be appreciated.

apache2 python cgi misconfiguration

I am having problems with executing a python script from a browser.
My script is simple as follows,
cameron_toll.py
#!/usr/bin/env python
print "Content-type: text/html\n\n";
import mapnik
print "Done"
The permissions are as follows,
-rwxrwxrwx 1 www-data www-data 77 2011-11-28 12:59 cameron_toll.py
drwxrwsr-x 2 antony antony 4096 2011-11-28 10:42 cgi-bin
I have also tried setting "antony antony" to the cameron_toll.py but still does not work.
My error log file is,
[Mon Nov 28 14:36:43 2011] [error] [client 92.27.17.145] suexec policy violation: see suexec log for more details
[Mon Nov 28 14:36:43 2011] [error] [client 92.27.17.145] Premature end of script headers: cameron_toll.py
the script runs fine from my shell window which means that python is ok and mapnik is imported fine.
Any ideas or suggestions would be extremely appreciated.
Ok, I think I have got it. It was a permission error indeed. I had a user misconfiguration. The User did not have rights to execute..

symfony unlink warning in Apache error log

I have a symfony 1.4 project that is continually putting the following warning in the Apache error log:
[Wed Sep 26 06:18:22 2011] [error] [client 192.168.100.12] PHP Warning: unlink(/var/cache/project-ttp/device/dev/config/config_autoload.yml.php): No such file or directory in /usr/share/project-ttp/lib/vendor/symfony/lib/autoload/sfAutoload.class.php on line 132
Any idea what may be causing this?