The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. February 12, 2012, 04:28:04 PM

Login with username, password and session length


Pages: 1 [2] 3
  Print  
Author Topic: phpMyIDE 0.5a - Real Functionality. A First Look.  (Read 11909 times)
leden
n00b
*
Offline Offline

Posts: 8


View Profile
« Reply #15 on: September 27, 2008, 11:27:48 AM »

Hi perk

sorry, I hadn't noticed testinstall.php or buildsql.php.  I have now run both.  buildsql didn't return anything to the browser except
Code:
<pre></pre>
which probably means it ran without error (looking at the code).

testinstall.php seems to return most things in order (including mysqli_connect, and looking at php extensions php_mysqli does seem to be on), except for:
  • a quadruple (php) warning for "Call-time pass-by-reference has been deprecated" for "\source\class.webrequest2.php on line 343" (once) and "...line 487" (three times).
  • Testing Prompt Handler - Testing: Connection - Not Available

Which sort of suggests some sort of problem with my connection settings.  I had hard coded them into the config.php file as follows:
Code:
$connections[$ptr]['user'] = 'xxxxxx';
$connections[$ptr]['password'] = 'xxxxxx';
$connections[$ptr]['rootdb'] = 'xxxxxx';
$connections[$ptr]['phpmyadmin'] = 'http://localhost/phpmyadmin/';
I left the rest of config.php unchanged.

Any ideas?

Many thanks

Lee

User-specific info removed - dood, please don't EVER post your username and/or password, even if it's local. Very bad plan around here.
« Last Edit: September 27, 2008, 12:28:19 PM by perkiset » Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #16 on: September 27, 2008, 01:25:11 PM »

OK, looks like we're getting there.

The problem with every aspect of the command prompt is that "connection not available" jazz after the "Testing command prompt" message.

Again, the way that this part of the app works is by literally throwing web requests at itself to "pseudo-thread" the SQL statement responses. That means that the server needs to understand how to throw requests at itself - in other words, the DNS or web location needs to be equally understandable to your client machine as it is to the server where the software is running.

The portion of the config file that affects this is the first 5ish variables, $siteHost, $siteURL, $sitePort, $pmiDatabase and $pmiPrefix. The variables initially come set with nonsensical values, 42.phpMyIDE (which is actually a private reference to one of my servers) and therefore will not be pointing correctly for you.

Assuming you're running all of this on your local machine, then you'd need to modify those variables to something like this:
$siteHost = 'localhost';
$siteURL = '/';

By default, createsql.php creates the phpMyIDE tables in a database called, cleverly,  "phpmyide." The database where your tables go must already exist before you run the buildsql script - much like an install of WordPress or SMF. So let's say you had "ledendb" as your main database, you can use that for your phpmyide tables (in fact, this is a great way to do it), but you'd want a prefix on the tables so that they do not interfere with other tables in your DB. So you may consider changing these values to something like:
$pmiDatabase = 'ledendb';
$pmiPrefix = 'pmi_';

... in which case my tables would be "pmi_long_commands" and such. There are only 5 tables and they are small, so there's no real impact to your system by having them in the same location as your other tables.

With regards to the deprecation warnings, I've never heard that before and the lines it references are "return false" and "}" LOL ... and nothing really close that looks like something that would be deprecated... so if the above suggestions do not work, let's focus a bit more on that extraordinary symptom.

Good luck!

/perk
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
leden
n00b
*
Offline Offline

Posts: 8


View Profile
« Reply #17 on: September 27, 2008, 02:27:27 PM »

Now I'm really beginning to get it working...

I followed your advice and did the following:
Code:
$siteHost = 'localhost';
$pmiDatabase = 'myExistingDBname';
$pmiPrefix = 'pmi_';
($siteURL was already set to '/')

Then I reran buildsql.php and this time got a few lines of info telling me what it had managed successfully to build.

Now I can create and save stored procedures in phpMyIDE.

The command line is still giving me some trouble though.  The show commands work
Code:
SHOW TABLES
SHOW CREATE PROCEDURE showAllCustomers
are both OK.  But still no joy with SELECTs or with CALL showAllCustomers() (which of course only contains a SELECT at this early stage).  It is behaving differently from before.  Whereas previously it immediately returned a blank line and a new command-line prompt it now seems to freeze (the [Cancel] button will get its attention back).  Although SELECT * from customers could be dangerous, I only have 5 customers (and they are still completely ficticious), so I don't think I'm killing it with masses of data.

I guess I could just use the standard MySQL console, but would be nice to really do the whole thing in phpMyIDE.  It's a beautiful thing you've created...

Lee



Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #18 on: September 27, 2008, 03:13:01 PM »

What does testinstall.php tell you now? The issue of the server scripts being able to call itself still looks like the problem.

This looks like you're doing everything locally, so if that is the case, please post the exact URL that you use to access phpMyIDE from your browser, and your config.php (PLEASE OBSCURE USERNAMES AND PASSWORDS) so that I can see if it all looks copacetic.

You're really close. And BTW - I use select * from contacts all the time then, remembering that I don't need hundreds of thousands of rows, I'll select * from contacts limit 10 or something. The threading mechanism will start pushing data to you hard and fast - when this is working you'll see no delay. It looks like the MySQL client actually.

I have a couple ideas of what might be going on and I think we're right at the edge.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
leden
n00b
*
Offline Offline

Posts: 8


View Profile
« Reply #19 on: September 27, 2008, 03:36:58 PM »

I access it with http://localhost/phpMyIDE/ in Firefox 3

testinstall is still saying exactly the same (i.e. everything is OK except Testing Prompt Handler >> Testing: Connection>> Not Available, and the php deprecated warnings [by the way line 343 is if ($this->handleProxyRetry(&$keepTrying)) so it is relevant to 'Call-time pass-by-reference has been deprecated']) - let me know if you want it posted in its entirity

Here goes with config php
Code:
<?php

// These parameters are what configure the entirety of phpMyIDE.
// You may move this file to .config.php if you prefer.

/*
$siteHost
This variable is the domain of where <this> instance of phpMyIDE is 
to be found via a browser. It needs to be a completely qualified domain,
but nothing else. For example, if you want to go to 
http://www.mydomain.com/phpmyide/ 
for this instance, then the $siteHost variable would be "www.mydomain.com"
*/
$siteHost 'localhost';

/*
$siteURL
This variable is the URL path of where a browser will find <this>
instance of phpMyIDE. If you want to access phpMyIDE with the URL:
http://www.mydomain.com/phpmyide/
then the $siteURL variable should be '/phpmyide/'. If you are pointing
to the root of a domain like this:
http://www.mydomain.com/
then the $siteURL variable should simply be '/'
*/
$siteURL '/';

/* 
$sitePort
This variable should, in most instances, be left alone since more webservers
server web pages on port 80. If, however, you want to access phpMyIDE on another
port, then A) you know what the port number is and B) you'll know why to 
change this. Again, in most circumstances this should be left alone.
*/
$sitePort 80;

/*
$ajaxLog
If this variable is set to true the a tab will show up in the bottom area 
of the IDE called "Ajax Log" - this will display a verbose log of all
AJAX communications with the server for debugging. In most curcimstances,
this should be left as false for efficiency.
*/
$ajaxLog false;

/*
$pmiDatabase
$pmiPrefix
This variable is the database where phpMyIDE can find it's own tables. 
It can be any database, at all, and in the default configuration phpMyIDE
expects its own database. If you are using an existing database, then you
should set the $pmiPrefix variable to something like 'pmi_' so that tables
made for phpMyIDE will be separate from other tables in your database. In
the default configuration, phpMyIDE expects a database "phpmyide" and no
prefix for the table names.
*/
$pmiDatabase 'myExistingDB';
$pmiPrefix 'pmi_';

/* 
Connections
The $connections array contains all the information phpMyIDE needs to 
connect to databases and load up phpMyAdmin for you in the correct pane.
Add connections by creating another block of code like the one below,
from the $ptr++ line to the // ====== // line. 

['name']  This is the caption for the connection. It shows up at the top right
corner of the IDE as well as when you type "show connections"
['host'] This is the host address or name where the MySQL instance you are
connecting to is. In most cases you will connect to 127.0.0.1
(the local machine) for your primary connection.
['user'] This is your user name for MySQL login.
['password'] This is your MySQL password
['rootdb'] This is a database at <this MySQL instance> that you should
have pretty full privileges. This is the database that will be
used for testing the connection and privileges.
['phpmyadmin'] This is the full URL pointing to a phpMyAdmin instance for <this>
connection. It will be iFramed in a tab at the bottom of the IDE
and change as you change connections automatically.
['authname'] If your web server has a authentication scheme then you'll need 
['authpass'] to fill these two fields in. In most cases, or if you don't know
what I'm talking about then DONT FILL THEM IN. If, when you go
to connection to phpMyIDE you get a Windows or Mac dialog message
that asks you for your username and password, then these fields
must be filled in for the IDE to work correctly. This will only
present itself as a problem if you run a long command from the
command prompt like, "select * from atable." The testinstall.php
script will let you know if this is set up correctly.

An important thing to note is that the zeroth connection [0] is very important
to phpMyIDE. It's the place where the app will expect to find the tables that
phpMyIDE uses. 
*/

$ptr = -1// Leave this alone

$ptr++;
$connections[$ptr]['name'] = 'Primary Connection';
$connections[$ptr]['host'] = '127.0.0.1';
$connections[$ptr]['user'] = 'memyself';
$connections[$ptr]['password'] = 'mypwd';
$connections[$ptr]['rootdb'] = 'myExistingDB';
$connections[$ptr]['phpmyadmin'] = 'http://localhost/phpmyadmin/';
$connections[$ptr]['authname'] = '';         // NOTE I DID HAVE SOMETHING HERE (have now gone back to empty string, no difference)
$connections[$ptr]['authpass'] = '';           // NOTE I DID HAVE SOMETHING HERE (have now gone back to empty string, no difference)
// ==================================== //

/* Don't touch this one either... */
$GLOBALS['pmiDBPrefix'] = $pmiDBPrefix "$pmiDatabase.$pmiPrefix";

?>

Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #20 on: September 27, 2008, 03:55:07 PM »

OK Lee - let's try this.

Please create a new file in the directory where config.php is ... there should also be a file called apthread.php there. Call the file looptest.php.

In that file, please put this script and NOTHING outside of the <?php and ?> ie., no extraneous returns and such.

Code:
<?php

require "config.php";
require 
"source/class.webrequest2.php";

echo 
"<pre>";

$req = new webRequest2();
$req->domain $siteHost;
$req->url "$siteURL/apthread.php";
$req->addGetParam('testing'1);
$req->debugMode WRD_ECHO;
$req->dispatch();
echo 
$req->getContent();

?>


Using a browser, please hit this file (looptest.php) - it will come back with a lot of data. Mine looks like this:

Dispatch Starts
Method: GET
Built GET String: ?testing=1
FinalURL: //apthread.php?testing=1
Outbound Header:
GET //apthread.php?testing=1 HTTP/1.1
Host: 42.phpmyide
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/417.9 (KHTML, like Gecko) Safari/417.8
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding:
Accept-Charset: ISO-8859-1,utf-8:q=0.7,*;q=0.7
Connection: close

Content-Type: text/html
Content-Length: 0

Default beforeExecute()
Execute: Starts
Execute: HostStr=[42.phpmyide] Port:80
Execute: PHP5 or greater, setting timeout of 30
Execute: Sending request
Execute: Request Sent
GetChunk: Starts
GetChunk: Received 2276
GetChunk: Received 5
getChunk: Remote Timeout
processHeaders: Starts
processHeaders: Result Code is 200
processHeaders: Array Follows
Array
(
    [Date] => Sat, 27 Sep 2008 22:52:06 GMT
    [Server] => Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.8b PHP/5.2.1
    [X-Powered-By] => PHP/5.2.1
    [Connection] => close
    [Transfer-Encoding] => chunked
    [Content-Type] => text/html
)

processHeaders: Chunked Transfer - expected length is 2048
Execute: Successful Retrieve
postProcess: Content length is 2055
handleSuccess()
Default afterExecute()
Execute: Completes
OK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
0


... I expect that yours will be different. Please post it here for me.

Thanks!
/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
leden
n00b
*
Offline Offline

Posts: 8


View Profile
« Reply #21 on: September 28, 2008, 07:44:32 AM »

Here it is:

Code:
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\phpMyIDE\source\class.webrequest2.php on line 343

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\phpMyIDE\source\class.webrequest2.php on line 487

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\phpMyIDE\source\class.webrequest2.php on line 487

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in C:\wamp\www\phpMyIDE\source\class.webrequest2.php on line 487

Dispatch Starts
Method: GET
Built GET String: ?testing=1
FinalURL: //apthread.php?testing=1
Outbound Header:
GET //apthread.php?testing=1 HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/417.9 (KHTML, like Gecko) Safari/417.8
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding:
Accept-Charset: ISO-8859-1,utf-8:q=0.7,*;q=0.7
Connection: close

Content-Type: text/html
Content-Length: 0

Default beforeExecute()
Execute: Starts
Execute: HostStr=[localhost] Port:80
Execute: PHP5 or greater, setting timeout of 30
Execute: Sending request
Execute: Request Sent
GetChunk: Starts
GetChunk: Received 398
getChunk: Remote Timeout
processHeaders: Starts
processHeaders: Result Code is 404
processHeaders: Array Follows
Array
(
    [Date] => Sun, 28 Sep 2008 14:38:11 GMT
    [Server] => Apache/2.2.6 (Win32) PHP/5.2.5
    [Content-Length] => 210
    [Connection] => close
    [Content-Type] => text/html; charset=iso-8859-1
)

Execute: Successful Retrieve
postProcess: Content length is 210
handleSuccess()
Default afterExecute()
Execute: Completes




Not Found

The requested URL /apthread.php was not found on this server.


despite what it says there is a file called apthread.php in the same directory as the others.  The contents of that directory (which itself is at C:\wamp\www\phpMyIDE or http://localhost/phpMyIDE) are:

  • apthread.php
  • buildsql.php
  • config.php
  • current-connection
  • index.php
  • INSTALL
  • license.txt
  • main.php
  • README
  • testinstall.php
  • looptest.php
  • folder: graphics
  • folder: resources
  • folder: source
Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #22 on: September 28, 2008, 11:01:38 AM »

Good, thanks Lee.

As you can probably tell, this test uses your zeroth connection to try to throw a test request up against apthread, and your server does not see that file as existing - it doesn't mean that there's a problem with the file, it means that the server is somehow directing a request for the domain "localhost" into a directory on your server that you are not expecting. Why, exactly, I am not sure.

How, exactly, do you call phpMyIDE from your browser? is it http://localhost/ and that's it, or is there more to the url in your browser?

Another interesting test would be to change this line in the script:
$req->url = "$siteURL/apthread.php";
to this:
$req->url = $siteURL;


... this would ask for the index page associated with this "website" on your server. Let's see what you get back from that, because it may tell us where the server thinks it should be fulfilling the request for apthread.

Sorry you're having so much trouble,

/p

<edit>
I also noticed that this line:
$req->url = "$siteURL/apthread.php";
should not have had the / in it ... if should have read:
$req->url = "{$siteURL}apthread.php";
- please give that a try as well and let's see what we get. Although this is a very tiny difference (and Apache would ignore it, but it looks like you're on a Windows system) this MAY have caused a little trouble.
</edit>

« Last Edit: September 28, 2008, 11:04:48 AM by perkiset » Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
leden
n00b
*
Offline Offline

Posts: 8


View Profile
« Reply #23 on: September 28, 2008, 12:18:28 PM »

Hi perk

