LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-06-2003, 04:25 PM   #1
david63
LQ Newbie
 
Registered: May 2003
Location: Lancashire, UK
Distribution: Mandrake 9.1
Posts: 27

Rep: Reputation: 15
Newbie and PHP


I am not sur if I have the right forum for this problem or not - but I am sure someone out there will point me in the right direction!

I am new to Linux but I have managed to get it set up and working - even to the point of having it networked with an XP machine (I can access the Internet and printers via the XP)

The problem I have now got is with configuring PHP. I have Apache installed which is working ok - it displays the default page when I access it. What I do not seem to be able to do is to get PHP scripts to run. I have set up a directory under my user and in php.ini I have set user_dir to this directory.

Whenever I enter the script name (with any and all permutations of the path) I get a 404 error (File not Found)

Does anyone have any suggestions as to where I have gone wrong?
 
Old 05-06-2003, 06:05 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
You say you have a directory in your user and in php.ini - I'm a little confused. Your php.ini shouldn't need to be told anything about directorys really, in its default config it should just work. As for user directories do you mean you have a public_html directory and you are trying to access http://server/~user ?? If so just try putting a file say called test.php in Apache's htdocs folder, ensure that the file is chmoded to 644 and it should be accessable from a browser. If you put
PHP Code:
<?PHP phpinfo(); ?>
in the file then it should return some useful info. Once this works then move onto specific user's folders.

You can always post what you've got in you httpd.conf and your php.ini if you think its necessary. To be honest it seems difficult to stop php from just working so it's gotta be something silly! Did you remember to add the php handler lines to httpd.conf as per the installation docs?

cheers

Jamie...
 
Old 05-07-2003, 05:25 PM   #3
david63
LQ Newbie
 
Registered: May 2003
Location: Lancashire, UK
Distribution: Mandrake 9.1
Posts: 27

Original Poster
Rep: Reputation: 15
You were right - it was something silly

I was not putting a "~" before the user in the path

It now works fine
 
Old 05-08-2003, 03:18 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Quote:
Originally posted by david63
I was not putting a "~" before the user in the path
Naturally this was a complete guess on my part, I've not really done such things in the past, many many times

Glad you got it working

Jamie...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
PHP question (newbie) matthewchin Programming 2 12-05-2005 09:46 PM
newbie: create session with php ?? ALInux Programming 3 11-01-2005 02:58 PM
Newbie PHP question sleepisforwimps Programming 2 08-28-2005 04:06 AM
Newbie needs help with PHP code mclard Programming 7 12-09-2004 12:50 PM
PHP newbie question jacksmash Programming 20 11-22-2003 11:52 AM


All times are GMT -5. The time now is 10:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration