Hi there.
I just downloaded PHPCrawl, and I can't seem to make it work. I'm trying to run example.php as shown on their webpage: http://phpcrawl.cuab.de/example.html, but it gives me this error:
Warning: unlink(): No such file or directory in .../PHPCrawl_081/libs/PHPCrawlerUtils.class.php on line 572
Fatal error: Uncaught exception 'Exception' with message 'Error creating working directory '/phpcrawl_tmp_26711389643165/'' in .../PHPCrawl_081/libs/PHPCrawler.class.php:782 Stack trace: #0 ...PHPCrawl_081/libs/PHPCrawler.class.php(276): PHPCrawler->createWorkingDirectory() #1 .../PHPCrawl_081/libs/PHPCrawler.class.php(532): PHPCrawler->initCrawlerProcess() #2 .../PHPCrawl_081/libs/PHPCrawler.class.php(330): PHPCrawler->startChildProcessLoop() #3 .../PHPCrawl_081/example.php(62): PHPCrawler->go() #4 {main} thrown in .../PHPCrawl_081/libs/PHPCrawler.class.php on line 782
Can anyone help me please?
I'm really stuck here :(
Thanks in advance, Mathias Lund.
Anonymous
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Hi Mathias!
Are you using windows?
If so, this probably is the (open) bug as described here:
http://sourceforge.net/p/phpcrawl/bugs/57/
The detection of the system-temp-dir fails.
This will get fixed in the next version.
For a temporary workaround, please set the temp/working-directory of the crawler manually by using setWorkingDirectory() brefore calling the go method in your script.
(http://phpcrawl.cuab.de/classreferences/PHPCrawler/method_detail_tpl_method_setWorkingDirectory.htm)
This can be any writablwe direcrtory on you system.
Please let me know if this works for you.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Hi! Thanks for your support, but I still can't make it work.
I'm running on OSX.
I'm not sure what you mean by manually setting a setWorkingDirectory().
Does that mean that I place
$crawler->setWorkingDirectory("/tmp/");
in example.php, and create a new folder named "tmp" in my project?
I'm kind of new to crawling sorry :)
Thanks for aiding me!
Yes, just set the working directory to ANY existing and writeable directory you want.
phpcrawl just needs it to store some temporary data.
Like $crawler->setWorkingDirectory("/home/me/dontknow/temp/");
BTW: "/tmp/" is NOT in your project-directory, that would be "./tmp/".
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Man thank you so much!! I just edited the WorkingDirectory in PHPCrawler.class.php to a folder on my desktop.
I wouldn't have been able to do it without your assistance.
Thank you so much!
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
OK! So im closing this since the bug is already reportet here:
http://sourceforge.net/p/phpcrawl/bugs/57/
Good luck!
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I did this just before $crawler->go();
$crawler->setWorkingDirectory("./tmp/");
And I created a tmp folder in the same directory as my example.php. Doesn't work, gives the same error.
Hi!
Just seems that phpcrawl doesn't have the permission to write to you tmp-dir.
Get sure the user who runs phpcrawl has the permission.