Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 15th, 2000, 07:16 AM
awayand awayand is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 1 awayand User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I installed php4 and mysql on my linux box. I ran a simple "phpinfo()"-script, and it worked just fine. The phpinfo gives me the following info:
MySQL Support - enabled
Active Persistent Links - 0
Active Links - 0
Client API version - 3.23.10-alpha
mysql_include -
mysql_lflags -
mysql_libs -

Then I try using php to connect simply to my mySQL server which is working fine:

mysql_connect(127.0.0.1, root, sql);

However, I get the following error in my browser:
Parse error: parse error in /home/httpd/file.php on line 5

I assume that is because php doesn't have a clue what 'mysql_connect' means. I don't know how to 'teach' php that syntax or where to look it up. I'm suspecting it has something to do with the 3 empty:
mysql_include -
mysql_lflags -
mysql_libs -
lines in my phpinfo() result, which should probably point to some directory. Can anyone help me? I'd really appreciate it.

Reply With Quote
  #2  
Old October 15th, 2000, 01:47 PM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
No, it means you did something wrong. You need quotes around the arguments to the function.

Reply With Quote
  #3  
Old October 18th, 2000, 04:44 AM
paul gadsdon paul gadsdon is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 13 paul gadsdon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The fact that you got a PHP error means that PHP is working, have a look at your code

Paul

Reply With Quote
  #4  
Old October 18th, 2000, 08:41 AM
Hartmann's Avatar
Hartmann Hartmann is offline
chown python:users\ /world
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Texas Tech
Posts: 95 Hartmann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Your code should look like this = mysql_connect("localhost","username","password");

------------------
Hartmann

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > mysql and php not working

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap