• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Opening php files on Android from Google drive

I installed Google Drive onto my Android. I have php files in my Google drive. I can see them on my Android in the Google Drive app. But, when I click on them to open them, it says I don't have a viewer. However, I installed Webmaster lite. I should be able to at least use that to open them. If I click on an html file from Google Drive, I get prompted to open this with the Firefox app I downloaded or the default html viewer. I expected the same prompt for the php files. Any ideas on how I can open the php files in this case?
 
Well certain files aren't recognized on Android devices and it would seem that PHP is one of them, so I really don't know if there is anything you can do about that.

PHP is an internet extension right? You could potentially try downloading different browsers to see if one of them supports this file type on Android.
 
Upvote 0
I have downloaded some other apps that can open php files. I don't think that is the issue. I guess I forget to mention that in the original post. I can open the php files using these other apps like Astro File and Webmaster Lite. I just cannot open the php files from Google Drive. It says I can open them offline. But, when I click on Open Offline, it still tells me I don't have the correct viewer. That is not true though because I have a few viewers as stated above.

Webmaster lite is a web development app. Php files are very common in web development. I think the issue is that the device is not seeing one of these apps as a default to be able to open a php file. Or Google Drive is blocking something.


Remember also, I am trying to get the file from Google Drive also on the Android. I have read on many other sites while researching this issue, that there can be issues from time to time with the Google Drive app on Androids.

Oh, I have the Evo also. Maybe device type is an issue too. I don't think so for me since I can use other apps to open the php files, but maybe. LIke I said, I can open the php file outside of Google Drive.

Here are my steps just so I am clear:

1. Set Offline up on Google drive ( not listing steps, this can be googled )
2. On Android, open Google drive
3. Click on "Offline"
4. Long press on .php file
5. Choose "Open With" from menu
6. Now I see "Oops Unable to open document. Reason: No viewer is available for this type of document"
6a. I can click Cancel of "Open Offline"
7. So, I click Open Offline
7a. I get the same pop up as in step 6
8. Click Cancel
9. Open Astro File Manager ( I downloaded from Play Store already )
10. ( I also had already set up my Google account in here...Astro Manager will ask you this after you install and run it...it was pretty easy, not listing steps here )
11. Click on my Google Drive account ( I can see the Google Drive icon )
12. I see Connecting, then Loading, then my Google Drive files
13. Click on folders and files until I get to the php file I want
14. Long press the php file, choose "Copy" from bottom
15. Go back up a few directory to "My Files 1"
16. Click My Files 1
17. Click sd card at top ( at least for me it was, may be in a different location for you )
18. Click paste at the bottom
19. Shows copying the file to sd card
20. Scroll down and find the php file that was copied
21. Long press and choose Open As
22. Choose Text
23. Choose an option. I also had install ES File Explorer. ES Note Editor is an option. So I picked that. The .php file is opened
24. Now, I can edit this file and save it back to the sd card

I don't want to go through those steps every time to make a change. Is that what I have to do though? Anyone have a better way to do this?
 
Upvote 0
So I found that the files were encrypted. From within Astro File Manager, I went to /sdcardAndroid//data/com.google.android.apps.docs/files/pinned_docs_file_do_not_edit. I found my files here. I could open them. The characters were machine code symbols and such, not english text. So, I knew they were encrypted. I turned off the Enable Encryption setting in Google Drive. I turned off made online for all the files I had made available offline. I even deleted a few of the files too from Google Drive.

On my computer, I added a new file to my folder in Google Drive. I made this available off line. On the Android, I went into Google Drive. I long pressed and chose open with. I got the same error about no viewer.

So, your other point may be valid. How do I check / change default apps for opening items.

Also, I don't have a problem opening the html file still.
 
Upvote 0
I posted this on Google:

Google Groups

I wanted to see if Google Drive was the problem. I have files that can open php files. So, from this end, how can I set these to be a default php file viewer? What I noticed is that when I opened the html file, Google Drive prompted me to choose from about 4 apps that all could open html files. This is the same thing that should just happen for the php files. Then, there would be no problem. However, I am wondering if Google Drive doesn't see any apps that can open php files, even though such apps do exist on my device. How can I check what is set for default php viewers? How can I set any app to open php files by default? I will download another app if need be. I have googled, and surprising found very little about this. I have found a few things, but not much.

Thanks in advance!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones