Installing Laravel on Apache
Installing Laravel on an Apache server was going to be a no fuss process said no developer! Research done. Documentation looks good and easy to follow. Time to load Laravel.
The set-up
The install notes on Laravel are easy to follow. Beginning with checking that your server is able to install Laravel.
PHP version on Apache Centos 7
I need to set the default php-version of a subscription to php7.3. The current server php version is PHP 7.1.33 (cli) (built: Oct 25 2019 11:33:58) ( NTS ).
Using a shell program (I used Terminal) from the home directory I ran:
export PATH=/opt/plesk/php/7.3/bin:$PATH;
centos 6 use
service httpd restart
centos 7 use
Apache version
Using a Centos 6 or 7 server, how to check the current version of Apache?
httpd -v
This command will return a string that is similar to the following:
Server version: Apache/2.4.6 (CentOS) Server built: Nov 16 2020 16:18:20
If you want to find where the httpd binaries are located use the following:
whereis httpd
This command will return something like:
Composer PHP version part 2
As outlined in an earlier article composer php version, when installing the latest version of Drupal the Plesk version and the server version can be different. In plesk, the version of PHP is 7.3.18, whereas, on the Centos server a check through Terminal (php -v) shows PHP 7.1.33 (cli).
When attempting to install Drupal 9 through composer, the following errors will be shown:
Applying a patch via Terminal
As a process I apply patches locally first, then using git upload the update(s) to a development site on the server. Once the testing has been completed, the final step to apply the patch to the production site.
Using Terminal or your preferred shell program, navigate to the correct directory. Then run this command using the name of the patch file (example.patch):
CDN error on pod update
Today while in Terminal, I ran a regular script pod update. However, this time I received the following error
[!] CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/d/a/2/Alamofire/5.1.0/Alamofire.podspec.json Response: Timeout was reached
I read on GitHub that it could be a cache issue, so I ran:
Centos server restart
I'm receiving a server not found when logging in to Plesk from shell or Terminal. Specifically the error message I'm receiving is
Can't connect to the server
My first reference for this fix is to run the command
sudo service httpd restart
Running this command you will see the following in Terminal
Starting a new GitHub repository including having to merge
Wanting to create a new repository on GitHub, add in a few of the available options that can come with an initial repository such as:
Copy directory
To copy the content of a directory /source to another existing directory /destination can be achieved with the command cp -a
cp -a source/. destination/
Changing the variables accordingly:
- source = challenge/vendor/
- destination = stg/vendor/
cp -a challenge/vendor/. stg/vendor/
General ssh update script for Drupal
First transfer the drupal-8.8.x.tar.gz file to your directory
Via your ssh program (for us Terminal on OSX), enter the path to the directory where you transferred the drupal-8.8.x file