Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 Not Found - No Charts or Data Showing... #191

Open
Starfish777 opened this issue Jul 2, 2015 · 18 comments
Open

404 Not Found - No Charts or Data Showing... #191

Starfish777 opened this issue Jul 2, 2015 · 18 comments

Comments

@Starfish777
Copy link

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?

notfound

displayreports

@valepu
Copy link

valepu commented Jul 7, 2015

I think you are having my same issue in that url rewriting is not working. What web server are you using? Apache, ngix, IIS....?

@Starfish777
Copy link
Author

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.

@valepu
Copy link

valepu commented Jul 7, 2015

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

@Starfish777
Copy link
Author

OK. I was able to locate my httpd.config: You should be able to click on it two times to see it maximized.

confile

@valepu
Copy link

valepu commented Jul 9, 2015

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)

@Starfish777
Copy link
Author

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?

@ripperkhan
Copy link

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"

@Starfish777
Copy link
Author

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"

@ripperkhan
Copy link

Sorry I updated the comment.

@Starfish777
Copy link
Author

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
'# ' blocks below.
'#'

AllowOverride none
Require all denied

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.

@ripperkhan
Copy link

Change the #2 one.

@Starfish777
Copy link
Author

ripperkhan... Many thanks. I will be restarting the server momentarily. I will update this comment with the results tomorrow.

@ripperkhan
Copy link

Ok. No problem happy to help.

@valepu
Copy link

valepu commented Jul 9, 2015

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

@Starfish777
Copy link
Author

Yes. It all worked out. I am now up and running. THANKS TO ALL!

@ripperkhan
Copy link

Awesome!

@mbfbsae90
Copy link

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

`

HTACCESS:
`RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]

DirectoryIndex index.php`

@mbfbsae90
Copy link

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants