symfony command line tool with custom php.ini

Posted: January 12, 2011 7:49 PM Updated: January 12, 2011 10:51 PM

I recently changed hosting service provider. It's acutally quite great. It's shared hosting, so it's not that expensive like vps, got secure shell (ssh) access and it serves website much faster than previous hoster. Plus I got the place to play with python, php5.3, and if (or rather when) I'd turn to it as well, Ruby on Rails.

Currently I'm still enjoying my ssh access, but discovered some nuisance. I can have my own php.ini for web access but then got no access to php-cli settings. So at first, when I turned on APC cache for my homepage, It was running on APC, but I couldn't manually clear cache, since command line php hadn't had apc module enabled.

So after a little bit of thinking, I created a wrapper for symfony execute. It's small bash script, that runs symfony execute with my webserver php.ini file and passes all it's parameters to symfony command line tool:

Bash code
  1. #!/bin/bash
  2.  
  3. php -c /path/to/php.ini symfony $@

But there's a question, why bother with this, when I can just run this code from command line?
 Well... If I got an execute that already runs by itself, why should I pass it directly to php? And coming to that... typing each time path to php.ini? No thanks!

Still have some issues to clear with apc in my app (cache is quite complex issue), but at least I no longer have error message in my cli, that I have to enable it APC, before I use it in project. Still question, which is better for standalone app cache: APC or memcached? And how to use both?

Grzegorz Śliwiński

Comments list (19)

my website July 27, 2013 12:55 PM #1 replyreport
Gravatar photo
The board is engaged in locating a successor, within
the interim Bobby Parker Jr my website many people would say that their
only problem with money is just not having enough from it, but there are lots of examples of folks who create ample streams of income and
can't hold to any one it.
Microsoft Office Word July 30, 2013 11:47 PM #2 replyreport
Gravatar photo
What's up to all, the contents present at this site are actually awesome for people knowledge, well, keep up the good work fellows.
Teds Woodworking Review August 1, 2013 7:39 PM #3 replyreport
Gravatar photo
An outstanding share! I've just forwarded this onto a coworker who had been conducting a little research on this. And he in fact bought me breakfast due to the fact that I found it for him... lol. So allow me to reword this.... Thank YOU for the meal!! But yeah, thanx for spending some time to talk about this matter here on your web page.
Kelli August 6, 2013 3:49 AM #4 replyreport
Gravatar photo
Hi to all, how is the whole thing, I think every one is getting more
from this website, and your views are good for new viewers.
Anna August 9, 2013 11:49 AM #5 replyreport
Gravatar photo
This website was... how do I say it? Relevant!! Finally I have found something that helped
me. Thank you!
Edwardo August 31, 2013 6:52 PM #6 replyreport
Gravatar photo
Something to consider when shopping for Nike maillot air jordan pas
cherv 2010 shoes in sport wear. Its special pressurization techniques used on the Hyperposite, which are currently making their way to stores now.

Before them, domestic players have long training for a period of time, such as
the graphic on the shoe's upper design was
covered with stars and peace signs. For a slip-on style with a bit more masculine appeal, pick
up the shoes.
my website September 4, 2013 2:16 PM #7 replyreport
Gravatar photo
Apart using this, you can use of avail 6 month loans
no credit assessment without pledging of collateral my website installment loans for a bad credit
score are simple and easy , easy to avail through online process.
Eugene Party Bus October 14, 2013 5:34 AM #8 replyreport
Gravatar photo
This text is worth everyone's attention. When can I find out more?
Heizölpreise October 26, 2013 10:24 PM #9 replyreport
Gravatar photo
I was curious if you ever thought of changing the layout of your site?
Its very well written; I love what youve got to say.
But maybe you could a little more in the way of content so people could connect with it better.
Youve got an awful lot of text for only having 1 or 2 images.
Maybe you could space it out better?
Michael Kors Outlet sale October 29, 2013 6:13 PM #10 replyreport
Gravatar photo
You actually make it appear really easy together with your presentation
however I to find this topic to be really something
that I believe I would by no means understand. It seems too
complex and extremely huge for me. I am taking a look forward on
your next publish, I'll attempt to get the
hold of it!
Jedidiah Liebmann December 7, 2013 3:38 AM #11 replyreport
Gravatar photo
I do believe that a foreclosure can have a
significant effect on the client's life. Foreclosures can have a Several
to 10 years negative effect on a client's credit report.
The borrower who may have applied for a mortgage or virtually any
loans for example, knows that your worse credit rating is, the more difficult it is to have a decent financial loan.
In addition, it might affect the borrower's chance to find a
quality place to let or hire, if that gets to be the
alternative real estate solution. Thanks for your blog post.
dr oz garcinia cambogia January 17, 2014 10:12 AM #12 replyreport
Gravatar photo
Hеllo thеre! Ƭhiѕ is my fіrst visit to your
blog! Ԝе aгe a group ߋf volunteers аnd starting ɑ neѡ
project in a community іn the sаme niche. Yoour blog provided սs uѕeful informɑtion tο ԝork on.
Υօu have done a extraordinary job!
wow gold January 19, 2014 11:11 PM #13 replyreport
Gravatar photo
Hey this is kinda of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code
with HTML. I'm starting a blog soon but have no coding know-how so I
wanted to get advice from someone with experience.
Any help would be enormously appreciated!
Converse Skor billiga January 23, 2014 2:43 PM #14 replyreport
Gravatar photo
I really like it when folks get together and share opinions.
Great website, continue the good work!
louis vuitton February 25, 2014 1:49 AM #15 replyreport
Gravatar photo
Greetings! This is my first visit to your blog! We are a collection of volunteers and starting a new initiative in a community in the same niche.
Your blog provided us valuable information to work on.
You have done a wonderful job!
Gravatar photo
Awesome! Its really remarkable piece of writing, I have got much clear idea about from this article.
wordpress themes corporate March 16, 2014 4:13 PM #17 replyreport
Gravatar photo
I tend nօt to write many responses, howеver i did some ѕеarching and wound up
here symfony ϲommаnd line tool with custom php.ini
Grzegorz Śliwiński. And I ԁo hаѵe a couple of questions
fߋr you if it's allright. Is it just me or ԁoes it seem like some of the responses come
across like they are coming from brain dead visitors?
:-P And, if you аre posting at additional sites, I'Ԁ
like to keep up with anything fresh you have to post.

Woսld you list of all of ʏoսr public pagеs like your
linkedin profile, Facebook page or twittеr
feed?
Gravatar photo
They have seen the blueprint and they have a duty to hear these concerns.

Russian Foreign Minister Sergey Lavrov said his country wanted Britain to remain in the UK and
the Government, including Christopher Chope and Peter Bone from posts on the committee which was investigating us.
Mr Walker, saying: It comes at a time david cameron of great crisis in the global economy.
Some 82 per cent of those aged david cameron 25-34.
learn kungfu March 22, 2014 11:28 PM #19 replyreport
Gravatar photo
I don't know if it's just me or if perhaps everyone else experiencing problems with your website.

It looks like some of the text within your content
are running off the screen. Can someone else please comment and let me know if this is happening to
them too? This may be a problem with my web browser
because I've had this happen previously. Thanks
Add new comment

Your email will never be published

Must start with http:// or https://
Delete the reply