About Form use in Laravel5 - php

This is my Laravel error:
FatalErrorException in compiled.php line 6376:
Class 'Illuminate\Html\HtmlServiceProvider' not found
in compiled.php line 6376
at HandleExceptions->fatalExceptionFromError(array('type' => '1', 'message' => 'Class 'Illuminate\Html\HtmlServiceProvider' not found', 'file' => '/home/nl/Laravel/storage/framework/compiled.php', 'line' => '6376')) in compiled.php line 1721
at HandleExceptions->handleShutdown()
And my console error:
Generating autoload files
PHP Fatal error: Class 'Illuminate\Html\HtmlServiceProvider' not found in /home
/nl/Laravel/storage/framework/compiled.php on line 6376
PHP Stack trace:
PHP 1. {main}() /home/nl/Laravel/artisan:0
PHP 2. Illuminate\Foundation\Console\Kernel->handle() /home/nl/Laravel/artisan
:36
PHP 3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/nl/Laravel/vend
or/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:92
PHP 4. Illuminate\Foundation\Application->bootstrapWith() /home/nl/Laravel/ven
dor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:195
PHP 5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /home/nl
/Laravel/storage/framework/compiled.php:1307
PHP 6. Illuminate\Foundation\Application->registerConfiguredProviders() /home/
nl/Laravel/storage/framework/compiled.php:1758
PHP 7. Illuminate\Foundation\ProviderRepository->load() /home/nl/Laravel/stora
ge/framework/compiled.php:1404
PHP 8. Illuminate\Foundation\ProviderRepository->compileManifest() /home/nl/La
ravel/storage/framework/compiled.php:6338
PHP 9. Illuminate\Foundation\ProviderRepository->createProvider() /home/nl/Lar
avel/storage/framework/compiled.php:6362
PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Th
e stream or file "/home/nl/Laravel/storage/logs/laravel-2015-04-20.log" could no
t be opened: failed to open stream: Permission denied' in /home/nl/Laravel/stora
ge/framework/compiled.php:12372
Stack trace:
#0 /home/nl/Laravel/storage/framework/compiled.php(12431): Monolog\Handler\Strea
mHandler->write(Array)
#1 /home/nl/Laravel/storage/framework/compiled.php(12313): Monolog\Handler\Rotat
ingFileHandler->write(Array)
#2 /home/nl/Laravel/storage/framework/compiled.php(12081): Monolog\Handler\Abstr
actProcessingHandler->handle(Array)
#3 /home/nl/Laravel/storage/framework/compiled.php(12179): Monolog\Logger->addRe
cord(400, 'exception 'Symf...', Array)
#4 /home/nl/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Exception
s/Handler.php(47): Monolog\Logger->error('exception 'Symf...')
#5 /home/nl/Laravel/app/Exceptions/Handler.php(27): Illuminate\Foundation\Except
ions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalErrorExceptio
n))
#6 in /home/nl/Laravel/storage/framework/compiled.php on line 12372
PHP Stack trace:
PHP 1. {main}() /home/nl/Laravel/artisan:0
PHP 2. Illuminate\Foundation\Console\Kernel->handle() /home/nl/Laravel/artisan
:36
PHP 3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/nl/Laravel/vend
or/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:92
PHP 4. Illuminate\Foundation\Application->bootstrapWith() /home/nl/Laravel/ven
dor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:195
PHP 5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /home/nl
/Laravel/storage/framework/compiled.php:1307
PHP 6. Illuminate\Foundation\Application->registerConfiguredProviders() /home/
nl/Laravel/storage/framework/compiled.php:1758
PHP 7. Illuminate\Foundation\ProviderRepository->load() /home/nl/Laravel/stora
ge/framework/compiled.php:1404
PHP 8. Illuminate\Foundation\ProviderRepository->compileManifest() /home/nl/La
ravel/storage/framework/compiled.php:6338
PHP 9. Illuminate\Foundation\ProviderRepository->createProvider() /home/nl/Lar
avel/storage/framework/compiled.php:6362
Script php artisan clear-compiled handling the post-update-cmd event returned wi
th an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Illuminate\Html\HtmlServiceProvider'
not found in /home/nl/Laravel/storage/framework/compiled.php on line 6376
PHP Stack trace:
PHP 1. {main}() /home/nl/Laravel/artisan:0
PHP 2. Illuminate\Foundation\Console\Kernel->handle() /home/nl/Laravel/ar
tisan:36
PHP 3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/nl/Laravel
/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:92
PHP 4. Illuminate\Foundation\Application->bootstrapWith() /home/nl/Larave
l/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:195
PHP 5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /ho
me/nl/Laravel/storage/framework/compiled.php:1307
PHP 6. Illuminate\Foundation\Application->registerConfiguredProviders() /
home/nl/Laravel/storage/framework/compiled.php:1758
PHP 7. Illuminate\Foundation\ProviderRepository->load() /home/nl/Laravel/
storage/framework/compiled.php:1404
PHP 8. Illuminate\Foundation\ProviderRepository->compileManifest() /home/
nl/Laravel/storage/framework/compiled.php:6338
PHP 9. Illuminate\Foundation\ProviderRepository->createProvider() /home/n
l/Laravel/storage/framework/compiled.php:6362
PHP Fatal error: Uncaught exception 'UnexpectedValueException' with messag
e 'The stream or file "/home/nl/Laravel/storage/logs/laravel-2015-04-20.log
" could not be opened: failed to open stream: Permission denied' in /home/n
l/Laravel/storage/framework/compiled.php:12372
Stack trace:
#0 /home/nl/Laravel/storage/framework/compiled.php(12431): Monolog\Handler\
StreamHandler->write(Array)
#1 /home/nl/Laravel/storage/framework/compiled.php(12313): Monolog\Handler\
RotatingFileHandler->write(Array)
#2 /home/nl/Laravel/storage/framework/compiled.php(12081): Monolog\Handler\
AbstractProcessingHandler->handle(Array)
#3 /home/nl/Laravel/storage/framework/compiled.php(12179): Monolog\Logger->
addRecord(400, 'exception 'Symf...', Array)
#4 /home/nl/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Exce
ptions/Handler.php(47): Monolog\Logger->error('exception 'Symf...')
#5 /home/nl/Laravel/app/Exceptions/Handler.php(27): Illuminate\Foundation\E
xceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalErr
orException))
#6 in /home/nl/Laravel/storage/framework/compiled.php on line 12372
PHP Stack trace:
PHP 1. {main}() /home/nl/Laravel/artisan:0
PHP 2. Illuminate\Foundation\Console\Kernel->handle() /home/nl/Laravel/ar
tisan:36
PHP 3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/nl/Laravel
/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:92
PHP 4. Illuminate\Foundation\Application->bootstrapWith() /home/nl/Larave
l/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:195
PHP 5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /ho
me/nl/Laravel/storage/framework/compiled.php:1307
PHP 6. Illuminate\Foundation\Application->registerConfiguredProviders() /
home/nl/Laravel/storage/framework/compiled.php:1758
PHP 7. Illuminate\Foundation\ProviderRepository->load() /home/nl/Laravel/
storage/framework/compiled.php:1404
PHP 8. Illuminate\Foundation\ProviderRepository->compileManifest() /home/
nl/Laravel/storage/framework/compiled.php:6338
PHP 9. Illuminate\Foundation\ProviderRepository->createProvider() /home/n
l/Laravel/storage/framework/compiled.php:6362
I refer to this tutorial, and am following these steps:
1."illuminate/html": "5.*"
2.Run: composer update
3.Add to the app.php providers array:
'Illuminate\Html\HtmlServiceProvider',
4.Add to the app.php aliases array:
'Html' => 'Illuminate\Html\HtmlFacade',
'Form' => 'Illuminate\Html\FormFacade',
but still not work, someone could give some advice?

