entroducing.com
  • Home
  • Coding
  • Trading
  • Troubleshooting
    • Operating System
    • Networking
  • Reviews
  • Travel
  • Quick Snap
  • Thoughts
  • Side Hustle
  • Earn Passive Income/Referral
Website sponsored by LingeriesG
@2023 - All Right Reserved. Entroducing. Sponsored by mm3288
Codingsymfony

Migrating Symfony1 to Symfony2: Weekend 1

by Ben July 21, 2014
written by Ben

Before i start, i am not a Symfony pro.

I have a day job and i am updating my website on my freetime (usually on the weekends).

Its been 2-3 years ever since i last update my other website.

Hence, this timeblog is not really for experts looking for answer here but more of keeping a record of how i update the framework so that i do not need to ‘re’-read the whole cookbook/tutorial again.

I hope you may find some useful information from my blog here. If do, please drop some comments here.

…

Read the overview and tutorial briefly from symfony website and its time to install one clean copy in my development machine

Installed latest XAMPP

And the composer

And as per Symfony’s instruction, enter

composer create-project symfony/framework-standard-edition path/ "2.5.*"

to install symfony framework to your machine.

Next, add the virtual host to your apache and get it started


<VirtualHost 127.0.0.1:8000>
ServerName www.hostphotocontest.com.localhost

DocumentRoot "G:/Websites/hostphotocontest/hostphotocontest_site_sym2/Symfony/path/web"
<Directory "G:/Websites/hostphotocontest/hostphotocontest_site_sym2/Symfony/path/web">
# enable the .htaccess rewrites
AllowOverride All
Require all granted
</Directory>

ErrorLog "D:/xampp/apache/logs/project_error.log"
CustomLog "D:/xampp/apache/logs/project_access.log" combined
</VirtualHost>

Make sure the website(e.g www.hostphotocontest.com.localhost) is added to your hosts file so that when u load www.hostphotocontest.com.localhost in your local browser, it is actually calling apache 127.0.0.1 to load the symfony

OK. Website loaded but it keep showing error.
Right. Production is not setup yet. I need to load DEV environment instead.

Hence, i load http://www.hostphotocontest.com.localhost:8000/app_dev.php/ in my browser instead (read ‘app_dev.php’).

Website loaded. Installation is good.

And i spend the rest of the weekend in re-designing my website with bootstrap.

End of Weekend 1

July 21, 2014 0 comment
0 FacebookTwitterPinterestEmail
Codingsymfony

Symfony 1 to Symfony 2

by Ben July 21, 2014
written by Ben

Finally have some time to update one of my personal website (http://www.hostpohotocontest.com) from Symfony 1 to Symfony 2 framework.

Below are the noticeable differences i encounter when migrating to Symfony 1 to 2.

I will update this list from time to time whenever i have the time and energy to do so.

The Good

  • The concept of the framework is similar to Symfony 2.
  • Unlike Symfony1, which multiple applications (e.g. frontend and backend) using the one single framework API, everything in Symfony 2 is bundles. The frontend twig, is a bundle, the framework is a bundle.
  • There is no ‘plugin’ concept. Everything is a bundle.
  • Twig looks good. Write lesser code for view layer.
  • Most of the generator are still available in Symfony 1
  • Composer makes installing third party bundles easy!
  • Want to overwrite or extend third party’s controller without updating their codes directly? Yes it can be done easily in Symfony 2. This is good in the sense that if you update third party bundles, you can be assured that your own ‘manual override’ codes still remain intact.

The Bad

  • sfguard is not available in Symfony2. Yes. its a nightmare to migrate this over, especially that the encyrption implemented in symfony 2 is different.
    • I found a a replacement of sfguard = FOSUserBundle bundle. Will update my progress on this along the way
  • If you are using timestampable fields like me (i.e created_at, updated_at, deleted_at), these features does not come with Symfony2 by default, you need to install a DoctrineExtension bundle from STOF

The Ugly

  • You need to re-code everything over. The directory structure and the codes are totally different in Symfony 2.

And… I will keep track of the weekends i spent on re-writing my codes over.

  •  Weekend 1
July 21, 2014 0 comment
0 FacebookTwitterPinterestEmail
magentophp

aheadworks Blog not showing up or empty in Magento

by Ben June 11, 2014
written by Ben

I recently set up a new Magento website from fresh and then install a new theme follow by installing aheadworks blog extension.

Everything works fine until I installed the blog extension and I encounter a 404 not found page in backend.
I logged out and login in backend and able to see the blog admin page. Fine.

I then check out my frontend store and i couldnt see any blog link on top or bottom.
I tried visiting /blog page but it shows an empty page.

Googled online and found out that the extension only install the files to the magento default folder.
If you are using custom theme, you would need to copy them to your theme folder.
Below are the folders/files to copy

app/design/frontend/default/default/template/aw_blog
to
app/design/frontend/[THEME FOLDER]/default/template/aw_blog

app/design/frontend/default/default/layout/aw_blog.xml
to
app/design/frontend/[THEME FOLDER]/default/layout/aw_blog.xml

skin/frontend/default/default/aw_blog
to
skin/frontend/[THEME FOLDER]/default/aw_blog

Flush/Clear your cache and try again

June 11, 2014 0 comment
0 FacebookTwitterPinterestEmail
magentophp

Mystery weird Magento behaviors have finally been resolved… due to base64_decode being disabled by web hosting!

by Ben February 11, 2014
written by Ben

For a few months after i have upgraded to 1.6.x and to current 1.8.x, i have been facing the following issues/behavior in backend admin

  1. Searching by fields in every view(Sales, Order, Catalog, etc) are not possible. All searches will return all result back. It seemed as if filter is not working!
  2.  Dashboard graph is not working. It shows broken images regardless of any selection.
  3. Reports that require to input a date range are not working. It keep showing ‘No Records’ even if i refresh the statistics
  4. Even to the extend of doing fresh install of Magento (i tried 1.8.1) also gives the same errors above

And the clues i have are

  1. phpinfo() shows that base64_decode has been disabled
  2. Log files keep showing the following errors
Warning: base64_decode() has been disabled for security reasons  in MYAPP/app/code/core/Mage/Core/Helper/Abstract.php on line 365
Undefined index: title  in MYAPP/app/code/core/Mage/Reports/Model/Resource/Report/Collection.php on line 187
Warning: base64_decode() has been disabled for security reasons  in MYAPP/app/code/core/Mage/Core/Model/Encryption.php on line 144
Warning: base64_decode() has been disabled for security reasons  in MYAPP/app/code/core/Mage/Adminhtml/controllers/DashboardController.php on line 95

I never thought that the base64_decode php functions would indirectly cause all the problems i faced until i recently ask my web hosting company to enable it back.
To my surprise, all the functions are working properly now and i have finally close this issue.

If you encounter the above behaviors or issues, you may want to check if base64_decode has been disabled by your web hosting company. You can do so by creating a php file with a phpinfo() in it.

February 11, 2014 0 comment
0 FacebookTwitterPinterestEmail
magentophp

Magento 1.8.1 Javascript Undefined error when placing order

by Ben February 7, 2014
written by Ben

I just recently upgrade one of my magento ecommerce website from 1.7.x to 1.8.1 and one of my customer feedback that he encounter a javascript undefined error upon checkout.

After some comparison with the base folder of magento 1.8.1, i figured out that you need to amend the following page.

app/design/frontend/default/THEME_NAME/template/checkout/onepage/review/info.phtml

Search for the following line or similar

echo $this->getUrl('checkout/onepage/saveOrder');

and change it to

echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey()));
February 7, 2014 0 comment
0 FacebookTwitterPinterestEmail
Thoughts

