LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   apache2 not parsing .php file? (https://www.linuxquestions.org/questions/linux-software-2/apache2-not-parsing-php-file-542939/)

rlee923 04-06-2007 12:23 AM

Ok, I figured this out.

Maybe I was being very stupid.

When I try open php file I just typed

firefox abc.php

but when I do firefox http://localhost/abc.php

it points.

This raises another question, when I write php with method post or other, I can't put relative path for action= ?

Regards,

rlee923 04-06-2007 12:26 AM

ok now I figured out what is wrong.

When I tried to open the file with the command

firefox abc.php

it wouldn't open

but when I do

firefox http;//localhost/abc.php

it works

This raises another question. When I write some html with post method or something else with action=path, does path have to be absolute and cannot be relative?

Cheers

acid_kewpie 04-06-2007 02:58 AM

so "firefox abc.php" would look to open the file locally, not via the web server... is it unfair to call you a muppet? :D

and yeah you can use relative paths in a document, as if they are served via a url then links are done relative to the current location / protocol.

rlee923 04-08-2007 04:27 AM

No not at all, I was stupid.

Btw how do you do relative path and make the browser recognise it as it's through webserver?

I guess this is the problem I had in the first place.

I tried just normally by putting the other php file in the same directory for action=path
and it wouldn't work. :(

acid_kewpie 04-08-2007 04:40 AM

well it's that changes are made relative to the referring url. so clicking <a href"nextpage.php"> when your furrent page is http://example.com/index.php will go to http://example.com/nextpage.php but from file://home/user/index.php goes to file://home/user/nextpage.php yeah?

rlee923 04-08-2007 08:52 PM

Ok,

This has been fully resolved. (maybe not)

When I load the page with using full path of localhost url, the relative path for the next pages, and action=path works.

But what I was doing is going into the specific directory where the start page file exists and just opening the page by typing

firefox firstpage.html or firefox firstpage.php

Thanks for taking the time to read posts and writing replies. Now I finally figured out how to do stuff properly.

Have a good day everyone!!!.

Special thanks to : acid_kewpie :D


All times are GMT -5. The time now is 12:51 PM.