Anyone proficient with PHP? - Hero CDMA General

I'm trying to accomplish something in php format and I'm stuck.
I don't want to go into too much detail because I'm trying to surprise a friend on here so I will only go into specifics via pm but here's what I got so far:
I dl'd the eclipse PHP environment and the Zend debugger, got it all set up just fine (I think, lol)
I'm trying to edit an existing .php and with Treve's help was able to determine just exactly what I needed to edit. But I can't figure out how to "play" the code so I can see the changes, or even the original.
When I go to play the .php thru the web portal I only get code, it sees the file and displays it but doesn't convert it to the format I'm looking for, it just shows a large part of the page in plain text.
Any help would be greatly appreciated.
I will owe you one, or two maybe (and I'll actually pay up on it!!).
Please PM me if you need/want specifics. If there is something I am obviously missing then please help me out.
Thanks!
neb

wish i could help

regaw_leinad said:
wish i could help
Click to expand...
Click to collapse
Move along regaw, nothing to see here...
Anyone else? Anyone... anyone? Bueller?

i'm taking a php class and i know < ? p h p
i think thats right??? lol...

Not real proficient in it, but I figured if I can learn PHP in three weeks to allow me to build a web report group builder for the company I work for, I might be able to help.
First, which web server are you using? Apache, IIS or something else? The answer to that question depends on what happens next.
nebenezer said:
I'm trying to accomplish something in php format and I'm stuck.
I don't want to go into too much detail because I'm trying to surprise a friend on here so I will only go into specifics via pm but here's what I got so far:
I dl'd the eclipse PHP environment and the Zend debugger, got it all set up just fine (I think, lol)
I'm trying to edit an existing .php and with Treve's help was able to determine just exactly what I needed to edit. But I can't figure out how to "play" the code so I can see the changes, or even the original.
When I go to play the .php thru the web portal I only get code, it sees the file and displays it but doesn't convert it to the format I'm looking for, it just shows a large part of the page in plain text.
Any help would be greatly appreciated.
I will owe you one, or two maybe (and I'll actually pay up on it!!).
Please PM me if you need/want specifics. If there is something I am obviously missing then please help me out.
Thanks!
neb
Click to expand...
Click to collapse

tkirton said:
Not real proficient in it, but I figured if I can learn PHP in three weeks to allow me to build a web report group builder for the company I work for, I might be able to help.
First, which web server are you using? Apache, IIS or something else? The answer to that question depends on what happens next.
Click to expand...
Click to collapse
Apache2
And I just realized I apparently need GIFEncoder, reading up on it...

uhmm ill take a stab at it, i can probably guess what you're trying to set up by why you are needing but you want to be secretive. if you are using a decent webserver gifencoder should be installed. if you are running a script on a server you set up on your local pc then maybe you havent installed php correctly or it may not be running that why its coming up as txt in your browser.
edit: i see you installed zend, so youre running a server on your pc. im willing to bet you havent started the php service.
i have some webspace i havent used for years if you want some space let me know, u can run the script there

Bonified PHP Guru here... send me a PM and I will see what I can do to help.

I too am a php programer. Your issue is that to don't have the php integrated into your web server correctly best way to solve that would be to find some one that can host the app for you. I currently have my own servers at several co-location sites all running php and can let u use for a while

Download and install XAMPP web server, it's easy, free and works great. Then you can veiw your changes.

Yes install xampp and you will get a server running in no time ... just copy your php to inside the apache folder.

Thanks guys!

Only PHP thread on XDA??
I was searching to see if anyone has managed to compile PHP cli for rooted Android devices, and the only result I found is this thread ...

So I installed xampp, very neat program, but I can't figure out how to use it right.
I'm not sure what I'm doing wrong...
localhost takes me to the xampp screen and myadmin screen works but when I try opening the php in the browser I get "object not found", and the icon on the browser tab switches from the xampp icon to the Zend icon even though I've uninstalled Zend
xampp says Apache and MySQL are running.
Also I went with eclipse-php. I've set up a galileo w/ adt successfully but have not done something right in the php install, I can't create working php projects or files.
I edited and saved as php in notepad++, if anyone wants to check it out and try to get it to execute please let me know
Any help would be appreciated
Thanks

nebenezer said:
localhost takes me to the xampp screen and myadmin screen works but when I try opening the php in the browser I get "object not found", and the icon on the browser tab switches from the xampp icon to the Zend icon even though I've uninstalled Zend
Click to expand...
Click to collapse
It sounds like you need place the php file into the working root directory for XAMPP. You may even need to rename the php file as index.php and place that in the root.
I think you are just trying to open the php file from your file explorer. The php file needs to be in the web root directory and you access it like you would a webpage. ( http://127.0.0.1/YOURFILE.php ) <--- but like I said it needs to be in the webroot directory.

centran said:
It sounds like you need place the php file into the working root directory for XAMPP. You may even need to rename the php file as index.php and place that in the root.
I think you are just trying to open the php file from your file explorer. The php file needs to be in the web root directory and you access it like you would a webpage. ( http://127.0.0.1/YOURFILE.php ) <--- but like I said it needs to be in the webroot directory.
Click to expand...
Click to collapse
Thank you,
I tried your suggestions to no avail. I put the file in (separately, not multiple copies) c:\, c:\xampp and c:\xampp\php and always get the error.
I tried renaming the file index.php, same error
I need to put this on the shelf for a bit and do something productive...
Thanks for your help guys!

nebenezer said:
Thank you,
I tried your suggestions to no avail. I put the file in (separately, not multiple copies) c:\, c:\xampp and c:\xampp\php and always get the error.
I tried renaming the file index.php, same error
I need to put this on the shelf for a bit and do something productive...
Thanks for your help guys!
Click to expand...
Click to collapse
The correct directory for xampp is in htdocs.

damageless said:
The correct directory for xampp is in htdocs.
Click to expand...
Click to collapse
Tried that one also.. BUT I didn't try it after renaming to index.php
One more shot!
*edit, still just getting raw code, which I suppose is better than an error code
thanks damage

pm me your php script. probably best to just pastebin.ca it. If it is showing you the code after putting it in the htdocs directory that means you found the right directory. Usually when php is not configured correctly on your web server it doesn't just show you the code, the mime type is not recognized and offers it as a download. So your browser would try to download "index.php" or whatever instead of just showing you raw php.

hahhaah.. I know what you're up to....
Here's how I did it before your modifications you're working on: http://i0v.net/matrix/

Related

Portable Webserver for APK files

Hi guys,
I have just been playing around with the idea of hosting a webserver on my machine that my phone could connect to to download apk files after performing a wipe.
Iv been thinking about this as everytime i wipe my phone i connect back to the market and download appmanager to install apps direct from sd. So instead of having to do that im looking at having them all in a directory on my PC/Flashdrive (as this will be portable) using XAMPP.
Before any gets any wrong ideas this is not intended for any illegal doings. Its just to make my life easier. I thought i would share what i have started to see if this will help out anyone else.
So far i have it working (very rough). But i dont know any coding so this is a bit of a hack job.
I am using XAMPP as stated aswell as a PHP script that will automaticly populate the page will all files within a particular folder.
I have attached the index file i am using.
if you wish to use this please make sure you do a few things.
Install XAMPP
From where you installed XAMPP. In the HTDOCS folder create a "APK" Folder
Place the index.php in the HTDOCS folder
Edit the index.php file to change the path of the APK folder (currently set to D:\\Dream\\xampp\\htdocs\\APK) keep the double slashes "\\"
Start the Apache webserver from the XAMPP control panel
Now connect to Localhost, any files you place in that folder should now appear
Anyone wishing to use this, edit this, whatever you feel like. Go ahead
If you would like to help and change the look and feel of the page it would be greatly appreciated. If you do post the files back up here for all to use
Hope you guys like
Can I ask why you wouldn't just backup your apps to your sdcard (use something like MyBackup) and be done with it?
You can always copy them from your sdcard to your flash drive (and back from flash drive to sdcard temporarily if you need to re-install).
I'm all for experimenting, learning and even playing around a lot. But this seems like overkill. First off, your apps will surely get outdated quickly, and you'll end up upgrading lots of apps. You'll end up spending an enormous amount of time managing your own local library.
Personally, I think you're wasting your time unless your trying to learn how to do something in the process. Maybe you are, and in that case, go for it. Otherwise, enjoy your phone and let the Market do the management for you.
Or you can just have all your .apk's in a folder and use adb to install all of em at once. But like the above post you might have to get updates for alot of em.

WebView help needed

Hi guys and gals I am having a issue with my app I'm making. The app uses webview to load a special web page to let a user download files mostly .pkg files but some zip files and exe's as well. I have the app built and it loads the website url I need it to but when I click on a file to download it to the storage card it does nothing at all. I know I need to do something with the DownloadListener I'm just not sure what or how. The snippets of code I have found on the net to try to understand it has not worked. I have given permission to the net and SD card in the manifest file. Any help with this would be great Thanks
p.s. for some reason it wont let me post my code. if anyone can help + rep for you
No one on this? ok well I know I need to set up a downloadlistener but I am unsure how to do this everything I have found is only to force media to be played somewhere but I need to just make it download the file to the root of the sdcard. any help even to a good tutorial or link with a code snippet for a different file type that i could modify to work would be very helpful

How to host an .apk file?

Hi!
I've been trying to upload an .apk to my webhost (through ftp) and when I try to download it through the given url, the file doesn't download. Instead I only get text, just as if my host don't understand the file.
Any idea how I can fix this? Is it though .htaccess or what? /:
(I've tried to search this but with no luck)
First off I don't know too much about ftp but from what I do know I would imagine what you want to do would involve the .htaccess file in the apk's directory
My guess would be in the .htaccess file you'd have to edit/add the FilesMatch line
(if that doesn't work it may me just "Files" instead of "FilesMatch" - not sure)
Code:
<FilesMatch "\.(apk)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
Other alternatives I can think of are either:
Change the link from [B]ftp[/B]://your.ftp.org/blah/android.apk to [B]http[/B]://your.ftp.org/blah/android.apk when you give it out - but I realize this kinda defeats the purpose of using a FTP in the first place
Upload the .apk into a zip. That should force the 'save as' dialog
Hopefully this does the trick for you
**I hope this post looks correct - adding the html myself I may have messed up somewhere along the line, if it you see /LIST] or anything like that I'll fix it when I have access to a computer **
Sent from my Android using Tapatalk
kyouko said:
First off I don't know too much about ftp but from what I do know I would imagine what you want to do would involve the .htaccess file in the apk's directory
My guess would be in the .htaccess file you'd have to edit/add the FilesMatch line
(if that doesn't work it may me just "Files" instead of "FilesMatch" - not sure)
Code:
<FilesMatch "\.(apk)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
Other alternatives I can think of are either:
Change the link from [B]ftp[/B]://your.ftp.org/blah/android.apk to [B]http[/B]://your.ftp.org/blah/android.apk when you give it out - but I realize this kinda defeats the purpose of using a FTP in the first place
Upload the .apk into a zip. That should force the 'save as' dialog
Hopefully this does the trick for you
**I hope this post looks correct - adding the html myself I may have messed up somewhere along the line, if it you see /LIST] or anything like that I'll fix it when I have access to a computer **
Sent from my Android using Tapatalk
Click to expand...
Click to collapse
Geniuous! Worked like clockwork!
(I used the http://-link from the start, that's where it failed.. but the .htaccess content did it's job!)
1+Thanks! ^^

[DEV] AndroidLib.dll Expansion Project

Description:
The AndroidLib Expansion Project was created to bring support of more Android devices to my AndroidLib.dll project I'm working on. This project is a Windows executable (compiled batch script) that you will run on your computer with your Android device connected. This will NOT run automatically; it will give you a prompt to run after opening.
The main purpose of this project is to collect data about new phones for AndroidLib.dll, not about your specific phone, but about how it transfers specific data through it's shell and through the Android Debug Bridge (ADB), and more importantly, how that output is formatted.
This information will not be shared with anyone other than myself, and will only be used for further developing AndroidLib.dll to support many more Android devices than it currently does.
Source Code is available under "Download Info"
What it does:
Starts an Adb server
Checks Device List
Checks Device Type
Checks Device Serial (only for unique .zip filename)
Checks For SU
Checks UID
Checks BusyBox
Checks File System
Checks Battery Statistics
Checks Running Processes
Checks /data/system/packages.xml for existance
Checks Build Properties
Checks Shell Environment
Creates Zip of Data Above
Opens Upload Form in Browser After Exiting
NOTE: Does NOT Upload Automatically
Usage:
Download the Windows Executable below and run from any directory on your computer with your Android device connected.
Requirements:
Windows Computer
Android device to test
Download Latest Release
AndroidLibExpansion.exe
Download Info
AndroidLibExpansion.exe MD5: 3a8971f452ab7e3da63e375a859033d4
VirusTotal Report
Source Code
No zip file on my desktop to send...
drcell said:
No zip file on my desktop to send...
Click to expand...
Click to collapse
Check the Desktop folder in %USERPROFILE%\Desktop as well instead of just the graphical desktop. I have tested it working on 5 different computers here...
Can you upload to another site
Like http://www.mediafire.com/
TarekNajem04 said:
Can you upload to another site
Like http://www.mediafire.com/
Click to expand...
Click to collapse
Yeah, you can, if you send me the link to it.. but I just wrote that upload script so it would just go straight to my server.. Upload it to mediafire if you would like.
I realize now that this exe may not have worked correctly. I've had 3 reports now of no zip being created on the desktop. I am working to solve this issue, as you see in the source.. it really has no reason not to be creating on the desktop.
I'll be glad to help, if only it created a zip file for me to upload.
EDIT: I checked the %USERPROFILE%/Desktop as well as running a search for anything containing "androidlib" in C:\Users... nothing.
2 things.
1st, it won't make a zip file for anyone that doesn't have 7zip or the required folder structure (there is no standard environment variable of %myfiles% - just use %temp% instead), and it's assuming subfolders exist for output of the adb commands.
2nd, why is it an exe file when it's a batch file? Please link the bat file instead of an exe. I'm running the bat file I copied and pasted from the source and it runs just fine.
Archer said:
2 things.
1st, it won't make a zip file for anyone that doesn't have 7zip or the required folder structure (there is no standard environment variable of %myfiles% - just use %temp% instead), and it's assuming subfolders exist for output of the adb commands.
2nd, why is it an exe file when it's a batch file? Please link the bat file instead of an exe. I'm running the bat file I copied and pasted from the source and it runs just fine.
Click to expand...
Click to collapse
Well, if you knew who I was or looked at anything else I have written, you'd realize that I know what I'm doing, and that I would not assume everyone has the standard environment variable %MYFILES% or have 7zip installed. I am assuming in this program, actually, that the end user does NOT have the android sdk set up (or in their path) and does NOT have any 7 zip binaries. I created a self extracting exe out of my batch file that includes adb.exe, the 2 required adb dlls, and the 7 zip binary, all in the global variable %MYFILES% (aTemp folder in %temp%). It works fine. Just need to figure out why it creates a zip on all of my computers, and not any of yours. I appreciate the feedback though.
FredFS456 said:
I'll be glad to help, if only it created a zip file for me to upload.
EDIT: I checked the %USERPROFILE%/Desktop as well as running a search for anything containing "androidlib" in C:\Users... nothing.
Click to expand...
Click to collapse
Thanks for letting me know you ran a full search and nothing came up still, that actually does help me out, telling me it didn't write to anywhere else. I'll have a working version for you guys in a little bit.
Ok guys, fixed the problem. Works great now. Check the source code and VirusTotal report in the first post if you need to. Thanks again for everyone helping with this! And special thanks to nebenezer for testing the new builds!
regaw_leinad said:
Well, if you knew who I was or looked at anything else I have written, you'd realize that I know what I'm doing, and that I would not assume everyone has the standard environment variable %MYFILES% or have 7zip installed. I am assuming in this program, actually, that the end user does NOT have the android sdk set up (or in their path) and does NOT have any 7 zip binaries. I created a self extracting exe out of my batch file that includes adb.exe, the 2 required adb dlls, and the 7 zip binary, all in the global variable %MYFILES% (aTemp folder in %temp%). It works fine. Just need to figure out why it creates a zip on all of my computers, and not any of yours. I appreciate the feedback though.
Click to expand...
Click to collapse
Lol - calm down mate. I wasn't criticising - I was trying to help. I get why it's an exe now you've explained and that makes sense. Glad you got it working anyway. I'll upload a couple of files for you later.
Archer said:
Lol - calm down mate. I wasn't criticising - I was trying to help. I get why it's an exe now you've explained and that makes sense. Glad you got it working anyway. I'll upload a couple of files for you later.
Click to expand...
Click to collapse
Ok thanks for clarifying. The way you presented your self in your post sounded like somewhat of "this n00b doesn't know what he's doing, and I'm gonna let him know that" lol I'm a pretty chill guy, I just don't appreciate when people do that.
And thank you for doing some uploads later! I appreciate it!
This is my upload link because i couldn't upload with your page. It says "The file you are trying to upload is not a .zip file. Please try again."
http://db.tt/0HoRAK11
It works and I have uploaded the zip
Burned from my laser torch using pencil cells
Uploaded .zip file.
regaw_leinad said:
Ok thanks for clarifying. The way you presented your self in your post sounded like somewhat of "this n00b doesn't know what he's doing, and I'm gonna let him know that" lol I'm a pretty chill guy, I just don't appreciate when people do that.
And thank you for doing some uploads later! I appreciate it!
Click to expand...
Click to collapse
Apologies if that's how I came across - it wasn't intended. I've just uploaded a couple of zip files for you.
Thank you to everyone who has uploaded a zip so far! This is really helping development on AndroidLib. I am still accepting more uploads, so if you feel like helping develpment of AndroidLib, feel free to download and run the exe! I'm needing a few more Samsung devices in particular, those seem to vary in output between themselves.
Have you got an upload from an Motor ATRIX 4g yet? If not ill see if I can sort it for you.
Sent from my MB860 using XDA
The-Milkybar-Kid said:
Have you got an upload from an Motor ATRIX 4g yet? If not ill see if I can sort it for you.
Sent from my MB860 using XDA
Click to expand...
Click to collapse
Nope haven't got one yet, that'd be awesome! Thanks!

Lumia 950/950XL Service level execution

Hi,
I've been able to use vcREG 1.5 on a 950XL to execute any exe file via services.exe, except it's getting stopped by Code Integrity. That's also why putting older NdtkSvc.dll doesn't work on the newer phone (aside from the fact that it has to be in c:\windows). I thought oh maybe any valid arm executable signed by microsoft would be enough, so I copied some executables from the Raspberry Pi Windows 10 IoT image, but I could only get them to run inside the app sandbox because they weren't in the system catalog :'(
Example:
21-March-2016 15:04:08.339601 0x000003D4 0x00000F88 Verbose Microsoft-Windows-CodeIntegrity Code Integrity completed validating file hash. Status 0xC0000428.
21-March-2016 15:04:08.339631 0x000003D4 0x00000F88 Error Microsoft-Windows-CodeIntegrity Code Integrity determined that a process (\Device\HarddiskVolume37\Windows\System32\services.exe) attempted to load \Device\HarddiskVolume39\WPSystem\ftpd.exe that did not meet the Windows signing level requirements.
So now the trick is to find an executable on the system that currently exists, that can be used to gain further access... I've been trying various things like OOBE stuff etc without any luck so far.
Hoping someone else has some ideas... maybe even executing a dll function to import registry from a file or something directly, then we could unlock interop on 950's..
Thanks
Great work
maybe you can MTP your 950/950xl and look for the files in the \windows folder
micheal
Can you tell me how to execute a exe via services.exe ? Thanks?
naiple said:
Can you tell me how to execute a exe via services.exe ? Thanks?
Click to expand...
Click to collapse
use vcREG1.5 to edit HKLM\SYSTEM\ControlSet001\Services\NlpmService\ImagePath
Change it to whatever executable you want, reboot and it will run as LOCAL SYSTEM, provided that it is signed correctly.
NOTE: Changing this will stop your Glance screen from working, so take note of the original value and restore it after you are done if you use glance.
megasounds said:
Great work
maybe you can MTP your 950/950xl and look for the files in the \windows folder
micheal
Click to expand...
Click to collapse
Actually using MTP isn't the best thing for that, because you are missing out on more than half of the available executable files as they are not viewable via MTP on 950/XL due to permissions. It's best to mount the FFU image and look around that way.
I have already looked and tested most of them, thus why I was asking if anyone else had some ideas.
darkfires said:
use vcREG1.5 to edit HKLM\SYSTEM\ControlSet001\Services\NlpmService\ImagePath
Change it to whatever executable you want, reboot and it will run as LOCAL SYSTEM, provided that it is signed correctly.
NOTE: Changing this will stop your Glance screen from working, so take note of the original value and restore it after you are done if you use glance.
Click to expand...
Click to collapse
Thanks! I will try it on my lumia
darkfires said:
use vcREG1.5 to edit HKLM\SYSTEM\ControlSet001\Services\NlpmService\ImagePath
Change it to whatever executable you want, reboot and it will run as LOCAL SYSTEM, provided that it is signed correctly.
NOTE: Changing this will stop your Glance screen from working, so take note of the original value and restore it after you are done if you use glance.
Click to expand...
Click to collapse
I can't find NlpmService because my lumia730 don't have a Glance screen ... is there any way else to run a exe?
naiple said:
I can't find NlpmService because my lumia730 don't have a Glance screen ... is there any way else to run a exe?
Click to expand...
Click to collapse
I only decompiled the NdtkSvc on 950XL, the one on 730 might be different. But to answer your question there is only one other way, and it will kill USB so you won't be able to connect to it via PC at all until you reverse the change. If you post your NdtkSvc.dll I can check it for you.
HKLM\SYSTEM\ControlSet001\Services\NokDeviceHubSvc\ImagePath
darkfires said:
I only decompiled the NdtkSvc on 950XL, the one on 730 might be different. But to answer your question there is only one other way, and it will kill USB so you won't be able to connect to it via PC at all until you reverse the change. If you post your NdtkSvc.dll I can check it for you.
HKLM\SYSTEM\ControlSet001\Services\NokDeviceHubSvc\ImagePath
Click to expand...
Click to collapse
Ahh, i find the Nlpmservice. Don't know why i cant find it yesterday... And if you need any thing(unlocked bootloader, uefi...) from 730 or 540 i can post it, both are prototype and can enter massStorage. Hope i can help you. Thank you for the answer
naiple said:
Ahh, i find the Nlpmservice. Don't know why i cant find it yesterday... And if you need any thing(unlocked bootloader, uefi...) from 730 or 540 i can post it, both are prototype and can enter massStorage. Hope i can help you. Thank you for the answer
Click to expand...
Click to collapse
I'm trying to do something different and I found this topic so if you still have these devices can you extract NlpmService.dll file from System32 and upload it here for me?

Categories

Resources