I've found there is a bit of an issue with that library that composer requires - try changing:
"illuminate/Html" : "5.0.*"
To..
"Illuminate/Html": "5.0.*#dev"
in the composer.json in the root of your laravel project.

I fall this problem,solve this and wrote a blog about it.For use laravel html helper you need to require this dependency in your composesr.josn file and need to require those file.For full process follow this url http://www.kingpabel.com/laravel-html-helper/

Related

Laravel throw console warning

I'm starting use laravel for a project. I've installed it like it's suggested on the official documentation, hovever, if I type laravel new projectname after I navigate to the macOS sites folder, It will give this errors
host:~ z$ laravel new kcms
Crafting application...
PHP Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Process\Process::fromShellCommandline() in /Users/z/.composer/vendor/laravel/installer/src/NewCommand.php:84
Stack trace:
#0 /Users/z/.composer/vendor/symfony/console/Command/Command.php(255): Laravel\Installer\Console\NewCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /Users/z/.composer/vendor/symfony/console/Application.php(886): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /Users/z/.composer/vendor/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(Laravel\Installer\Console\NewCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /Users/z/.composer/vendor/symfony/console/Application.php(145): Symfony\Component\Console\Applicat in /Users/z/.composer/vendor/laravel/installer/src/NewCommand.php on line 84
Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Process\Process::fromShellCommandline() in /Users/z/.composer/vendor/laravel/installer/src/NewCommand.php on line 84
Error: Call to undefined method Symfony\Component\Process\Process::fromShellCommandline() in /Users/z/.composer/vendor/laravel/installer/src/NewCommand.php on line 84
Call Stack:
0.0002 394608 1. {main}() /Users/z/.composer/vendor/laravel/installer/bin/laravel:0
0.0081 1414560 2. Symfony\Component\Console\Application->run() /Users/z/.composer/vendor/laravel/installer/bin/laravel:13
0.0202 1807648 3. Symfony\Component\Console\Application->doRun() /Users/z/.composer/vendor/symfony/console/Application.php:145
0.0203 1807648 4. Symfony\Component\Console\Application->doRunCommand() /Users/z/.composer/vendor/symfony/console/Application.php:262
0.0204 1807648 5. Laravel\Installer\Console\NewCommand->run() /Users/z/.composer/vendor/symfony/console/Application.php:886
0.0209 1812424 6. Laravel\Installer\Console\NewCommand->execute() /Users/z/.composer/vendor/symfony/console/Command/Command.php:255
what's wrong?
You will need to run the following command as the global version is not compatible or outgrade with the local one.
composer global update
or
composer global update laravel/installer

PHP Artisan Tinker not working with Laravel 5.4 and PHP 7.0.1

I just added tinker to my Laravel project 5.4.
When I try to run:
php artisan tinker
I am getting following error:
PHP Warning: Uncaught ErrorException: require(/home/abdullah/php_apps/website): failed to open stream: Success in /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php:51
Stack trace:
#0 /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php(51): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'require(/home/a...', '/home/abdullah/...', 51, Array)
#1 /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php(51): require()
#2 /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php(33): Laravel\Tinker\ClassAliasAutoloader->__construct(Object(Psy\Shell), '/home/abdullah/...')
#3 /home/abdullah/php_apps/website/vendor/laravel/tinker/src/Console/TinkerCommand.php(59): Laravel\Tinker\ClassAliasAutoloader::register(Object(Psy\Shell), '/home/abdullah/...')
#4 [internal function]: Laravel\Tinker\Console\TinkerCommand->handle()
#5 /home/abdullah/php_apps/website/vendor/laravel/framework/src/Illuminate/Contai in /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php on line 51
PHP Fatal error: Laravel\Tinker\ClassAliasAutoloader::__construct(): Failed opening required '/home/abdullah/php_apps/website' (include_path='.:/home/abdullah/.phpbrew/php/php-7.0.1/lib/php') in /home/abdullah/php_apps/website/vendor/laravel/tinker/src/ClassAliasAutoloader.php on line 51
[Symfony\Component\Debug\Exception\FatalErrorException]
Laravel\Tinker\ClassAliasAutoloader::__construct(): Failed opening required '/home/abdullah/php_apps/website' (include_path='.:/home/abdullah/.phpbrew/php/php-7.0.1/lib/php')
I have tried giving rights to various folders.
Also tried adding the Tinker class to console/kernel.php.
I fixed it finally by upgrading my version of laravel.
Laravel v5.4.0 to Laravel v5.4.33.

Why does code coverage report fail on php 7.2?

I'm running a php build matrix on travis-ci for php 7.0 and 7.2.
https://travis-ci.org/uawcob/course-overrides/jobs/242630482
On 7.0, The tests all pass and code coverage is generated fine.
On 7.2, you can see that all the tests run and pass the same, but generating the code coverage report throws an exception which causes the whole build to fail.
Why is this?
The full error stack for posterity:
Generating code coverage report in HTML format ...PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php:895
Stack trace:
#0 /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php(735): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
#1 /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build('Illuminate\\Cont...')
#2 /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve('Illuminate\\Cont...')
#3 /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make('Illuminate\\Cont...')
#4 /home/travis/build/uawcob/cour in /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895
Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895
Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895
Call Stack:
3.7921 6622616 1. Illuminate\Foundation\Bootstrap\HandleExceptions->handleException() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:0
3.7921 6622616 2. Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:80
3.7921 6622616 3. Illuminate\Foundation\Application->make() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:155
3.7921 6622616 4. Illuminate\Foundation\Application->make() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:728
3.7921 6622616 5. Illuminate\Foundation\Application->resolve() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php:575
3.7921 6622616 6. Illuminate\Foundation\Application->build() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php:608
3.7921 6622728 7. Illuminate\Foundation\Application->notInstantiable() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php:735
PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php:895
Stack trace:
#0 /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php(735): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...')
#1 /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build('Illuminate\\Cont...')
#2 /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve('Illuminate\\Cont...')
#3 /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(728): Illuminate\Container\Container->make('Illuminate\\Cont...')
#4 /home/travis/build/uawcob/cour in /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895
Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895
Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895
Call Stack:
3.7929 6633672 1. Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:0
3.7938 6641592 2. Illuminate\Foundation\Bootstrap\HandleExceptions->handleException() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:119
3.7938 6641592 3. Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:80
3.7938 6641592 4. Illuminate\Foundation\Application->make() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:155
3.7938 6641592 5. Illuminate\Foundation\Application->make() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:728
3.7938 6641592 6. Illuminate\Foundation\Application->resolve() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php:575
3.7939 6641592 7. Illuminate\Foundation\Application->build() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php:608
3.7939 6641704 8. Illuminate\Foundation\Application->notInstantiable() /home/travis/build/uawcob/course-overrides/vendor/laravel/framework/src/Illuminate/Container/Container.php:735
Looking into your code for that exact error message, the proposed fix upstream is to exclude the ./app/Http/routes.php file from code-coverage:
...
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
<exclude>
<file>./app/Http/routes.php</file>
<!-- ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ -->
...
That is from a quick look checking your projects sources of the build that fails shows that this is not yet set in the phpunit.xml.dist file. I can not say why this happens only in the PHP 7.2 build. So hopfully this can shed some more light and perhaps this rings a bell (e.g. different Phpunit version).

Developing app in laravel 5.1 having reflection error, i am using Wamp server URL: http://localhost/laravel/public/.

I am migrating one table to database
C:\wamp\www\laravel>php artisan migrate
Fatal error: Uncaught exception 'ReflectionException' with message 'Class App\Co
nsole\Kernel does not exist' in C:\wamp\www\laravel\vendor\laravel\framework\src
\Illuminate\Container\Container.php on line 736
ReflectionException: Class App\Console\Kernel does not exist in C:\wamp\www\lara
vel\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 736
Call Stack:
0.0010 123768 1. {main}() C:\wamp\www\laravel\artisan:0
0.0380 1075752 2. Illuminate\Foundation\Application->make() C:\wamp\www
\laravel\artisan:31
0.0380 1075832 3. Illuminate\Container\Container->make() C:\wamp\www\la
ravel\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:674
0.0380 1075832 4. Illuminate\Container\Container->build() C:\wamp\www\l
aravel\vendor\laravel\framework\src\Illuminate\Container\Container.php:626
0.0380 1075832 5. Illuminate\Container\Container->Illuminate\Container\
{closure}() C:\wamp\www\laravel\vendor\laravel\framework\src\Illuminate\Containe
r\Container.php:733
0.0380 1075880 6. Illuminate\Foundation\Application->make() C:\wamp\www
\laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php:216
0.0380 1075880 7. Illuminate\Container\Container->make() C:\wamp\www\la
ravel\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:674
0.0380 1075896 8. Illuminate\Container\Container->build() C:\wamp\www\l
aravel\vendor\laravel\framework\src\Illuminate\Container\Container.php:626
0.0380 1076072 9. ReflectionClass->__construct() C:\wamp\www\laravel\ve
ndor\laravel\framework\src\Illuminate\Container\Container.php:736
I am new to laravel and this is demo setup for one project and getting confuse with these errors.
As for the error on existing projects. Make sure the bindings in bootstrap/app.php are correct and run composer dump-autoload to clear out any lingering issues.

Zend Gdata - missing HeaderValue.php

So I am following this and I'm trying to run his first php example. I get the following error:
PHP Warning: require_once(Zend/Http/Header/HeaderValue.php): failed to open stream: No such file or directory in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Http/Client.php on line 45
I checked and the file is in fact not there. So I added it from the minimial 1.12 download. It then says Zend/Xml/Security.php doesn't exist so i add it.
Now I am getting the following error:
PHP Notice: Undefined offset: 1 in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/ClientLogin.php on line 150
PHP Stack trace:
PHP 1. {main}() /opt2/sites/gdataApi/test.php:0
PHP 2. Google_Spreadsheet->__construct() /opt2/sites/gdataApi/test.php:11
PHP 3. Google_Spreadsheet->login()/opt2/sites/gdataApi/Google_Spreadsheet.php:40
PHP 4. Zend_Gdata_ClientLogin::getHttpClient() /opt2/sites/gdataApi/Google_Spreadsheet.php:223
PHP Notice: Undefined variable: php_errormsg in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php on line 834
PHP Stack trace:
PHP 1. {main}() /opt2/sites/gdataApi/test.php:0
PHP 2. Google_Spreadsheet->addRow() /opt2/sites/gdataApi/test.php:24
PHP 3. Google_Spreadsheet->getSpreadsheetId() /opt2/sites/gdataApi/Google_Spreadsheet.php:62
PHP 4. Zend_Gdata_Spreadsheets->getSpreadsheetFeed() /opt2/sites/gdataApi/Google_Spreadsheet.php:252
PHP 5. Zend_Gdata->getFeed() /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/Spreadsheets.php:150
PHP 6. Zend_Gdata_App->getFeed() /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata.php:162
PHP 7. Zend_Gdata_App->importUrl() /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php:213
PHP 8. Zend_Gdata_App::importString() /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php:792
PHP Fatal error: Uncaught exception 'Zend_Gdata_App_Exception' with message 'DOMDocument cannot parse XML: ' in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php:833
Stack trace:
#0 /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php(792): Zend_Gdata_App::importString('', 'Zend_Gdata_Spre...', NULL, NULL)
#1 /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php(213): Zend_Gdata_App->importUrl('https://spreads...', 'Zend_Gdata_Spre...', NULL)
#2 /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata.php(162): Zend_Gdata_App->getFeed('https://spreads...', 'Zend_Gdata_Spre...')
#3 /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/Spreadsheets.php(150): Zend_Gdata->getFeed('https://spreads...', 'Zend_Gdata_Spre...')
#4 /opt2/sites/gdataApi/Google_Spreadsheet.php(252): Zend_Gdata_Spreadsheets->getSpreadsheetFeed()
#5 /opt2/sites/gdataApi/Google_Spreadsheet.php(62): Google_Spreadsheet->getSpreadsheetId('test spreadshee...')
#6 /opt2/sites/gdataApi/test.php(24): Google_Spreadsheet in /opt2/sites/gdataApi/ZendGdata-1.12.13/library/Zend/Gdata/App.php on line 833
I have a google spreadsheet that I would like to update programatically using php. Can you tell me whats going wrong with this script? Seems like this is an old article. Are there more recent articles I am missing?
Download Zend framework minimal version. Then extract archive and copy /library/Zend/Http/Header directory to your GData's /Zend/Http/ directory.

Categories