This topic is locked

Running PHP code

4/13/2005 9:27:45 AM
PHPRunner General questions
author

I'm trying out PHPRunner on my local machine which is running Apache server V2.0. On this local machine I have a test mySQL database called Orders.
I'm trying to generate a php page to allow me to add additional customers to this simple, three table (customers, orders, catalog) database.
I go through the entire process and I see all of the expected generated files in my htdocs folder under Apache.
When I type in localhost/client_add.php into my browser, I'm brought to a log in screen. I enter the hard coded test log in data and I get to a screen that looks like that below:
Logged as root Log out
--------------------------------------------------------------------------------

client

orders
Client and Orders are clickable, but when I select them, I get the following php error message:

+++++++++++++++++

PHP error happened
Technical information

Error type 2

Error description mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client

URL localhost/php/php.exe

Error file C:\Program Files\Apache Group\Apache2\htdocs\include\dbconnection.php

Error line 9

SQL query

++++++++++++++++++
This is probably elementary but I'm relatively new at this so any help would be appreciated. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=1321&image=1&table=forumtopics' class='bbc_emoticon' alt=':huh:' />
Thanks,

Peter

admin 4/14/2005

Peter,
MySQL 4.1 and later is not fully compatible with older clients.

The complete description of this issue can be found at

http://dev.mysql.com/doc/mysql/en/old-client.html
Following the instructions in this article is the only way to solve this problem

if you use PHP 4 or older.
If you use PHP 5 then you can just upgrade MySQL client library used by PHP.

To do that replace libmysql.dll file in your PHP installation folder and in C:\Windows\System32 folder with

the same file found in your MySQL installation. Usually it resides in C:\MySQL\bin

501166 5/6/2005

I too just downloaded the trial version of PHPRunner this evening. I went through the process to create a simple screen to maintain one of the tables in my database.
Everything appeared to ge well until I got to the screen that said that my "project was built successfully." However, the "View in Browser" button was disabled. I clicked on the link that offered to explain why it was disabled and discovered, to my shock and dismay, that I can only view through a local browser via Internet Information Server (IIS) or Personal Web Server.
I am using Apache 2.0.52, PHP 5.0.2, and mySQL 4.0.18-nt.
Is there any way that Apache2 is supported as a localhost?
It looks like a great product and I'm going to be real disappointed if I can't use it.
Thanks,

Roy Maul

admin 5/6/2005

roy,
PHPRunner supports Apache2 and any other Web server supported by PHP.
Automatic virtual directory creation is supported with IIS only. When using Apache you can create it manually or just do the following:

  1. Browse for any directory under Apache htdocs folder on Output directory tab in PHPRunner. I.e. create PHPRunner folder there.
  2. Build the project
  3. Open the following URL in browser
    http://localhost/PHPRunner/index.htm
    where PHPRunner is the name of folder you created

501167 5/6/2005

Thank you, Sergey. I was successful in getting things working with Apache2/PHP/mySQL.
I'm now experienceing the same problem Peter was dealing with. I copied the libmysql.dll file from C:\WebServ\mySQL\bin to C:\WebServ\php\dlls and \Windows\SYSTEM32. I still encountered the following mesage:

_

PHP error happened
Technical information

Error type 2

Error description mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client

URL localhost/crms/publicationslist.php

Error file C:\WebServ\wwwroot\htdocs\crms\include\dbconnection.php

Error line 9

SQL query


On further research I discovered that I have several versions of libmysql.dll.

  1. C:\WebServ\php 228KB 9/23/04 11:31am
  2. C:\WebServ\apache2\bin 228KB 7/13/04 8:00pm
  3. C:\WebServ\mySQL\bin 240KB 9/08/04 3:56pm
  4. C:\WebServ\mySQL\mysqladmin 916KB 6/04/04 12:03pm

    5: C:\WebServ\php\dlls 240KB 9/08/04 3:56am

    6: C:\My Downloads\php-5.0.4-Win32.zip contains one 1044KB dated 3/31/05 2:52am
    I would think they should all be the same but I'm really not sure which one I should use.
    Can you offer any help? I'm befuddled!
    Thanks,

    Roy

admin 5/10/2005

Hi,
as far as PHPRunner works you may take libmysql.dll file from C:\Program Files\PHPRunner and copy it here: C:\Windows\SYSTEM32.
To avoid confusion in future you can delete libmysql.dll file from these locations:

  1. C:\WebServ\php 228KB 9/23/04 11:31am
  2. C:\WebServ\apache2\bin 228KB 7/13/04 8:00pm
  3. C:\WebServ\mySQL\bin 240KB 9/08/04 3:56pm
  4. C:\WebServ\mySQL\mysqladmin 916KB 6/04/04 12:03pm

    5: C:\WebServ\php\dlls 240KB 9/08/04 3:56am
    or replace them by libmysql.dll file from C:\Program Files\PHPRunner too.