Jump to content

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
Edited by jazzman1
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.