Tag Info

New answers tagged

2

I would suggest you to let varnish does what it does best, caching, and let the tracking done by varnishog/ncsa By adding the Redis Vmod, you will add complexity in your vcl and if for some reasons your redis goes down, you will loose your tracking. Using varnishlog/ncsa, you can build your tracking logic outside varnish, process the log in realtime by ...


1

Limiting the access on the side of Apache is a more general approach that works for everything, including static files. It's a generally more secure approach because the request is blocked before the PHP interpreter ever sees it, making it impossible (or at least much more difficult) to exploit bugs in the PHP app. Limiting the access on the side of a PHP ...


-1

First is the Apache ACL, then the PHP one. You cannot include in PHP what you excluded in Apache before.


0

First of all .htaccess files are intended to have effect in the directory they're placed, so rather than having one in /var/www/ typically you would have two: one in each of /var/www/impdata/ and /var/www/data/ Or rather have no .htaccess files at all: my pet peeve, quoted from from the manual on .htaccess files: You should avoid using .htaccess files ...


0

It won't change the actual location, but you can make a symbolic link (shortcut) using the ln program. sudo ln -s /opt/local/bin/php /usr/bin/php That makes a shortcut from /opt/local/bin/php to /usr/bin/php. It's cleaner and more straightforward than having duplicate files or adding a directory to your PATH, in my opinion.


1

Try the next config: LoadModule php5_module libexec/apache24/libphp5.so <IfModule php5_module> <FilesMatch "\.(php|phps|php5|phtml)$"> SetHandler php5-script </FilesMatch> DirectoryIndex index.php </IfModule> <IfModule mime_module> ... AddType application/x-httpd-php-source .phps ...


1

fastcgi_param SCRIPT_FILENAME /var/www/bigblubutton-default$fastcgi_script_name; You forgot a / in the path.


0

You haven't configure PHP module. DirectoryIndex requires nonexistent module mod_php5.c. Try the next config: LoadModule php5_module libexec/apache24/libphp5.so . . . . . <IfModule php5_module> DirectoryIndex index.php index.html index.htm AddType application/x-httpd-php .php </IfModule>


0

I had the same similar problem. When I uploaded from my pc to my online webhost i got the same error. I removed any whitespace, put the session_start at the top of the file, but with no result. Then looked at my php version running on my localhost. And it was 5.4 and online it was 5.3. I updated my webhost version from 5.3 to 5.4 and my problem was gone.


2

So can I achieve this: When I go to: www.websitename.com/data/ it should give an 404 error. And when do www.websitename.com/data/welcome.php it should work. You can simply rewrite every request to a 404 not found status with an exception to welcome.php. In the code below you will see that every rule gets rewritten tot a 404 status with the exception ...


0

This answer is based on the assumption that both of your test scripts open the user session since I think that this is the most likely explanation; let me know if this assumption is wrong. PHP session files can only be accessed by a single script at any given file; this is important to prevent two scripts interfering with each other during their ...


0

Did you just upgrade to 2.4 from 2.2? Try Upgrading to 2.4 from 2.2.


1

Those tutorials are probably "helping" by having you install multiple things at the same time that they'll be using later; mostly libraries to glue the different technologies together. So, to install a MySQL server, mysql-server is the only package you need, but if you wanted to have Apache authenticate to MySQL you'd want libapache2-mod-auth-mysql, and to ...


0

Long story short: you forgot to translate non-chrooted full path to chrooted, and, since chrooted php-fpm uses the latter one, got troubles.


1

TL;DR /etc/nginx/sites-enabled/dummysite -> /etc/nginx/sites-available/dummysite ... location ~ \.php { root /var/www/domains/dummysite/web; fastcgi_pass 127.0.0.1:9000 include fastcgi_params; } ... And /etc/nginx/fastcgi_params ... fastcgi_param SCRIPT_NAME $document_root$fastcgi_script_name; ... Long solution Ok, this is how I solved ...


3

The questions is a little bit strange, it's not clear if you're asking only for PHP or your question is more general. I will give you a brief overview from the PHP side. First, the two protocols: CGI scripts is a way how to run a server side script when a HTTP request comes; this has nothing to do with PHP FastCGI is a "better CGI" - CGI is known to be ...


1

