When I instal nextgen-gallery plugins. This error message appears How can I fix this problem ? Answer This is a permissions issue. Ensure the directory is writable by apache. Plugins are unpacked into the wp-content/plugins directory, so I would first attempt writing to the directory as apache: Set permission…
Tag: php
Retrieving Last Inserted ROWID In PHP/OCI
Is it possible to retrieve the rowid of the last inserted Oracle row in PHP? I was trying: With no luck. I’m getting the error define not done before fetch or execute and fetch at the fetch line. Answer Declare: Use: Bind your variable to a PHP variable:
Hide last digits of phone number like 99XX XXX XXX PHP or jQuery
I have this code that outputs the var $phone. Which outputs: 9999 999 999. I want it to …
Merging two json in PHP
I have two json’s First one is [{“COLUMN_NAME”:”ORDER_NO”,”COLUMN_TITLE”:”Order Number”} ,{“COLUMN_NAME”:”CUSTOMER_NO”,”COLUMN_TITLE”:”Customer Number”}] Second one is [{“COLUMN_NAME”:”̷…
MySQL GROUP_CONCAT with COLUMN SPLIT
I am working with a TABLE, need logical help. Check the below URL for the table structure and sample data. http://sqlfiddle.com/#!2/ece06/2 Table Schema: Inserted Data: Query: OutPUT: Expected OUTPUT: As you can see the output of the query has concat with comma. And currently we are doing string concat using …
Symfony/Doctrine Rearranging Database Columns
When I go to generate a table using the doctrine:schema:update command line, it appears that Doctrine(or Symfony?) wants to throw in a command that rearranges my columns, putting the keys towards the front it would appear. I was wondering if, and more hopefully, where, I can disable this “feature”…
Symfony2 create and download zip file
I have one application that upload some files and then I can compress as zip file and download. The export action: public function exportAction() { $files = array(); $em = $this->…
How to use custom exception from cakephp plugin?
I have some custom exception for my application. I placed them to app where it is running well. Now I want to move them to one of my plugin and use exception from their. I have implemented custom exception as mentioned here: http://book.cakephp.org/2.0/en/development/exceptions.html But, I am looking for same…
One Page Checkout scrolling to the bottom of screen on next
On my magento site, I am getting a strange behaviour in onepagecheckout that I’d like to fix. Basically, on Step 2, after entering all the data required and I click on the continue button, the page automatically scrolls down to the bottom of the screen so instead of seeing the shipping option, you see the foo…
PHP if shorthand and echo in one line – possible?
What’s the best, preferred way of writing if shorthand one-liner such as: Plot twist: I need to echo $foo or echo $bar. Any crazy tricks? 🙂 Answer edit: here’s a good read for you on the topic edit: more to read