Turning On Error Displaying
Today i passed almost 1 hour with a silly syntax error but apache was not showing even the slightest clue for me to what is going on . i tried to level up the error reporting :
And , Yes . That did not work :p
Then i got the solution. I have to change in the ini settings :
It will work for sure .
But it did not :p
Then i got the solution and the problem also in our beloved php manual. See the first comment
at the top of your script will not catch any parse errors. A missing “)” or “;” will still lead to a blank page.
This is because the entire script is parsed before any of it is executed. If you are unable to change php.ini and set
then there is a possible solution suggested under error_reporting:
In my opinion would be to change the php.ini settings and turn the display_error to on if you are in development phrase.
Run this command in ubuntu :
sudo sublime-text /etc/php5/apache2/php.ini
change sublime-text with your preferred text editor.
search for display_error and set it’s value to true
Then restart the apache server.
sudo /etc/init.d/apache2 restart
And that all. It’s done .
Now we can make error with ease :p
softwares for keyboard geeks
I am not a keyboard geek though but i love to use keyboard a lot cause it’s fist and it’s handy .
Recently i have started using some application launcher to fasten my activities. These are really handy. Lets have a look at those.
Launchy is an application launcher. It does the job like kind of windows 7’s start search. But unlike of that , it’s not good at a hell lot of things , it’s good at only particularly one thing. That is application launching.
You have to just show some folders to index it will then allow you to search in that folder.It can include exe files , directory names and also any kind of files or some definite file types if you want but then you have to play with the settings.
Lauchy is very user friendly. You can start using this just after downloading.
Executor is another one with more advanced feature. Literally , it starts where launchy ends.Executor supports keywords and most probably one of the most powerful application launcher in the town. It lacks in only one field, that is user friendliness. It takes some time to cope up with it and i have to say it’s not for beginners.
Search and replace values in mysql
Some days ago i was trying to find out a way to search and replace a string in mysql table. This string was all over the rows , in most of the tables . At first i googled for the solution as i do usually. Then i found a very strange and unique solution . That is a really weird solution but very effective. What that is ????
Here is the workflow of that :
- Dump the sql file.
- Open the sql file in a text editor.
- Hit CTRL+H (to open find and replace dialog box ).
- Put the string you want to replace in the search box.
- Put the string you want to replace with in the replace box.
- Hit enter.
- Save the file.
- Drop all the tables in the database.
- Import the modified sql file.
- Voila , you are done
yup , it’s that simple but fast and powerful technique.