New theme… after 4 years!

by Ben November 9, 2013
written by Ben

Finally have time to change my theme.

The previous and the first one lasted 4 years and 2 months (2009 Sep)!

The previous one (re-doable) is not supported in latest wordpress anymore and thus i have started to look for another new theme recently.

Hope you like this theme. 🙂

November 9, 2013 0 comment
0 FacebookTwitterPinterestEmail
phpsymfony

Could not open input file: composer.phar

by Ben July 5, 2013
written by Ben

If you, like me try to use the following command in using composer

 php composer.phar update friendsofsymfony/user-bundle

and get this error

 Could not open input file: composer.phar

You are probably using Windows command prompt to do the update.

Try this instead.

composer update friendsofsymfony/user-bundle
July 5, 2013 0 comment
0 FacebookTwitterPinterestEmail
magento

Add aheadworks’s blog list to magento home page or any CMS page

by Ben May 24, 2013
written by Ben

Ever wondering how to add aheadworks’s mangento extenstion–  blog list to your home page?

Here’s how to do it.

  1. Duplicate
    app\design\frontend\default\helloseasonal\template\aw_blog\blog.phtml
    to
    app\design\frontend\default\helloseasonal\template\aw_blog\bloghome.phtml
  2. Edit bloghome.phtml
  3. Optional: If you want to remove the pagination, remove the following occurrences

     <?php echo $this->getChildHtml('aw_blog_comments_toolbar'); ?>
    
  4. Optional: If you want to set a a limit to the no of post you want to show in the home page, add

    if ($i++ > 5) break;
    

    below foreach…

    ...
    <?php foreach ($posts as $post): 
    	if ($i++ > 5) break;
    ?>
        <div class="postWrapper">
            <div class="postTitle">
    
  5. Log in to Mangento Admin
  6. Go to CMS -> Pages and select the home page or the page you want to insert the blog
  7. Click Content on the side navigation
  8. At the placement which you want to insert, paste the following codes
    {{block type="blog/blog" name="blog" alias="list_blog" template="aw_blog/bloghome.phtml"}}

At the above time of writing, I am using Magento 1.7.0.2 and aheadworks extension 1.2.1.community edition.

You may see the following website for reference: www.lingeriesg.com

May 24, 2013 6 comments
0 FacebookTwitterPinterestEmail
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 10

Search

Categories

  • Coding
    • apache
    • cakephp
    • java
    • magento
    • php
    • SQL
    • symfony
    • wordpress
  • Hosting
  • Quick Snap
  • Reviews
  • Side Hustle
  • Thoughts
  • Trading
  • Travel
  • Troubleshooting
    • Networking
    • Operating System

Tags

3.28 angry bird jb angry birds activity park apache beijing cakephp cdata cruise crypto docker elasticsearch element mall fil ftx claim hacked hanshou how-to html data in xml java johor bahru jumper land linux mac magento magento2 malacca malaysia travel move-to-earn passive income php plugin Programming rides side hustle stepn stfil stfil.io struts SyntaxHighlighter theme travel VPS windows 7 wordpress xampp
  • Email

@2023 - All Right Reserved. Entroducing. Sponsored by mm3288