ReeceSayer Posted May 14, 2013 Share Posted May 14, 2013 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 Link to comment https://forums.phpfreaks.com/topic/277990-php-ini-not-working-or-doesnt-seem-to-be/ Share on other sites More sharing options...
ginerjm Posted May 14, 2013 Share Posted May 14, 2013 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. Link to comment https://forums.phpfreaks.com/topic/277990-php-ini-not-working-or-doesnt-seem-to-be/#findComment-1430037 Share on other sites More sharing options...
jazzman1 Posted May 14, 2013 Share Posted May 14, 2013 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 Link to comment https://forums.phpfreaks.com/topic/277990-php-ini-not-working-or-doesnt-seem-to-be/#findComment-1430040 Share on other sites More sharing options...
Q695 Posted May 15, 2013 Share Posted May 15, 2013 or on the WAMP login screen. Link to comment https://forums.phpfreaks.com/topic/277990-php-ini-not-working-or-doesnt-seem-to-be/#findComment-1430123 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.