(php_flag) Migrating to new Host, received error message....

Permalink
I migrated from ServerGrove to GoDaddy recently..

I thought all was fine until I cleared my cache.. yikes..

Here's what I'm getting now:
/home/thesourceadmin/public_html/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

Any Idea whats going on? I tried copying my php.ini info from my previous host and placing it in my new public_html

View Replies: View Best Answer
SourceChurch replied on at Permalink Reply
I am a novice in this arena, so please approach this from all angles..
MoonGrab replied on at Permalink Reply
MoonGrab
Could you post the content of your .htaccess file? Should be in your public_html folder.

Also, try commenting out any of the lines that begin with php_flag or php_admin_flag.
You can do that by putting a hashtag (#) at the beginning of the line.
SourceChurch replied on at Permalink Reply
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
php_flag short_open_tag on
RewriteEngine On
RewriteCond %{http_host} ^tapintothesource.com [NC]
RewriteRule ^(.*)$http://www.tapintothesource.com/$1... [R=301,L]
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
MoonGrab replied on at Permalink Best Answer Reply
MoonGrab
Yeah, remove the line that says php_flag short_open_tag on.
SourceChurch replied on at Permalink Reply
Okay, done.

What was the code line doing?
SourceChurch replied on at Permalink Reply
In the meantime while I've been working on this I repointed my nameservers back to my old host, trying to keep the site uptime at a maximum...
MoonGrab replied on at Permalink Reply
MoonGrab
Normally, PHP code is executed when you see a line that says <?php and stops being executed when you see a line that says ?>

So something like this:
<?php echo 'Hi'; ?>

Short open tags make it possible to have a short open tag (duh) which would mean that <?php can be replaced with just <?

So in the end, you can have
<? echo 'Hi'; ?>

This sometimes conflicts with other programming languages so short open tags should be avoided in production environment.
SourceChurch replied on at Permalink Reply
Would you mind taking a look over my php info code?

I had to create a php.ini file in my public_html from scratch...

Copied and pasted what looked like my info from my old host...
MoonGrab replied on at Permalink Reply
MoonGrab
Yeah, well configurations might be identical.
Currently I see your website being hosted with ServerGrove.
SourceChurch replied on at Permalink Reply
pardon my noobishness here...

Other than pointing my name servers to GoDaddy and editing my A Record..

What else do I need to do?
MoonGrab replied on at Permalink Reply
MoonGrab
If you have changed your name server, most probably you wouldn't need to add additional A/MX/CNAME records (let's call them DNS records).
This is because the name server handles your DNS records.

So short answer, this should suffice. Are you sure you've updated your name servers?
SourceChurch replied on at Permalink Reply
I just updated my name servers, the reason I asked is because GoDaddy had a place on their web portal stating that my A Record should match their specific IP address for my site.

I noticed all my DNS records matched my old host.
MoonGrab replied on at Permalink Reply
MoonGrab
Those take up to a few hours to get updated.
Are your new name servers NS33.DOMAINCONTROL.COM and NS34.DOMAINCONTROL.COM?
SourceChurch replied on at Permalink Reply
Yes they are
MoonGrab replied on at Permalink Reply
MoonGrab
You're fine then.

Wait a few hours and your website should be accessible from the new location.
You can create a file called test.txt in your httpdocs folder on your new host. Then try accessing it by openinghttp://www.tapintothesource.com/test.txt...

If you can, then you are seeing your new web host. If not, try again later.
SourceChurch replied on at Permalink Reply
my file path was as such:

public_html/tapintothesource.com/httpdocs

I had moved the contents of httpdocs to my public_html as per GoDaddy customer service's direction... Should I move it back?
MoonGrab replied on at Permalink Reply
MoonGrab
What you just said means that what used to be httpdocs should now be called public_html or the other way around.
If your index.php file used to be in /SOMETHING/httpdocs/index.php, it now should be in /SOMETHING/public_html/index.php.

So if your site is in public_html/tapintothesource.com/httpdocs, it should probably just be in public_html/

I can only make guesses about this. If you PM me your FTP credentials, I can make sure everything is in place for you.