I have recently installed Google Drive File System (Google's new Backup and Sync) on my Mac. It runs on /Volumes/GoogleDrive/
Looking to move all my local /dev/ to /Volumes/GoogleDrive/My\ Drive/dev/ to keep everything in sync in the cloud. So far so good.
Apache on MAMP won't recognize /Volumes/GoogleDrive/
[Wed Dec 20 14:22:38 2017] [error] [client ::1] File does not exist: /Volumes/GoogleDrive
..so I created a symlink on the local drive hoping this would work. I get a 403 error now (Forbidden).
[Wed Dec 20 14:43:13 2017] [error] [client ::1] Symbolic link not allowed or link target not accessible: /Users/sergiupoenaru/Documents/dev
One more thing I did was noticing the permissions are 700 and can't change them to anything else. Read somewhere on the web that you can't chmod a NTFS drive.
Any tips on either how to set the proper permissions or a workaround?
Upon upgrading to the latest MAMP, I could use the following PATH successfully:
<Directory "/Volumes/GoogleDrive/My Drive/dev/">
Related
When i want to edit a page of my pmwiki, i get a screen containing this message:
PmWiki can't process your request
Cannot acquire lockfile
We are sorry for any inconvenience.
More information
Return to http://aim-bigfoot.uzh.ch/~morpho
The message in apache's error_log is
[Tue Aug 13 12:17:51.969802 2019] [php7:warn] [pid 28521] [client xxx.xxx.xxx.xxx:34994] PHP Warning: fopen(wiki.d/.flock): failed to open stream: Permission denied in /server2/home/morpho/public_html/wiki/pmwiki.php on line 579, referer: http://server1.loc.ch/~morpho/
If i delete .flock, and try again, the same error is reported.
This happens for all pages in this particular pmwiki.
The permissions for the wiki.d directory
drwxrwxrwx. 2 morpho morpho 4096 Aug 13 12:17 /server2/home/morpho/public_html/pmwiki/wiki.d/
The security context for this directory:
drwxrwxrwx. morpho morpho unconfined_u:object_r:httpd_sys_rw_content_t:s0 /server2/home/morpho/public_html/pmwiki/wiki.d/
If i disable SELinux with sudo setenforce 0, the page can be edited.
I have a second pmwiki system with the same permissions and security contexts, differing only in the user name, where editing is not a problem.
How can i make this pmwiki editable (with enforced SELinux)?
This question is not about PmWiki engine, it is about PHP writing permission on your server. The problem is that PHP is unable to create files in /wiki.d and probably other directories.
To point the problem, you can create simple php-script like:
<?php
touch( __DIR__ . '/test.file' );
?>
When executed, it should create file /test.file , but on your server this will not work, and this is a real problem to solve.
I suggest asking your hosting provider support for help to solve this problem.
I'm installing the datapusher, CKAN extension. The CKAN installation (version 2.4.1) is in source mode, and when I test the datapusher installation in develop environment mode everything is ok. However, when installed in production mode (for this I have installed Apache 4.4.17 from source and mod_wsgi 4.4.21 from source), when testing the datapusher using the curl command to call localhost:8800, it fails and returns this error:
[Mon Nov 16 12:41:03.697713 2015] [wsgi:error] [pid 1709] [client 10.178.174.65:56283] Truncated or oversized response headers received from daemon process 'datapusher': /xxxxxx/opendata/ckan/datapusher.wsgi, referer: http://XXXXXXXXXX:8800/
I was reading the mod_wsgi documentation and testing including the parameter WSGIApplicationGroup %{GLOBAL} and recompiling specifing the python location, and I reviewed that in datapusher.wsgi and datapusher_settings.py the activate_this.py location are correct.
I have successfully installed Laravel on Apache2 with php as a module. The instructions are simple. However, when I try with fcgi it does not work. So it has to do with the server configuration. After I visited http://<mylaraveldomain> (domain not public), I looked at /var/log/apache2/error.log and got this error message
[Thu Mar 26 22:52:34.012794 2015] [fcgid:warn] [pid 30834] (104)Connection reset by peer: [client 65.92.253.153:7785] mod_fcgid: error reading data from FastCGI server
[Thu Mar 26 22:52:34.012862 2015] [core:error] [pid 30834] [client 65.92.253.153:7785] End of script output before headers: php-fcgi-wrapper
[Thu Mar 26 22:52:39.826939 2015] [fcgid:error] [pid 30830] mod_fcgid: process /var/www/default/cgi-bin/php5-default/php-fcgi-wrapper(31115) exit(communication error), get unexpected signal 11
I also looked at all other log files in /var/log recently modified after visiting the URL, but no additional useful info was found. Should I look elsewhere? It is not that fcgi is not working, because if I put a file test.php in laravel public folder I can read it fine at the URL http://<mylaraveldomain>/test.php. Is there some special configuration settings to make laravel works with fcgi ? It is possible that it is specific to my installation of fcgi. So, I would like to know if others have succeeded to install laravel with fcgi on apache2. I am on Ubuntu and I made a recent apt-get upgrade.
I checked syslog and there was additional info. I could see a segment fault. I guessed it could be cache management issue. I commented out the line zend_extension=opcache.so in the file /etc/php5/apache2/conf.d/05-opcache.ini and it worked. Of course, this is only a work around.
Since a few days, my Apache 2 error log is showing a lot messages like the following (IP addresses and URIs redacted):
[Thu Dec 12 13:46:42 2013] [error] [client 111.222.333.444] 0
[Thu Dec 12 13:52:27 2013] [error] [client 222.333.444.555] 0, referer: http://www.mydomain.com/
[Thu Dec 12 13:52:27 2013] [error] [client 222.333.444.555] 0, referer: http://www.mydomain.com/
[Thu Dec 12 13:53:54 2013] [error] [client 333.444.555.666] 0, referer: http://www.mydomain.com/subdirectory/
[Thu Dec 12 13:46:42 2013] [error] [client 444.555.666.777] 0
[Thu Dec 12 13:54:07 2013] [error] [client aaaa:1111:2222:ffff::] 0, referer: http://www.otherdomain.com/subdirectory/
What is this 0? There are no other messages shown (besides sometimes some other, normal messages, but very rarely).
The IP addresses are both IPv4 and IPv6. I checked the access log for the same date/time and IP addresses. Most of the times, there was an access for the exact same moment from this IP for different URIs on my webpage. But sometimes, there wasn't an access according to the access log.
It's a shared hosting environment, so I can't access the Apache settings (but I have ssh access to my home directory if this helps). I already googled and searched the Apache documentation, but didn't found anything (it's hard to search for "0"...)
/edit: I also asked the webhoster, they said they don't know what it's causing. I cross checked it with the Apache access log, these are requests to PHP scripts (mostly Joomla), but also requests to images as well as JS and CSS files. So I assume it's not a PHP script which is causing this.
If your error_log directive is unset errors will be written in your Apache log file for current VirtualHost.
So double check your PHP configuration (php.ini) or write a simple page with phpinfo()
If this is true, you should look inside your code (may be even into index.php).
Pay attention to this: usually there are two separate php.ini files for Apache /etc/php5/apache2/php.ini and CLI configuration /etc/php5/cli/php.ini.
Please also consider that, if you want change your PHP configuration, you can use ini_set function.
ini_set('error_log', '/var/log/php/error_new.log');
Remember: the destination directory must exist and your web server (or php engine) must have all permission to write into.
error_log format is not customizable, I suspect that it can be set to some higher level: debug or trace, where it can produce additional information.
Also please take into account, that error_log contains debug info from CGI/PHP/Perl scripts, so that 'zero' can be produced by some script that executed through apache as its module.
Struggling to find a root of issue with Apache22 and mercurial. Everything seems to work right — made repository, folder with properly configured hgweb.cgi, set permissions etc.
Here comes the main problem. Everything works only if I (re)start Apache manually, using /usr/local/etc/rc.d/apache22 restart otherwise, using service apache22 restart or while whole system is booting, I'm getting up and running Apache with website accessible. But once trying to access web interface it gives me "Internal Server Error" in browser and next messages in http-error.log
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] env:
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] python
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] :
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] No such file or directory
[Fri Apr 20 17:49:40 2012] [error] [client 10.20.30.34] Premature end of script headers: hgweb.cgi
My guess is that it could be an issue with environment variables but what a heck is a difference between service run and direct call of script from /usr/local/rc.d/ ? Am I missing something?
Check PATH, it look likes python is not in your path. Maybe add /usr/local/bin to the path of the www user
Solution is really about making user running httpd (www in my case) to have $PATH adjusted. But it might not be obvious for everyone so here is what I did:
created /usr/local/etc/apache22/envvars.d/path.env with content
#!/bin/bash
export PATH=$PATH:/usr/local/bin:/usr/local/sbin
This require Apache to have env_module loaded but this looks like a standard module to be loaded in default configuration.