Full path name?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
chrizzis
Forum Newbie
Posts: 5
Joined: Tue Jun 23, 2009 12:45 am

Full path name?

Post by chrizzis »

Hi,
I am using PHP and mySQL set up by my host on their server, so I have not downloaded any setup/installation files. I am also using Dreamweaver to edit files.

At first I had a test folder in my public_html folder that contained my test html and php. I made a welcome.html page that has a form in it, which passes variables to a welcome.php script that prints the variables to the screen. I got that working...

Now, I want to place all php scripts in a php folder under my root directory for security. I have a setIncludePath.php script in my public_html folder that reads:
<?php
set_include_path(get_include_path() .':/path/to/root/dir/php/');
?>

I added this to the beginning of my welcome.html page:
<?php
require_once('/path/to/root/dir/public_html/setIncludePath.php');
?>

I moved welcome.php into the /root/php folder and tested it. It doesn't work.

I wasn't explicit in welcome.html:
<FORM ACTION="welcome.php" METHOD=POST>

But I thought that was the point...

I have also edited my php.ini file:
include_path = ".:/path/to/root/dir/php"

What am I doing wrong?
chrizzis
Forum Newbie
Posts: 5
Joined: Tue Jun 23, 2009 12:45 am

Re: Full path name?

Post by chrizzis »

Just to see if it worked, I changed the path in welcome.html:

<FORM ACTION="../../php/welcome.php" METHOD=POST>

didn't work...
chrizzis
Forum Newbie
Posts: 5
Joined: Tue Jun 23, 2009 12:45 am

Re: Full path name?

Post by chrizzis »

I ended up deleting everything and returning it to a condition where my old php scripts were working.
The culprit: my php.ini file. I reset:
session.save_path = /home/my/root/dir/path/phpsessions

My current directory setup:
/root
-/phpsessions
--/welcome.php

-/public_html
--/dbTest
---/welcome.html

Now, how do I set it up so welcome.html will pass variables to welcome.php in a folder outside of public_html?
Post Reply