I first tried changing to
Code:
$req->url = "{$siteURL}apthread.php";
but that made no difference.  Then I tried
Code:
$req->url = $siteURL;
and the result looks more promising:
Code:
<b>Warning</b>:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in <b>C:\wamp\www\phpMyIDE\source\class.webrequest2.php</b> on line <b>343</b><br />
<br />
<b>Warning</b>:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in <b>C:\wamp\www\phpMyIDE\source\class.webrequest2.php</b> on line <b>487</b><br />
<br />

<b>Warning</b>:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in <b>C:\wamp\www\phpMyIDE\source\class.webrequest2.php</b> on line <b>487</b><br />
<br />
<b>Warning</b>:  Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in <b>C:\wamp\www\phpMyIDE\source\class.webrequest2.php</b> on line <b>487</b><br />
<pre>Dispatch Starts
Method: GET
Built GET String: ?testing=1
FinalURL: /?testing=1
Outbound Header:
GET /?testing=1 HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/417.9 (KHTML, like Gecko) Safari/417.8
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding:
Accept-Charset: ISO-8859-1,utf-8:q=0.7,*;q=0.7
Connection: close

Content-Type: text/html
Content-Length: 0

Default beforeExecute()
Execute: Starts
Execute: HostStr=[localhost] Port:80
Execute: PHP5 or greater, setting timeout of 30
Execute: Sending request
Execute: Request Sent
GetChunk: Starts
GetChunk: Received 1460
GetChunk: Received 1460
GetChunk: Received 1460
GetChunk: Received 68
getChunk: Remote Timeout
processHeaders: Starts
processHeaders: Result Code is 200
processHeaders: Array Follows
Array
(
    [Date] => Sun, 28 Sep 2008 19:04:30 GMT
    [Server] => Apache/2.2.6 (Win32) PHP/5.2.5
    [X-Powered-By] => PHP/5.2.5
    [Content-Length] => 4261
    [Connection] => close
    [Content-Type] => text/html
)

Execute: Successful Retrieve
postProcess: Content length is 4261
handleSuccess()
Default afterExecute()
Execute: Completes

Yes I am running under Windows (SP1) for my sins.  I run phpMyIDE with http://localhost/phpMyIDE/ in the address line in Firefox (and "installed"
by copying the contents of the zip to c:\wamp\www\phpMyIDE [c:\wamp\www\ is localhost for wamp server]).


Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #24 on: September 28, 2008, 12:32:34 PM »

Almost there.

The output shows that the loopback works, although it's pointing in the wrong place.

Then you finished the problem with your last sentence.

The $siteURL variable in your config.php needs to be '/phpMyIDE/' - that's the problem. The phpMyIDE program is looking for itself in / but it's actually residing in /phpmyide/ - so change your config to:

$siteURL = '/phpmyide/';

and you should be good to go. If testinstall.php complains, try 'phpmyide/' and '/phpmyide' as well, because I don't know how IIS will handle the URL.

You should then be able to select * from contacts and make yourself all happy and warm inside Wink

BTW, LOL @ "running under Windows SP1 for my sins" - nice
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
leden
n00b
*
Offline Offline

Posts: 8


View Profile
« Reply #25 on: September 28, 2008, 01:10:21 PM »

That's it perky!  It works...

Thank you for your help, and for phpMyIDE itself, which does indeed give me a happy and warm inside thing.

I'll try and replicate the installation on another Windows machine and see if I can write an idiot's guide to installing phpMyIDE in a hostile environment.

Have you talked to whoever owns the code at phpmyadmin about incorporating what you've done into their mainstream standard?  I think your work definitely deserves to be automatically included in all the server, xampp and wamp installations around the world.  Not sure how to make a business model for you out of it, but it would certainly get you well distributed.

