Centos | Yiiframework | Permission Denied - yii

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.

Related

Unable to code sign the apache modules in mac

I get the below error while starting Apache
root# sudo apachectl configtest
[Tue Jun 28 13:31:53.686521 2022] [so:error] [pid 8913] AH06665: No code signing authority for module at /private/libexec/apache2/mod_dispatcher.so specified in LoadModule directive.
httpd: Syntax error on line 191 of /private/etc/apache2/httpd.conf: Code signing absent - not loading module at: /private/libexec/apache2/mod_dispatcher.so
To fix the above problem, I created Certificate Authority in mac machine by following - https://www.simplified.guide/macos/keychain-ca-code-signing-create and trying to codesign to sign the AEM Dispatcher module with below command
codesign --sign "XXX CA" --force --keychain ~/Library/Keychains/login.keychain-db /private/libexec/apache2/mod_dispatcher.so
But I get the following error The specified item could not be found in the keychain.
Ref - https://www.codexpedia.com/apache-server/no-code-signing-authority-for-module-php-on-mac-monterey/
Can anyone tell me if there is any problem in above command ?
My macOS version is 12.2 (Monterey)

Moodle 3.4 installation on Centos 7

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.

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

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?