As I may (or may not) have mentioned before, I mostly blog here for the purpose of note-keeping for myself. In most of the cases I don't really care about how good the tutorials (not so much) are coming out. So, please do your homework if you are following any of my tutorials at all. This is gonna be a disclaimer somewhere, but see? I can't give a damn here. Thanks.
I was trying my hands on the Google App Engine. My system is Linux so I downloaded, followed the linux part of things from their official how-to-first-time page here [ https://developers.google.com/appengine/docs/php/gettingstarted/installing ]
As you can see from that page (yeah, that's a dependency) you
1. Download the PHP SDK
2. Extract it some nice place
3. Write a "hello world!" PHP script
4. Execute the python script (dev_appserver.py) in the the "google_appengine" (if you haven't done it otherwise) folder.
BUT ! I got stuck here for sometime, and looked up for the fix.
Source of the problem:
Following this trail I came to notice that my ignorance toward the tutorial's PHP installation paid of here. The problem was actually my PHP installtion was a CLI version. While the app engine essentially wants a CGI version. For doing so, the tutorial has very good instructions, and yes, php-cgi is NOT available in Ubuntu repos. So I did
I was trying my hands on the Google App Engine. My system is Linux so I downloaded, followed the linux part of things from their official how-to-first-time page here [ https://developers.google.com/appengine/docs/php/gettingstarted/installing ]
As you can see from that page (yeah, that's a dependency) you
1. Download the PHP SDK
2. Extract it some nice place
3. Write a "hello world!" PHP script
4. Execute the python script (dev_appserver.py) in the the "google_appengine" (if you haven't done it otherwise) folder.
BUT ! I got stuck here for sometime, and looked up for the fix.
Source of the problem:
_PHPBinaryError: The path specified with the --php_executable_path flag () does not exist.Which naturally implied 2 things
1. The PHP installation was NOT as the app engine wants it to be 2. God doen't want me to code anymoreI naturally believe God loves it when I'm busy with my favourite thing so number 2 was obsolete. I looked up on Google for some solutions and a sudden SO page suggested that executing the appserver executable like
./dev_appserver.py --php_executable_path="...path..to..the..php-cgi..executable..." helloworldwill solve the problem.
Following this trail I came to notice that my ignorance toward the tutorial's PHP installation paid of here. The problem was actually my PHP installtion was a CLI version. While the app engine essentially wants a CGI version. For doing so, the tutorial has very good instructions, and yes, php-cgi is NOT available in Ubuntu repos. So I did
sudo apt-get install gcc libmysqlclient-dev libxml2-dev wget --trust-server-names http://us2.php.net/get/php-5.4.15.tar.bz2/from/us1.php.net/mirror tar xjf php-5.4.15.tar.bz2 cd php-5.4.15 ./configure --prefix=$PWD/installdir --enable-bcmath --with-mysql make install cd -And afterwards executed
./dev_appserver.py --php_executable_path="...path..to..the..php-cgi..executable..." helloworldAnd it went smooth. :) By the way, the above method will NOT harm you normal PHP installation.
No comments:
Post a Comment
Post your comment here. If you want to say something about programming problems, scripts, software etc, please try to be as descriptive as possible.