php-reports
php-reports copied to clipboard
404 Not Found - No Charts or Data Showing...
I have successfully gotten the Reports List page to display now. However, none of the reports links work.
I keep getting the following no mater which link I click:
Not Found The requested URL /report/html/ was not found on this server.
In the cloned Git files, there was no such directory as /report/html. How does one get the sample charts to show?
I think you are having my same issue in that url rewriting is not working. What web server are you using? Apache, ngix, IIS....?
Thank you valepu for your input. I am using Apache for Windows on a Windows 7 virtual machine. I am also using the .htaccess file provided in the PHP Reports Master zip that turns rewrite on.
Ok then, is it possible to see your httpd.conf? I had an issue because i was using a directory with an alias that was not in the documentroot, for some reason this makes url rewrite not working
OK. I was able to locate my httpd.config: You should be able to click on it two times to see it maximized.
i don't see your virtualhost entry, and i don't see any file being included in your configuration. I'm no Apache expert i just know those few things i needed to fix issues i had and to make things work so i can't help much.
I suggest you to ask on another site such as stackoverflow since this is not strictly related to php-reports but rather to mod_rewrite not doing its job (which doesn't necessarily mean it doesn't work but rather that your server is not correctly configured to use it)
Thank you for your assistance valepu. When you suggest that mod_rewrite is not doing it's job. Just so that I know what to ask for when I post elsewhere, what exactly is it supposed to be doing?
You do not have the mod_rewrite module enabled. Its commented out. Uncomment out #LoadModule rewrite_module modules/mod_rewrite.so. And in directory "c:/Apache24/htdocs" make sure to change "AllowOverride none" to "AllowOverride all"
Thank you ripperkhan... After posting my prior comment I decided to go back into the httpd.conf file and do a search for mod_rewrite. I did find it with the "#" in front of it, denoting that it was inactive. I have removed the # and have restarted the server. I will try again once it's back up and see what happens. Can you clarify your last sentence please? "and in the make sure this is set AllowOverride all"
Sorry I updated the comment.
Thanks. I am not sure how to set that specific mod to AllowOverride all... I am finding "AllowOverride" in two places and they are:
'# 'Deny access to the entirety of your server's filesystem. You must '# 'explicitly permit access to web content directories in other '# '<Directory> blocks below. '#' <Directory /> AllowOverride none Require all denied </Directory>
And then #2)
'# 'AllowOverride controls what directives may be placed in .htaccess files. '#' It can be "All", "None", or any combination of the keywords: '#' AllowOverride FileInfo AuthConfig Limit '#' AllowOverride None
Are either of these it? Or do I need to add "AllowOverride all" just behind the LoadModule rewrite_module modules/mod_rewrite.so ?
Thanks so much for your help.
Change the #2 one.
ripperkhan... Many thanks. I will be restarting the server momentarily. I will update this comment with the results tomorrow.
Ok. No problem happy to help.
My bad, i misread on your first answer that mod_rewrite was turned on so i assumed it was enabled and didn't even check that, instead you were talking about the .htaccess file. Hope you solved though
Yes. It all worked out. I am now up and running. THANKS TO ALL!
Awesome!
I am new to PHP and I don't quite understand the solution here... I am getting the same 404 code.
I turned on AllowOverride for the php alias I have (see below), but it still didn't work. How do I determine if rewrite is actually working? THere is a mention of the .htaccess file, it exists and has what came with the phpReports delivery.
BTW I'm using the EasyPHP-DevServer-14.1VC11 install....
Thx, Mark httpd.conf `Alias /php "I:\work\build\php" <Directory "I:\work\build\php"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named explicitly --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>`
HTACCESS: `RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [QSA,L]
DirectoryIndex index.php`
I've figured out my problem...
I had to add the following line to my .htaccess file in the php_reports directory: RewriteBase /php/myphp/php-reports
My HTTPD.CONF file had: Alias /php "I:\work\build\php" <Directory "I:\work\build\php">
It turns out the rewrite uses '/' as the base so I had to redefine it and it worked...