php,laravel,laravel-4,composer-php,laravel-artisanRelated issues-Collection of common programming errors


  • Iain
    apache-2.2 php centos suphp
    We have a server that’s handling uploads. The memory limit is set at a ridiculously high level in php.ini (800 M).. however we have gd, which is managing the image resizing, but it is dying at about 60M of memory usage (our error log is reporting a fatal error at this stage).From all our Apache config files (CPanel/WHM managed), I can’t find a RLimitMem that’s set anywhere either.I’ve looked as well if there’s any limits set in our kernel, but can’t find anything there as well.Is there somethin

  • Haresh Vidja
    ubuntu php wordpress
    I have moved my server data PHP + WordPress and database(mysql) from one server to another server… All things working fine… but some time i got page blank in click submit button.. This problem occures some time ..I didnt get any error or fatal error in errorLog file and not get access entry in accsessLog file also on time of blank page.. Black page issue occurs some time on same taskSo how can I fix this problem..

  • Scott Pack
    apache-2.2 php centos
    So the same code works on my Ubuntu server but when I upload it to my dedicated hosting server running CentOS it seems to add an extra prefix of .:/usr/share/pear:/usr/share/php: I tried setting includepath to different things but it just doesn’t work. The file is in a directory called language in the same folder as the file that is including it and I’m using:include dirname(__FILE__).DIRECTORY_SEPARATOR.”language”.DIRECTORY_SEPARATOR.”storage.inc”; include dirname(__FILE__).”/language/language.

  • mike
    php cpanel pdo
    Getting this error: Fatal error: Class ‘PDO’ not foundHave these lines in php.ini:extension=pdo.so extension=pdo_sqlite.so extension=sqlite.so extension=pdo_mysql.soThis shows up in php.info()– –enable-pdo=shared’ ‘Have access to whm but there is no “software” tab from which to access easyapatche? Any suggestions??

  • Mahbubur R Aaman
    php centos zend-framework
    Shows PHP Fatal Errormain(): Failed opening required ‘Zend/Loader.php’I have installed ZF on /usr/share/phpzf command is working. I can create project and do other works using zf command. But while including the library path then shows the error.Am i missing something?

  • Passionate Developer
    apache-2.2 php
    I am getting below errors despite setting memory_limit in php.ini to 64mb:Fatal error: Out of memory (allocated 6291456) (tried to allocate 91284 bytes) in /home/favstayc/public_html/coverbuddy2/cake/libs/configure.php on line 1067What could I change to fix this issue?

  • BlaM
    php iis7 stdout stderr
    Okay, this is slowly getting annoying. I’m used to work with Apache Webservers and never had any of these problems. IIS seems to try to be intelligent – or whatever.Here’s my situation: My customer wants a PHP website and it is supposed to run on an Windows IIS webserver.For my development environment I could use my Apache – but just to be sure I want to do it with IIS, too. So I set up a dev-server with Windows Vista, all the latest Updates and installed IIS. Everything fine!I quickly found ins

  • WerkkreW
    apache-2.2 php varnish
    We recently migrated our site to a load balanced apache cluster behind varnish. Since that time a very small subset of users is reporting they cannot view any pages. I have narrowed the issue down quite a bit. This issue was not present before the move, the old infrastructure was a single large box.We are on Rackspace Cloud running 8 apache2 instances behind varnish 3.0 all load balanced using Rackspace Cloud load balancers (Zeus) and 2 mysql instances for a total of 10 servers, all linux.Use

  • Uvais Ibrahim
    php php-extensions pecl expect
    I got some serious error while installing expect extension in PHP.I ran sudo pecl install channel://pecl.php.net/expect-0.3.1I got error like this while running make,running: make /bin/bash /tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/libtool –mode=compile cc -I. -I/tmp/pear/temp/expect -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/include -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/main -I/tmp/pear/temp/expect -I/usr/include/php5 -I/usr/include/php5/main -I/u

  • Justin808
    php http httpd hostgator
    OK, so I’m uploading a 350meg zip file. The file one uploaded is unzipped and the contents are processed. The processing consists of reading in a data file, then copying and thumbnailing images, the adding data to a database. This is all once process start to finish. I can see in the log that the datafile is processed. I can see on the filesystem the thumbnails get created. But then it looks like the whole this starts over from scratch with blank post data and it fails.When I look at the httpd l

  • Martijn Pieters
    laravel laravel-4 composer-php
    I made one change in my composer.json including Facebook SDK package (http://packagist.org/packages/facebook/php-sdk).So during the composer update I got this error$ php artisan optimize PHP Fatal error: Interface ‘SessionHandlerInterface’ not found in /Users/Leandro/www/bootstrap/compiled.php on line 2644After this, I can’t run artisan or composer commands. Always get the same error.I tried to remove Facebook SDK from composer json but not works.Some help? Using –no-scripts the command works f

  • Antonio Carlos Ribeiro
    laravel laravel-4
    I try Laravel 4 but get errorCatchable fatal error: Argument 1 passed to Illuminate\Container\Container::share() must be an instance of Closure, unknown given, called in /host/sites/centos6/laravel4/bootstrap/compiled.php on line 3131 and defined in /host/sites/centos6/laravel4/bootstrap/compiled.php on line 98please help me, thanks allps: sorry for my english

  • Charles
    php laravel
    http://localhost/laravel/app/tests/ExampleTest.phpif i run laravel it shows the following errorFatal error: Class ‘TestCase’ not found in D:\xampp\htdocs\laravel\app\tests\ExampleTest.php on line 3 , any idea

  • citizen_of_noobville
    php laravel illuminate-container
    I got a web app that works on my local computer, but not on my server. I get this error on server. I checked the code that the error mentions about, and there’s nothing wrong with it. Do you have any idea what causes this? Thank you very much in advance. Here’s my error message: Fatal error: Interface ‘Illuminate\Exception\ExceptionDisplayerInterface’ not found in /var/www/test-app.domain.com/public_html/vendor/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php on line 6Here’s Symph

  • Jeemusu
    php forms laravel
    When I’ve made multistep forms in the past I would generally place the form data into the session so that should the user refresh the page or use the browsers native back buttons the data persists.Transferring my past logic to Laravel I built the following form consisting of three stages [Input -> Confirm -> Success].Routes.phpRoute::group(array(‘prefix’ => ‘account’), function(){Route::get(‘register’, array(‘before’ => ‘guest’,’as’ => ‘account-create’,’uses’ => ‘AccountCon

  • Antonio Carlos Ribeiro
    laravel laravel-4 composer-php
    I have the latest Laravel 4 beta 5 build from Laravel’s github repo.I have built a simple web API and it is working fine. I wanted to duplicate the project to another folder and continue working on it from the copy. However, when I try that, I get the following error message:InvalidArgumentException Driver [native] not supported./Users/tolga/Sites/l4api-copy/bootstrap/compiled.phpLine 10908: throw new \InvalidArgumentException(“Driver [{$driver}] not supported.”);Here is what I did in order to c

  • jdersen
    php validation model controller laravel
    I’m trying to register a user in my application while keeping all business logic in the model and as little as possible in the controller. To accomplish this, I’m running user validation in the model’s boot() method when the Class::creating() event fires. If the validation fails, I simply return false, cancelling the event. You can see this here:public static function boot() {parent::boot();User::creating(function(){$validator = new Services\Validators\RUser;if (! $validator->passes()) return

  • Ryan
    php arrays sorting laravel laravel-4
    I have a “Post” object, accessed via the IOC container. Various errors tell me this object’s type ends up as a “Collection”, which implements several interfaces, including IteratorAggregate and ArrayAccess.I want to display a user-defined group of posts according to a specific order, e.g.:$desired=array(“69″,”63″,”70”);//these represent post id’sJust sorting an array in this manner seems complex, but I want to sort my collection. I have been researching various combinations of usort(), uksort(

  • johnnyfittizio
    php html redirect laravel laravel-4
    This is the situation:In my Laravel 4 app, after validating, it redirect to the same page displaying a succesfull message. It works fine. The problem is that the page is quite heavy and so the redirecting process it takes up to 3 seconds. What i would like to do, is to display a message without redirecting. In order to save the time that takes to load the page again, and display the message instantly.This is the code:return Redirect::back()->with(‘message’,'<b>Congratulations! You have

  • Antonio Carlos Ribeiro
    laravel laravel-4
    I have problems understanding how Laravel handles exceptions. I registered Exception handlers in global.php like this: use MyNamespace\Custom\Exceptions\NotAllowedException; App::error(function(NotAllowedException $exception, $code) {die(“MyNamespace\Custom\Exceptions\NotAllowedException catched”); });App::error(function(\Exception $exception) {echo “general exception thrown<br/>”; });In a controller action I now throw a NotAllowedException. The strange part however is, that first Exce

  • Martijn Pieters
    laravel laravel-4 composer-php
    I made one change in my composer.json including Facebook SDK package (http://packagist.org/packages/facebook/php-sdk).So during the composer update I got this error$ php artisan optimize PHP Fatal error: Interface ‘SessionHandlerInterface’ not found in /Users/Leandro/www/bootstrap/compiled.php on line 2644After this, I can’t run artisan or composer commands. Always get the same error.I tried to remove Facebook SDK from composer json but not works.Some help? Using –no-scripts the command works f

  • Antonio Carlos Ribeiro
    laravel laravel-4
    I try Laravel 4 but get errorCatchable fatal error: Argument 1 passed to Illuminate\Container\Container::share() must be an instance of Closure, unknown given, called in /host/sites/centos6/laravel4/bootstrap/compiled.php on line 3131 and defined in /host/sites/centos6/laravel4/bootstrap/compiled.php on line 98please help me, thanks allps: sorry for my english

  • Antonio Carlos Ribeiro
    laravel laravel-4 composer-php
    I have the latest Laravel 4 beta 5 build from Laravel’s github repo.I have built a simple web API and it is working fine. I wanted to duplicate the project to another folder and continue working on it from the copy. However, when I try that, I get the following error message:InvalidArgumentException Driver [native] not supported./Users/tolga/Sites/l4api-copy/bootstrap/compiled.phpLine 10908: throw new \InvalidArgumentException(“Driver [{$driver}] not supported.”);Here is what I did in order to c

  • Ryan
    php arrays sorting laravel laravel-4
    I have a “Post” object, accessed via the IOC container. Various errors tell me this object’s type ends up as a “Collection”, which implements several interfaces, including IteratorAggregate and ArrayAccess.I want to display a user-defined group of posts according to a specific order, e.g.:$desired=array(“69″,”63″,”70”);//these represent post id’sJust sorting an array in this manner seems complex, but I want to sort my collection. I have been researching various combinations of usort(), uksort(

  • johnnyfittizio
    php html redirect laravel laravel-4
    This is the situation:In my Laravel 4 app, after validating, it redirect to the same page displaying a succesfull message. It works fine. The problem is that the page is quite heavy and so the redirecting process it takes up to 3 seconds. What i would like to do, is to display a message without redirecting. In order to save the time that takes to load the page again, and display the message instantly.This is the code:return Redirect::back()->with(‘message’,'<b>Congratulations! You have

  • Antonio Carlos Ribeiro
    laravel laravel-4
    I have problems understanding how Laravel handles exceptions. I registered Exception handlers in global.php like this: use MyNamespace\Custom\Exceptions\NotAllowedException; App::error(function(NotAllowedException $exception, $code) {die(“MyNamespace\Custom\Exceptions\NotAllowedException catched”); });App::error(function(\Exception $exception) {echo “general exception thrown<br/>”; });In a controller action I now throw a NotAllowedException. The strange part however is, that first Exce

  • Antonio Carlos Ribeiro
    php laravel laravel-4 composer-php
    I’m running into issues installing Laravel 4… I am following the instructions posted here:http://badubizzle.blogspot.com/2013/01/setting-up-laravel-4-on-webfaction.htmlMy host allows multiple versions of PHP to run at the same time, so running the command php will run php 5.2.17 on whatever you specify next. I know you need greater than php 5.3 to run Laravel 4, so I am using php 5.4 to do so. I can either specifically type php54 to run the command under php 5.4, or an alias can be made in t

  • Marco Rivadeneyra
    laravel laravel-4 eloquent
    I have a table Books: with an ID (int) and a ISBN (string) the ISBN is a unique key. I have another table where I store the isbn for the book. On the book model I have: $this->hasMany(‘Other’, ‘isbn’, ‘isbn’); But that ignores the isbn. Do you know any way of doing this?Temporary fix:$this->primaryKey = ‘isbn’; return $this->hasMany(‘Other’, ‘isbn’);

  • Antonio Carlos Ribeiro
    php laravel laravel-4 crud
    I’m just playing around with Laravel at the moment, trying to work out if it is a good choice of framework to use for a project.I’ve downloaded the generator bundle from here and created a resource, following the documentation.This gives me a form with author and body.The store method that gets generated looks like this:/*** Store a newly created resource in storage.** @return Response*/public function store(){$input = Input::all();$validation = Validator::make($input, Tweet::$rules);if ($valida

  • skcin7
    laravel laravel-4
    I’m getting an unexplained FatalErrorException when trying to implement a simple page layout using blade templating. I’m not sure if it’s something I’m doing wrong or Laravel is. I’m following the tutorial on L4’s documentation about Templating and my code seems to follow it. Here’s my code.app/routes.php:<?php Route::get(‘/’, ‘HomeController@showWelcome’);app/views/home/welcome.blade.php:@extends(‘layouts.default’) @section(‘content’)<h1>Hello World!</h1> @stopapp/views/layouts/d

  • Martijn Pieters
    laravel laravel-4 composer-php
    I made one change in my composer.json including Facebook SDK package (http://packagist.org/packages/facebook/php-sdk).So during the composer update I got this error$ php artisan optimize PHP Fatal error: Interface ‘SessionHandlerInterface’ not found in /Users/Leandro/www/bootstrap/compiled.php on line 2644After this, I can’t run artisan or composer commands. Always get the same error.I tried to remove Facebook SDK from composer json but not works.Some help? Using –no-scripts the command works f

  • Antonio Carlos Ribeiro
    laravel laravel-4 composer-php
    I have the latest Laravel 4 beta 5 build from Laravel’s github repo.I have built a simple web API and it is working fine. I wanted to duplicate the project to another folder and continue working on it from the copy. However, when I try that, I get the following error message:InvalidArgumentException Driver [native] not supported./Users/tolga/Sites/l4api-copy/bootstrap/compiled.phpLine 10908: throw new \InvalidArgumentException(“Driver [{$driver}] not supported.”);Here is what I did in order to c

  • edorian
    php phpunit phpstorm composer-php
    I’m now trying for hours to setup phpstorm for unit testing. Whatever I do, I get thisProcess finished with exit code 1 Cannot find PHPUnit in include path …phpunit is (via commandline) asseccible from anywhere; I’ve set the correct include path and have added phpunit to the external libraries. No chance.Is it possible at all or does it only work with installations via pear? I’ve worked through all related questions here, am on mac and phpunit is running smoothly cia cli.

  • Antonio Carlos Ribeiro
    php laravel laravel-4 composer-php
    I’m running into issues installing Laravel 4… I am following the instructions posted here:http://badubizzle.blogspot.com/2013/01/setting-up-laravel-4-on-webfaction.htmlMy host allows multiple versions of PHP to run at the same time, so running the command php will run php 5.2.17 on whatever you specify next. I know you need greater than php 5.3 to run Laravel 4, so I am using php 5.4 to do so. I can either specifically type php54 to run the command under php 5.4, or an alias can be made in t

  • Ir1sh
    php amazon-web-services amazon-ec2 composer-php elastic-beanstalk
    So my application installs and deploys fine as long as I put it on an instance bigger than micro.when I deploy on micro when composer tries to install I get a php error about not being able to allocate enough memory. so I did some googling and it seems that you can create a swap file/disk on boot/ creating of the instance here are two tutorials one twothese might be dated so first question is can this still be done?Second question is how do I create a .ebextensions file to make this happen on d

  • mikeTheLiar
    php try-catch composer-php
    I am trying to install Composer (http://getcomposer.org/download/) on a GoDaddy-hosted Linux server but it’s not working. No matter which method I try, I eventually run up against some version of the following error:Parse error: syntax error, unexpected ‘{‘ on line 290.Line 290 refers to line 290 in this file: https://getcomposer.org/installer which is the start of a try-catch block. And, indeed, even a simple script like:echo ‘<?php echo “Hello World “; try {echo “Goodbye”;} catch (Except

  • Brodie
    php namespaces include composer-php autoloader
    I know you can use Composer’s files scheme to include functions or definitions automatically in every file.I’d like to take this one step further and never have to manually write a use classname as statement again in individual files. This is my ideal set up:/composer.json:{“require”: {“slim/slim”: “2.*”}”autoload”: {“files”: [“init.php”]} }/init.php:use Slim\Slim as Slim; use Slim\Route as Route; define(“RYAN”,”BRODIE”);/example.php:require ‘/vendor/autoload.php’; echo RYAN; // ? outputs “BROD

  • ign
    php composer-php
    I’ve been trying to install Composer on my machine (OS X 10.6) with no success so far.As per Composer docs, i executed this in Terminal: curl -s http://getcomposer.org/installer | php#!/usr/bin/env phpAnd this is the output:The detect_unicode setting must be disabled. Add the following to theend of your php.ini:detect_unicode = OffOf course, this is in my php.ini: detect_unicode = Off, located at /etc/php.ini.defaultphp -info tells me that php.ini file is being loaded from /etc/ (output is: Conf

  • Antonio Carlos Ribeiro
    git laravel laravel-4 composer-php
    I’m working on a Laravel 4 project. When I try to update my packages with Composer, it gets to doctrine/collections but then throws this error:[Runtime Exception] Failed to execute git status –porcelain –untracked-files=noerror: bad index file sha1 signature fatal: index file corruptException trace: http://pastebin.com/Js3nKrhyI tried removing the index in doctrine/collections but then I it tells me the format is incorrect in refs/remotes/origin/master.Any idea how to solve this issue? Thank

  • RayJ_inSJ
    git svn version-control composer-php
    How can I tell which packages require which version control? For example, I have the following Composer.json{“name”: “sample/app”,”description”: “sample app”,”require”: {“monolog/monolog”: “1.0.*”,”smarty/smarty”: “dev-trunk”,”zend/gdata”: “dev-master”} }The smarty lib gave me a runtime exception because I didn’t have svn installed. Compared this to zend/gdata which gives a runtime exception if git is not installed.

  • SLim
    php laravel laravel-4 laravel-artisan
    Would like to know how can i execute the PHP Artisan script inside my controller of Laravel? Tried the following code but it doesn’t work.php /Users/sl/Dropbox/Development/ABC/artisan currency:update;This is the error returned: syntax error, unexpected ‘currency’ (T_STRING)Thanks

  • a7omiton
    php cli laravel-artisan
    I’ve looked around SO and couldn’t figure out what could be wrong with me running the php artisan serve command and getting the cli stopped working error.I’m running WAMP and executing the command within my laravel projects folder (wamp/www/project) and get the error.When I hit debug after Windows fails to find a solution, it shows a message saying “An unhandled win32 exception occured in php.exe [7236]”Anybody know how to fix this?

  • Jean-Nicolas Boulay Desjardins
    php laravel laravel-4 composer-php laravel-artisan
    Here is the error I am getting:Script php artisan optimize handling the post-update-cmd event returned with an error[RuntimeException] Error Output:update [–prefer-source] [–prefer-dist] [–dry-run] [–dev] [–no-dev] [–lock] [–no-plugins] [–no-custom-installers] [–no-scripts] [–no-progress] [–with-dependencies] [-v|vv|vvv|–verbose] [-o|–optimize-autoloader] [packages1] … [packagesN]This shows after:Writing lock file Generating autoload filesI tried to delete all my folders in my v

Web site is in building