(Then the only thing missing from phpmyadmin would be a nice GUI-based query builder for generating SQL graphically - I do know the syntax but still lazily create my joins in MS Access and copy-paste from there - that's two confessions in one night - you should become a priest...)
Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #26 on: September 28, 2008, 01:33:17 PM »

Most kind Leden, thank you.

I have not approached the phpMyAdmin folks yet because I don't feel that phpMyIDE is quite ready for prime time. It is my intention, however, to get to some of the authors in the next year and see what can be done between us. Have you set up phpMyIDE to incorporate phpMyAdmin in the tab? That is the way that I use it currently, and it's wonderful. Particularly with mutliple connections - by saying "use connection 4" in the command prompt, I'm instantly talking to another server and it moves phpMyAdmin for me as well. It's quite handy.

I have a solid ToDo list for phpMyIDE and am working through elements of the 0.6 version. Over the course of time, I think you'll see my package continue to be more of a typer's program than a GUI - it'll probably continue to look more like an old world IDE than a GUI helper for SQL n00bs. That said, the Stored Queries system will allow you to create queries with variable references that will be asked for before firing off the query - this is not done, but it'll look something like this:

Stored Query: select * from contacts where id=[%ContactID:integer]
Saved as "getContact"

Then when you're in the command prompt, you'll type "run getContact" and I'll present you with the question, "ContactID: " followed by a normal web input box - you type in "12345" or whatever, and I'll then execute "select * from contact where id=12345" for you. Of course this is a simplistic example, but I know it will really help me out on a lot of things.

Any help you can contribute is greatly appreciated, thanks man. And please don't let this be the end of our discourse - please post with questions and requests for future versions, that's what'll make this program better.

Cheers!
/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
leden
n00b
*
Offline Offline

Posts: 8


View Profile
« Reply #27 on: October 04, 2008, 07:14:56 AM »

These are the instructions how to install on a Windows machine running WAMP server with a mySQL database running on localhost.  (Perki - please correct anything I've got wrong)

1. Create folder in the wamp\www address:  c:\wamp\www\phpMyID\

2. Unzip the contents of the zip file into it.  You should have some files directly in c:\wamp\www\phpMyID\ and three sub-folders:
  • c:\wamp\www\phpMyID\graphics\
  • c:\wamp\www\phpMyID\resources\
  • c:\wamp\www\phpMyID\source\   - this one itself also contains a folder ..\fonts
each containing further files

3. Edit the file c:\wamp\www\phpMyID\config.php - change the following lines as follows:

$siteHost = 'localhost';
$siteURL = '/phpmyide/';
$pmiDatabase = 'myDBname';  // replace this with whatever your database is called
$pmiPrefix = 'pmi_';
$connections[$ptr]['user'] = 'myUserName';  // replace this with whatever username you use to connect to the database
$connections[$ptr]['password'] = 'myPassword';  // replace this with whatever password you use to connect to the database
$connections[$ptr]['rootdb'] = 'myDBname';   // replace this with whatever your database is called
$connections[$ptr]['phpmyadmin'] = 'http://localhost/phpmyadmin/';    // should be correct for wamp installations

You shouldn't need to change any other lines in the file.

4. Run buildsql.php - do this by opening a browser and typing http://localhost/phpMyIDE/buildsql.php into the address line

You should get a few rows notifying you that things have been built.

5. Run phpMyIDE by opening a browser and typing http://localhost/phpMyIDE/ into the address line

That's it.  I've just fresh installed on another Windows machine doing the above and it worked first time.

footnote : If anybody feels like writing a version of this how-to for a linux installation I would be genuinely interested in it - I got stuck with XAMPP trying to work out where to put my web-site to reference as a folder on localhost, or in other words what is the XAMPP equivalent of C:\wamp\www ?
« Last Edit: October 04, 2008, 07:25:07 AM by leden » Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Online Online

Posts: 9792



View Profile
« Reply #28 on: October 04, 2008, 11:50:19 AM »

Excellent Leden, looks good to me - thanks so much for the post!
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
shenys
n00b
*
Offline Offline

Posts: 2


View Profile
« Reply #29 on: November 18, 2008, 08:12:46 PM »

多个服务器环境,在phpmyadmin中切换以后,上面的“Script Explorer”没有改变,还是原来的库表,点击‘refresh’也没有切换到下面显示的库表结果,怎么办?详细看Attach。
谢谢!


* 11.gif (1384.08 KB, 912x518 - viewed 171 times.)
Logged

No links in signatures please
Pages: 1 [2] 3
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!