Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Sunday, April 18, 2021

How to configure settings in php on MAMP ?

 The configuration file for php is php.ini.

The file is present in /etc directory.

Open a Terminal. Change to Root user.

bash#su -s
enter password

bash# cd /etc

bash# ls -l | grep php.ini

-rwxr-xr-x   1 root  wheel   72020 Apr 18 11:17 php.ini.default

bash# chmod 755 php.ini.default

Rename the file to pho.ini

mv php.ini.default

Edit the file and set the following settings if you wish too.

vi php.ini

To seach use /<word>

Userful settings

display_errors On
disaplay_start_errors - On
error_log /var/log/apache2/php_errors.log

write and quit

restart apache to reflect changes

bash#apachectl restart

Additional commands

php -v          -         version of php
php -m        -          modules installed like ssl, sockets etc.,
php -i            -        view php.ini configuration files

Thursday, April 15, 2021

How do I build a website on Mac, Windows or Linux?

Download the following software on your local machine Mac,Windows or Linux machine.

MAMP - Mac Apache MySQL PHP
XAMPP - Cross-Platform Windows/Mac - Apache MySQL Php and Perl
WAMP - Windows Apache MySQL PHP
LAMP - Linux Apache MySQL PHP - Comes default in Linux OS

 Apache - WebServer 

PHP/Perl - Service side Programming language that is used in combination with browser based a.k.a client client languages HTML,CSS and Javascript for your website look and feel

MySQL - database - store data

Once you build your website and have it running on your machine, you could 

  • Buy domain name
  • Buy a domain hosting space and configure LAMP installed on the host.
  • Use FTP to move files from local machine to server host 

Viola! done

 Additional Info read here