PHP CLI increase memory limit

PHP logo

When running a PHP script from command line interface (CLI), a higher memory limit may be required in order for the script to be successfully executed. This can be achieved using the “-d” or “–define” option in the command. According to the manual:

This option allows you to set a custom value for any of the configuration directives allowed in php.ini.

An example of running a PHP script in CLI with custom memory limit:

Of course the “-d” or “–define” option is not limited to the memory limit directive; it can be use to alter other php.ini directives as well.

Copy from Firefox and paste into Excel

You’ve probably already noticed that if you try to copy a table from Firefox and paste into an Excel spreadsheet, using the classic methods the table formatting is not preserved, and the data from the table is copied into one cell from the Excel spreadsheet.

The solution is to paste the table contents in Unicode format into the Excel spreadsheet. You can do it using the Paste Special command from the Edit menu in Excel.

Step by step instructions:

1. Copy the table content from Firefox into clipboard (using CTRL+C or right-click and Copy).

2. Go to the Excel spreadsheet, select Edit from the menu, then Paste Special; in the Paste Special dialog box, select Unicode and pres the Ok button.

Now your data is properly formatted.

Using multiple yahoo accounts at the same time

If you have more than Yahoo accounts and you want to use them in the same time, there is a simple way to do it, by using an alternative instant messenger client or by executing some small tweaks on the Yahoo Messenger client.


Alternatives to the Yahoo Messenger client are Pidgin, Miranda or Trillian. You can open as many accounts as you want with Pidgin, which is free and open-source, has lots of useful plugins.

Tweaking the Yahoo Messenger client:

You need to add a key in the windows registry. Just follow the images step by step.

  • Go to START -> Run type regedit, press OK.
    start run regedit
  • In the Registry Editor window, double click on the HKEY_CURRENT_USER.
    regedit hkey_current_user
  • Double click on Software.
    regedit hkey_current_user software
  • Dublu click on Yahoo.
    regedit hkey_current_user software yahoo
  • Double click on pager.
    regedit hkey_current_user software yahoo pager
  • Single click on Test (or test).
    regedit hkey_current_user software yahoo pager test
  • On the right column of the window, right click somewhere below Default, and select New -> DWORD Value.
    regedit dword value
  • A new element will be created; rename it plural.
    regedit redenumeste plural
  • Dublu click on plural; in the new window set Value data to the maximum number of Yahoo Messenger windows you want to be opened at the same time (if you set it to 10 – you will be able to open 10 Yahoo Messenger windows simultaneously).

That’s all. Close Registry Editor and try to open more Yahoo Messenger windows.