Jump to content

php ini not working (or doesn't seem to be)


ReeceSayer

Recommended Posts

As in the title - my PHP.ini doesn't seem to be working - I did move from a WAMP setup to an LAMP setup but i changed the files in my ini to reflect the different directories.

 

I have the following set in my php.ini:

include_path = ".:/var/sites/t/testing.indigoonline.co.uk/public_html/php"

However, when i try to require the file i get the following:

Warning: require_once(required.php) [function.require-once]: failed to open stream: No such file or directory in /var/sites/t/testing.indigoonline.co.uk/public_html/admin/index.html on line 4

Fatal error: require_once() [function.require]: Failed opening required 'required.php' (include_path='.:/usr/local/lib/php') in /var/sites/t/testing.indigoonline.co.uk/public_html/admin/index.html on line 4

It seems that the php.ini isn't having an effect - anyone have any ideas please? I know i'm probably just missing something really simple.

 

Thanks

 

 

have you run a phpinfo to see what the current settings are?

 

Or - you could just specify your require_once as:

 

("/php/required.php")

 

btw - storing your php scripts within the web tree (public_html) is not a good idea IMO.  They should be above 'public_html' to keep them away from prying eyes.

The php include_path should be located to your php library directory something like - .:/usr/local/php5/lib/php, .:/usr/share/pear:/usr/share/php

 

So, that one (/var/sites/t/testing.indigoonline.co.uk/public_html/php) should be a part of the Apache (web server) confing file!

 

EDIT: Can you run into a linux terminal next command:

php -i | grep include_path

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.