RaRa3 Posted April 3, 2015 Share Posted April 3, 2015 (edited) hello i have a problem i just want to run a simple php code, it use to work but i think once i updated to Yosemite something changed im not sure. So i want to create a php code that links with a database, but right now im doing a test code and i get nothing. I use XAMPP and i turned everything on and i used netbeans and set a php file hit run and i get "Object Not Found!" what is there i need to do? I know in XAMPP there PHP extension that can be turned on but when i use terminal to enter the code lines i get command not found. I need help please i just want to run right now this code: Edited April 24, 2015 by RaRa3 Link to comment Share on other sites More sharing options...
Ingolme Posted April 3, 2015 Share Posted April 3, 2015 You need to download a PHP server. Search for MAMP, I believe XAMPP is also compatible with macs. 1 Link to comment Share on other sites More sharing options...
RaRa3 Posted April 3, 2015 Author Share Posted April 3, 2015 well i have xampp but it still isnt helping run php codes i will try mamp Link to comment Share on other sites More sharing options...
Ingolme Posted April 3, 2015 Share Posted April 3, 2015 XAMPP should work. But you have to put the PHP files in a particular folder and open the files under the http://localhost/ domain. 1 Link to comment Share on other sites More sharing options...
RaRa3 Posted April 3, 2015 Author Share Posted April 3, 2015 i did that it is in the htdocs folder but any php file i open i get an error Link to comment Share on other sites More sharing options...
Ingolme Posted April 3, 2015 Share Posted April 3, 2015 What error are you getting? 1 Link to comment Share on other sites More sharing options...
RaRa3 Posted April 6, 2015 Author Share Posted April 6, 2015 (edited) -- Edited April 24, 2015 by RaRa3 Link to comment Share on other sites More sharing options...
Stemar Posted April 6, 2015 Share Posted April 6, 2015 (edited) I think you are opening it directly as a file without running it through the apache server. Try opening the file with localhost/first.php. at least that´s how it works on windows Edited April 6, 2015 by Stemar 1 Link to comment Share on other sites More sharing options...
RaRa3 Posted April 6, 2015 Author Share Posted April 6, 2015 oh thank you that worked! i didnt know sorry im new to php. is there any other way? it only can run on a local host or be viewed in local host? Link to comment Share on other sites More sharing options...
Stemar Posted April 7, 2015 Share Posted April 7, 2015 (edited) Glad to help. And no, there is no other way as PHP must be 'traslated' by a server to HTML and that's what your browser will show to you!EDIT: buying an actual server will do the job too but I suponse that has no sense for only practicing. Edited April 7, 2015 by Stemar 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now