As Hrvoje suggested, Wordpres ->Nginx codex gives examples on most of possible situations (http://codex.wordpress.org/Nginx) In your case, the config file should look like below: server { root /usr/share/nginx/www/oliviataussig; index index.php; server_name oliviataussig.com www.oliviataussig.com; location / { try_files $uri $uri/ ...


2

It's pretty clear what's happening here. php56u requires httpd from CentOS base. But you installed httpd from Amazon repository. Generally IUS is compatible with a standard CentOS/RHEL. I seriously doubt IUS tests for compatibility with Amazon repositories (hint: IUS was built for Rackspace customers, it's sponsored by Rackspace and Rackspace is pretty much ...


1

Have you checked your PHP configuration regarding your request length? There are several parameters controlling the allowed size of a request, I'll include the most important ones here (straight from php.ini with references). ; Maximum size of POST data that PHP will accept. ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is ...


2

You need to add listen [IP:]80; inside of the server section in your _includes/XXX.conf file.


0

I think it is not possible. Every domain has to have specific .htaccess file because this file is settings per folder so there is no way to specify subfolder. And even this is possible then user can use his own .htaccess file to override settings. On shared hosting is only one solution. One user account per domain.


0

Webtatic has php 5.6.3 available, which was released this month: UPDATE: yum update php56w --enablerepo=webtatic-testing INSTALL: rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum install php56w You can always rollback if needed with yum-plugin-replace ...


0

[Sat Nov 15 00:35:20 2014] [error] server reached MaxClients setting, consider raising the MaxClients setting indicates that MaxClients needs to be increased. MaxClients Directive Description: Maximum number of connections that will be processed simultaneously Syntax: MaxClients number Default: See usage for details Context: server config Status: ...


4

From their FAQ (http://wiki.centos.org/FAQ/General#head-472ce8446ebcfc82ca1800f775ba0e629ac835c7): Where can I get the latest version of XyZ.rpm for CentOS? I cannot find it anywhere. CentOS is an Enterprise-class operating system and as such is more about stability and long-term support than cutting edge. Major package versions are retained ...


0

I know this is an old question, but on another question there was a very apt response to the problem, I wonder if it can apply to you too: http://superuser.com/a/829413/196842 Basically, Xdebug is leaking file descriptors for connection listeners (sorry if this is technically incorrect, that's the idea) when the debugging client is not open. To solve the ...


0

It turns out that the SQL Server driver only supports PHP 5.4 (there's also a preview for 5.5) and I was using PHP 5.6. Rolling back to PHP 5.4 and enabling the php_pdo_sqlsrv_54_nts.dll and php_sqlsrv_54_nts.dll extensions worked.


1

Try locate ssh2.so It looks as if the library is not there where php is looking for it. locate will find it for you & then you can link it into the directory you need it in. ln -s /someDirectory/ssh2.so /usr/lib64/php/modules/ssh2.so Hope this was helpful.


1

I experienced this. What I did was to chown the directory. So, if your public_html is under /var/www/example.com , it would be something like this: chown -R www-data:www-data /var/www/example.com With www-data is username and group of nginx.


1

Not sure what firewall you're using, but it sounds like it's proxying web traffic via itself. If it's acting as a proxy it may be setting the $_SERVER['HTTP_X_FORWARDED_FOR'] variable. If that's the case, you can check to see if that's set, and if it is, use that. Otherwise, fall back to the REMOTE_ADDR. Note also, client IP can be faked fairly easily, so I ...


0

SQL Server is not supported by Mediawiki according to the Installation requirements [1]. The only way to provide such support is to write your own adapter for SQL Server. [1] - https://www.mediawiki.org/wiki/Manual:Installation_requirements#Database_server


0

I think the problem is WinCache extension, existed some problems reported with the use of this extension https://bugs.php.net/bug.php?id=58985, https://bugs.php.net/bug.php?id=59352 and others. You can try to disable from your code: ini_set('wincache.fcenabled','0'); Also check if exists some plugin that is using this extension. I hope this help


2

One possible solution would be to use a wrapper for sendmail command, for example you can create a script like this: #!/bin/sh # file: sendmail-wrapper-php # env vars: ${HTTP_HOST}, ${REMOTE_ADDR}, ${SCRIPT_NAME}, ${PWD}, ${UID} # .... # check and alert #send email. /usr/sbin/sendmail -t -i $* and php_set_envs.php to sets some PHP variables to the ...


1

With version PHP 5.6.2 on an Arch Linux system (Current: Nov2014) Please note also to do to: Set in /etc/php/php.ini the path where your sqlite3.so extension resides at the section: [sqlite3] sqlite3.extension_dir = /path/to/your/modules Mine are installed at '/usr/lib/php/modules' and can be listed with pacman: $ sudo pacman -Ql php-sqlite Which will ...


0

You may want to consider this git on github: https://gist.github.com/amichaelgrant/90d99d7d5d48bf8fd209 I encountered a similar situation, when I checked error logs for my upstream servers they were reporting some ulimit error so I increased that to 1000000(on both the upstream and nginx boxes) and everything worked fine


0

I updated my nginx.conf to run Nginx as www-data, that did the trick.


1

You are describing a web-proxy which authenticates users with it's code. Yes, it's possible. But it this setup, you will have to proxy requests programmatically with PHP curl module, not with nginx itself. For nginx this would look just like a normal PHP web-site. Althoug this system looks overcomplicated. I'd propose you to authenticate users using IIS ...


0

You could try the newrelic stuff, they give two weeks trial with full power of their PHP profiler (pretty easily to get the cart of most consuming scripts). You could also use dtrace or systemtap, depending on the OS to track down the consuming script, but this is more complicated (but also more experience-giving and skillful) way.


0

Use cron to execute a script that scan the mail.log file every minute. //every minute * * * * * * php -f /path/to/script.php I thing with this solution you have to use a database to remember scanned entries


0

Try checking that the linode host sees the right MX records for your destination domain... dig MX good domain.org That should show Google's servers. If not you've got a lower level problem. The domain part of sending address is typically derived from what is in /etc/hosts for the local machine. At the very least you want this to be the fqdn. You can ...


0

You just need to add a variable string to fastcgi_cache_key that represents the user ID. Something like: set $user_key 0; if ($cookie_userid != "") { // you set cookie "userid" via your app set $user_key $cookie_userid; } fastcgi_cache_key $user_key$scheme$host$uri$args; This way, all anonymous users will get $user_key = 0, and the rest of your users ...


-1

Try this (on my IIS 6.0) 'datadirectory' => 'C:\Inetpub\wwwroot\owncloud\data'


1

For the upstream sent too big header while reading response header from upstream error: You need to identify where the request producing the original error was processed. 'Upstream' might be a lot of different things (proxy, fastcgi, uwsgi) You need to tweak the proper upstream *_buffers and *_buffer_size to make the proper buffer(s) bigger As for the ...


0

You can adjust this with extended file system access lists, e.g. setfacl -R -d -m u:www-data:rwX /var/cache/nginx


1

On the OS level you can solve this in 2 ways: filesystem ACL's (which are a bit hairy) User groups - which in my opinion are a bit easier Steps: modify the init script of nginx to include umask 007 - this will allow to create files with group writable permissions modify user www-data to be also in nginx group - eg usermod -a -G nginx www-data restart ...


0

It turns out that phpMyAdmin was already installed (and was accessible via cPanel). I got the hosting provider to investigate the PHP issue, and they performed an EasyApache rebuild through WHM, and this resolved the problems.


0

I agree with Michael Hampton's statement that you should not have phpMyAdmin installed on a production server. I prefer to install phpMyAdmin via a git checkout rather than their package. This gives you control over what the hostname is, adding an .htpasswd authentication, ssl, etc. (I'm sure all that can be done via the package but why bother doing it ...


0

Running audit2allow < /var/log/audit/audit.log confirmed that httpd was being blocked by SELinux (see this link). The solution was to create and apply a policy module using the following steps: As root, run the command audit2allow -a -M my_httpd (replace 'my_httpd' with whatever name you prefer). Again as root, run the command semodule -i my_httpd.pp to ...


0

Edit: Cleared things up. I assume you use a Debian based distro like Ubuntu, so details might differ in your case. It might be because you switched methods from password to key based. Things to do: Delete all content of your ~/.ssh/known_hosts file. This is because it stores a fingerprint for all successfull connections you had before. If you change your ...


-2

My issue was that not only was apache not able to write to the log files, it also wasn't able to write to the /var/log/httpd directory. My fix? php.ini error_log = /var/log/httpd/php-error.log chmod 777 /var/log chmod 777 /var/log/httpd I'm running CentOS 6 by the way. There has to be a better way than chmod'ing your log and httpd folder to 777, but this ...


1

I don't do much SELinux, but you can try semanage fcontext -a -t httpd_sys_script_exec_t '/var/www/html(/.*)?' restorecon -R -v /var/www/html/ That allows Apache to execute PHP scripts in that directory, and persists after a reboot. If you use MySQL, you may have to do the same for that. SELinux: Letting Apache talk to MySQL on CentOS may help



Top 50 recent answers are included