Random Block suddenly stopped working!

phgrove

Joined: 2002-10-10
Posts: 101
Posted: Sun, 2003-06-29 20:54

The web page in question is www.petergrove.co.uk/index2.php. It takes some time to load up, but when it does i get the following warnings:-

 
Warning: main() [function.main]: php_hostconnect: connect failed in /home/www/petergro/index2.php on line 24

Warning: main(http://www.petergrove.co.uk/gallery/block-random.php) [function.main]: failed to create stream: Connection timed out in /home/www/petergro/index2.php on line 24

Warning: main() [function.main]: Failed opening 'http://www.petergrove.co.uk/gallery/block-random.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/www/petergro/index2.php on line 24

If you try the Random block directly at www.petergrove.co.uk/gallery/block-random.php it works fine, and the index page used to work fine. I think something has been done to the server, but not sure what. Could someone please point me in the right direction.

Peter

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2003-06-29 21:23

The hint is in the "include_path=" string. Your setup is only allowed to include files in the current directory "." and in "/usr/local/lib/php".

Since the block-random.php file is in the /gallery/ directory you can't include it from your root (/) dir. You need to make php allow you to include files from /gallery/ aswell.
Try to add this to your .htaccess file (in your root webfolder)
php_value include_path "/full/path/to/gallery"
and se how that goes.

 
phgrove

Joined: 2002-10-10
Posts: 101
Posted: Mon, 2003-06-30 07:32

I have tried that and i got a similar message. What is the work around? Do i need my ISP tyo allow my htaccess file to contain php_values?

Peter

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2003-06-30 17:40

Try to contact your host, and see what response you get.

 
medic119

Joined: 2003-03-05
Posts: 14
Posted: Wed, 2003-07-16 03:01

I did that, and now the Random-Block file is trying to kick Gallery into Config mode. I guess it can't find config.php. Any Ideas??

 
medic119

Joined: 2003-03-05
Posts: 14
Posted: Wed, 2003-07-16 03:03

I did that, and now the Random-Block file is trying to kick Gallery into Config mode. I guess it can't find config.php. Any Ideas??

 
SamBeckett
SamBeckett's picture

Joined: 2002-09-29
Posts: 146
Posted: Fri, 2003-07-18 03:47

Warning: Failed opening 'http://www.mysite.com/gallery/random.php' for inclusion (include_path='.:/usr/share/pear') in /home/www/mysite/index.php on line 3

my random block stopped working too, right out of no where. no server changes at all.

FIXED IT, i edited the chache file and removed a few lines and it started working again. weird.

 
jasongw

Joined: 2003-12-18
Posts: 2
Posted: Thu, 2003-12-18 18:55

What did you do to the cache file? On mine I get a huge bundle of errors *after* the initial load. WHat I have found is that if I FTP into the site, DELETE the cache file and then refresh the website, the block displays *flawlessly*. However, upon the next refresh it goes back to teh same errors.

The errors are:

Warning: rand() expects parameter 2 to be long, string given in /home/simsadmi/public_html/modules/gallery/block-random.php on line 138
ERROR: requested index [] out of bounds [3]
Fatal error: Call to a member function on a non-object in /home/simsadmi/public_html/modules/gallery/classes/Album.php on line 962

Warning: pnvarprepforstore(config/md-config.php): failed to open stream: No such file or directory in /home/simsadmi/public_html/includes/pnAPI.php on line 793

Warning: pnvarprepforstore(): Failed opening 'config/md-config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/simsadmi/public_html/includes/pnAPI.php on line 793

Warning: pnvarprepforstore(config/md-config.php): failed to open stream: No such file or directory in /home/simsadmi/public_html/includes/pnAPI.php on line 793

Warning: pnvarprepforstore(): Failed opening 'config/md-config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/simsadmi/public_html/includes/pnAPI.php on line 793

Any help would be appreciated!

Jason