Jump to content

modifiying php.ini


Recommended Posts

Good evening all,I am trying to modifiy my php.ini config file and am hitting problems.Here is the location of php5 : /usr/share/php5here is the location of PEAR : /usr/share/psa-horde/peari am trying to include them on my unix operating platform like this

include_path = ".:/usr/share/php5:/usr/share/psa-horde/pear"

but when i try to use the PEAR functions it says (No such file or directory)how should i express the include_path to the server in php.ini ??Many Thanks.

Link to post
Share on other sites
There are some examples here:http://www.php.net/manual/en/ini.core.php#ini.include-pathIt looks like your path is in the correct format.
i took a look at the manual before i posted this topic i have followed what it has to say and also i looked up on google i carnt seem to find any examples etc... with more than one directory in the include_path but this is right but for someone uknown reason this does not work
Link to post
Share on other sites

i have sorted now missing a / symbol but it now wont open because open_basedir is off i host a few sites from my server so dont want to switch it at all. is there a function you can use to set the open_basedir on at the start of opening this page? before i include the mail.php class?

[b]Warning[/b]: include() [[url="http://www.milnas-mafia.co.uk/function.include"]function.include[/url]]: open_basedir restriction in effect. File(/Mail/Mail.php) is not within the allowed path(s): (/var/www/vhosts/mysite/httpdocs:/tmp) in [b]/var/www/vhosts/mysite/httpdocs/test.php[/b] on line [b]2[/b][b]Warning[/b]: include(/Mail/Mail.php) [[url="http://www.milnas-mafia.co.uk/function.include"]function.include[/url]]: failed to open stream: Operation not permitted in [b]/var/www/vhosts/mysite/httpdocs/test.php[/b] on line [b]2[/b][b]Warning[/b]: include() [[url="http://www.milnas-mafia.co.uk/function.include"]function.include[/url]]: Failed opening '/Mail/Mail.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/psa-pear') in [b]/var/www/vhosts/mysite/httpdocs/test.php[/b] on line [b]2[/b][b]Fatal error[/b]: Class 'Mail' not found in [b]/var/www/vhosts/mysite/httpdocs/testing_platform/test_mail.php[/b] on line [b]15[/b]

Thanks

Link to post
Share on other sites

you can use http://php.net/function.ini_set to change the open_basedir config (as far i can remember its from php 5.3) or it can be done from directory based php.ini

Link to post
Share on other sites

thanks,still does not work, in my php.ini it shows this for the opend_basedir line;open_basedir =whats the default is it off?if i was to change it to open_basedir = Off this would not create any issues ?Again many thanks.

Link to post
Share on other sites

The open_basedir restriction is currently on, not off. The default for open_basedir is off. You can only use ini_set to increase the restrictions, not decrease them. If you want to turn open_basedir off you need to either set it server-wide in php.ini, or set in the httpd.conf file for a particular virtual host.http://www.php.net/manual/en/ini.core.php#ini.open-basedir

Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...