<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Links Are not working(Already Edit directory Fi (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Links Are not working(Already Edit directory Fi
#927
Swafey (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Links Are not working(Already Edit directory File) 2 Years, 11 Months ago Karma: 0  
I have Installed using Fantastico, and all seems to be working fine!

When i go to click any links, ie about us, or add a site, the adverts at the bottom of the page just seem to refresh.

I can add new sites in the admin section... But they do not appear in the directory, unless i use the search function for them.

I have done the following without success :

Code:

Add these lines to the top of the directory file *should* fix either of these causes. Code: if ($_POST['submit_add']){$show="add";} if (empty($PATH_INFO)){$PATH_INFO = $_SERVER["REQUEST_URI"];} if (empty($PATH_INFO)){$PATH_INFO = $_SERVER['PATH_INFO'];} if (empty($PATH_INFO)){$PATH_INFO = $_SERVER["ORIG_PATH_INFO"];} if (empty($PATH_INFO)){$PATH_INFO = $HTTP_SERVER_VARS['PATH_INFO'];} Keep in mind, the directory file is actually a PHP file, it's just lacking the .php file extension. If you need to use an FTP program to download/upload the file for editing, be sure to use ASCII/plain text transfer method.
My site is Zooyou.co.uk If you have any ideas your help would be greatly appriciated. Many Thanks, Adam
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#928
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Links Are not working(Already Edit directory Fi 2 Years, 11 Months ago Karma: 9  
Very odd... Do you know if your server is running Apache ? or something else ?

I'm curious if the $PATH_INFO array is ever getting populated... under the line ...

Code:

if (empty($PATH_INFO)){$PATH_INFO = $HTTP_SERVER_VARS['PATH_INFO'];}
see if you can print out that array like this ...
Code:

print_r($PATH_INFO);
If the array is populated, you should get a bunch of text at the top of the page... Doesn't solve the problem, but gives me a hint.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#929
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Links Are not working(Already Edit directory Fi 2 Years, 11 Months ago Karma: 9  
Had another thought.. Double check that the base path and base URL are correct in the admin section, on the configuration page..

In your case, the base URL should be http://zooyou.co.uk and base path should be blank.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#930
Swafey (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Links Are not working(Already Edit directory File) 2 Years, 11 Months ago Karma: 0  
Thanks for your quick reply,

I have checked the base path and URL, which all seem to
be in order.

I am running Apache version 2.0.63 & PHP Version 5.2.5.

I also have added:

Code:

print_r($PATH_INFO);
Under the previous code. I now have /directory/ along the top of my page which changes when i click links, /directory/add.html and /directory/new.html ECT!
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#931
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Links Are not working(Already Edit directory Fi 2 Years, 11 Months ago Karma: 9  
Ok. 3 steps away from fixing this...

First, remove or comment the print_r line I had you add.


Next, add a similar line below these lines.. around line # 64
Code:

if(!empty($PATH_INFO)){ $url_array = explode("/",$PATH_INFO); print_r($url_array);
After adding that, you should see something like this at the top of the page while viewing new.html .. [0] => directory [1] => new.html In this example, $url_array['1'] should contain 'new.html' .. Possibly you'll see a different number, like [2] => new.html Whatever that number is, change the following few lines...
Code:

if ($url_array[2] == "new.html"){$show="new";} if ($url_array[2] == "popular.html"){$show="pop";} if ($url_array[2] == "cool.html"){$show="cool";} if ($url_array[2] == "add.html"){$show="add";} if ($url_array[2] == "about.html"){$show="about";} if ($url_array[2] == "review.html"){$show="review";} if ($url_array[2] == "update.html"){$show="update";} if ($url_array[2] == "owner.html"){$show="owner";} if ($url_array[2] == "lost.html"){$show="lost";} if ($url_array[2] == "review_add.html"){$show="review_add";} if (is_numeric (ereg_replace (".html", '', $url_array[2]))){ $PID = (ereg_replace (".html", '', $url_array[2]));
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/06/04 11:40 By Dewed.
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#932
Swafey (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Links Are not working(Already Edit directory File) 2 Years, 11 Months ago Karma: 0  
I have now also done this,

we can add sites and view the different tabs,

but it still doesnt seem to be working 100%

the site i have added does not seem to be apearing in the catergories. or neither does the "Add your own review" link work.

Sorry to be a pain!
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008