Started working with Fedora again… installed laravel. It could not find pdo mysql driver.
Fedora:
sudo dnf install php-mysqlnd
Debian:
sudo apt-get install php7.0-mysql
Started working with Fedora again… installed laravel. It could not find pdo mysql driver.
Fedora:
sudo dnf install php-mysqlnd
Debian:
sudo apt-get install php7.0-mysql
Oh my… switched to java spring a while ago and finally started to log my notes. lots of jpa/hibernation to come..
In the database, the date column can be null. jpa doesnt like this.
one shop says that 2 different ways to get rid of the issue:
1.
UPDATE table SET datefield = NULL WHERE datefield = '0000-00-00 00:00:00';
I like it.
2.
jdbc:mysql://localhost:3306/yourMySqlDatabase?zeroDateTimeBehavior=convertToNull
I like it also.
I guess it is a preference thing. both methods are easy enough to implement. database defaults to null value …
Easy to forget debian:
Remove processes that run on startup
$> sudo update-rc.d -f nginx remove
Easy to forget fedora:
$> sudo chkconfig apache2 off
An easy one to forget is adding authentication to laravel 5.7.
$> composer require laravel/ui
$> php artisan ui vue --auth #only if using vue
$> php artisan migrate #add authenticate tables
working with web sites on a local linux machine running nginx and can be an issue.
Found an awesome site that describes this wonderfully on how to get your test site up and running quickly
1. create your test site in /var/www/mytestsite.com
2. in the /etc/nginx directory :
mytestsite.conf
#my test site configuration file
server {
listen 80;
server_name mytestsite.com;
location / {
root /var/www/mytestsite.com
index index.html index.htm
}
}
3. in your /etc/hosts file, add the line:
127.0.0.1 mytestsite.com
restart nginx with a systemctl restart nginx and hopefully, you are done.
Issues I ran across:
If nginx doesnt start properly, do a sudo journalctl command
that flashes up lots of useful messages. Your nginx debugging messages will be at the very bottom of the list. I get there by doing a SHIFT-G.
You should see something like
fix the issue and try again.
I just switched from Fedora 31 to Debian 10.1
It seemed that every major release of Fedora update wrecked the delicate balance between wayland/xorg and nvidia drivers.
Hopefully, debian wont do that to me!
This server is running debian and I like it.
Just switched from fedora to debian.
also made the change from apache to nginx.
This is about www-data.
I found that setting my /var/www/{project} with group of www-data and setting the directory to 755, that is good enough to run with.
In the older version, php artisan make:auth exists. It doesnt now. To rectify, follow the below steps:
composer require laravel/ui
php artisan ui vue --auth
alternative is a useful program that allows you to switch between different versions of the same program
example: when I run python, I can change between the default python version by:
# alternatives --install /usr/bin/python python /usr/bin/python2.7 1
# alternatives --install /usr/bin/python python /usr/bin/python3.7 2
#switch between the two
sudo alternatives --config python
https://fedoraproject.org/wiki/Alternatives_system
https://medium.com/coderlist/how-to-change-default-python-version-on-linux-fedora-28-c22da18bdd6
A good article on medium on a quick and easy environment for apache setup for multiple projects on one site sums it up with one quick example:
fedora – httpd
I created a .conf file /etc/httpd/conf.d/sites.conf
dropped the below data in it and restarted httpd. works nicely, fast and easy.
Alias /project1 /var/www/html
Alias /project2 /var/www/php-monitor
AllowOverride All
reference:
https://medium.com/@umaams/multiple-laravel-sites-on-sub-directory-using-apache-webserver-91fa20e57ac4