Lichaczew Posted October 19, 2008 Posted October 19, 2008 Hello everybody I lost two days finding a solution to my problems. Installation was OK. My shop works in sub-domain "sklep1". During I try to genarate sitemaps I receive the following error messages: [b]/sklep1/sitemapproducts.xml[/b] Warning: fopen(/sklep1/sitemapproducts.xml) [function.fopen]: failed to open stream: No such file or directory in /home/coins/public_html/sklep1/sitemap.class.php on line 592 Blad: Nie wygenerowano google sitemap produktow! [b]/sklep1/sitemapcategories.xml[/b] Warning: fopen(/sklep1/sitemapcategories.xml) [function.fopen]: failed to open stream: No such file or directory in /home/coins/public_html/sklep1/sitemap.class.php on line 592 Blad: Nie wygenerowano google sitemap dla kategorii! [b]my test of variables $pattern: sitemap*.xml $savepath: glob($this->savepath . $pattern):[/b] Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/coins/public_html/sklep1/sitemap.class.php on line 762 Warning: Invalid argument supplied for foreach() in /home/coins/public_html/sklep1/sitemap.class.php on line 762 /sklep1/sitemapindex.xml Warning: fopen(/sklep1/sitemapindex.xml) [function.fopen]: failed to open stream: No such file or directory in /home/coins/public_html/sklep1/sitemap.class.php on line 592 Blad: Nie wygenerowano google sitemap dla strony glownej! Array ( [QUERY] => Array ( [PRODUCTS] => Array ( [sTATUS] => success [NUM_ROWS] => 185 ) [CATEOGRY] => Array ( [sTATUS] => success [NUM_ROWS] => 25 ) ) [sAVE_FILE_XML] => Array ( [0] => Array ( [file] => /sklep1/sitemapproducts.xml [status] => failure [file_exists] => false ) [1] => Array ( [file] => /sklep1/sitemapcategories.xml [status] => failure [file_exists] => false ) [2] => Array ( [file] => /sklep1/sitemapindex.xml [status] => failure [file_exists] => false ) ) ) This what is bolded font above I get as a result of small modification of code aroud the lines where the the problems were appearing. I enetered lines to ECHO variables values. Perhaps it can help somebody familiar with PHP. Below is the code with the line 762. Line 762 is the one with foreach echo ('<BR><BR>my test of variables <BR>'); echo ('$pattern: '. $pattern.'<BR>'); echo ('$savepath: '. $savepath.'<BR>'); echo ('glob($this->savepath . $pattern): '. glob($this->savepath . $pattern).'<BR>'); // echo ('array_merge(glob(this->savepath . $pattern)) as $filename: '. array_merge(glob(this->savepath . $pattern).'<BR>'); foreach ( array_merge(glob($this->savepath . $pattern)) as $filename ) { In my opinion there is a very simple bug which I do not see since I am not familiar with PHP. Error is shown exactly - argument is not an array - but that's not enough for me. Is there anybody who can help? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.