Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Easter Monday? Kill your server...

Easter Monday? Kill your server...
Thread Tools
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Apr 12, 2004, 06:40 AM
 
All I did was run an itsy bitsy teeny weeny php script then wham....

I tested some PEAR stuff on my localhost, when I FTP'd to test it on the server I ran this script...

ini_set("include_path", "/var/www/html/pear/");

It appears that php "/" has taken the script to the root of the server (or someit) and I've now messed up the path to the .htaccess files. well that's what I think after reading the error log....

[error log]
(13)Permission denied: /home/virtual/site120/fst/var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[/error log]

I'm getting 403 forbidden on everything on my site, I'm curious if that is the case for other people who are sharing the hosting, and whether I should be contacting the server admin.


     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Apr 12, 2004, 07:24 PM
 
Originally posted by skalie:
All I did was run an itsy bitsy teeny weeny php script then wham....

I tested some PEAR stuff on my localhost, when I FTP'd to test it on the server I ran this script...

ini_set("include_path", "/var/www/html/pear/");

It appears that php "/" has taken the script to the root of the server (or someit) and I've now messed up the path to the .htaccess files. well that's what I think after reading the error log....

[error log]
(13)Permission denied: /home/virtual/site120/fst/var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[/error log]

I'm getting 403 forbidden on everything on my site, I'm curious if that is the case for other people who are sharing the hosting, and whether I should be contacting the server admin.


See if adding a few paths fixes the problem -e.g.:

ini_set("include_path",".:/var/www/html/pear:".$_SERVER['DOCUMENT_ROOT']);

This adds 3 paths - one to the same directory as PHP, one to your pear directory, and one to the current path. Does this help?
Computer thez nohhh...
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Apr 13, 2004, 02:36 AM
 
Originally posted by Simon Mundy:
Does this help?
Tried it, got the "forbidden" page as usual, although not the 403, but the "forbidden page that shows up when there is no index page in the directory.

Probably going to have to contact the host about this one *wince*.
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Apr 14, 2004, 07:15 AM
 
Finally got it sorted, while messing around with the .htaccess I had flushed the correct chmod settings down the toilet, they should be....

755 to all directories(rwxr-xr-x)
644 to all files(rw-r--r--)
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Apr 14, 2004, 08:45 AM
 
Originally posted by Simon Mundy:
See if adding a few paths fixes the problem -e.g.:

ini_set("include_path",".:/var/www/html/pear:".$_SERVER['DOCUMENT_ROOT']);

This adds 3 paths - one to the same directory as PHP, one to your pear directory, and one to the current path. Does this help?
I typically try to add paths like this:

[php]
<?php
$dev_include_dir = "/some/path/I/want/";
set_include_path(get_include_path() . ":" . $dev_include_dir);
?>
[/php]
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Apr 14, 2004, 09:29 AM
 
Originally posted by Arkham_c:
I typically try to add paths like this:

[php]
<?php
$dev_include_dir = "/some/path/I/want/";
set_include_path(get_include_path() . ":" . $dev_include_dir);
?>
[/php]
Wow, that works a charm, thanks for taking the time to post that.

*starts to enjoy himself after three days of going WTF ??*
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:07 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2