forum.coppermine-gallery.net
No Support => General discussion (no support!) => Topic started by: Steve.H on October 28, 2004, 03:34:41 pm
-
Hi! I'm trying to edit a whole new theme, and right now, all my Website is made thru Dreamweaver.
But i want to know what kind of tools, do you guys use to edit your sites, PHP.
I can't "preview" the PHP files, as I do with .HTML files.
Thanks in advance!
-
You can't view php files on your local machine unless you have php and a webserver installed since PHP is a scripting language.
The webserver I installed on my WindowsXP machine is Abyss Web Server, a free personal web server available for Windows, MacOS X, Linux, and FreeBSD operating systems from Aprelium Technologies (http://www.aprelium.com/abyssws/).
Get PHP from http://www.php.net/.
You will also need to load mySql (http://www.mysql.com/)on your machine to work with the databases. I'd also recommend getting phpMyAdmin (http://www.phpmyadmin.net/home_page/) to help you manage your database(s).
Once you have everything installed and configured correctly, you can set up your Testing Server using the PHP MySql server model in Dreamweaver.
-
PHP is a scripting language, you cannot simply 'preview' it. The files can be viewed in any text editor eg. notepad but will not be much use to you unless you know PHP.
-
Hey Jabi,
Thanks for such a detailed explanation, i got it now. I'll try to set up my Computer into a WebServer.
Really Apreciate :)
Cheers.
-
No problem.
One other hint. Since it's a pain to try and keep two separate config files for database access (one for the local host and another for the remote server) I set up my config file with an if statement.
Example include/config.inc.php
// MySQL configuration
if($_SERVER['HTTP_HOST'] == "localhost") {
$CONFIG['dbserver'] = 'localhost'; // Your database server
$CONFIG['dbuser'] = 'local_dbuser'; // Your mysql username
$CONFIG['dbpass'] = 'local_password'; // Your mysql password
$CONFIG['dbname'] = 'local_dbname; // Your mysql database name
}
else
{
$CONFIG['dbserver'] = 'remote_server; // Your database server
$CONFIG['dbuser'] = 'remote_username'; // Your mysql username
$CONFIG['dbpass'] = 'remote_password'; // Your mysql password
$CONFIG['dbname'] = 'remote_dbname'; // Your mysql database name
}
Hope this helps make your life a bit easier.
Jabi
-
Hey Jabi,
Thanks for such a detailed explanation, i got it now. I'll try to set up my Computer into a WebServer.
Really Apreciate :)
Cheers.
It doesn't get much easier than this -
xampp (http://www.apachefriends.org/en/xampp.html)
I run this on one of my partitions and it's really easy to setup and use. I was up and running in about 10 minutes. It's a whole package, mysql, perl, GD, got it all.
Edit: typo