![]() Warning: mysqliconnect function.mysqli-connect: : Access denied for user (using password: YES) in /Users/pankaj/CODE//testdb.php on line 2Failed to connect to MySQL: Access denied for user (using password: YES)Warning: mysqliclose expects parameter 1 to be mysqli, boolean given in /Users/pankaj/CODE//testdb.php on line 10This is some problem with the user creation, check above for the correct syntax for creating the user.Thats all for setting up local Mac OS X environment with basic setup to learn PHP. To enable VirtualHosts, we need to make some changes in Apache Configuration file (nf).Pankajs-MacBook-Pro: root# vi /etc/apache2/nfUncomment below lines and save it.# Virtual hostsInclude /private/etc/apache2/extra/nfNow when Apache will load the configuration file, it will also load the virtual hosts configuration file. We can proceed now to HTTPD virtual hosts file.Pankajs-MacBook-Pro: root# vi /etc/apache2/extra/nfAdd following configuration for a new VirtualHost and save it.ServerAdmin '/Users/pankaj/CODE/'ServerName ServerAlias '/private/var/log/apache2/-errorlog'CustomLog '/private/var/log/apache2/-accesslog' commonAllowOverride AllOrder allow,denyAllow from allMake sure to change the DocumentRoot, ServerName and Directory location according to your needs.
0 Comments
Leave a Reply. |