Tag Info

New answers tagged

0

Remove any PEAR RPMs completely, then rm -rf /usr/share/pear/ then install pear again and all your modules.


0

SELinux was causing problems. Need to add a rule to allow it to write to the socket's directory. As for now, I simply disabled SELinux and it worked, so I know it is SELinux causing the problem.


1

Does your mysql.user table have an entry for your database user for localhost host? If not, that is the reason for Permission denied error from MySQL.


0

It's a Plesk 11.5? :~# cat /usr/local/psa/version 11.5.30 Ubuntu 10.04 115140407.17 :~# ls -la /usr/local/psa/bin/php_handler lrwxrwxrwx 1 root root 43 2012-03-23 07:50 /usr/local/psa/bin/php_handler -> /opt/psa/admin/plib/api-cli/php_handler.php


0

It seems there is a bug in the init script. restart didnt restarted the php fpm but didnt reported a problem either. stop & start worked and lead the no more X-Powered-By.


0

Its unclear what you are asking, but neither the Expression Engine or PHP url's interfere with Cron. WGET simply acts as a command line webclient and the same parsing (by the web server and php) is done on the URL as if you had accessed it from a webbrowser on the machine. If in doubt, you may be able to temporarily modify the cron entry by modifying the ...


1

First of all you need check PHP version you have installed # php -v After this you need to find php-gd package for your version of PHP, cause yo are trying php-gd for PHP 5.5., but you (probably) have PHP 5.3.. So you can try: I assume you have REMI or CentALT repo installed, so just try installing pgp-gd from those repos. # yum install php-gd ...


2

You can prevent access outside of proscribed boundaries by setting up and using AppArmour or SELinux. What you're really saying here is: "scripts that I put on the system and run have access to read world-readable files on the system." Yes, yes they do.


11

The passwd file is readable by all users. This is perfectly normal. Same for /. Programs need access to /etc/passwd to map usernames to ids. The actual passwords are stored in /etc/shadow which is more restricted. If for some reason you don't want programs seeing those file you should look at creating a chroot jail which provides it with its own fake ...


1

If the modules are dynamically loaded then you will find them either in php.ini or in some additional configuration files. If you look at a phpinfo result, you will see a parameter called 'Scan this dir for additional .ini files'. Look in that folder for any additional ini files that might be loading modules. All the rest of the modules remaining are ...


0

You may be able to abuse smtp_generic_maps to divert this mail. Unlike the other directives you mentioned, this one operates on outgoing mail. While it's not capable of dropping it, it can send it to a different mailbox, where you can then take appropriate action on it (such as suspending the customer who sent the mail). In main.cf you would have: ...


-1

You can use a alternative sendmail script like msmtp to transport your mail() mails over smtp. After installing set sendmail_path in your php.ini file: sendmail_path = /usr/local/bin/msmtp -C /etc/msmtprc -t -i


1

The ProxyPassMatch directive is for routing only certain traffic (i.e. requests for php files) to the FastCGI server (i.e. HHVM). Use the ProxyPass directive instead: ProxyPass / fcgi://127.0.0.1:9000/var/www/whatever.com/ According to the documentation, that should route all requests to the FastCGI server. Edit: okay, in response to your comment, ...


0

It actually was combination of 3 things: Installation must be mod_php Then the config file on CentOS with cPanel is /usr/local/apache/bin/envvars; and usual export PATH=$PATH:/path works just fine here You need to stop/start httpd service, simple restart will not change the environmental variables Thanks for help!


0

Edit /opt/suphp/etc/suphp.conf and set env_path to the path string that you want.


5

Heartbleed allows memory to be exposed from the server on which [a vulnerable version of] OpenSSL is running, during a TLS connection. So, for heartbleed to be exploitable, a server must both be running a vulnerable version of OpenSSL AND accept TLS connections. Therefore, in Scenario 1, you'd be at risk of having the memory of your load balancer being ...


1

S3 is a storage service. Code of any sort will not execute on it. There are cheaper options than AWS if you just want to run a tiny, non-critical contact form script. Shared hosting might run you as low as a buck a month, or a small Digital Ocean instance runs $5/month. If your current website has PHP support and it's still not working, though, you're ...


-1

