From: Bailey, K. <kev...@me...> - 2002-12-23 06:29:13
|
Thanks for the help on this. The error was all mine. My unzipper was not preserving the directory structure on the extract. The tool is working great. Now I need to figure out how to do a style sheets. Thanks -----Original Message----- From: Dave Patton To: php...@li... Sent: 12/22/2002 10:24 AM Subject: Re: [PHPMyEdit-Discuss] Installation question At 01:03 PM 2002-12-19, Bailey, Kevin wrote: >I really like the looks of the phpMyEdit tool and I'm excited to start >using it but I am having problems getting it going. I'm sorry if this has >already been answered on the list but apparently the archive is not >available for me to look through now. > >Problem > I am trying to use this tool to point to a database on a web server. > The problem I have is that it only displays the field names listed > down the left side of the screen with an empty text box next to it. > The title is shown at the top and an apply button is at the bottom > with a couple of other small unmarked buttons. A number of milliseconds > is shown at the very bottom. I don't get any error messages. I have > tried versions 5.0, 5.1 and 5.2 all with similar results. Sounds like you maybe didn't do the installation properly. Here a posting I made to the list on November 21st. In particular, your problem sounds like the problem mentioned in step 2.2.15. ----------------------------------------------------------------- I have written a new and more complete set of installation instructions for use with phpMyEdit 5.1, which I'm including below. They are intended to replace section 2 of the Readme file. Let me know if you have any comments/corrections/additions. Note that these will need to be revised for new phpMyEdit versions. For example, the CVS version has already fixed the problem with the "require_once" outlined in step 2.2.9. In a subsequent email I'll outline some suggestions I have that should make the install a bit easier. ====================================================================== phpMyEdit 5.1 ------------- 2. Installation Two types of installation are documented - Basic and Custom. If you are using phpMyEdit for the first time, it is suggested to do a Basic installation. Once you have confirmed that phpMyEdit is working properly in your environment, you may then wish to do a Custom installation. If you do a Custom installation and have problems getting phpMyEdit to work properly, please do a Basic installation first to confirm whether the problem is being caused by something you have done in your Custom installation. Please read both the Basic and Custom installation documentation before asking "why doesn't phpMyEdit work on my system". 2.1 Basic Installation Definitions: - local system: location where you have downloaded the phpMyEdit distibution archive - server: webserver where you wish to install phpMyEdit 2.1.1 Download the phpMyEdit distribution archive to your local system. 2.1.2 Extract the phpMyEdit distribution archive on your local system. 2.1.3 Copy all the phpMyEdit files/directories to your server, maintaining the directory structure. 2.1.4 Using a browser, run phpMyEditSetup.php, and enter: - the name(Hostname) of your MySQL server - the MySQL account name(Username) to be used to login to the MySQl server - the password for the MySQL account Note that the values supplied for these fields are the default values used by the generated table editing program, so the default is that the generated program will be using an account that has the MySQL user rights associated with this account. 2.1.5 All available databases will be listed. Select the one you want by clicking the radio button next to its name, then clicking on the "Submit" button at the bottom of the page. 2.1.6 All tables in the selected databases will be listed. Select the one you want by clicking the radio button next to its name, then clicking on the "Submit" button at the bottom of the page. 2.1.7 Follow the instructions on the page to select an 'identifier' field from the table(used for Changes and Deletes). 2.1.8 Fill in a 'Page Title', which will be used by the generated table editing program. 2.1.9 Fill in a name(Base Filename) to be used for the generated program's name. Avoid using characters that may cause problems in your server's filesystem, such as spaces and punctuation. 2.1.10 After you click on "Submit", the phpMyEditSetup.php script will display a 'results page': - the top part of the page shows the name of the file that was used, and whether or not phpMyEditSetup.php was able to write the generated table editing program to that file - the contents of the generated program are listed, whether or not the file creation succeeded - if the file creation failed, copy the generated program listing into your PHP editor, save it to a file, and then copy it to your server, into the same directory as the phpMyEdit.class.php file 2.1.11 Using a browser, run the generated table editing PHP script and confirm it is working properly in your server environment. 2.2 Custom Installation Definitions: - local system: location where you have downloaded the phpMyEdit distibution archive - server: webserver where you wish to install phpMyEdit - setupdir: directory on the server which will contain phpMyEditSetup.php - includedir: directory on the server which will be used by PHP to include phpMyEdit files when scripts use "require" or "include" - scriptdir: directory on the server which will contain the scripts generated by phpMyEditSetup.php Some of the steps listed in this section refer to modifications to the PHP code in some phpMyEdit files. There are additional modifications that are possible in these files, and in the generated PHP scripts, but these are not required for the installation described below. 2.2.1 Download the phpMyEdit distribution archive to your local system. 2.2.2 Extract the phpMyEdit distribution archive on your local system. 2.2.3 When using phpMyEditSetup.php, to avoid sending the MySQL account name and password over the internet, find the following lines in phpMyEditSetup.php: $submit = $HTTP_POST_VARS['submit']; $hn = $HTTP_POST_VARS['hn']; $un = $HTTP_POST_VARS['un']; $pw = $HTTP_POST_VARS['pw']; and change them to specify the vales for your MySQL host, MySQL account name, and account password, and to simulate having clicked on the "Submit" button. For example: $submit = 'submit'; $hn = 'mysql.mycompany.com'; $un = 'username'; $pw = 'password'; This will cause the script to start at the database selection page, and prevent sending the username/password over the net. 2.2.4 If you are only going to be using phpMyEdit with the tables in one database, then in phpMyEditSetup.php you can specify the database: $db = 'mydatabase'; Coupled with 2.2.3, this will cause the script to start at the table selection page. 2.2.5 To have phpMyEditSetup.php generate scripts in 'scriptdir' rather than in 'setupdir', change the following line: $inclDir = '.'; to something like: $inclDir = '../scriptdir'; Do not include a trailing slash(/). Your webserver process will need write permission to this directory for phpMyEditSetup.php to be able to save the generated table editing program to a file. 2.2.6 Unless you are going to make your own modifications to phpMyEditSetup.php, don't bother changing the following lines, as they are not used in version 5.1: $phpExtension = '.phtml'; $phpExtension = '.php'; $destDir = '.'; $headerFile = 'SiteHeader.inc'; $footerFile = 'SiteFooter.inc'; 2.2.7 It is suggested that you make use of an "include file" to contain the MySQL hostname, account, and password that will be used by the scripts generated by phpMyEditSetup.php. Aside from issues of site maintainability and security, this is also a good idea because by default phpMyEditSetup.php displays the generated script contents on a webpage, which means that without this change, the username/password will be sent over the net when you run phpMyEditSetup.php. In phpMyEditSetup.php find the following lines: /* NOTE: coder is strongly urged to remove the hn, un, pw lines from here and set values in PME_site_defaults.inc require "PME_site_defaults.inc"; */ ' $opts["hn"] = "'.$hn.'"; $opts["un"] = "'.$un.'"; $opts["pw"] = "'.$pw.'"; Change these to read: /* NOTE: coder is strongly urged to remove the hn, un, pw lines from here and set values in PME_site_defaults.inc $opts["hn"] = "'.$hn.'"; $opts["un"] = "'.$un.'"; $opts["pw"] = "'.$pw.'"; */ ' require "PME_site_defaults.inc"; Do not remove the single quote on the line by itself. 2.2.8 If you are going to do step 2.2.7, you will need to create a "PME_site_defaults.inc" file, with the following content: $opts['hn'] = "mysql.mycompany.com"; $opts['un'] = "username"; $opts['pw'] = "password"; 2.2.9 The 5.1 version of the phpMyEdit.class.php file requires there to be a "timer.class" file in the same directory. The use of the 'timer' is controlled by the setting of $opts['display']['time'] in the generated scripts, and defaults to false. If you do not want to use the timer(it displays the time for each operation at the bottom of the page, like "78.024 milliseconds"), and you do not wish to have the "timer.class" file on your server, edit phpMyEdit.class.php and find the following line: if (@require_once dirname(__FILE__).'/timer.class') { and change it to: if (@include_once dirname(__FILE__).'/timer.class') { If you do not do this, and you do not have a "timer.class" file, then your generated scripts will fail to produce any output, without generating any error messages. 2.2.10 If it doesn't already exisit on the server, create 'setupdir'. The minimum permissions needed for the directory are those to enable you to use your browser to run phpMyEditSetup.php. If you have not made the change outlined in 2.2.5, then your webserver process will need write permission to this directory for phpMyEditSetup.php to be able to save the generated program to a file. 2.2.11 If it doesn't already exisit on the server, create 'includedir'. The minimum permissions needed for the directory are those to enable the webserver process running the generated scripts to be able to include files such as phpMyEdit.class.php and PME_site_defaults.inc. 2.2.12 If it doesn't already exisit on the server, create 'scriptdir'. The minimum permissions needed for the directory are those to enable the webserver process to run the generated scripts. If you have made the change outlined in 2.2.5, then your webserver process will need write permission to this directory for phpMyEditSetup.php to be able to save the generated program to a file. 2.2.13 Copy the following files from the local system to the server's 'setupdir': phpMyEditSetup.php 2.2.14 Copy the following files from the local system to the server's 'includedir': phpMyEdit.class.php timer.class (see 2.2.9) PME_site_defaults.inc (see 2.2.7 and 2.2.8) 2.2.15 In 'includedir' create a subdirectory called 'lang'. Copy the following file from the local system to the server's 'includedir/lang' directory: PME.lang.EN-US.inc You may wish to also copy the other supplied language files. If the phpMyEdit.class.php file cannot include any language file(the default is PME.lang.EN-US.inc), then the generated table editing scripts will not work(you will get a webpage with a table having two columns, "Field" and "Value", and no data from the table). 2.2.16 If you are going to use the "graphic links" navigation style in your table editing scripts(controlled by $opts['navigation']), then in 'scriptdir' create a subdirectory called 'images', and copy the following files from the local system to the server's 'scriptdir/images' directory: pme-change.png pme-copy.png pme-delete.png pme-view.png If using FTP to do the copying, make sure to use 'binary' mode. 2.2.17 Using a browser, run phpMyEditSetup.php. If you implemented step 2.2.4, go to step 2.2.18. If you did not do step 2.2.4 it will start at the page listing the available databases. Select the one you want by clicking the radio button next to its name, then clicking on the "Submit" button at the bottom of the page. 2.2.18 All tables in the selected databases will be listed. Select the one you want by clicking the radio button next to its name, then clicking on the "Submit" button at the bottom of the page. 2.2.19 Follow the instructions on the page to select an 'identifier' field from the table(used for Changes and Deletes). 2.2.20 Fill in a 'Page Title', which will be used by the generated table editing program. 2.2.21 Fill in a name(Base Filename) to be used for the generated program's name. Avoid using characters that may cause problems in your server's filesystem, such as spaces and punctuation. 2.2.22 After you click on "Submit", the phpMyEditSetup.php script will display a 'results page': - the top part of the page shows the name of the file that was used, and whether or not phpMyEditSetup.php was able to write the generated table editing program to that file, which would be in 'scriptdir' - the contents of the generated program are listed, whether or not the file creation succeeded - if the file creation failed, copy the generated program listing into your PHP editor, save it to a file, and then copy it to your server, into the 'scriptdir' directory 2.2.23 Using a browser, run the generated table editing PHP script and confirm it is working properly in your server environment. ======================================================================== ===== ----------- Dave Patton CIS Canadian Information Systems Vancouver, B.C. dav...@sh... ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Phpmyedit-discuss mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phpmyedit-discuss |