corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » PHP database connection help!


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author PHP database connection help!
Planty02
Member

Registered: 5th Mar 05
Location: Burslem, Stoke-on-Trent
User status: Offline
9th Sep 06 at 10:26   View User's Profile U2U Member Reply With Quote

Hi people,

I need to be able to connect to an Access database that is on a web server using PHP and cant get it to work. The error message im getting says its trying to use an non-object (or something along those lines). can anyone help me out a little?

Also the server has PHP 4.4, should i update this, and how is it done.

Thanks guys
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
9th Sep 06 at 10:27   View Garage View User's Profile U2U Member Reply With Quote

for an accesss database you will need to create an ODBC datasource and give it a name, have you not considered using SQL? far better
Planty02
Member

Registered: 5th Mar 05
Location: Burslem, Stoke-on-Trent
User status: Offline
9th Sep 06 at 10:33   View User's Profile U2U Member Reply With Quote

I have thought about it but wasnt sure how to go about it - i have never set the server side of things up before (this is my uni placement year)
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
9th Sep 06 at 10:39   View Garage View User's Profile U2U Member Reply With Quote

its probably easier to setup than an access db, just install mysql and create a new instance in it, its quite straightforward and all GUI based

download mysql and have a play
Planty02
Member

Registered: 5th Mar 05
Location: Burslem, Stoke-on-Trent
User status: Offline
9th Sep 06 at 10:44   View User's Profile U2U Member Reply With Quote

ok thanks

How easy/difficult would it be to set my home machine up to run PHP/mysql? - would it need to be a web server or could i simply run the files locally just for testing purposes

[Edited on 09-09-2006 by Planty02]
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
9th Sep 06 at 10:58   View Garage View User's Profile U2U Member Reply With Quote

you will need apache, php, or which is probably easier is an all in solution like xampp
Planty02
Member

Registered: 5th Mar 05
Location: Burslem, Stoke-on-Trent
User status: Offline
9th Sep 06 at 11:01   View User's Profile U2U Member Reply With Quote

ok thanks - ill have a crack at it today
AndyKent
Member

Registered: 3rd Sep 05
User status: Offline
9th Sep 06 at 12:18   View User's Profile U2U Member Reply With Quote

I've got a home development machine at home here. Currently running Apache 1.3.35 with PHP 5.1 and MySQL Server 5.0.

It took me a while to set it up but follow the installation instructions you should be fine.

See http://www.php.net, http://www.apache.org and http://www.mysql.com for the latest downloads

edit - fixed link

[Edited on 09-09-2006 by aPk]
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
9th Sep 06 at 12:22   View Garage View User's Profile U2U Member Reply With Quote

just download xampp it has apache php and mysql all inbuilt in the package, it sets it up all for you
AndyKent
Member

Registered: 3rd Sep 05
User status: Offline
9th Sep 06 at 12:25   View User's Profile U2U Member Reply With Quote

I saw that but decided to go for the challenge of installing everything seperately - is much easier to use an all in one installer as above - I'd recommend Steve's link over mine unless you'd like a bit of a challenge!
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
9th Sep 06 at 12:32   View Garage View User's Profile U2U Member Reply With Quote

yes if its only for testing then all in one is fine, if your doing full on hosting, better to install all the bits seperatly to allow full customisation
Planty02
Member

Registered: 5th Mar 05
Location: Burslem, Stoke-on-Trent
User status: Offline
9th Sep 06 at 12:40   View User's Profile U2U Member Reply With Quote

ive got an all in one set up on my home machine but i think ill try install them seperately at work as it will be for full on hosting of a web application

thanks for all the help guys
drax
Member

Registered: 5th Feb 05
Location: Sittingbourne, Kent
User status: Offline
9th Sep 06 at 12:56   View User's Profile U2U Member Reply With Quote

get WAMP its very cool stuff
Planty02
Member

Registered: 5th Mar 05
Location: Burslem, Stoke-on-Trent
User status: Offline
10th Sep 06 at 21:51   View User's Profile U2U Member Reply With Quote

Cheers for all the help guys

Will give a few things a try tommorow at work, main prioroty is to get a mysql database up and password protected

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
car insurance set to rise by £60? mk4_astra General Chat 5 1314
26th Jan 04 at 20:15
by Nath
 
Writing a PHP forum from scratch James Geek Day 8 948
2nd Nov 05 at 23:40
by Ian
 
Rear Headrest Ajones_17 Help Zone, Modification and ICE Advice 8 647
6th Dec 05 at 13:25
by N90ATH
 
VPN security issues Melville Geek Day 3 961
14th Feb 06 at 17:00
by Tim
 
Software for ordering (for business) Bart Geek Day 6 1052
13th Apr 06 at 15:12
by Bart
 

Corsa Sport » Message Board » Off Day » Geek Day » PHP database connection help! 28 database queries in 0.0166490 seconds