I had the same issue after upgrading to PHP 5.4 on Ubuntu 14.04 following this tutorial: http://phpave.com/upgrade-php-5-3-php-5-5-ubuntu-12-04-lts/ You just need to run the following after the instructions above. dpkg-reconfigure php5-ioncube-loader


1

If you don't want to use chroot, you can set open_basedir and disable dangerous functions, such as system(), exec(), shell_exec(), passthru(), scandir(), popen() and proc_open()


0

client denied by server configuration: /home/username/Development/PHP/foo.dev.com/public_html/ It should be obvious that.... ls -la /home/username/Development/PHP/foo.dev.com/ ... drwx--x--x 8 username username 4096 Apr 3 14:35 public_html ...the apache uid needs READ permission on the directory (and the file). To fix: chmod -R o+r ...


0

I'm not sure if <Directory>-directive accepts %0 as part of the path name, in the documentation only regexps are mentioned: http://httpd.apache.org/docs/current/mod/core.html#directory Whereas ´%0´ is part of the vhost_alias-module:http://httpd.apache.org/docs/current/mod/mod_vhost_alias.html You might try changing <Directory ...


1

My personal experience with windows implementations of PHP/MySQL have resulted in pain for me, my employees, and my customers. I have found many memory leaks and performance issues with PHP in 2008R2. MySQL uses a huge amount of memory in Windows. Security updates for exploits do not come as fast for windows if at all. In your situation I would seriously ...


0

I'd take a look at how many file handles you have open, and what the max is set to. sysctl fs.file-nr is a good place to start. If the first number is close to the last, you're running out of file handles! you can up them by setting it in systcl.conf, or by sysctl -w fs.file-max=100000. If this is the case, I'd look elsewhere in your code for why file ...


0

It is because smtpd_*_restrictions only apply to the mails received by smtpd daemon through an SMTP transaction. The mails submitted using sendmail command is queued in maildrop queue by postdrop command, which is picked up by pickup and fed to cleanup directly. You can't restrict recipients for the mails submitted through sendmail command. The only ...


2

You can also use the 'final' option after your statements. Much easier. local.0 /var/log/sea.log &~


0

Check how much RAM you have to spare (perhaps stop php-fpm to calculate this) and how much memory a php-fpm process typically takes for your webapp (look at top or ps) and then set pm.max_children = available RAM / php-fpm process RAM , otherwise you'll run out of memory.


1

