ImpressPages admin page has 404 error - http-status-code-404

I have just installed ImpressPages 4_0_17 and I completed the installation process through the point of filling out the database form and submitting it. The next page gave a 404 error on the URL /ImpressPages/admin. Prior to that, the systems check page listed 3 warnings: Magic quotes Off, Apache mod_rewrite, PHP memory limit 64MB. No other info on these warnings was available on that page.
I am using the alias feature on GoDaddy for hosting, which allows me to create multiple websites in the same account. In addition, I am using a sub-domain for this install so I can test it out before replacing the original site. Because I uploaded the entire IP zip file and extracted it in the web root folder, all the IP files are now installed in the folder /ImpressPages.
After the 404 error, I altered the URL to be just /ImpressPages/. That actually loaded fine. In addition, a small dialog popped up saying that I had been automatically logged in as admin. It gave me the username, password and the email I configured for the site. It also provided the admin page URL that produces a 404 error and said I needed to go there to login in the future.
The home page at /ImpressPages/ loads and shows inline editing features. If I click the Lorem Ipsum link, /ImpressPages/index.php/lorem-ipsumy, I get a white page with the one line:
"No input file specified."
I have tried a few tweaks to the .htaccess file with no success. The latest active lines are shown below. All the other lines from the default file are commented out and I have not tried messing with them.
<IfModule mod_rewrite.c>
RewriteEngine on
# Attempt to fix SVG images, 6/4/2014
AddType image/svg+xml svg
AddType image/svg+xml svgz
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /ImpressPages/index.php?%{QUERY_STRING} [L]
# Redirect www urls to non-www.
# RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
# RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>
The changes I attempted to get admin access are in the RewriteRule. I prefixed index.php first with a slash, then with /ImpressPages/. Neither one helped. Any suggestions on how to get admin access will be greatly appreciated.
17:11 - New info:
With the /ImpressPages/ path and the following .htaccess lines enabled, I can now get the login dialog on the admin page. Once I enter the login correctly, the next URL is /ImpressPages/index.php with the white page described previously. Then reloading /ImpressPages/admin produces the same white page and the same /ImpressPages/index.php URL. So now I can login, but it doesn't help.
Options -Indexes
Options -MultiViews
Those lines are in the default .htaccess file already. I just removed the comment character to activate them.
17:45 - more progress.
I moved all the contents of the /ImpressPages/ folder up one level to web root. Then I removed /ImpressPages/ from the path for index.php in the rewrite rule. With that one change, admin login started working and I am now able to edit my site. There are still issues. For example, publishing a page does publish the changes, but then loads the typical white page with the URL /index.php/home. The URL / loads the home page correctly. Almost sounds like the URL routing is not working correctly.

It looks like ImpressPages instal decided your server doesn't support URL rewrites and has placed rewritesDisabled in config.php
Try to remove this config line.

Related

Wordpress 500 Error on remote website, but works locally

I encountered the dreaded wordpress 500 error but couldn't find a solution from other topics. Here is my situation:
My site works fine locally, with the url localhost/zufic. It worked fine on my staging test.zufic.com as of this morning.
I flushed my permalinks (on local) to fix some inconcistencies in page URLs, which worked
After uploading the new database to my staging site (changing my URLs from local to remote, as usual), the CSS on my homepage is a mess, and all subpages give me 500 errors.
Screenshots of the homepage between local & remote
I tried the following, to no avail:
disabling all plugins
flushing permalinks on the remote website
checking my DB for a bad search/replace in my URLs, but all is fine
reinstalling the core wordpress files
deleting all remote FTP files and replacing them with the local WP folder
uploading a backup of my remote DB
Updating my PHP version
I also tried displaying error logs through wp-config but couldn't get them to show up for some reason.
I certainly messed up something, but what? Any tip for how to proceed and save my sanity?
UPDATE:
So I checked the logs, where this error shows up repeatedly:
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://test.zufic.com/
From what I understood, it comes from a faulty .htaccess? I reset it on the remote site (renamed the existing file, flushed the permalinks to generate a new htaccess) > I can see my subpages now, but the CSS is still messed up.
Here is my remote htaccess (=default WP file):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Here is the error I see in WP_debug:
[16-Sep-2021 14:56:00 UTC] PHP Warning: require_once(/home/zuficcomap/test/wp-includes/sodium_compat/src/Compat.php): failed to open stream: No such file or directory in /home/zuficcomap/test/wp-includes/sodium_compat/autoload.php on line 45
[16-Sep-2021 14:56:00 UTC] PHP Fatal error: require_once(): Failed opening required '/home/zuficcomap/test/wp-includes/sodium_compat/src/Compat.php' (include_path='.:/usr/local/php7.0/lib/php') in /home/zuficcomap/test/wp-includes/sodium_compat/autoload.php on line 45
[17-Sep-2021 09:15:22 UTC] PHP Notice: Array to string conversion in /home/zuficcomap/test/wp-includes/formatting.php on line 1098
The Compat.php file IS present at the specified location so I'm not sure why it can't be found?

Sonata admin missing css files

