CakePHP without mod_rewrite problems - mysql

I've developed a website using CakePHP and I am now trying to host it on the live server. I couln't get much help from the hosting service, but I think they do not allow mod_rewrite (I get 500 server error whenever I try to turn it on).
So, I looked into using CakePHP without mod_rewrite. Now I can at least see the website, but I'm getting tons of errors, in particular:
The css and js files are not found.
There seems to be problems with the database, although it might be related to the problem above, I can't tell for sure.
The live website can be seen at new.enviro.lu.
The working website can be seen at enviro.webforall.be
Can anybody point me into the right direction to solve these problems?
I'm using CakePHP 1.3.4.

The problem with the CSS and JavaScript pages not showing is that you have Apache's DocumentRoot point to the wrong directory. The DocumentRoot should be /app/webroot, but you have it set to Cake's root directory. You can see that the paths work if you access http://new.enviro.lu/app/webroot/.
The database error on the page is:
Error: Database table content_pages for model ContentPage was not found.
This suggests that either the content_pages table has not been created as the error message says or the database configuration points at a wrong database.

Try contacting your hosting provider and ask them to turn mod_rewrite on for your account, or ask them how you can do it. CakePhp will not work without it.

Related

Transferring wordpress from a hijacked domain name

I've read many questions on here but nothing seems to fit my scenario and try as I might, nothing seems to work so far!
My host unlawfully transferred my domain name out from under me resulting ine being unable to use the usual plugins to export my site and migrate it… Nominet enabled me to regain access to my domain name and I’ve transferred it out from 1&1 Ionos to a new host (GoDaddy) and went about setting up a hosting plan with them.
So, what I have is a webspace with Ionos with all the WordPress files and the database from my WordPress site which I’ve downloaded via FTP and my new domain name set up with a Linux server with GoDaddy.
The issue I’m facing is, when I upload the site files I downloaded via FTP and import the database, it keeps coming up with the “install WordPress” screen to set up a fresh WordPress site.
I’ve transferred over the htaccess file and now, it’s trying to download a file that doesn’t do anything (according to the text in the file when opened with notepad).
I’m in a right pickle. Wp-config is all set up correctly so far as I can tell pointing to the new host with the new database username and password.
Can anyone provide a step by step guide on moving from another server webspace to the domain name? All the guides online I can find includes migration whilst the previous site is still active. For me, this isn’t the case.
My issue is (probably) unique because it is effectively a local host set up on the 1and1 server where everything is still pointing to my domain name, I’ve downloaded this and assumed it wouldn’t be too difficult to just upload, reconnect the database and I’d be good to go but it doesn’t seem to be so easy as I expected.
So far, I’ve spent the last 8 hours toying with it myself, and since the 11th June dealing with the domain hijacking and spent much of that time with Ionos and GoDaddy support to try and get it all sorted and up and running… Its half 3 in the morning now and this post is probably going to be my last avenue for a solution before giving up on it! 😂
Really appreciate the help.

How do I add a Remote Connection to Ionos Database for ExcelforMySQL?

I have a database that I have created for a friend of a mine that he would like to store his data and work directly from on a daily basis. Recently I came across ExcelforMySQL and thought this would be a perfect AddIn for him to use.
I have successfully linked the AddIn to the database (Xampp Local connection) and this loads up fine but when I move the database onto a webserver that I have with ionos(1and1) and enter the Host Details along with the Username and Password, I get the following error:
Connection attempt failed.
Unable to connect to any of the specified MySQL hosts.
When I click Show Details:
All it says is One or more errors occurred.
Would really appreciate it, if somebody could advise on how to fix this, as I really want to be able to work live on the data and update the changes from the user directly in Excel if possible and this addin looks like it does that.
If anyone has any other suggestions then I am happy to hear them as not fussed as what is used as long as it works.
Thanks
I had a similar problem to yourself with a number of my own sites/DB's hosted on Ionos. After a bit of searching through their help they state that access from outside your Ionos package is not possible. Unfortunately we're stuck with their hosted version of PHP My Admin in the control panel.
Although I have found that MySQL-front works great and bypasses the Ionos restrictions. Google is your friend...
Maybe a bit late for you but for others who come across this question as I said google is your friend...

Update some html when ruby on rails is live

