php

PHP memory allocation error.

PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 8193 bytes) in ….

looks familiar ? This memory limit is dependent on settings inside your php.ini file(which should be inside public_html, if you have created one).

You can change it by editing line 232 in your php.ini file. I would change it to read as such:

memory_limit = 64M

If you haven’t created a php.ini before, follow these steps:
1. Login to cPanel.
2. Click on PHP Config from the Software / Services section.
3. Select PHP5 (Single PHP.INI).
4. Click Save Changes.
5. On this same screen, select IONCube, and click ‘Install PHP.INI Master File’.
6. Go back to the cPanel.
7. Click on ‘File Manager’ from the Files section.
8. Select Webroot and click go.
9. Find php.ini.default and rename it to: php.ini
10. Select the php.ini file and click ‘Code Edit’.
11. Click ‘Edit’ in the lower right hand corner.
12. Scroll to line number 232.
13. Change line 232 to read as such:
memory_limit = 64M
14. Click ‘Save Changes’ (upper right hand corner).

You should now be able to perform operations that require more than 32 megabytes.

About author : This original article is property of Top 10 Web Hosting (http://www.top10webhosting.com). List of best web hosting services company offering PHP and MySQL. Compare & save ! on web hosting fee.

Note : Please include author information if you wish to republish this article.

Deprecating PHP functions

I received this email from Reseller club

Hello,

Keeping up with our promise of providing you with the safest hosting environment, we have to make a few changes to our PHP installation on our Linux Hosting Servers. We will be disabling a few PHP functions that allow users to execute system commands on the servers that disclose system information in a shared hosting environment. These functions are sparingly required by clients and are more of a security threat to your websites.

The functions that will be deprecated are:

system, shell_exec, exec, passthru, php_uname, popen, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_setgid, posix_uname, proc_close, proc_nice, proc_open, proc_terminate

We will be making these changes on Friday, 27th of November, 2009. If you are using these functions in your PHP scripts, you will have to inform your customers accordingly about these changes.

Your co-operation is highly appreciated.

Regards,
Team ResellerClub

About author : This original article is property of Top 10 Web Hosting (http://www.top10webhosting.com). List of best web hosting services company offering PHP and MySQL. Compare & save ! on web hosting fee.

Note : Please include author information if you wish to republish this article.

Installing Zend Optimizer locally.

I need a higher version of Zend Optimizer than what is installed on the server. How do I locally install Zend Optimizer?
1. Visit http://www.zend.com/downloads to download latest zend optimizer

2. Extract the files in your local computer. You will find a folder called data. Rename the folder to a more specific name such as zendopt (We will use
this name for the rest of this article).

3. Upload the zendopt folder to public_html.

4. Add following lines to php.ini (create the file if it does not exist):

[Zend]
zend_optimizer.optimization_level=15
zend_extension=/home/USERNAME/public_html/zendopt/4_4_x_comp/ZendOptimizer.so
zend_extension_ts=/home/USERNAME/public_html/zendopt/4_4_x_comp/TS/ZendOptimizer.so

Note: replace USERNAME with your cpanel username. Please also replace
4_4_x_comp with whatever php version on your server. Zendopt folder contains several folders such as 4_4_x_comp, 5_1_x_comp, and 5_2_x_comp. Please select the closest to your php server.

6. Confirm the zend optimizer has been upgraded by creating a php file with the following line and browse the file on the internet:

<? echo phpinfo(); ?>

About author : This original article is property of Top 10 Web Hosting (http://www.top10webhosting.com). List of best web hosting services company offering PHP and MySQL. Compare & save ! on web hosting fee.

Note : Please include author information if you wish to republish this article.

Next »