Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Phalcon webtools not working

I`m creating a new project according to this instructions: https://docs.phalconphp.com/ru/latest/reference/tools.html#webtools And get an empty page at adress http://mydomain.com/myproject/webtools.php http://mydomain.com/myproject/ is working good. Help!



30.0k

Hi,

have a look at your errors:

  • http errors (404 500 ...)
  • webserver errors
edited Mar '17

Hi,

Yep. My Errors:

Warning: include(): openbasedir restriction in effect. File(/root/phalcon-devtools/bootstrap/autoload.php) is not within the allowed path(s): (/home/admin/web/(mydomain)/publichtml:/home/admin/tmp:/root/phalcon-devtools) in /home/admin/web/(mydomain)/publichtml/phalcon/test/public/webtools.php on line 26

Warning: include(/root/phalcon-devtools/bootstrap/autoload.php): failed to open stream: Operation not permitted in /home/admin/web/(mydomain)/publichtml/phalcon/test/public/webtools.php on line 26

Warning: include(): Failed opening '/root/phalcon-devtools/bootstrap/autoload.php' for inclusion (includepath='.:/usr/share/php') in /home/admin/web/(mydomain)/publichtml/_phalcon/test/public/webtools.php on line 26

Fatal error: Class 'Phalcon\Bootstrap' not found in /home/admin/web/(mydomain)/publichtml/phalcon/test/public/webtools.php on line 28



30.0k

Warning: include(/root/phalcon-devtools/bootstrap/autoload.php): failed to open stream: Operation not permitted in /home/admin/web/(mydomain)/publichtml/phalcon/test/public/webtools.php on line 26

message is clear, you have to install phalcon-devtools outside the /root/ directory (in /home/admin/ for example)

Warning: include(/root/phalcon-devtools/bootstrap/autoload.php): failed to open stream: Operation not permitted in /home/admin/web/(mydomain)/publichtml/phalcon/test/public/webtools.php on line 26

message is clear, you have to install phalcon-devtools outside the /root/ directory (in /home/admin/ for example)

I have reinstalled tools in /home/admin/phalcon-devtools, configured apache2 openbasedir, and webtools.config PTOOLS_IP var to my ip. Result:

403 Forbidden Sorry! You are not allowed to access this page.

Warning: include(/root/phalcon-devtools/bootstrap/autoload.php): failed to open stream: Operation not permitted in /home/admin/web/(mydomain)/publichtml/phalcon/test/public/webtools.php on line 26

message is clear, you have to install phalcon-devtools outside the /root/ directory (in /home/admin/ for example)

I deleted ptools_ip, cleaned the cache, the situation on the page http://mysite.com/webtools.php did not change... http://i.imgur.com/zGi5JZr.png http://i.imgur.com/KWB6Glg.png http://i.imgur.com/qMSvrgx.png http://i.imgur.com/5k49ljw.png

Help!, webtools is not working((



715
Accepted
answer
edited Mar '17

The problem was in incorrect $SERVER['REMOTEADDR'] value - apache2 rpafmodule not worked propertly and the IP was wrong. According to Phalcon devtools sources $SERVER['REMOTEADDR'] is used to determine user IP.