I have a Ruby on Rails website online. I tried changing the HTML, but saw no change when I uploaded the file via FTP.
I've even checked by making a simple change such as adding an HTML heading:
<h1>omais</h1>
I checked the online page which I edited and looked at the source code in the browser, and confirmed that I was on the correct page.
Is there some kind of command to inform the project that there are changes that has been made in the HTML file?
I am new to Rails but good in PHP.
Any help, Thanks
Apart of my comment, I am adding answer here also, so that other programmers can get help from your question.
You need to restart your rails server or just try to start app server, which will leads to rails server restart. If still you face the issue, try to clear your browser's cache.

Configuring authentication and authorization in Apache2 with MySQL

I am trying to configure Apache2 so I can use MySQL for authenticating users to access certain pages. Also authorization needs to work so different groups can reach differen pages.
Now, I have googled a lot but can't find out how to do this. At least not for the configuration I am having. There doesn't seem to be any version of mod_auth_mysql that supports my configuration.
OSX 10.6.4
Apache 2.2
Now, how do I achieve this not creating my own login-application in php but using the built in support of Apache2? I'm totally stuck on this one...
Thanks in advance!
Regards,
Niklas
I also would like to use a taylormade login page, not pop-up
....
how do I achieve this not creating my own login-application in php but using the built in support of Apache2
Short answer is that you can't. Unless you rewrite the Apache source code or create your own module, you can't mix HTTP based authentication with non-pop-up login prompts.
However if you are using PHP then a relatively low impact solution would be to use auto-prepend to prefix every protected page with a check on the users session. Obviously this would need a bit more thought if it is to be applied to files other than PHP source files (it'll work perfectly well if you tell Apache to apply the php engine to, say .gif files, but your script will need to detect and return the appropriate mime type).
A simpler solution might be to put a tool like squid in front of the webserver as a reverse proxy, then make the session handling data available to the squid url-rewriter.
You can build mod_auth_mysql from the source. Have a look at this post.
I you want your own log-in page, you cannot use Apache to do authentication.
Apache authentication uses the Authentication portion of the HTTP standard, and as a result you're reliant on the browser to handle the interaction with the user. There are plugins (like mod_auth_mysql) to use a database as the backend for this, but Apache can't ask the user for their credentials any other way.
The fastest approach might well be to set up Drupal or Joomla, which will get you user and group management as well as full content editing, in a way that will let you control who can edit what.

Uploading a Coldfusion Website

So, I've created a site; using Mysql 5, Coldfusion 8 and Dreamweaver CS3. I have a 'GoDaddy' windows hosting plan - and have just uploaded my database. I have uploaded my site - But it doesn't work! I have an index.cfm page, so it should work, my URL's are correct. I'm not sure why thats not working!!
Also, I am woundering if I need to put some code in my Application.cfc page that connects my site to my database on godaddy, as example:
DRIVER={MySQL ODBC 3.51 Driver}; SERVER=bridgettips.db.5452582.hostedresource.com; PORT=3306; DATABASE=bridgettips; USER=bridgettips; PASSWORD='invu4uraqT'; OPTION=0;
Or do I need to put something in my 'server' and 'Port' box - it is Server - localhost Port - 3306 at present, in Coldfusion.
Also, there is a problem with saving my pages and editing recordsets now - it says that it requires a 'cold Fusion data source'. I think this may be becasue in dreamweaver is changed localhost:8500 to my URL....? (Do you think this is why it no longer works?)
Sorry about so many qustions! It's only that I have had my hosing plan for about 10 days now - and its costing me a lot! I need to have it working asap!
Thanks for any help at all....
Steven,
I have tried to use GoDaddy as a CF host, and personally cannot recommend them. In my opinion, they have no business trying to host CF.
I can recommend another host which I use, but I'm not sure it's proper to name it here. (Perhaps someone else can chime in and educate me on this?)
As for your Datasource issue - you most likely need to let GoDaddy know that you need a DSN - now they may have a way for you to do that yourself, but sometimes it's the provider who must set that up for you.
Also, keep in mind that when you are in the hosted environment, you'll need to create any mappings you have locally, and if you are using any paths for cffile and the like, they will be different on the host than locally.
You can set up some variables in application.cfc for that, to switch based on the IP address. Let me know if you need some help with that and I'll be happy to post some code samples for you.
You will need to create a DSN for your datasource in order to get it to work. In the GoDaddy Hosting Control Panel there is a DSN option under the "Databases" pull-down menu. Once you've got the DSN created, just use the name of the DSN in the "datasource" attribute of your queries and you should be good to go. That should solve both of the issues that you're having.