Localhost points to different address - cakephp

I have an app developed with CakePHP and it is working just fine on my local machine. Now, I wanted to develop another app with CakePHP. I installed cake in a different folder, configured vhost and server block and did everything like for the first app. I created an empty app, just basic controller and view and when I type the address for the second app I get the first app!!! Weird thing is that all links are working and when I click I get in browser url like secondapp/companies but the content is firstapp/companies. Once more, the second app is empty, no controllers, views and models, just a basic one. Then I did all that in htdocs, and the same problem occurs (none of the apps wasn't in htdocs, but in folders on E partition).
Can someone please give me some help before I kill myself?
Thank you...

If the problem is not on the database configuration, maybe cache problems ? Try it on a private browser/incognito ?

Related

react-app from subdirectory does not get loaded

I'm working for educational purpose on create a react app and serve it in a subdirectory of an existing domain which already hosts a web application.
Just to try to be more clear I have this situation:
www.mydomain.com (this is a web application currently online)
Now I need to put this new web app under
www.mydomain.com/test
To try to make it work I have my wwwroot folder with my brand new subfolder wwwroot/test.
Now the problem is that if I just put (in wwwroot/test) a simple html file with nothing more than just an <h1> tag, I can open the URL and see the content in it.
If I put my react-app (which work fine in my develop environment) I just see an empty page and if I open the inspector I see that some of the necessary resources aren't reachable because their requests point to root domain (www.mydomain.com/css/ionicons.min.css instead of www.mydomain.com/test/css/ionicons.min.css).
This is my very first time with IIS and I'm trying to get it work by myself, but it seems that I'm unable to find a proper solution to my problem...
Hopefully I was clear enough!
thanks in advance to all who will spent some time reading about this!
I've already made some research and all of them seems to point to some kind of redirect/rewrite rule to write in the web.config of my subdirectory app and/or in the web.config of the root app.
I've also tried to put "homepage": ".", in the package.json which solved the problem of the resources not getting loaded from the proper path but the page is still blank.

Request.InputStream empty

A number of years ago I wrote a .aspx page that handled a HTTP POST Request which contained a piece of xml. The code read the xml using Request.InputStream - it worked fine for years until The DNN site that it was running in was updated to 5.6.8 now Request.InputStream is always empty. Note that the page is completely separate to DNN but located in site.com/Special/tlweb.aspx .
I've tested the same page on the same server using .net 4 but with a different IIS site and it works fine. Since another app POSTS data to the current URL I need to get it working in the existing location - changing the app is not an option.
I kind of think something was done in DNN 5.6.8 that was intended to stop cross site scripting attacks but I'm really having trouble figuring out what changed and what I can do to ensure that the specific page runs as it did previously.
Can anyone make any suggestions please?
Thanks
Josh

cakephp auth login issue, only white screen appear

I’ve created a small cakePHP application that uses the auth component to manage an admin section for changes.
The problem I’m having ‘only in the production environment’ is that after I login all I can see is a blank white screen. I should be redirected to a ‘dashboard’ view. This blank screen is also what I get with all other ‘admin’ prefixed views that require a logged in user, thus the auth component.
What is strange about this are two things, (1) this works fine in the local host and (2) this application is a copy of one that works fine in both the local host and production.
What I’ve done to try and resolve this is:
Checked the previous application copy; nothing different found
Checked that the passwords were hashed
Checked that the .htaccess file was uploaded in ASCII format (suggested by the host)
Any help with this is appreciated.
Ideally I’d like to understand how to trouble shoot this type of problem.
Thanks, Prasad
Possible things to do/check...
Turn on debug in your app/config/bootstrap.php file.
Clean out caches in each of the directories in app/tmp/cache.
Make sure you've properly created ACL stuff.
Check contents of app/tmp/logs/error.log and app/tmp/logs/debug.log.
Check /var/log/httpd/error_log (or wherever your web server makes its own logs for errors and php errors).

Cakephp multiple applications in root folder

I have two apps and I want to access the first app by http://localhost/ (Note: no app1 folder specified here) and the second by http://localhost/app2/. How can I set this up?
why not working with virtual hosts?
thats the right way to do it:
http://www.dereuromark.de/2011/05/29/working-with-domains-locally/
you can have as many "vhosts" as you want. this will also enable you to work locally as you would live (on the webserver).

Preview Pane Not Displaying Correct Formatting

I am using C1 3 and am having problems with the preview pane.
The C1 site uses master pages for templates, and works correctly when published. However, it is not displaying correctly in the preview pane. It visually appears to be ignoring CSS settings.
This site was copied from an original install, on another sever, that works correctly.
Any tips and or ideas would be greatly appreciated.
*UPDATE**
In the content view, which is not working, it is using this url
http://www.abc.com/Composite/content/Frontend/Images/logo.gif
All other sites, including the published version of the site above use this url
http://cms.abc.dev/Frontend/Images/logo.gif
I am assuming the same is happening for all images and style sheet references.
However, I cannot find where this is happening. In the master page items are referenced as follows:
href="~/Frontend/Styles/layout.css"
ImageUrl="~/Frontend/Images/logo.gif"
Thats weird... have you somehow accidently configured the /Composite/Content folder as an application? Thats almost the only explanation why asp.net would expand ~ to /Composite/content/ instead of just /.
The preview-tab is handled through a wrapper-page that lives inside /Composite/content, unlike normal viewing of published pages which is handles by the root itself.
I think i found the problem...
I created a new app pool, used it, and now it works.
I guess the app pool somehow got corrupted...

Resources