Look at this line; $IncludeConfig /etc/rsyslog.d/*.conf. It shows up above all of the standard rules. You need to add local0.none to the /var/log/messages and /var/log/syslog rules in /etc/rsyslog.conf.


0

Your error seems to be seems to be related to this update of the mongo php driver: https://jira.mongodb.org/browse/PHP-971 (if you look at the error in the git commit, it's exactly that). If you have set mongo.native_long to 0, but you are still getting the error, have a look in any php scripts or php pages, and see if they have ...


3

Your error reads: PHP Fatal error: PHP Startup: To prevent data corruption, you are not allowed to turn on the mongo.native_long setting on 32-bit platforms in Unknown on line 0 The key here is the mongo.native_long setting. Seems like your OS is 32-bit, but this specific setting requires a 64-bit OS. The best long-term solution for you if this is ...


0

It seems that you are using the dotdeb.org repository for your old PHP, and some other repository for PHP 5.5. The other repository doesn't have php5-apcu package available, therefore it tries to use PHP 5.4 package for it. The solution is to use dotdeb.org's PHP 5.5 repository to install your PHP 5. This repository should also contain the php5-apcu package ...


2

Those are cache files from MySQL and PHP sessions. No concerns there. If you're that worried about /tmp, add noexec,nodev,nosuid to the options column for /tmp in /etc/fstab. That will stop anything from being executed on that volume. Try looking for files modified in the last X days: find /etc -iname "*.conf" -mtime -1 -print


1

Most likely the PHP processes start using a lot of memory at some point (you can check that in top, press M to sort the processes by memory). Try setting "pm.max_requests = 100" or, anyway, a much lower value of what you have now (or, around 100 or so if it is 0, which means infinite). By the way, a much better approach to your encryption would be to use ...


0

Not a complete answer... but watching the output from: tcpdump -vvv port 53 Showed the server was trying to resolve its hostname... now while dig can resolve this, I assume that something (SELinux?) is blocking php? So adding an entry to the /etc/hosts file: 127.0.0.1 example.net Seems to have done the trick: time php -n -d extension=imap.so -v PHP ...


0

When you upgrade packages and the config file differs from the existing one and you decide to replace the config, the old one is saved to a file with .dpkg-old extension. If you do not replace the config, the new config from the package is saved with .dpkg-dist extension. So, you can search for your old config file with find /etc -name '*.dpkg*' command, ...


0

I don`t have a real answer, but maybe more information can help to solve the problem. I like to tell, I have the same problem on a windows server with PHP 5.3.5. Some cgi-processes remain as a kind of zombie task, after the done their real execution. They even ignore settings like max_execution time. Currently I have a scheduled script what kills these old ...


0

You can use mod_rewrite to accomplish this, i.e with the following example: RewriteCond %{HTTP_HOST} site2.com RewriteCond %{REQUEST_URI} !^/site2.com RewriteRule ^(.*)$ site2.com/$1 [R=301,L] Placing an .htaccess under the hostname you want to redirect will make this work. You can also modify your vhost configuration as well. Don't forget RewriteEngine ...


1

You are correct that it is because you are running a 32-bit build of PHP. Since it is compiled as a 32-bit application, despite running on a 64-bit system you still do not get 64-bit integers. It should also be noted that at the time of writing 64-bit builds of PHP on Windows do not provide 64-bit integers (or large file support) so even if you go with a ...


0

Is there a limit in apache2 in how many connections it can handle? Yes, it's limited by its configuration parameters (MaxClients, MaxServers, KeepAlive, MaxRequestsPerChild etc) and by CPU/memory (with KeepAlive you can trade some of one for the other). will it just grow in memory...? Yes, the more connections the more threads and more memory ...


0

Use smaller sessions. Don't store them in RAM. Buy more RAM. Or as you've already discovered, use a lower gc_maxlifetime. However 100M is only a tiny fraction of the memory - which rather suggests something else is very badly configured and using up all the memory - have you got MySQL with a massive buffer pool?


0

First of all, you should really consider that design carefully. Best practices in database design is to avoid splitting your data in multiple databases as far as possible. Of course, there are exceptions (for example if you need to let customers/applications modify their schema), but in general scalability in the direction of connecting to multiple databases ...


0

You said that /var/lib/php5/session is owned by root and has permissions drwx-wx-wt. This means that all users can write to the directory, but only root can read. The result is that PHP can create session files, but cannot go back and read them later. This appears to be why your sessions are failing. Fix the ownership and permissions so that www-data can ...


2

You should have the developers test their code (specifically the code that changed in this new version) and measure the memory usage. Tools like the xdebug profiler (you can use webgrind, phpstorm, qcachegrind/kcachegrind to read the results) and (maybe more importantly) xhprof, as it also collects memory metrics. You can use tools like preinheimer/xhprof or ...


1

mail(...) invokes the system sendmail executable to queue the mail for delivery. If you do not have a mail server I would assume that didn't go very well and in that case I would expect that there is no trace (other than maybe an error logged about the command invocation failing). As for the return value it is somewhat unclear why it would return null but ...


0

It has been solved by disable seLinux and restart Apache


1

You have several valid options. You can go with an architecture where the requests are handle at the front by a load balancer (with nginx for example in a separate server or in one of the servers, or using a load balancer provided by your hosting company), the balancer redirects these requests to two or more "identical" servers that contain all the stack ...


2

I'd be looking at AWS. You can create autoscaling groups and you can use RDS to solve your database issues. MySQL replication isn't that hard to set up on your own: http://dev.mysql.com/doc/refman/5.6/en/replication.html Any modern load balancer will do health checks. E.g., hit your app and return a 200 if okay. If the LB gets a non-okay, it can remove ...


3

If it's mainly about ddos protection https://www.cloudflare.com/ might be worth checking out. Cloudflare is a basically a distributed/cloud-based CDN/reverse-proxy that also automatically provides ddos protection. This is perfect for static content, eventually a bit more challenging with dynamic content. Basic features are free of charge, advanced features ...


2

So it turned out that the problem wasn't about how I was using the commands but how I was using the commands from PHP. I was doing it like this: exec($command); However, I then found out that the exec() command doesn't like these kind of usage. So instead of passing the command directly, I decided to put the command to a temporary .sh file and use it ...



Top 50 recent answers are included