The full error is this,
[error] [client ::1] PHP Fatal error: require_once():
Failed opening required 'src/core/AdminSystem.php'
(include_path='.:/usr/local/pear/share/pear:/Users/everardobarriga/pear/share/pear:/usr/share/pear')
in /Users/everardobarriga/smgadmin/src/controller/CmdLogin.php on line 3`
So I have an application I am trying to run locally and I have updated my include_path in php.ini, I am not allowed to modify any code I can only modify my include_path does anyone know how I can modify my include_path to get this app working?
Thanks!
Add in /Users/everardobarriga/smgadmin/ to your include_path, and hopefully that should fix it.
Related
I have a problem with a PHP script. The following error is being logged whenever the site is accessed:
[Fri Sep 26 11:57:56 2014] [error] [client 31.22.44.2]
PHP Fatal error: require_once(): Failed opening required
'./sites/default/modules/views/handlers/views_handler_field_markup.inc'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/www.xoomtalk.com/htdocs/sites/default/modules/views/includes/handlers.inc
on line 76
I have confirmed that the file referenced is present, and that www-data can access it. Permissions look fine and have not been changed as far as I am aware
What am I missing?
[Fri Sep 26 11:57:56 2014] [error] [client 31.22.44.2] PHP Fatal
error: require_once(): Failed opening required
'./sites/default/modules/views/handlers/views_handler_field_markup.inc'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/www.xoomtalk.com/htdocs/sites/default/modules/views/includes/handlers.inc
on line 76
Add path /var/www/www.xoomtalk.com/htdocs into your include_path
More explains:
your include_path=.:/usr/share/php:/usr/share/pear , means php script will find include file in: current_path, /usr/share/php or /usr/share/pear
when you want to require this file
./sites/default/modules/views/handlers/views_handler_field_markup.inc
all allowed path are:
(current path)
/var/www/www.xoomtalk.com/htdocs/sites/default/modules/views/includes/./sites/default/modules/views/handlers/views_handler_field_markup.inc
(/usr/share/php) /usr/share/php/./sites/default/modules/views/handlers/views_handler_field_markup.inc
(/usr/share/pear)
/usr/share/pear/sites/default/modules/views/handlers/views_handler_field_markup.inc
In these path ,php can't find the file.
in the following file:
/var/www/www.xoomtalk.com/htdocs/sites/default/modules/views/includes/handlers.inc
on line 76
Change This:
'./sites/default/modules/views/handlers/views_handler_field_markup.inc'
to THIS: '/var/www/www.xoomtalk.com/htdocs/sites/default/modules/views/handlers/views_handler_field_markup.inc'
This should do the trick.
The problem is, you're using scripts from various directories, but the "root" of the request is the cwd (current working directory) which you can check with: getcwd()
(and you're requesting the include relative to the cwd.
I managed to solve this problem, ended up being nothing to do with permissions or paths, although there was no indication of this in the Apache logs.
The problem was that the server was also running AppArmor which for some reason was blocking the Apache process from accessing the files.
AppArmor was set to complain rather than enforce mode for testing (command is aa-complain apache2) this made everything start working.
Thanks to all contributors for their suggestions.
I'm using PHP, Smarty, jQuery, etc. for my website. I'm getting following error from the apache error log.
[Mon Apr 14 12:27:02 2014] [error] [client 127.0.0.1] PHP Fatal error: Unknown: Failed opening required '/var/www/smart-rebate-web/web/admin/change_password.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0, referer: http://localhost/smart-rebate-web/web/admin/
I've checked all the configuration settings and permissions. Everything is correct. Then why this error is coming from apache? Also there is no error printing in a bowser when I run a webpage, ablank webpage appears. I googled a lot about the solution but couldn't find out the exact solution. Checked all the configurration settings. So, can anyone help me in resolving this error please? If you need any further information I can provide you the same.
Go to your php.ini and set
display_errors = on
and restart your web server, you will get errors on browser ;)
I just installed apache2 and php5 on my ubuntu computer, Ive done it before on debian but now I have a weird error.
when I try to reach a page with my framework in CodeIgniter I get this error
[error] [client 127.0.0.1] PHP Warning: require_once(/var/www/project/system/core/CodeIgniter.php): failed to open stream: Permission denied in /var/www/project/index.php on line 202, referer: localhost/
[error] [client 127.0.0.1] PHP Fatal error: require_once(): Failed opening required '/var/www/project/system/core/CodeIgniter.php' (include_path='.:/usr/share/php5-common') in /var/www/project/index.php on line 202, referer: localhost/
before that I have an error of not found on my include_path, so , I changed it on my php.ini and i changed it to :/usr/share/php5-common
Still... I have NO idea what is the error...
I changed permissions on my /var/www folder and its like user:user
on the line of index.php I have this:
require_once BASEPATH.'core/CodeIgniter.php';
Most probably your $config['base_url'] is wrong.
Make sure its properly identifies the localhost or IP you are using to access localhost.
I mean if you are accessing local server or remote server using http://[ipaddress] then you have to define baseurl like that only.
in your case may be **$config['base_url'] = http://127.0.0.1/codeigniter_project_name**
Similarly that applies to database config also.
I've recently moved my site to a new server and I'm getting the following error on the new server.
[Thu Jan 17 01:30:09 2013] [error] [client] PHP Fatal error: require_once(): Failed opening required 'RB/stdlib.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/application.php on line 90
I may not have copied a the RB directory but I'm unsure where it is. I've copied the pear folder but still receiving the same error.
Any idea how to resolve this issue and how to get the RB folder with the libs on the new server?
Thanks
Following fatal error we are getting in apache errorlog. So IO operation increased and log file size is increasing. We dont know how we can findout and fix it?. Anyone knows pls share the details for our references.
Recently Upgraded Version : PHP ver from 5.2.17 to 5.3.14 after upgradation only following error we are getting, previously we didnt get this issue.
[Wed Sep 05 06:41:20 2012] [error] [client 80.12.96.14] PHP Fatal error: Cannot redeclare DomainNameInfo() (previously declared in /home/rackapps/conflg/ltnit.lg4:261) in /home/rackapps/lgconf/ltnit.lg4 on line 515, referer: http://in.mc1935.mail.yahoo.com/mc/welcome?.gx=1&.tm=1346806375&.rand=8k3tjpq0fmk8b
Note : Actually its a included files. We cant able to findout the landing php file. Because in that file we have included the above file. how we can findout the landingfile.
PHP Fatal error: Cannot redeclare DomainNameInfo()
This is an php error and not apache. You definied a function DomainNameInfo() on lltnit.lg4 on line 261 and on lgconf/ltnit.lg4 line 515 you defined the same function again .... there's your fault ....
hint: when you use inlcude() / require you can alternativ use the function include_once() / require_once() to avoid the error by including functions twice ...