Archive

For the PHP category

SYSTEM WARNING: session_start()…No such file or directory.

No Comments

When installing Mantis in a shared hosting environment, you may get an error message like this one on the Mantis login panel:

SYSTEM WARNING: session_start() [function.session-start]: open(/var/php_sessions/sess_ac5acafaecb612345675d30123456789, O_RDWR) failed: No such file or directory (2)

This message is likely caused by the fact that /var/php_sessions/ is not accessible. It can be resolved by adding to the config_inc.php file the following line
$g_session_save_path = '/home/users/web/b880/ipw.myaccount/sessions';.

Replace the path above by one accessible by your environment.

Installing memcached to use it with php

No Comments

Installing Memcached with php support in Ubuntu is a matter of a few steps:

sudo apt-get install memcached php5-memcached
sudo service apache2 restart

You can test if memcached is active by running this command:
echo "stats settings" | nc localhost 11211
You will end up with a response like this one:

STAT maxbytes 67108864
STAT maxconns 1024
STAT tcpport 11211
STAT udpport 11211
STAT inter 127.0.0.1

STAT item_size_max 1048576
STAT maxconns_fast no
STAT hashpower_init 0
STAT slab_reassign no
STAT slab_automove 0
END

How to change the maximum upload file size in PHP

1 Comment

You can increase the maximum upload file size for only one application by creating a php.ini file in the directory where the file upload PHP script is. Add the following lines:

; Maximum allowed size for uploaded files.
upload_max_filesize = 40M

; Must be greater than or equal to upload_max_filesize
post_max_size = 40M

It can also be changed system wide by editing the file /etc/php5/apache2/php.ini which is the global php.ini file. Modify the two lines listed above and restart apache.

WordPress “Internal server error”

No Comments

You may experience an “Internal server error” on the home page of your site if you are a customer of iPower. You cannot access the home page nor login to WordPress.

Simply edit the php.ini files located in the root directory of WordPress and in the wp-admin subdirectory to fix this issue. If they do not exist, create them. Add a line containing “cgi.force_redirect = Off”, without the double quotes. You will need to update or create these files either using iPower‘s file manager or FTP.

Blue Taste Theme created by Jabox