Archive for the ‘PHP’ Category

Error refreshing the OAuth2 token invalid_grant

Thursday, July 10th, 2014

Google Cloud Platform OAuth

Google OAuth invalid grant

Trying server side interaction between Google App Engine and Google Compute Engine services with use of service account I stucked with this error message:

Fatal error: Uncaught exception 'Google_Auth_Exception' with message 'Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }'' in /includes/Google/Auth/OAuth2.php:330.

A few days of testing, experiments, “googling” Internet, and miscellaneous shamanic dances with a tambourine around “Google APIs Client Library for PHP” source code and the sample example of its usage did not allow me to make even a little step forward. Trying various variants with service-account.php (recreate service account, replacing private key file, trying other, default service account with client secret loading from JSON file) did not help and I still was on the same place with the same error. That was funny to resolve finally this issue and smile to myself, how the small mistake at very begin may cost a lot of time to fix it.

Read the rest of this entry

php curl sslv3 allert illegial parameter

Friday, February 17th, 2012

PHP Curl SSL Version

PHP Curl SSL Version

Working with one site via PHP CURL library recently, I met strange error. Site returned nothing to my CURL request from PHP code, but worked fine for the same URL via browser. What the mysticism was happened there? I started my research.

1st, I found CURLOPT_VERBOSE parameter. If you can not guess what is wrong with your CURL request, turn on CURLOPT_VERBOSE parameter. It’s very useful in such situation:

curl_setopt($ch, CURLOPT_VERBOSE, true);

Setting its value to TRUE forces CURL to output verbose information. It writes output to STDERR, or the file specified using CURLOPT_STDERR.
So I added parameter above and made step forward at once. I got the reason, why my CURL request didn’t work. CURL returned this information in the verbose mode:

Read the rest of this entry

NetBeans IDE for PHP 7.1 available

Thursday, January 5th, 2012

NetBeans IDE for PHP 7.1

NetBeans IDE for PHP 7.1

Today, January 5th, 2012 netbeans.org team announced, that NetBeans IDE 7.1 released. Congratulations!
I use NetBeans as my main integrated development environment to work with PHP. So, I downloaded it just got the notification email from netbeans.org. What is first impression? First impression is right the most of the time. On my Ubuntu 10.04 LTS installation was smooth and fast. After 1st start NetBeans as usual asked permission to import settings from the previous installation. Finally, it started and worked as it should. The main part – debugging with FireFox browser still works. So I can continue my Web development work under this version.
Small negative – I don’t know where the reason, but I caught the situation, when NetBeans editor window lost cursor focus.

Read the rest of this entry

NetBeans IDE for PHP 7.1 Beta

Sunday, October 9th, 2011

NetBeans for PHP 7.1 Beta

NetBeans for PHP 7.1 Beta

Developers of popular free NetBeans IDE announced at netbeans.org, that version 7.1 beta (including PHP support) is available.
What’s new this version offers for PHP developers? According to official release information page web developers can find this enhanced features in upcoming 7.1 release: Support for CSS3, Code completion and documentation for new CSS3 elements, Browser specific properties, Improved PHP debugging, PHPUnit test groups capabilities, Support for Smarty templates, Faster uploads with keep-alive for (S)FTP client.
Let’s take a closer look at NetBeans version 7.1 Beta.

Read the rest of this entry

NetBeans 7.0 for PHP Waiting for Connection to XDebug

Sunday, May 15th, 2011

NetBeans IDE 7.0 for PHP and XDebug

NetBeans IDE 7.0 for PHP and XDebug


Recently I met with one annoying thing during work on the small PHP programming task. My favorite IDE for PHP development NetBeans failed to connect to the PHP debug library xDebug. It just shows “NetBeans XDebug waiting for connection message’ in the status line for long time. See the example on the image below. What is going wrong? I tried to recall what I did recently with my box and what could be the reason of such a pity that I could not use more built-in NetBeans PHP debugger.
Yes, I installed system updates including (FireFox libraries) for my Ubuntu. Little earlier I moved to NetBeans for PHP 7.0. May be something wrong is in my setup? I raise accesible manuals, digged the Net, triple times re-checked depended settings. All of them were in the right state, but Ubuntu-Apache-PHP-NetBeans bundle still not allowed me to debug PHP scripts in the habitual, effective and convenient way. For any case I restarted Apache 1st, then reboot the whole system. Nothing helped.

Read the rest of this entry

NetBeans IDE 7.0 Release Candidate 2 for PHP

Sunday, April 17th, 2011

Netbeans IDE 70 RC2 for PHP

Netbeans IDE 70 RC2 for PHP

08 Apr 2011 NetBeans.org announced that NetBeans IDE 7.0 Release Candidate 2 is available for download. The last testing before the final release (it is planned for April) started. We talked about NetBeans IDE 7.0 here an ShinePHP.com already (check NetBeans posts list). I should make a little correction. I supposed in previous posts that Java 7 is required to install NetBeans IDE 7.0 for PHP. I was wrong. Java SE Development Kit (JDK) 6 Update 24 or later is required for that actually. To be more exact, the PHP NetBeans bundle requires the Java Runtime Environment (JRE) 6 only to be installed and run.
NetBeans IDE 7.0 for PHP installation process for Linux users was described in details here already. It is straightforward and quite simple.
Let’s repeat in short, just to show a process screenshots for the new Release Candidate 2 version:

Read the rest of this entry

NetBeans IDE 7.0 Beta 2 for PHP

Sunday, February 27th, 2011

NetBeans IDE 7.0 Beta 2

NetBeans IDE 7.0 Beta 2

The NetBeans team announced that NetBeans IDE 7.0 Beta 2 with PHP support is available for download. The Beta 2 build provides improved quality and performance with bug fixes.
Good news! The final release of NetBeans IDE 7.0 is planned for April 2011.
General description of updates and new features of NetBeans 7.0 for PHP is available in this post.
Here you can see road-map (with screen-shots) of Netbeans 7.0 installation process on Ubuntu 10.04 (Lucid) box. Some useful links with information about NetBeans 7.0 for PHP and tutorials are available at the end of the post.

Read the rest of this entry