jonseg / crud-admin-generator

An open source tool to generate a complete backend from a MySql database.
http://crud-admin-generator.com/
MIT License
1.43k stars 441 forks source link

404 on clicking on a table #48

Open arjanvlek opened 9 years ago

arjanvlek commented 9 years ago

Hi all,

I have set up crud admin for a database. It loads the home page fine, but as soon as i click on a database table and select either list or create, the server throws a 404 error saying that the directory /crud-admin-path/table-name was not found.

This is my config:

Alias /outdoorparadise /var/www/crud_admin/web
<VirtualHost *:80>
    DocumentRoot /var/www/crud_admin/web
    DirectoryIndex index.php
    <Directory "/var/www/crud_admin/web">
        Options Indexes MultiViews FollowSymLinks
        Order Allow,Deny
        Allow from all
        AllowOverride all
        <IfModule mod_php5.c>
           php_admin_flag engine on
           php_admin_flag safe_mode off
           php_admin_value open_basedir none
        </ifModule>
   </Directory>
</VirtualHost>

It doesnt matter if I run it on localhost or on a real server as shown below: image

blag001 commented 9 years ago

check this https://github.com/jonseg/crud-admin-generator/issues/47#issuecomment-111649793

As far as I can see, it's a rewriting fail, check for your .htaccess and you virtualHost config (this is not really the funny part...)

arjanvlek commented 9 years ago

I got it to work on localhost just by enabling the rewrite module of apache. Why it won't work on the server is still a mystery. On a sidenote, what are the minimum PHP and Apache requirements? The server is running PHP 5.4 + Apache 2.2 on debian (armv6hf) The localhost is running PHP 5.5 + Apache 2.4 on Windows (64 bit).

There is also another web backend (pure PHP) with phpMyAdmin running on the server. If I change the /var/www directery to Allow from All, the index page of crud admin also gives a 404 error.

blag001 commented 9 years ago

"php": ">=5.3.3", (and Apache doesn’t matter) Do you know if your server have his rewrite module enable ? (phpinfo(); can help you)

The other backend/whatever, if not in the same folder or in a parent directory, is not a problem.

Your sub-folder /outdoorparadise/ need to be specified in your .htaccess I think.

viniciusdepaula commented 8 years ago

To check, look in /etc/apache2/httpd.conf and ensure that these lines:

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

bizkit45 commented 8 years ago

i cant get it to work..was working for a brief time yesterday, but today this error, when i click on table (list/create)

image

my vhost:

image

to sum up, i have same error as first post in this thread and i tryed everything..suggestions? thanks

edit i see table in both controllers & views folders, but yet i cannot access it. When i click list/create it gives me 404 error, that table is not found. here is the output from apache

[Thu Jul 07 19:59:37.557121 2016] [:error] [pid 4107] [client 89.212.142.48:51346] PHP Warning: require_once(/var/www/CRUD/web/controllers/pc/index.php): failed to open stream: No such file or directory in /var/www/CRUD/web/controllers/base.php on line 18, referer: http://91.185.208.210/wordpress/?page_id=17 [Thu Jul 07 19:59:37.557164 2016] [:error] [pid 4107] [client 89.212.142.48:51346] PHP Fatal error: require_once(): Failed opening required '/var/www/CRUD/web/controllers/pc/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/CRUD/web/controllers/base.php on line 18, referer: http://91.185.208.210/wordpress/?page_id=17 [Thu Jul 07 20:00:05.651642 2016] [:error] [pid 4100] [client 89.212.142.48:51352] PHP Warning: require_once(/var/www/CRUD/web/pc/../../../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/CRUD/web/pc/index.php on line 14, referer: http://91.185.208.210/CRUD/web/ [Thu Jul 07 20:00:05.651695 2016] [:error] [pid 4100] [client 89.212.142.48:51352] PHP Fatal error: require_once(): Failed opening required '/var/www/CRUD/web/pc/../../../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/CRUD/web/pc/index.php on line 14, referer: http://91.185.208.210/CRUD/web/