Jump to content

Different connection statement for Apache?


Moron

Recommended Posts

I'm helping to migrate a website from IIS to Apache (using Joomla). PHP runs fine, but the database connection is failing, even though the exact same connection statement works fine in the IIS (Windows) version.

 

Is there a difference?

 

 

Link to comment
Share on other sites

If they always fail, it is likely due to a configuration problem or wrong database details.

 

Start by checking your web server log file for errors.

 

You would need to post your code if you what help with what it might or might not be doing, such as no error checking, no error reporting, and no error recovery logic.

Link to comment
Share on other sites

If they always fail, it is likely due to a configuration problem or wrong database details.

 

Start by checking your web server log file for errors.

 

You would need to post your code if you what help with what it might or might not be doing, such as no error checking, no error reporting, and no error recovery logic.

 

I see several errors in the Apache log that refer to not being able to map certain images. I can fix that by, if nothing else, using straight HTML code for the images instead of embedding the HTML code inside PHP.

 

The website is currently on IIS. We're moving it to Apache on the same server using a Joomla! interface.

 

PHP runs fine on Apache as long as there isn't a database connection.

 

So why would the same connection statement fail if running on the same server?

 

Link to comment
Share on other sites

PHP is a web server language extension. Each web server has a different PHP dll/executable, a different environment, and likely a different location for looking for a php.ini file.

 

To get the quickest solution, post whatever symptoms you are getting that are telling you that it is not working.

Link to comment
Share on other sites

PHP is a web server language extension. Each web server has a different PHP dll/executable, a different environment, and likely a different location for looking for a php.ini file.

 

To get the quickest solution, post whatever symptoms you are getting that are telling you that it is not working.

 

I've now eliminated Apache as the problem. If I hit a direct web path to the files, everything runs like a champ. I think it might be a weird bug in Joomla! itself.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.