We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon webtools not working

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



43.9k

Hi,

have a look at your errors:

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

Hi,

Yep. My Errors:

Warning: include(): open_basedir restriction in effect. File(/root/phalcon-devtools/bootstrap/autoload.php) is not within the allowed path(s): (/home/admin/web/(mydomain)/public_html:/home/admin/tmp:/root/phalcon-devtools) in /home/admin/web/(mydomain)/public_html/_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)/public_html/_phalcon/test/public/webtools.php on line 26

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

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



43.9k

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 https://mysite.com/webtools.php did not change... https://i.imgur.com/zGi5JZr.png https://i.imgur.com/KWB6Glg.png https://i.imgur.com/qMSvrgx.png https://i.imgur.com/5k49ljw.png

Help!, webtools is not working((



4.1k
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.