Jump to content

dsartain

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dsartain's Achievements

Member

Member (2/5)

0

Reputation

  1. Make sure you've created a new path for PHPRC in the environment variables...look at the first couple of postings and you should see the value of PHPRC.
  2. One other thing, you have to create a new Environment Variable called PHPRC, see the php documentation to find the appropriate value, mine is "C:\php"  PHP documentation is located http://www.php.net/manual/en/  So you may want to ensure that you've followed all of the steps precisely. Also, if you haven't already, you need to make some modifications to IIS (or Apache) to run PHP as well, consult the php documentation for instructions on that as well. Let me know if you need anything else...
  3. Do you have the php.ini file in more than one place on your HD?  Have you added the directory where your php.ini file is located (i.e. C:\php) to your Windows Path??  If you installed PHP5, are you sure the directory isn't C:\php5 instead of C:\php??  If this doesn't help, please copy and paste your php.ini content as a quote so we can look at it...maybe something is commented out or something.
  4. [b][u]RESOLVED[/u][/b] Yet again...I had to reformat my hard drive and now I get to do all of this all over again... I'm getting a "Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\emerge\ContactList.php on line 134" again... php.ini is as follows... [quote] ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" ; ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" ; The root of the PHP pages, used only if nonempty. ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root ; if you are running php as a CGI under any web server (other than IIS) ; see documentation for security issues.  The alternate is to use the ; cgi.force_redirect configuration below doc_root =C:\inetpub\wwwroot\ ; The directory under which PHP opens the script using /~username used only ; if nonempty. user_dir = ; Directory in which the loadable extensions (modules) reside. extension_dir = C:\php\ext ; Whether or not to enable the dl() function.  The dl() function does NOT work ; properly in multithreaded servers, such as IIS or Zeus, and is automatically ; disabled on them. enable_dl = Off ;;;;;;;;;;;;;;;;;; ;dynamic extentions ;;;;;;;;;;;;;;;;;; extension=php_mysql.dll [MySQL] ; Allow or prevent persistent links. mysql.allow_persistent = On ; Maximum number of persistent links.  -1 means no limit. mysql.max_persistent = -1 ; Maximum number of links (persistent + non-persistent).  -1 means no limit. mysql.max_links = -1 ; Default port number for mysql_connect().  If unset, mysql_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look ; at MYSQL_PORT. mysql.default_port = ; Default socket name for local MySQL connects.  If empty, uses the built-in ; MySQL defaults. mysql.default_socket = ; Default host for mysql_connect() (doesn't apply in safe mode). mysql.default_host = localhost ; Default user for mysql_connect() (doesn't apply in safe mode). mysql.default_user =localhost ; Default password for mysql_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password") ; and reveal this password!  And of course, any users with read access to this ; file will be able to reveal the password as well. mysql.default_password =dsartain ; Maximum time (in secondes) for connect timeout. -1 means no limit mysql.connect_timeout = 5000 ; Trace mode. When trace_mode is active (=On), warnings for table/index scans and ; SQL-Errors will be displayed. mysql.trace_mode = Off [/quote] The php_mysql.dll and the libmysql.dll file is in the C:\php and C:\php\ext directories.  libmysql.dll is also in the C:\WINNT (running Win2K) directory.  I've restarted my IIS (version 4) server and still get the error...What am I missing??? Sorry to post this issue again... EDIT::I fixed this.  I hadn't added the PHPRC=C:\php to the environment variables for Win2K...thanks though...
  5. [quote]You need to setup the extension_dir to point to where your PHP extensions are loacted[/quote] Isn't that what "C:\PHP\ext" does?? And I'm using MySQL Server 5.0, so from my understanding I'm using the mysqli.dll file, so what do I need to do differently to call it?  I've tried both extension = "C:\PHP\ext\php_mysqli.dll" and extension = "C:\PHP\ext\php_mysql.dll", which is the way the php.ini came, only I deleted the semicolon and added the "i" in php_mysqli.dll when php_mysql.dll didn't work....
  6. Ok, I fixed the problem making the screen come up blank.  I didn't have short tags enabled (IE: had to use <?php instead of <?) Now I'm getting the following error: Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\PHP\database.php on line 28 I know the code is right because it worked on a different server, but somehow PHP isn't talking to MySQL...I've set the extension_dir = "C:\PHP\ext" and extension="C:\PHP\ext\php_mysqli.dll" MySQL section of PHP.ini is as follows: [MySQLi] ; Maximum number of links.  -1 means no limit. mysqli.max_links = -1 ; Default port number for mysqli_connect().  If unset, mysqli_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look ; at MYSQL_PORT. mysqli.default_port = 3306 ; Default socket name for local MySQL connects.  If empty, uses the built-in ; MySQL defaults. mysqli.default_socket = ; Default host for mysql_connect() (doesn't apply in safe mode). mysqli.default_host = localhost ; Default user for mysql_connect() (doesn't apply in safe mode). mysqli.default_user = dsartain ; Default password for mysqli_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") ; and reveal this password!  And of course, any users with read access to this ; file will be able to reveal the password as well. mysqli.default_pw = ; Allow or prevent reconnect mysqli.reconnect = On PHP/MySQL Connection Code is below: [code] $dbconn = mysql_connect("localhost","dsartain","marines"); mysql_select_db("test2",$dbconn); $query = "INSERT INTO `contacts` VALUES('$firstname','$lastname','$address','$apt','$city','$state','$zip','$email','$phone1_type','$phone1','$phone2_type','$phone2')"; $runquery = mysql_query($query,$dbconn); [/code] PHP works fine in and of itself, same thing for MySQL.  They just don't talk to each other...any ideas??
  7. Ok, I've followed the directions to the T..I think.  I've modified the PHP.ini file to call for the extensions dir and php_mysql.dll...libmysql.dll is in the winnt directory (I'm running Win2K).  PHP runs by itself just fine.  MySQL runs by itself just fine.  Whenever I try to insert data in a DB via PHP, the web page comes up blank...it shouldn't do that...any ideas??
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.