phpMyEdit


 

PhpMyEdit generates PHP code for displaying/editing MySQL tables in HTML. All you need to do is to write a simple calling program (a utility to do this is included). It includes a huge set of table manipulation functions (record adition, change, view, copy, and remove), table sorting, filtering, table lookups, and more. (quote from the phpMyEdit homepage).

phpMyEdit is released under the GNU GPL license.

phpMyEditWikka


The phpMyEdit package has been modified to work seamlessly from within the Wikka environment. The modified package will be referrered to as phpMyEditWikka. If you are familiar with phpMyEdit, you'll be at home with phpMyEditWikka. The functionality is the same, but there have been some 'tweaks' to make it Wikka friendly (see 'Tech Notes' below for the list of modifications).

Download
phpMyEdit-for-Wikka.version1.tar.gz

Usage



http://wikka.jsnx.com/images/phpMyEditInstructions/phpMyEditWikka-file-upload.JPG


You should see this...

http://wikka.jsnx.com/images/phpMyEditInstructions/phpMyEditWikka-setup-login.gif


http://wikka.jsnx.com/images/phpMyEditInstructions/phpMyEditWikka-setup-selectdb.gif


http://wikka.jsnx.com/images/phpMyEditInstructions/phpMyEditWikka-setup-selecttable.gif


http://wikka.jsnx.com/images/phpMyEditInstructions/phpMyEditWikka-setup-selectid.gif


http://wikka.jsnx.com/images/phpMyEditInstructions/phpMyEditWikka-setup-selectoptions.gif


http://wikka.jsnx.com/images/phpMyEditInstructions/phpMyEditWikka-setup-note-filename.gif

http://wikka.jsnx.com/images/phpMyEditInstructions/phpMyEditWikka-page-action.JPG


http://wikka.jsnx.com/images/phpMyEditInstructions/phpMyEditWikka-page-final.JPG


In closing...


Where do you go from here? Download and read the phpMyEdit documentation. The action file that was created for you is a starting point. The majority of the configuration can be done by editing the action file, but for advanced functionality read about triggers. You will need to create the trigger files manually.

I've been using phpMyEditWikka for about a month in a small production environment. I'm fairly confident that the bugs have been worked through.

This package has been a useful addition to my Wikka site. I hope you will find it useful too. Best wishes. -- JsnX, 26 March 2005




Tech Notes: Modifications from the official phpMyEdit distribution


Setup file tweaks

Class file tweaks








CategoryUserContributions
Comments
Comment by NilsLindenberg
2005-03-29 14:57:09
Nice work.
Comment by JavaWoman
2005-04-05 11:06:07
1.
"By default phpMyEdit allows everyone full access to MySQL tables, including deleting records. I find this to be a bit of a security risk."

I don't understand this - which (database) user is used to access the database? Surely security requires that an application uses a database user that only has the necessary permissions and nothing more. If registered users really need delete access (really??) the application should use a DB user that allows this.

The access control used is not clear to me. There is 1) access to the database (determined by which DB user is used by the application) and 2) access to the application (determined by ???). If for instance registered users should have no delete privileges then the *application* should take care it uses a DB user that does not have such privileges. The DB administrator should take care the necessary users with (limited) privileges are defined for the database.

Since access control is not clear to me I suspect there is a (possibly big) security hole here.

2.
"Class file tweaks"
Should never be needed - subclass!
Comment by GregorLindner
2005-04-25 08:50:30
It seems this version only works with Wikka in rewrite mode.

In my installation the result of klicking on a column title is something like:

http://MyDomain/wikka.php?wakka=WikkaPage?fm=0&fl=0&qfn=&sfn[0]=2&sfn[1]=0&sfn[2]=1

and thus results in nothing...
Comment by GregorLindner
2005-04-25 09:55:32
now i found the problem, but am unable to correct it:
it should be "wakka=WikkaPage&fm=0&fl=......." instead of "wakka=WikkaPage?fm=0&fl=........."
Can anybody more familiar with the phpcode solve this?
Comment by TimoK
2005-04-25 10:45:13
I don't have this installed, but after a quick look at the code I'd say you need to change it in line 1822 of phpMyEdit.class.php (change from
echo htmlspecialchars($this->page_name.'?fm=0&fl='.$this->fl
to
echo htmlspecialchars($this->page_name.'&fm=0&fl='.$this->fl
You might have to run the 'setup' of your action again.
Comment by JavaWoman
2005-04-26 15:50:52
The code should "detect" whether the URL already has a question mark; if so - use & (&) to append the parameters, otherwise use ?.
But using POST instead of GET should avoid that completely (and result in less ugly URLs).
Comment by RyNess
2006-04-12 17:09:54
i can't get this to work. i copied to the correct location but i get "403 You don't have permission to access /3rdparty/plugins/phpMyEdit/phpMyEditSetup.php on this server." Folder perms look fine via chmod.... ?
Comment by DomBonj
2006-09-15 16:18:00
I got an error in a configuration where the target database's host, login and pwd are the same as for the wikka database.
The fix I found for phpMyEdit.class.php is:
replace lines 2747-2748:
if ($this->dbh = @mysql_connect($this->hn, $this->un, $this->pw)) {
mysql_select_db($this->db);
with:
if ($this->dbh = @mysql_connect($this->hn, $this->un, $this->pw, true)) {
mysql_select_db($this->db, $this->dbh);

Otherwise, I was impressed how simple and fast it was to install and run. Deserves to end up in the mainstream distribution.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki