I am new in Ubuntu and try to migrate a laravel app to ubuntu.
Please take a look at below steps done.
1.Copied my laravel project and upload database.
2.Started my Xampp server and pointed my laravel app in browser, it showing error like.
Warning: require(/opt/lampp/htdocs/timegear/bootstrap/../vendor/autoload.php): failed to open stream: Permission denied in /opt/lampp/htdocs/timegear/bootstrap/autoload.php on line 17
Fatal error: require(): Failed opening required '/opt/lampp/htdocs/timegear/bootstrap/../vendor/autoload.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/timegear/bootstrap/autoload.php on line 17
When trying to update the composer with terminal throwing error like Mcrypt extension is required.
Please give me a solution for it.
Thanks and Regards.
You are missing the Mcrypt extension, to install:
sudo apt-get install php5-mcrypt
Then:
sudo updatedb && locate mcrypt.ini
Should show it located at /etc/php5/mods-available
locate mcrypt.so
Then edit mcrypt.ini with
chang thextension=mcrypt.so to extension=/usr/lib/php5/20121212/mcrypt.so (or whatever is the location of your mcrypt.so.
Next, create the symbol links
ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/cli/conf.d/20-mcrypt.ini
ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini
and finally, restart apache
service apache2 restart
Hope this helps.
Install the mcrypt PHP extension.
Related
I have an web application which successfully run since august 2020. now i want to add milon barcode package and it successfully ok in local server that's why i need to run coposer install or update command in cpanel terminal. but there show some problem.
N.B Laravel version 5.8, composer version 2.0.6, php version 7.4.
when i try to run composer install it show error
PHP Fatal error: Uncaught ErrorException: proc_open(): unable to create pipe Too many open files in phar:///opt/cpanel/composer/bin/composer/vendor/symfony/console/Application.php:952
when try to run composer update
Failed to download phpoption/phpoption from dist: getaddrinfo() thread failed to start
when try to run composer self-update
[Composer\Downloader\FilesystemException]
Filesystem exception:
Composer update failed: "/opt/cpanel/composer/bin/composer" could not be written.
rename(/opt/cpanel/composer/bin/composer): failed to open stream: Permission denied
You need to enable proc_open
Please Follow the Instruction Below in cPanel
Software > MultiPHP INI Editor > Editor Mode
Select your PHP version and search for (disable_functions)
disable_functions = "proc_open,..., ..."
Now remove (proc_open) from the list and save.
Otherwise, contact your hosting service provider to enable proc_open.
try using this command
composer update --no-scripts
Am new to Laravel ,so been trying to do migrations and this error keeps popping up in the terminal
so after editing my .env file and trying to run php artisan migrate i get the error that i have attached below,i have tried to search the error around,but cant get any meaningful solution
You need to have the php-mysql extension installed on your machine.
You can install this extension with the following command:
sudo apt-get install php-mysql
Hope this helps! :)
For 3 days I have been trying to get this to work with no luck and it's driving me absolutely insane. I have used composer to generate a skeleton cakePHP project for me and am now trying to start up the server and test everything is G2G. From my app directory I run
bin/cake server
and the following error comes up and does not deploy the app to the server.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20160303/php_mbstring.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/php_mbstring.dll, 0x0009): closured error in Unknown on line 0
PHP Fatal error: You must enable the intl extension to use CakePHP.
in /Users/nateschreiner/Documents/Development/ActTwo/app/config/requirements.php on line 31
I have gone into /etc/php.ini and un-commented
extension=php_intl.dll
and I have also gone into /Applications/XAMPP/xamppfiles/etc/php.ini and un-commented the same line.
Nothing is working and it's really starting to grind my gears. Not getting any help surfing the google either.
Took me absolutly forever to solve this, however I finally did so I'll post an answer incase anyone else has this issue.
First:
brew install php#7.1
( If it's not installed already )
brew upgrade php#7.1
update symlinks:
brew link --overwrite --force php#7.1
Then:
echo 'export PATH="/usr/local/opt/php#7.1/bin:$PATH"' >> ~/.bash_profile
echo 'export PATH="/usr/local/opt/php#7.1/sbin:$PATH"' >> ~/.bash_profile
After, go to your app directory and issue command:
bin/cake server
And you should have a server started up on localhost
I created a new Laravel 5.5 project with this command:
laravel new crud-angular
After then, run this command inside the project folder:
php artisan key:generate
At that moment, I got such error:
Warning: require(F:\Study\Laravel\crud-angular/vendor/autoload.php):
failed to open stream: No such file or directory in
F:\Study\Laravel\crud-angular\artisan on line 18
Fatal error: require(): Failed opening required
'F:\Study\Laravel\crud-angular/vendor/autoload.php'
(include_path='.;C:\php\pear') in
F:\Study\Laravel\crud-angular\artisan on line 18
I used wampserver 3.0.6 for this project.
Hope to help me.
Thanks
Make sure you have run:
composer install
Now it seems packages are not installed. If they are, try running:
composer dump-autoload
Try to to give permission for that vendor folder
sudo chmod -R 777 vendor
update your composer also
composer update
this will fix your issue
Most likely you forgot to Install composer just run composer install
First off: I'm very familiar with Composer and also Symfony and some other MVC frameworks.
I tried the following installation documentation, but I'm stuck on how to properly install a laravel project as "apache:apache" under "/var/www/html" on a CentOS 6 virtual machine.
I ran the composer global require "laravel/installer" command, and it says to put "~/.composer/vendor/bin" in your PATH. So I presume this command (laravel install) is done as a normal user (not root), and the folder will exist in your home directory when run.
I added to my path by editing my /etc/profile to include this. But when I try to run laravel new laraveltest in the /var/www/html folder (owned by apache), I get:
[abunk#Alvin-CentOS6 html]$ laravel new laraveltest
Crafting application...
PHP Warning: file_put_contents(/var/www/html/laravel_572e877d514bacbb7381860b8307a067.zip): failed to open stream: Permission denied in /tmp/.composer/vendor/laravel/installer/src/NewCommand.php on line 122
PHP Warning: ZipArchive::extractTo(): Permission denied in /tmp/.composer/vendor/laravel/installer/src/NewCommand.php on line 140
PHP Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /tmp/.composer/vendor/laravel/installer/src/NewCommand.php on line 142
Composer could not find a composer.json file in /var/www/html
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Application ready! Build something amazing.
So then I copied the folder /home/abunk/.composer to /tmp/.composer; and then I ran su -s /bin/sh apache -c "laravel new laraveltest" from the /var/www/html folder (this should run as apache).
But instead I get this:
[abunk#Alvin-CentOS6 html]$ su -s /bin/sh apache -c "laravel new laraveltest"
Password:
Crafting application...
PHP Warning: proc_open(/dev/tty): failed to open stream: No such device or address in /tmp/.composer/vendor/symfony/process/Process.php on line 290
[Symfony\Component\Process\Exception\RuntimeException]
Unable to launch a new process.
new [--dev] [--] []
So my question is (or maybe this is really a bug): How do install as the apache user? Any recommendations?
I could do this as root user, but I think it's a bad idea to run Composer as root user.