XAMMP - Difficulties with dynamic links database

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Re: XAMMP - Difficulties with dynamic links database

Postby Altrea » 08. November 2011 19:43

hermanG wrote:How do I get the db imported and set up? Is it in the phpMyAdmin page?

Yes, thats one of the possible ways and recommend for beginners.

hermanG wrote:Does it matter where the db files are located for my local site to connect to it?

I don't know if i understand the question. Your application don't know anything about saving destinations of the database.
Your application just uses host and port to request the data and your database management system processes the request (like Apache processes http requests on port 80).

hermanG wrote:Should I add ("Create new database") the db

yes

hermanG wrote:named the same as my live site (my live site's db is named "mysite5_mysiteLIVE")?

Thats not needed but makes it much easier for you.
If you don't use the same db name, your application have to know the new connection parameters.

hermanG wrote:Which option under "Collate" (what determines that)?

That depends on the characters you want to save in the database, the way it is stored there and how it is sorted by requesting.
utf8_general_ci is in most of the cases a good choice.

hermanG wrote:And, THEN try to import my db, which I exported from my live site host (mysite5_mysiteLIVE.sql.gz) into that newly created one?

correct! you need a .sql, .gzip, .bzip2 or .zip export of your database. This file(s) can be reimported with phpmyadmin.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMMP - Difficulties with dynamic links database

Postby hermanG » 08. November 2011 21:05

OK. Wonderful. Thanks.

I am right back where I was at one point. But, somehow, right now, that feels like great progress. I appreciate it.

SO... Homepage (local) is now running and looks good. All of the links out, however, get:

Object not found! Error 404 (excepting the twitter and fb links out, which I assume were hardcoded).

I'm trying to dig to find where the application is building a link that doesn't hold up. Any ideas where to look?

Thanks,
H
hermanG
 
Posts: 16
Joined: 03. November 2011 16:12
Operating System: Windows 7 Professional (64 bit

Re: XAMMP - Difficulties with dynamic links database

Postby Altrea » 08. November 2011 21:09

hermanG wrote:I'm trying to dig to find where the application is building a link that doesn't hold up. Any ideas where to look?

No. As i said, i don't know your application and you are doing your own thing.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMMP - Difficulties with dynamic links database

Postby hermanG » 08. November 2011 21:37

OK. So, some more about what I'm seeing.

Here are the address bar contents from my live site when I click on my FAQ link:
<http...> livesite.com/help/faq.html

AND

Here are the address bar contents from my local site when I click the FAQ link:
<http...> localhost/public_html/help/faq.html

Now, on my live host... public_html is not the top level directory. You have to select public_html, and within that directory is the main index.php file.

But on my local host... public_html has to be the root directory I navigate to to view the index.php homepage. I have copied the folders that are in the same level directory on my live site to the htdocs directory in my XAMPP folder on my pc. Is that much correct?

p.s. Is there a way for me to post screen shots here?
hermanG
 
Posts: 16
Joined: 03. November 2011 16:12
Operating System: Windows 7 Professional (64 bit

Re: XAMMP - Difficulties with dynamic links database

Postby Altrea » 08. November 2011 21:42

hermanG wrote:p.s. Is there a way for me to post screen shots here?

Use an image hoster to upload the screenshot.
Then you can include it as link or image here.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMMP - Difficulties with dynamic links database

Postby hermanG » 08. November 2011 22:38

Great!

The last entry in my Apache error log is:

[Tue Nov 08 16:07:39 2011] [error] [client ::1] File does not exist: C:/xampp/htdocs/public_html/help, referer: < http://> 127.0.0.1/public_html/


What I think may be going on is that the part of my application/code that builds a functional URL is leaving out the "/application/views" part of the URL. Does that seem possible? Though, as I mentioned in my last post, that part is not visible on my live site in the address bar. Anyone experience anything like this before?

Here is a screenshot of my LIVE site's control panel directory. (Let me know if I need to re-size or anything.)

Image

Thanks for looking,
H
hermanG
 
Posts: 16
Joined: 03. November 2011 16:12
Operating System: Windows 7 Professional (64 bit

Re: XAMMP - Difficulties with dynamic links database

Postby Altrea » 08. November 2011 22:57

I have seen this folder structure before.
This is a codeigniter v2 project, isn't it?

In codeigniter it is very common to rewrite urls with .htaccess and just place this files to a public accessible folder, which are really needed to be requested directly by HTTP Request.
I don't know if that is the case at your poroject, but what i can see the DocumentRoot directory is placed to the public_html folder.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMMP - Difficulties with dynamic links database

Postby hermanG » 09. November 2011 02:42

I can't speak to the version, but, YES, definitely codeigniter going on.

Below is the .htaccess file from my local version in full. The 2 lines below "#Only when live" I commented out earlier after a lead from Sharley. I've replaced my actual site name with "mysite".

# this is the htaccess from c:xampp\htdocs\public_html

#RewriteEngine on

#DirectoryIndex index.php

##Only when live
#RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC]
#RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]

RewriteCond $1 !^(index\.php|assets|css|flash|images|Interface|interface|js|sitemap\.xml|googlee5f5a3846d7cbe22\.html)
RewriteRule ^(.*)$ /~mysitec5/index.php/$1 [L]

#hide directory browsing
options -indexes


I used quote instead of code tags so I could make the one part purple. That purple part just happens to be the same as the LAST bit of the directory that the root public_html rests in on my live server. More specifically... the directory above public_html on my live server calls itself "(/home/mysitec5)".

It ALSO happens to be the first bit of the name of my db, which is "mysitec5_mysiteLIVE". Weird, huh?

Anyway, I tried changing that line in the .htaccess file to be:
RewriteRule ^(.*)$ /~htdocs/index.php/$1 [L]


... But, that didn't seem to help anything as far as the 404 Object Not Found goes. (Still no cheeseburger. :cry: )

Becoming any clearer?
hermanG
 
Posts: 16
Joined: 03. November 2011 16:12
Operating System: Windows 7 Professional (64 bit

Re: XAMMP - Difficulties with dynamic links database

Postby hermanG » 09. November 2011 18:24

I've tracked it down (I think) to the renaming or creating of the dynamic URLs done by my application/code. Other possibilities are that the httpd.config or the .htaccess file are not permitting/enabling the execution of the renaming/creation of the URLs.

I used the Apache error log. It kept reporting "file does not exist". Each time I got that error, I copied what it said didn't exist (folder or file) from a deeper directory/location in my local site up to the location in which it was looking for that folder or file. Sometimes this was one level... sometimes two. And finally, I had to change the extension .php to .html.

Has anyone had any success in working this kind of issue out before?

As Altrea said, it involves a codeigniter thing.

Thanks,
H
hermanG
 
Posts: 16
Joined: 03. November 2011 16:12
Operating System: Windows 7 Professional (64 bit

Re: XAMMP - Difficulties with dynamic links database

Postby Altrea » 09. November 2011 18:42

hermanG wrote:I've tracked it down (I think) to the renaming or creating of the dynamic URLs done by my application/code. Other possibilities are that the httpd.config or the .htaccess file are not permitting/enabling the execution of the renaming/creation of the URLs.

I used the Apache error log. It kept reporting "file does not exist". Each time I got that error, I copied what it said didn't exist (folder or file) from a deeper directory/location in my local site up to the location in which it was looking for that folder or file. Sometimes this was one level... sometimes two. And finally, I had to change the extension .php to .html.


Codeigniter makes use of mod_rewrite. One of the things you can do with it is to extend a .html extension on every url. I don't think that these files have to be .html files, so your renaming isn't good for the functionality.
Codeigniter is not that difficult. You have to understand the .htaccess file, and you have to understand the settings in the different configuration files.
And everything else is just a matter of configuration Apache the right way (Overrides, DocumentRoot, etc).

You have to understand that Framework, at least a little bit. Codeigniter does have a really good user guide.

I don't think that this issue can be solved in this board at this point of your changes. You should start right from the beginning again.
That means, take a fresh dump of your live site, set up your local Apache (set the DocumentRoot to the right place! => public_html) and just change things in the config files and .htaccess (be careful that you don't crash the mod_rewrite)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMMP - Difficulties with dynamic links database

Postby hermanG » 09. November 2011 18:59

Thanks. Will give that a try and report back.
hermanG
 
Posts: 16
Joined: 03. November 2011 16:12
Operating System: Windows 7 Professional (64 bit

Re: XAMMP - Difficulties with dynamic links database

Postby hermanG » 10. November 2011 02:23

Head bloody.

Banging into wall for toooooo long.

Same result as before. Index page = GREAT... any other link is DOA w/404!

I downloaded a new XAMPP, setup both my site and my database in the htdocs folder. I edited the httpd.conf file. I edited config.php and Config.php in my application. Also had to set a thing or two on my constants.php. I had to edit the .htaccess and comment out the re-writes so that it wouldn't redirect to my LIVE page. But, I think that MAY be shutting down part of the dynamically written codeigniter URLs. Grrrrrrrrrrrr. SOMETHING is causing parts of the URLs needed to be dropped out or constructed incorrectly.

I'm sure it's something simple, but I can't find it.

Beginning to wonder what life might be like w/o people, places, and things. It's mostly the nouns that give you trouble... though some verbs aren't so hot, either...

*sigh*
hermanG
 
Posts: 16
Joined: 03. November 2011 16:12
Operating System: Windows 7 Professional (64 bit

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 42 guests