Working on a site with php 7.2, Symfony 4 and Sonata admin 3.
In dev, on my machine, everything works fine, the site itself, and the two admins (user and content).
I have put everything on the final server (unfortunately, file by file, no console with S4 ! so, no "composer:install"...).
Still on dev, the site works fine, all functionalities.
But when I try to use the admin page, I only get a non-formatted page. None of the assets (css and js) seems to work!
However the source code are identical, on localhost and the distant site...
Can anyone help me
Edit : I found where the issue comes from : it's linked to .htaccess.
The http address I use ends in /public/index.php. I use .htaccess to shorten it and when using the .htacces redirection I can't get the assets of the admin page, while it works fine without redirection.
Is there something I should change in my .htaccess code ?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ public/index.php
</IfModule>

htaccess issue after setup restriction to folders

I have a demand where I need to deny access to a folder (localhost\uploads\video). I got this by applying the below rule in the htacess at localhost:
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?localhost.*$ [NC]
RewriteRule \.(|avi|mp4)$ - [F,NC]
Scenario 1 - It works fine if I try to access the resoruce (.avi files mainly)by typing the address straighforward in the browser and this is the message:
Forbidden You don't have permission to access /video/23/videoname.html on this server. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.THIS IS OK.
Scenario 2 - With tis rule applied, if I try to click in any link in my homepage which leads me to the video I'm also getting the same message than in scenario 1 and this isn't what I wanted to. I thought when I would access through homepage(by clicking over the avi link) this message wouldn't come.
How can I get this done in this way? I want to block over direct access but I want to keep it working fine if this be executed from homepage...
Regards
Eliel
Your regex seems to be problem for URI pattern matching. Change you rule to:
RewriteCond %{HTTP_REFERER} !(www\.)?domain\. [NC]
RewriteRule \.(avi|mp4)$ - [F,NC]
Make sure to replace domain with your actual domain name.

how to remove index.php from url cakephp

i have build a webapp on Cakephp 2.3 .. on my locaLhost all urls were fine.. i can access my urls like this
http://localhost/Cakephp
but now when i have uploaded the site on server in root folder ... i cant access my url like this
http://www.myweb.com
instead it can accessible like this
http://www.myweb.com/index.php/login
what i think that might be a problem is the .htaccess file in my app/webroot folder
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
I think this kind of index.php is causing the problem ..as i dont know about .htaccess so dont know how to remove it.
How do I get index.php out of my urls?
So, it should be ok? You already have mod_rewrite?
If mod_rewrite is correctly loaded, .htaccess files are in place and index.php still appears in links then it is most probably problem with core.php framework configuration file.
Problem cause
In my case it was problem with App.baseUrl configuration option:
Configure::write('App.baseUrl', env('SCRIPT_NAME'));
Solving problem
Here is how I fixed that problem (and few others with redirects) by commenting out following line from core.php:
// Configure::write('App.baseUrl', env('SCRIPT_NAME'));
Check the mod_rewrite module is installed or not? if not kindly enable it in httpd.conf file.
Find the following line and remove # (means uncomment) in front of it.
LoadModule rewrite_module modules/mod_rewrite.so
Also don't forget to restart apache http service using following command:
service httpd restart
Following are the steps to edit http.conf file from CPanel:
Log in to WHM/cPanel as the root user.
Open the "Service Configuration" section.
Open the "Apache Configuration" section.
Click "Global Configuration" to access the httpd.conf's settings, as displayed through cPanel.
Make your desired changes, then click the "Save" button. This saves the changes and then reboots Apache so that the changes are applied.
Read more: http://www.ehow.com/how_8696084_edit-httpdconf-cpanel.html#ixzz2YRDEgOMT
On IIS Server Read this link to enable mod_rewrite
on ubuntu,
sudo a2enmod rewrite
sudo systemctl restart apache2

Cakephp not loading css and js files

I seriously can't understand what is going on here. I just uploaded my web app from localhost to new domain-name on Windows IIS Server. When I try to access the web app, CSS files and images are not loaded and I get the following error:
"CssController could not be found."
I don't understand why it is doing this.
Although I've written code like this in my default.ctp:
echo $this->html->css('generic');
CSS files are placed in:
app\webroot\css
I have searched on Google and have tried everything, I even uncommented the line:
Configure::write('App.baseUrl',env('SCRIPT_NAME')); in core.php
But I still cannot get this to work. Please help me to resolve this issue.
Double check that you have all the .htaccess files in place.
Also making sure /app/webroot/ has its .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
Your request is trying to get the css file from /css/ but i'm thinking you don't have the proper .htaccess files in place to route it to the webroot and not to a controller!
also check if mod_rewrite is enabled
Edit: and then I saw the IIS part, you need some IIS equivalent to mod_rewrite
In this article you find all the information required for successfully run CakePHP web applications under Microsoft IIS web server: http://bakery.cakephp.org/articles/filippo.toso/2008/01/29/cakephp-on-iis
Here is a related question about getting cake to work on IIS: CakePHP 2.2.2 not working on Windows IIS7

Resources