Jump to content
The Uniform Server Community

phpglossar_0.8 - configuring uniserver correctly.


newbie2linux
 Share

Recommended Posts

I have done a quick Goggle for this program it would appear you are not the only one with this problem. I would have downloaded the program to test but was faced with a German site so I was completely lost.

 

Uni Server is working correctly because you were able to create the database. I scanned over one of the links and my instant reaction is they look wrong!

 

http://localhost/phpglossar_0.8/phpglossar...p?menue_do=show

 

I could be wrong but if there is nothing in the first phpglossar_0.8 folder other than the second (phpglossar_0.8 folder) then I think it has been installed incorrectely.

 

If you could supply a download link I will give it a bash. I saw mentioned that 0.8 is still beta this could be the problem.

 

:)

Link to comment
Share on other sites

Hi,

 

I'm a newbie to php, MySQL and Uniserver and think that the latter is a great package.

 

I want to put together a 'hobbyist level' web-site running on a home-brew web-server rather than via a paid for web-host and am trying to get a PHP download called phpglossar_0.8 to work however am failing dismally to do so.

 

I've tried another WAMP package and came across the same problem as i'm experiencing with Uniserver (however Uniserver is the only download that worked with php scripts immediately without any configuration being required).

 

I've entered the following details for the connect.php file (the only file that needs to be amended in order for phpglossar_0.8 to work to the best of my knowledge):

 

// DATABASE - PARAMETER

//-----------------------

 

// MySQL server hostname

$dbhost = "localhost";

 

// MySQL server username

$dbuser = "root";

 

// MySQL server password

$dbpasswd = "root";

 

// MySQL server connect - DON´T CHANGE THIS!

$db=mysql_connect("$dbhost","$dbuser","$dbpasswd");

 

// MySQL database name

$db_name="phpglossar";

 

A database named phpglossar has been created via phpMyAdmin however the following URLs do not appear to be working:

 

Show Entries:

http://localhost/phpglossar_0.8/phpglossar...p?menue_do=show

 

Add Entry:

http://localhost/phpglossar_0.8/phpglossar...hp?menue_do=add

 

Modify entry:

http://localhost/phpglossar_0.8/phpglossar...menue_do=change

 

Delete Entry:

http://localhost/phpglossar_0.8/phpglossar...menue_do=delete

 

Clicking on these URLs refreshes the index.php page only.

 

FTP'ing phpglossar_0.8 to a remote server to check whether or not the above details are configured correctly has confirmed that the PHP Glossary works so i'm stuck for ideas as to why phpglossar_0.8 fails to work locally. I've tried to get this to work under both Windows and OS X. The same problems are experienced on both operating systems.

 

Is there a possibility that file permissions need to be set in order for the above URLs to work?.

 

The installation code that creates the database 'phpglossar' works so I can only guess that the host name: localhost, username: root, password: root and database name: phpglossar are correct.

 

Are there any preliminary checks that should be made immediately upon installing Uniserver that i've not checked?.

 

Any suggestions would be appreciated.

Thank you.

Link to comment
Share on other sites

I could not leave this one alone. Managed to download the script.

 

Well since you are seeing the menu selections and have no problems with the database you must have got the file structure correctly in place should look like this:

 

UniServer3_3\Uniform Server\diskw\www\phpglossar_0.8\

UniServer3_3\Uniform Server\diskw\www\phpglossar_0.8\admin\

UniServer3_3\Uniform Server\diskw\www\phpglossar_0.8\admin\inc

 

The links when hovered over should be like this:

 

http://localhost/phpglossar_0.8/admin/inde...p?menue_do=show

http://localhost/phpglossar_0.8/admin/index.php?menue_do=add

 

As you have found the links do not work you need to open the file index.php located in folder

 

\UniServer3_3\Uniform Server\diskw\www\phpglossar_0.8\admin

 

Change the code from this:

 

if ($menue_do "") {

 

$do = "inc/";

$do .= $menue_do;

$do .= ".php";

}else{

 

To this:

 

$menue_do = $_GET['menue_do'];

 

if ($menue_do != "") {

 

$do = "inc/";

$do .= $menue_do;

$do .= ".php";

}else{

 

You will now find the links work.

Like I said 0.8 is still beta and contains this small error the rest appears to work OK although I have not tested it.

 

All the best

 

:)

Link to comment
Share on other sites

Hi Ric,

 

Apologies for not responding sooner. Didn't realise that you'd replied to the thread that i'd posted on 3rd Nov until early this evening (Mon 6th Nov).

 

Thank you for checking this problem out. Much appreciated. Apologies for not providing a link for phpglossar_0.8 (i'm glad that you'd found a download site anyway).

 

I'll amend the lines of code that you've suggested are modified and post back on this forum with my findings. Hopefully the PHP script will work as you seem to have thoroughly tested it your end.

 

Any idea's why phpglossar_0.8 works on a remote server and does not work locally using Uniform Server (nor XAMPP or MAMP come to that)?.

 

Thank you again. It's a shame that the author doesn't seem to want to respond to queries by e-mail. E-mailed on many many occasions and never received a response.

 

Keep up the good work.

Kind Regards.

Link to comment
Share on other sites

I gave the script a road test to see what it does, only to discover not a great deal. I bashed it a little more these are the changes I made. To give you a clue I have posted the relevant pieces of code the changes are obvious when compared to the original. I have add $_GET, $_POST and changed the compare in most places.

 

1)\www\phpglossar_0.8\admin\index.php

 

$menue_do = $_GET['menue_do'];

 

if ($menue_do != "") {

 

$do = "inc/";

$do .= $menue_do;

$do .= ".php";

 

 

 

2) add_action.php

 

<?php

 

require("../connect.php");

 

$word = $_POST['word'];

$definition = $_POST['definition'];

//Fixes Input-Bugs for the Word

 

3) change_action.php

 

<?php

$uid = $_GET['uid'];

$result = mysql($db_name,"select * from $table where uid='$uid'");

 

4) delete_action.php

 

<?php

$uid = $_GET['uid'];

//Deletes Newsentry from Database

 

5)show_action.php

 

<?php

$uid = $_GET['uid'];

$result = mysql($db_name,"select * from $table where uid='$uid'");

 

6) change_action2.php

 

<?php

 

require("../connect.php");

 

//Fixes Input-Bugs for the Word

$change_word = $_POST['change_word'];

$change_definition = $_POST['change_definition'];

$uid = $_POST['uid'];

 

if ($change_word == "")

 

7)\www\phpglossar_0.8\index.php

 

// Here is set the start up look of Glossary - first_letter comes from config_style.inc

$letter = $_GET['letter'];

$word = $_POST['word'];

 

I have probably missed something fundemental just seems strange the need to do this.

 

Ho well it was just a hack to get it working.

 

PHPGlossar Version 0.8 version_date = "2002" It could be old code that I downloaded however it was off the authors site.

 

Well have fun :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...