Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Php front end not working..?

Quote Reply
Php front end not working..?
When I click on "php" in the linksSQL Admin area..... nothing comes up.. I get a forbidden error. Do I need to set some permission differently..?
Quote Reply
Re: [6foot4] Php front end not working..? In reply to
Hi,

Typically you can't run php scripts that are inside the cgi-bin. You need to move page.php to a separate directory outside of the cgi-bin, and then goto Setup->Paths and URL's and enter in the URL to where you moved the program.

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Mar 19, 2002, 9:08 AM
Quote Reply
Re: [Alex] Php front end not working..? In reply to
I work whit the spanish version

I have make the changes and now work but my php Homepage display this error:

We don't seem to have a category by the name 'pages/page.php'.

And the search function doesn't work, only work when return an search error whitout results, with results I get an PHP.exe error on windows an by Apache an 500 error.

Frown

-----------------------
Nomada
Quote Reply
Re: [Nomada] Php front end not working..? In reply to
It sounds like you're trying to use page.php statically. Is this what you're doing, because you can't. If it isn't, send me an email with the link to your Links SQL install, as well as shell login information.

Adrian
Quote Reply
Re: [Alex] Php front end not working..? In reply to
Hi Alex,

U know a way to setup apache so u can use php script in cgi-bin? Are there any disadvantage to allow php in cgi-bin ?

Allready thx..
Quote Reply
Re: [brewt] Php front end not working..? In reply to
Hi Adrian:

I am making tests in my 'localhost'.

I know that this is a bug because I have installed the program and I have not modified the initial setup, only the changes that Alex explains above.

Your you can explain to me the changes that I need to make so that it works?

Thanks!

-----------------------
Nomada
Quote Reply
Re: [Nomada] Php front end not working..? In reply to
What exactly are the errors you're getting? If you're getting a 500 error, then it's due to the webserver trying to run it as a CGI. If it's another error, what's the error? You can easily fix the 500 error by moving the page.php out of the cgi-bin directory, say to the webroot, and then updating the URL to page.php in Setup => Paths and URLs => db_php_url.

Adrian
Quote Reply
Re: [brewt] Php front end not working..? In reply to
I have make these steps:

1. Change the page.php to other directory out of /cgi-bin
2. Change the URL to db_php_url

The template home.html works fine, I can see the homepage Ok, but I get only the error:

We don't seem to have a category by the name 'pages/page.php'.

at the area where the <%category%> should be shown...

At the browser bar I see: http://localhost/pages/page.php

Which are the problem?

-----------------------
Nomada
Quote Reply
Re: [Nomada] Php front end not working..? In reply to
I think you should take a look at this post: http://www.gossamer-threads.com/...orum.cgi?post=170681.
It sounds like you're trying to create a static directory using the PHP frontend (which only works dynamically).

Adrian
Quote Reply
Re: [brewt] Php front end not working..? In reply to
Hi brewt:

I not build the static directory with default_php templates.

I have follow the 2 steps and not work.

I work perfectly with PHP4 on my system and the rest of menulinks of LinkSQL works fine (HOME • ADD A LINK • MODIFY A LINK • NEW LINKS • COOL LINKS • TOP RATED...) But I can't search neither explore the categories...

I work with spanish version and php frontend is not translated... May be a problem?

Help me please.

-----------------------
Nomada
Quote Reply
Re: [Nomada] Php front end not working..? In reply to
Maybe you can post a screen shot of your problem as I'm having trouble understanding what the problem is.

Adrian
Quote Reply
Re: [brewt] Php front end not working..? In reply to
Ok I send you attached

Thanks!

-----------------------
Nomada

Last edited by:

Nomada: Mar 24, 2002, 2:06 AM
Quote Reply
Re: [Nomada] Php front end not working..? In reply to
Sorry about the late reply. I thought I replied, but I obviously didn't. Can you email me (see profile) the url to your admin panel and a username and password for the admin panel, as well as a detailed description of the problem? Thanks.

Adrian
Quote Reply
Re: [brewt] Php front end not working..? In reply to
Hi Adrian:

I have said:

Quote:
I am making tests in my 'localhost'.

And the problem are detailed:

Quote:
I not build the static directory with default_php templates.

I have follow the 2 steps and not work.

I work perfectly with PHP4 on my system and the rest of menulinks of LinkSQL works fine (HOME • ADD A LINK • MODIFY A LINK • NEW LINKS • COOL LINKS • TOP RATED...) But I can't search neither explore the categories...

I work with spanish version and php frontend is not translated... May be a problem?

Need you more information?

Thank you again!

-----------------------
Nomada
Quote Reply
Re: [Nomada] Php front end not working..? In reply to
Hmm... looking at the code, it seems it's something to do with the path_info_to_page() function in Page.php. What webserver are you using? It seems to be setting the variable PATH_INFO to be the path of the file instead of what's being passed in after the CGI. What that piece of code was meant to do was to be like the CGI version of LinksSQL where you could go:
http://www.myhost.com/cgi-bin/page.cgi/SomeCategoryName/anothersubcat
It seems it doesn't work too well on Win32 with that webserver (I'm assuming it's IIS or something). A temporary solution would be to edit admin/Links/PHP/Page.php line 41 from:
Code:
if (isset($HTTP_SERVER_VARS['PATH_INFO'])) {
path_info_to_page();
}
elseif (!$cat_id) {
generate_home_page();
}
else {
generate_category_page();
}
to:
Code:
# if (isset($HTTP_SERVER_VARS['PATH_INFO'])) {
# path_info_to_page();
# }
if (!$cat_id) {
generate_home_page();
}
else {
generate_category_page();
}

Adrian
Quote Reply
Re: [brewt] Php front end not working..? In reply to
Congratulations!!

I have changed the code and now works fine!!!! Cool

(I work in windows whit Indigo Perl)

Thank you very much Adrian!!!

-----------------------
Nomada
Quote Reply
Re: [Nomada] Php front end not working..? In reply to
Hiya,

I just get the same error here.

I got a dedicated server running on Linux.

I moved the page.php out of the cgi-bin into the webserver root and modified URL in the setup section.

First I got a 500 Internal Server Error message. Then I chomodded the file to 777 and now I only get "No suche template: TemplateName".

In that path that Adrian mentionend I couldn't find that file pointed out so I couldn't alter it.

Any suggestions?

wsjb78

----------------------------------------------

The third principle of sentient life is the capacity for self-sacrifice, the conscious ability to override evolution and self- preservation for a cause, a friend, a loved one.

ICQ: 171751720
Quote Reply
Re: [wsjb78] Php front end not working..? In reply to
If you email support with login information and a description of your problem, we'll take a look at it for you.

Adrian
Quote Reply
Re: [brewt] Php front end not working..? In reply to
Ok, I just wrote a message to the support.

I mainly wanna use the static option of Links SQL but some sites require to have it run on PHP.

wsjb78

----------------------------------------------

The third principle of sentient life is the capacity for self-sacrifice, the conscious ability to override evolution and self- preservation for a cause, a friend, a loved one.

ICQ: 171751720