PDA

View Full Version : PHP Confusion!



sdmike
May 21st, 2007, 12:31 AM
I have a forum which I used PHPBB2 and I want to configure it. So what editor should I use for PHP and how am I able to make changes and visually SEE what I am doing?

Future thanks,
Mike

pbw
May 21st, 2007, 12:54 AM
vim is my editor of choice, so easy and saves alot of time compared to others. But there's many you could use.. kate, bluefish, nvu, gedit, nano (with php syntax highlighting enabled), etc etc, see what you like best.

And as for seeing the effects, just run phpbb locally to test your changes out before going live onsite. If you're unsure of your edits.

-- pbw

sdmike
May 21st, 2007, 12:59 AM
do I just drop all of my code into var/www/ ?

sdmike
May 21st, 2007, 01:10 AM
When I go to view my forum locally (http://localhost/forums/) I get this error "Fatal error: Call to undefined function mysql_connect() in /var/www/forums/db/mysql4.php on line 48"

pbw
May 21st, 2007, 01:10 AM
yeah, if that is where you set your apache document root at (which is default in ubuntu i believe).

pbw
May 21st, 2007, 01:13 AM
I'm assuming that you installed php and mysql correctly, created a database for your forum, imported and set the phpbb config to reflect that?

-- pbw

sdmike
May 21st, 2007, 01:13 AM
So where should I put it then?

pbw
May 21st, 2007, 01:22 AM
/var/www is default document root for ubuntu. Just make sure your mysql settings are correct and you'll be good to go.

sdmike
May 21st, 2007, 01:25 AM
I made a phpinfo.php file and it worked there. I put my websites fodler there and it worked.

But the forum doesn't work like my websites folder.

pbw
May 21st, 2007, 02:18 AM
Make sure your mysql is configured correctly, and your forums are connecting to your db and everything should be fine. I'm sure that's all it is.

kaptainlange
May 21st, 2007, 04:53 AM
"Fatal error: Call to undefined function mysql_connect() in /var/www/forums/db/mysql4.php on line 48"

That suggests the mysql lib for php isn't installed.

Did you do:

sudo apt-get install php5-mysql