Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]
Print
Topic: After domain linking, PHP include no longer works  (Read 430 times)
« on: November 30, 2008, 08:28:34 PM »
hpsrc Offline
Newbie

View Profile WWW
*
Posts: 29



... at least over multiple directories.
Report to moderator   Logged

visit my Harry Potter fansite, hpsrc, @ http://hpsrc.t35.com/

 
« Reply #1 on: November 30, 2008, 08:31:15 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,205



They are working for me here: http://hpsrc.t35.com/

Like I said in your other thread, you need to change the way you are doing them if you want them to load at both the *.t35.com account and the domain at the same time. I gave you an example of how to do that in your original post.
Report to moderator   Logged

« Reply #2 on: November 30, 2008, 08:34:00 PM »
hpsrc Offline
Newbie

View Profile WWW
*
Posts: 29



Yes, I saw. But the include()s are relative, and not working
Report to moderator   Logged

visit my Harry Potter fansite, hpsrc, @ http://hpsrc.t35.com/
« Reply #3 on: November 30, 2008, 08:35:48 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,205



Still? http://hpsrc.com/ seems to load fine for me? Is it loading on http://hpsrc.t35.com/ but not on http://hpsrc.com/? Both seem to load the same thing for me?
Report to moderator   Logged

« Reply #4 on: November 30, 2008, 08:37:22 PM »
hpsrc Offline
Newbie

View Profile WWW
*
Posts: 29



PHP include works on the primary index.php page because it is in the same directory as the include() file.
On, say, http://hpsrc.com/site/about.php/ gives me this error message:
\
Warning: include() [function.include]: open_basedir restriction in effect. File(../layout.php) is not within the allowed path(s): (VIRTUAL_DOCUMENT_ROOT:.) in /home/freehost/t35.com/h/p/hpsrc/site/about.php on line 4

Warning: include(../layout.php) [function.include]: failed to open stream: Operation not permitted in /home/freehost/t35.com/h/p/hpsrc/site/about.php on line 4

Warning: include() [function.include]: Failed opening '../layout.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/freehost/t35.com/h/p/hpsrc/site/about.php on line 4
Report to moderator   Logged

visit my Harry Potter fansite, hpsrc, @ http://hpsrc.t35.com/
« Reply #5 on: November 30, 2008, 08:51:44 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,205



Unfortunately I might not have a quick fix for that. I would recommend keeping the main files in the same directory (index.php and about.php both in the root folder).
Report to moderator   Logged

« Reply #6 on: November 30, 2008, 09:00:08 PM »
hpsrc Offline
Newbie

View Profile WWW
*
Posts: 29



so I have to keep all of the files in the same folder?
Report to moderator   Logged

visit my Harry Potter fansite, hpsrc, @ http://hpsrc.t35.com/
« Reply #7 on: November 30, 2008, 09:20:44 PM »
Alex Melen Offline
President / Founder
Administrator
Addict

View Profile WWW
*****
Posts: 2,205



All the website files should probably be in the same folder.. images, css, etc.. can be in other places.

Another idea is to drop a copy of your layout.php (or even a symlink to it?) into your /site/ folder. Then change the code from include('../layout.php') to include('layout.php')
Report to moderator   Logged

« Reply #8 on: December 09, 2008, 06:49:15 PM »
hpsrc Offline
Newbie

View Profile WWW
*
Posts: 29



Alright, thanks!
Report to moderator   Logged

visit my Harry Potter fansite, hpsrc, @ http://hpsrc.t35.com/
 
Pages: [1]
Print
Jump to:  

Powered by SMF | SMF © 2006-2008, Simple Machines LLC