/etc/profile
to edit this file
nano /etc/profile
I wanted to add a shortcut for Zend Framework tools. I append this to the end of file
alias zf=/Applications/MAMP/bin/php/php5.4.4/bin/zf.sh
Then CTRL + o to Save
CTROL + x to exit
Edit:
Turns out that the file located at /etc/profile is the global config for BASH, you can use .profile under the user directory.
I have Acer Aspire 4736ZG Which is a wonderful laptop. And when I installed Ubuntu every thing was working out of box.
Then I wonder if the laptop camera is working as I never thought of that before.
To check if the camera is working you just do the following:
ALT + F2
gstreamer-properties
In Video Tab Under Default Input Click Test
Copy the folder named Zend inside library in the file downloaded from framework.zend.com
Copy zf.php and zf.sh from bin directory to /usr/bin
Rename zf.sh to zf
open the terminal and test your installation by type zf and hit enter
I was working in migration script which I am only using Zend_Db Component with the MVC (Normally I use Zend_Db_Table) and it seems that $db->insert(‘table_name’, $data); is not returning the last inserted id and after some investgation I fount that to get the last inserted id you should use the following method
$db->lastInsertId();
1. Add Virtual Box folder to your Windows Path
2. copy your VDI hard disk image (Example my-harddisk.vdi)
3. Locate the folder from the terminal and use the following command
VBoxManage internalcommands setvdiuuid my-harddisk.vdi
Go To Windows –> Preferences
Open the Keys window under General Category
In search box type Next Editor
In Binding box press CTRL + TAB
Done
May be you ask why I may need to disable the layout or views. Some times I am not outputting a normal page but XML data so I do not need the Layout. Other situations for example when I do migration for the data and I just need to use the controller to do that the view or the layout is not necessary
to disable the layout and view renderer in specific action use the following methods
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
If you want to disable them in every action on specific controller you can add them to the init() function as it is run before any thing else in the Controller Class
Use the command line tool to create your modules
zf create module mymodule
open application/configs/application.ini
add the following lines to the end of production section of the configration file
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] = ""
And it should be working now
You may need to create the controllers for your new modules use the following Zend_Tools syntax
zf create controller ControllerName index-action-included=1 mymodule
It was a long time ago when I decided to write in a blog. Never get the time to do that.
I am starting this blog to be my reference for the problems I face in work and life.And how I fix them.
I hope that’s help some one else.
Mohammad Al Qersh's website