Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #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: 12
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: 8
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


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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

IBM Developerworks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway