Support

Admin Tools

#14076 PHP File Scanner never finishes

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Tuesday, 11 December 2012 18:00 CST

geoffc
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: (unknown) 2.5.8
PHP version: (unknown) 5.4.5
MySQL version: (unknown) 5.0.91
Host: (optional, but it helps us help you) 1&1
Admin Tools version: (unknown) 2.4.2

Description of my issue: Downloaded and installed Pro version 2.4.2.

Tried running a PHP File scan. It immediately came back with zero files found.
Very strange since I had just updated a few modules and Akeeba Backup as well.
Looked at the configuration but changed nothing, just saved and tried rerunning.

This time I get the Scan in Progress window with the 'last server response 1 second ago'.
This has not changed for over 20 minutes, which is plainly wrong since scans using previous versions completed within minutes. I am not configured to calculate diffs in the scan.

Not a show stopper but one to fix.

Also whilst raising this ticket I will mention that the 'Clear Temp Directory' no longer displays the progress bar in this version. Again not a problem per sec. Just thought you might not be aware.

Regards
 geoffc

nicholas
Akeeba Staff
Manager
Regarding the PHP scanner, go to Admin Tools, PHP File Change Scanner and click on the blue Configure button at the top left of the main page area. Try setting:
- Minimum execution time: 1 second
- Maximum execution time: 7 seconds
- Runtime bias: 50%
and run it again. Does it work better now?

Regarding the clean temp feature, I am not sure what you mean. If the process takes too little time no progress bar is displayed, just a message that the window will close automatically in 3 seconds. Do you mean something different?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

geoffc

Thank you for the swift reply.

I have tried those settings and it now completes after about 5 minutes but has found no files differences and no report generated. This seems strange since I have as I said updated several modules, the Akeeba backup etc and these have always been reported as changes in earlier releases. 

Instead of leaving the 'Files types to be scanned blank' which is the default, I tried setting the 'Files types to be scanned to' php.   I had previously tried using '.php' and '*.php' since it is not clear how the file types should be specified.  Again it just runs and runs even with the suggested settings.

It has always run successfully prior to this last release, and I have never had cause to change any of the settings from the default.

The 'No report generated' might be true IF it somehow in the earlier runs created its list which I never saw of course, since I terminated it after 30 mins of running.  In which case I could re-install something to test it again ot would 'touching' a file be sufficient?

Re: the progress bar in the clean temp directory, in previous versions the bar has always been shown, even when there is little (or nothing) to clean, yet I have not seen it in the current version at all.  Is this one of the changes?

One other thing I have noticed is that in the ticket notification message I get a number of caret A characters. i.e.  This messages subject was:

A new message was posted in your public ticket #14076 &emdash; "PHP File Scanner never finishes"

This is probably an ATS problem of course.  [I have seen similar problems on my own site when saving articles etc but have never decided whether it is the editor I am using (JCE) or something else.]

 geoffc

geoffc

Drat! 

5 minutes after I had posted and after 20 minutes it has finished AND generated a report.

So it seems like one has to specify 'php' in the file types to be scanned.  Is that expected?

This also leads to the question as to whether one has to speciify the 'excluded directories' and 'excluded files' as well now?

 geoffc

nicholas
Akeeba Staff
Manager

I have tried those settings and it now completes after about 5 minutes but has found no files differences and no report generated. This seems strange since I have as I said updated several modules, the Akeeba backup etc and these have always been reported as changes in earlier releases.

This is indeed strange. Please take a look at the Configure page. Please put the following in the "File types to be scanned" text box:

php
phps
php3
inc

You should only put the extensions, without a dot or a star, in there. Normally the field should be pre-populated with these settings.

Again it just runs and runs even with the suggested settings.

Look, it took 5 minutes to scan no file whatsoever (since you were using invalid settings)! This tells me that actually scanning something will take hours.

It has always run successfully prior to this last release, and I have never had cause to change any of the settings from the default.

This is because there were no settings to change. If it crashed, tough luck, there was no way to fix it.

The 'No report generated' might be true IF it somehow in the earlier runs created its list which I never saw of course, since I terminated it after 30 mins of running.  In which case I could re-install something to test it again ot would 'touching' a file be sufficient?

No. You seemed to have used invalid settings which is why nothing was found. No files were scanned. It just took 5 minutes for the code to walk through your site's files/folders structure.

Re: the progress bar in the clean temp directory, in previous versions the bar has always been shown, even when there is little (or nothing) to clean, yet I have not seen it in the current version at all.  Is this one of the changes?

No. The code was actually not even touched since several versions ago. The progress bar appearing depends on how much cruft there is the tmp folder and how long it takes to delete it. If takes less than 3 seconds then no progress is shown, ever. That has been the case ever since version 1.0 :)

One other thing I have noticed is that in the ticket notification message I get a number of caret A characters. i.e.  This messages subject was:

Yes, I know! I'm trying to iron out main issues in the ticket system. It looks like something in the HTML source is not parsed correctly by PHPMailer. I am actually working on it.

This is probably an ATS problem of course.  [I have seen similar problems on my own site when saving articles etc but have never decided whether it is the editor I am using (JCE) or something else.]

Thanks! You saved me from lots of wasted hours. My test environment uses vanilla TinyMCE, whereas this site uses JCE with a custom front-end profile (admitedly more secure and more sexy than plain vanilla TinyMCE). I now know how to reproduce those issues.

Drat!

After 15 miniutes it has finished AND generated a report.

So it seems like one has to specify 'php' in the file types to be scanned.  Is that expected?

Ha ha! As I was typing my reply this reply of yours came in. I had guessed half an hour, it was 15 minutes. I love it when I'm too pessimistic in my educated guesses! :D

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

nicholas
Akeeba Staff
Manager

BTW, excluded directories and excluded files can be left blank – unless you have a reason to want to skip certain files / folders (e.g. cache directories and stuff).

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

geoffc

I am rerunning with the extra file types you suggested.  [It may be a perception but it does seem to be a little slower than previously, I would need to have runs over several days to be sure, since I have no control over the host load, which of course varies.  There are about 6000 php/inc files to be scanned.] 

I presume that the extra file types have to be entered 'one per line' or can they be separted by spaces or commas?

Also just to clarify the 'Excluded directories' are the previous exclusions i.e. tmp etc still skipped or should these be entered?  Again, 'one per line' or separated by commas etc.  I also presume that they assume the Joomla root path, rather than a specific server root?

I may seem to be pedantic but I suspect that this is likely to be a common question.

 geoffc

nicholas
Akeeba Staff
Manager

The speed should not be affected at all. The settings are read only once, when the scan starts, and kept in the cache until it completes. The settings work exactly like in Akeeba Backup. In fact, the PHP File Change Scanner is Akeeba Engine with a custom archiver engine. Instead of producing archives it simply scans the files. I like reusing and repurposing my code instead of reinventing the wheel :)

The extra file types have to be entered one per line, no commas, dots or anything else.

The excluded directories need not specify the tmp directory or the cache directories. These are always and automatically excluded (otherwise you'd get memory outage / timeout errors). You can enter one directory per line. All folders and files are relative to Joomla!'s root.

I may seem to be pedantic but I suspect that this is likely to be a common question.

I will document all of that, of course :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

geoffc

The latest run with all the file types specified has finished with no report generated.  I will assume that that is good news, since I am unsure whether I have any inc, phps or php5 extensions anyway.

Thank you for you earlier answers.  If you every track down the  problem I would be interested to know what it is (as no doubt would JCE if that is indeed the problem area).  I have tried many possible solutions without success to date.

As efficient as ever.

 geoffc

nicholas
Akeeba Staff
Manager

You're welcome! Hopefully I will have some time today to look into the email issue :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!