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

Webtools: Blank page on webtools.php

Good evening,

I am new to PhalconPHP and wanted to start a skeleton application with the Webtools. I downloaded and installed these following every step on the tutorial page, I don't see anything that could be wrong there.

If I type in https://localhost/project I see the message that I'm surfing with PhalconPHP now and these things. But when I try to access /project/webtools.php, I see nothing but a blank page. I googled this issue and saw that I am not the only one, but the tips given there didn't help or should've been fixed in an earlier release.

My system: Windows 10 x64 with Apache 2.4.18, PHP 7.0.6 and Phalcon 3.2.3. I put the devtools to D:\phalcondevtools, edited the PATH, but the file generation worked out pretty well as stated above.

I created the skeleton application with this command:

phalcon create-project PROJECT --name PROJECT --enable-webtools --type=modules --use-config-ini --trace

There are no errors in the php log file, I can't find any other log files. Are there log files specifically from Phalcon?

Thank you!



16.3k
edited Oct '17

I am using Wamp on Windows 7 x64 and a similar setup. It works. I see webtools page without any formatting initially. Then I add the below line in my config.ini. After that https://localhost/test/webtools.php works.

staticUri      = /test/

I do see a blank page without any errors for another old project that I downloaded and installed from github. Will check what could be the reason.

My DevTools install looked something like:

C:\Wamp\www\phalcon>curl -s https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading...

Composer (version 1.5.2) successfully installed to: C:\Wamp\www\phalcon\composer.phar
Use it: php composer.phar

C:\Wamp\www\phalcon>php composer.phar install
Loading composer repositories with package information
Updating dependencies (including require-dev)
...
...
Generating autoload files


4.0k

I tried this, but didn't change anything.

If Phalcon would throw any error messages, where would them be written to? Normal error.log @ apache/logs?



16.3k

AFAIK there is no phalcon log. Only PHP, Apache & MySQL error logs. You mentioned you had already checked the PHP error log. Are you using Wamp, Xampp or something else. Check if your php.ini setting has

error_reporting = E_ALL
display_errors = On

Can't think of anything else right now.



4.0k

I am using XAMPP. There are some errors in the log file (I edited it with both the directives above), but they have nothing to do with Phalcon I think.

[Sat Oct 28 09:23:27.441204 2017] [ssl:warn] [pid 8888:tid 672] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Sat Oct 28 09:23:27.500327 2017] [core:warn] [pid 8888:tid 672] AH00098: pid file D:/xampp7.0/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Oct 28 09:23:27.588581 2017] [ssl:warn] [pid 8888:tid 672] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Sat Oct 28 09:23:27.616663 2017] [mpm_winnt:notice] [pid 8888:tid 672] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.6 configured -- resuming normal operations

[Sat Oct 28 09:23:27.616663 2017] [mpm_winnt:notice] [pid 8888:tid 672] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39

[Sat Oct 28 09:23:27.616663 2017] [core:notice] [pid 8888:tid 672] AH00094: Command line: 'd:\xampp7.0\apache\bin\httpd.exe -d D:/xampp7.0/apache'

[Sat Oct 28 09:23:27.618661 2017] [mpm_winnt:notice] [pid 8888:tid 672] AH00418: Parent: Created child process 19336

[Sat Oct 28 09:23:28.056969 2017] [ssl:warn] [pid 19336:tid 704] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the ser ver name [Sat Oct 28 09:23:28.197163 2017] [ssl:warn] [pid 19336:tid 704] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

[Sat Oct 28 09:23:28.224261 2017] [mpm_winnt:notice] [pid 19336:tid 704] AH00354: Child: Starting 150 worker threads.



16.3k

I am using XAMPP. There are some errors in the log file (I edited it with both the directives above), but they have nothing to do with Phalcon I think.

Yes you are right, they don't have anything to do with Phalcon but they would ensure some error shows up on screen.

I searched a bit. I am just guessing after reading this full post. Check the last 4-5 posts and see the last post from this month itself. Where does PHP's error log reside in XAMPP?

Is PHP error log ON and exists in your setup. I think error.log in Xampp is Apache error log, not php error log.



4.0k
edited Oct '17

I created the /php/logs directory and forced an error to be written there, but still nothing related to Phalcon.

But I got something;

I forced XDebug to run, and now I got this:

€dit: Don't know how to append pictures, so here is the Imgur: https://imgur.com/a/mc6Tm



16.3k
edited Oct '17

I am not an expert but I think your installation might have some issue because it seems to be failing on the first step itself. The error doesn't give much hints. I hope you restarted everything (xampp) after creating the directory. Does phpinfo() give you correct info about logs etc. I have had issues if I changed some configuration and didn't restart. Secondly, I remember seeing some error like this when I tried to setup DevTools outside the C:\Wamp\www\ (Wamp's home directory for all websites) using some symbolic link. Could that be an issue.

Probably somebody from Phalcon team could shed some more light on the error you are getting.



4.0k
edited Oct '17

Sure, I restarted everything affected by any change I did. I tried to move DevTools to /htdocs in XAMPP, no change. Regarding phpinfo(), everything looks fine. I even tried this on a fresh installed machine and system (same versions as in my first post, but now Phalcon 3.2.4), same blank page. Maybe a dev can shed light on this.



16.3k
edited Oct '17

A few suggestions @Nyde. Check webtools.config.php. Does it look ok. Does the last line contain path to your project. If you have the time and interest try installing Wamp on your machine. It shouldn't take you more than 20-25min to setup everything including DevTools. At least it will tell you if Webtools works on your machine.

I noticed a devtools.log file in localhost/project/.phalcon directory. It probably got created because of errors in my cache path. If you have that log, check it out for any hints.



4.0k
edited Oct '17

Yes, everything's fine in webtools.config.php.

I installed WAMP and tried it, same problem. But on my machine (using XAMPP, see first post), I got it working by switching to an older branch of devtools (3.1.x instead of 3.2.x), now everything works fine (after adding staticUri as you in your first response). The devtools.log contains exactly the error I got from XDebug.

The file and function causing the problems (getCacheDir() in Initializable.php) was changed just 4 days ago (https://github.com/phalcon/phalcon-devtools/pull/1134). Do you think I should file an issue?



16.3k
Accepted
answer

You are right. Its a bug. I downloaded the latest version and tested. I also get a blank page and error:

Non-static method Phalcon\Bootstrap::getCacheDir() should not be called statically

You should report the issue.

Solved this issue. Could you try to latest version?