LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-12-2013, 04:37 PM   #1
bliss88
LQ Newbie
 
Registered: Jul 2013
Posts: 3

Rep: Reputation: Disabled
help me :problem with apache


hey i have hosted my php scripts in apache in ubuntu 12.04

when i try to refer values using $_files[]
the apache says the page not found [the 404 error ]i will add the screen shots of the pages too kindly help me am in troble

sorry i don't know how to add images
i will tell more about that sorry its not perfect
/appu/edit3.php when the url is like this, it will load the page no errors.
appu/edit3.php ? id =mathew& name=thundiyeth when the url is like this it willnot load the page says 404 error
 
Old 07-12-2013, 05:35 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Your issue here is not with apache but with pathing. You should ALWAYS use absolute pathing in your web applications or use relative pathing to your document root.

Read over

This explains the difference between relative and absolute paths in Linux in general: http://www.linuxquestions.org/questi...0/#post1300222

Shows how to set your root directory for relative pathing in PHP:

http://stackoverflow.com/questions/3...de-path-in-php
http://stackoverflow.com/questions/1...absolute-paths
 
Old 07-13-2013, 12:09 AM   #3
bliss88
LQ Newbie
 
Registered: Jul 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
<html>
<?php
$name=$_POST['n1'];

$name3=$_POST['n3'];
$name2=$_POST['n2'];

echo $name2 ;


?><p> <a href="/edit3.php ? id =<?php echo $name2;?>& name=<?php echo $name3;?>$

</html>


how to fix this
 
Old 07-13-2013, 01:32 AM   #4
bliss88
LQ Newbie
 
Registered: Jul 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
this is the error log
the undefined index are due to the problem with apache if u check above reply u can understand
thos variables will be defined with the values which refered


root@biss:~# tail -10 /var/log/apache2/error.log
[Sat Jul 13 11:23:54 2013] [error] [client 192.168.1.4] File does not exist: /var/www/edit3.php , referer: http://192.168.1.150/appu/edit2.php
[Sat Jul 13 11:24:00 2013] [error] [client 192.168.1.4] File does not exist: /var/www/appus, referer: http://192.168.1.150/appu/edit2.php
[Sat Jul 13 11:24:05 2013] [error] [client 192.168.1.4] File does not exist: /var/www/appus
[Sat Jul 13 11:24:36 2013] [error] [client 192.168.1.4] File does not exist: /var/www/appusedit3.php , referer: http://192.168.1.150/appu/edit2.php
[Sat Jul 13 11:24:55 2013] [error] [client 192.168.1.4] File does not exist: /var/www/appus, referer: http://192.168.1.150/appu/edit2.php
[Sat Jul 13 11:24:59 2013] [error] [client 192.168.1.4] File does not exist: /var/www/appus
[Sat Jul 13 11:25:21 2013] [error] [client 192.168.1.4] File does not exist: /var/www/appu/edit3.php , referer: http://192.168.1.150/appu/edit2.php
[Sat Jul 13 11:25:26 2013] [error] [client 192.168.1.4] PHP Notice: Undefined index: name in /var/www/appu/edit3.php on line 5
[Sat Jul 13 11:59:35 2013] [error] [client 192.168.1.4] File does not exist: /var/www/appu/edit3.php , referer: http://192.168.1.150/appu/edit2.php
[Sat Jul 13 11:59:41 2013] [error] [client 192.168.1.4] PHP Notice: Undefined index: name in /var/www/appu/edit3.php on line 5
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache file permissions problem. {Apache/2.2.6 Fedora 8} hacker supreme Linux - Server 5 01-31-2008 03:26 PM
apache/mod_python problem: ImportError: No module named mod_python.apache BrianK Linux - Software 2 10-10-2007 05:13 PM
Strange apache trailing / problem - Slack-current, apache 1.3.33 vamp Linux - Networking 1 01-30-2005 07:28 PM
RH9: PHP session problem (or Apache problem) fengcn Red Hat 0 12-01-2003 06:32 PM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration