Laravel base64_decode error on fresh install - php

I'm trying to get started with laravel but it seems like hell to get it working.
First of all, here is the error (this happens when i try to access /myapp/public):
Some considerations:
I'm using MAMP Pro with php 5.4.4
Already installed MCrypt extension
Already gave app/storage write permission
Already optimized artisan by running php artisan optimize
Don't know where to go from here, can you help?
Thanks in advance.
EDIT:
I'm using OSX and php5 json is already enabled

The error message tells you that you gave an array, not a string.
Basically its saying $paylod = array('something'=>'somethingelse');
So it is expecting you provide it with $payload['something'] so that it knows what string to decode.
have you installed/enabled php5 JSON support?
When I set up laravel on a fresh ubuntu 13.10 server I had to run:
sudo apt-get install php5-json
among other needed modules (like mcrypt) for laravel 4 to work.

Related

"symbol not found in flat namespace '_PHP_MD5Init' " Error encountered in loading redis dynamic library

Tried upgrading to PHP 8.1.8 and then made changes to php.ini file for "extension_dir" but it's giving me the above error.
I do not understand how to resolve this. can Anyone help me out here?
Okay, so I'm new to PHP and had to figure out understanding the error for quite a longer time than required.
The problem was basically I had uninstalled redis extension (through pecl) and simply installed redis again using brew.
So then, I installed redis extension through pecl using arch -arm64 sudo pecl install redis and was good to go.

How to run PHP with Firebird InterBase in VestaCP (CentOS)

I'm running VPS with VestaCP (CentOS) and I had previously installed InterBase for PHP 7.0.30, but after an yum-update and v-update-sys-vesta-all interbase was no longer running.
Here is what I've got so far:
Okay soo with new update the new PHP 7.1.17 version was installed. Allright, but the interbase module is not running with it.
And first thing I did was yum --enablerepo=remi install php71-php-interbase to install interbase for this new PHP version.
Tried to restart but still getting missing InterBase error if I try to use ibase_connect() function - therefor InterBase is still not properly installed.
I tried to follow PHP InterBase documentation on this, but I realized I have to compile it and add extra parameter on run, but the problem is that VestaCP uses different directories and libraries so I don't want to mess up my VPS.
Has anybody dealt with this? Any "howto's" to follow?
This answer is what #Mark Rotteveel already pointed out in the comments, but only with additional steps.
I had to compile PHP 7.1.17 from source with --with-interbase[=DIR] in configuration and then include it in php.ini
[UPDATE]
I found even faster way to do this automatically (if only I had known this earlier I would have saved few hours of research).
Answer
Just run yum -y install php php-interbase and you will be all set.

laravel 4 artisan make command - error Mcrypt PHP extension required

I'm trying to glean a signal from the noise in debugging this.
When I run ./artisan make:middleware MyTools, I get:
Mcrypt PHP extension required
Solutions seem to revolve around setting a proper value in /etc/php5/mods-available/mcrypt.ini and then doing a php5enmod mcrypt and Apache restart. Sounds good, and a phpinfo() call shows it's there and that I'm running PHP 5.5.9-1ubuntu4.20. All peachy.
However, I'm not running php 5 on the command line for artisan! Typing php -v tells me I'm running php 7.0.14-2.
When I go to /etc/php/7.0/mods-available, indeed I do not see mcrypt.ini - my question is how to "get" a proper mycrypt.ini file in there, have Mcrypt running for the COMMAND LINE, and not have to change anything else - for example I want to leave the webserver as it is at 5.5.9. How do I do this?
-- UPDATE --
See the discussion/comments below, I was able to get around this by DOWNGRADING my CLI to 5.5.9 vs. installing mcrypt into php7. This is not likely the best solution and I welcome a better one.

How can I get my current symfony installation run on a local server?

I have been working on a Symfony2 installation on a dedicated server for the past year and I'm finally trying to get it to work on my local server (since I am spending more time meddling with the code lately).
I've created a new database and imported it. Edited the parameters.yml file to contain all the info needed by local and ran php composer.phar install.
Ran php app/console doctrine:schema:update, clear cache, install assets and dumped assetics. No errors so far.
Now, when I go to the app.php file, I am getting this error :
Fatal error: Call to undefined function Doctrine\Common\Annotations\token_get_all() in [path]/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php on line 56
I couldn't find an answer by searching (could be because I am not sure what i am searching for). Has anyone encountered this issue before and know how to fix it?
Regards,
Do you have the PHP tokenizer extension enabled? Check the Symfony requirements for more information.
In Ubuntu 14.04 you could install it with
sudo apt-get install libapache2-mod-php5

Cannot load mysqli extension

I'm using an amazon ec2 instance.
When I try to access phpmyadmin I get the following error:
Cannot load mysqli extension. Please check your PHP configuration. - Documentation
It was working before, but I decided I wanted to upgrade to php 5.
I ran this command:
`sudo yum install -y php55-mysqlnd php55 php55-xml php55-mcrypt php55-mbstring php55-cli mysql55 mysql55-server httpd24`
I removed conflicts in order to get the command to run.
And now phpmyadmin does not work. I can't connect to the database anymore through my php scripts.
I have added extension=mysqli.so to the php.ini file and restarted apache.
How do I resolve this?
I figured it out. I think when I removed conflicts, I did it somewhat blindly.
Don't do something like yumo remove httpd*.
Don't be lazy like me. Type in exactly what you want to remove.
For whatever reason, my server got removed within myUrl.com/phpmyadmin/setup/index.php so I had to create a new one (luckily it kept my tables though).
If anyone wants a really good reference for installing (or fixing your blunders) I've been following this: http://www.martin-brennan.com/php-mysql-and-ftp-on-an-amazon-ec2-instance/
I used that command I posted above to install php 5 in combination with that tutorial.

Categories