Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
i have windows 7 home premium 64bit.
So i decided to try out some php, so i downloaded wampserver. First, i tried to change the index file in the www directory, but even when i quit wampserver by right clicking and clicking exit on the wampserver icon, notepad++ says the file is still open in an other application.
So i tried following this tutorial (How to create a Virtual Host in WampServer) but i cant edit the httpd-vhosts.conf file because of the same issue.
thanks in advance
PS:clicking "stop all services" doesnt work either.
edit:
computer restart did not resolve my issue.
notepad says access denied when trying to save the file.
permissions are read/write
Exit wampserver and run again by right clicking the wampserver and choose run as administrator. Then you should be able to stop and start the services.
Open notepad the same way by right clicking it and choosing Run as Administrator. Then you should be able to save the files.
thanks to raouf Athar. later in the tutorial it said that notepad++ needs to run as administrator to change these files, and it seems that instead of saying "needs administrator", notepad simply says that another program is using the file.
thanks to all who tried to help me
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Is there a known way to hide PHP code within a file?
I got an error message referencing a malware variable in a php file on a wordpress website.
When I grep for the variable it shows me the malware in the file
When I open the file in nano it doesn't show
When I download via sftp the malware doesn't show in notepad++
I'm wondering if:
grep could somehow be seeing 'cached files'?
is there is a way to hide php code?
has anyone using php or wordpress ever seen something like this?
I did everything to double check, yes these are the same files and all the other tips that were pointed out. opcache is off. I have no idea.
Removing face palming situations from the equation (e.g. downloading the wrong file, downloading from the different server - which have happened to me before ;)), maybe you could try to use
grep -n [variable name]
to figure out the line (-n) where the variable is in the file. That might help you.
Another suggestion is downloading the file and using diff tools against a known good version of the infected file.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I've tried installing Joomla 3.4 on to my server(upload .zip and extract everything), but everytime I want to run it, it directs me to "installation/index.php" then the entire page is blank. On the console menu inspect element the error I got is :
"Failed to load resource: the server responded with a status of 500 (Internal Server Error)".
I really have no idea what's wrong, also tried changing the file/directory permission, didnt work.
Here is the direct link to my site www.bobaking.co.uk
Here are my server specs:
Apache Version 2.2.29
PHP Version 5.4.33
MySQL Version 5.5.42-cll
Architecture x86_64
Operating System linux
Any help would be greatly appreciated, thanks a lot!
Faced same problem yesterday and solved once enabled PDO module via Easyapache update.
Maybe try changing .htaccess file configuration.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Can PHP pages be run locally?
I am trying several demos on creating a contact form, at the moment I am trying this one:
http://www.html-form-guide.com/contact-form/php-email-contact-form.html
I have downloaded the source files and put my own email address in, but when I click submit I get directed to the PHP page. The form's action attribute is set to that PHP page, so I was wondering if it is because PHP is not able to run locally? If I want the form to submit and send to my email would I need to put the downloaded source pages online to make them work?
This is not the only tutorial I've used where this happens.
Sorry if this is a silly question - newbie web developer :).
Thanks.
PHP, in this context, is a server side language. It must be run by a webserver.
The webserver can be installed and run locally.
PHP needs to be executed server-side, which means you will need to set up a local webserver.
The best way to go would be taking a look at WAMP or MAMP or LAMP, depending on your operating system.
You need to be running a PHP server locally, and have the file "hosted" by the server (in the same folder, but usually /var/www/). There are a verity of free programs for this. I like WAMP ( http://sourceforge.net/projects/wampserver/)
You should simple install WAMP server. If you use Windows I recommend this one: http://www.easyphp.org/
When you install it you should copy php file to projects directory and then you can run in your browser http://localhost/projects/ to see your file and to execute it
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I've got WAMP server on my Windows machine (just starting to study Servers and what not so I'm new to all this).
What I want to know is how can I give Apache permission to access a folder, but users should not be able to access that folder.
I've got a folder containing images which anyone would be able to view if they knew the structure of my server's file system and directories. Therefore, what I wish to do is that this folder should be accessible by my .html and .php pages but not by a user who inputs the URL of the folder/image directly in their browser.
I realize this may not be possible, but there must be some alternative to what I'm trying to achieve. I'm very new to all this so I'd like to know if I'm going about this wrong way, whether I'm on the right track or if I simply need to edit my permissions in the httpd.conf file.
Unfortunately that's not possible. The way the browser loads images when they're referenced in your website is not different from the way it does load them when a user enters the same URL directly. SO you get either both or none.
What you CAN do is: disable indexing, so entering just the directory name without the image name results in an "Access Forbidden" error. For that, put this anywhere in your Apache config:
<Directory c:/path/to/your/directory>
Options -Indexes
</Directory>
(You may have to use Backslashes on Windows, not sure. Haven't done any Apache config on Windows fore some time. Can anybody help me out here?)
Another thing you can do is to write an PHP (or use any other server side language) script that reads those images and pases them to the browser. That way, you could check the referrer the browser sends and react to it. But I would not recommend this, as it yields more trouble than it solves, therefore I won't give you a ready made script for this.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I've been using PHP-5.4.3 for about a month now, and today, I decided to make a switch to PHP-5.5.5, I downloaded the source code, and placed it in C:/php (also renaming the folder php-5.5.5 to php) and I added server variables, as usual C:/php/ <-- but here I got stuck. Because, usually I appended the php.exe at the end, which was found inside the PHP folder so, I could be able to access PHP from the command line, or start the built-in server, but now,I can't find this file, and I can't find a way to start the server from the command line either.
You can compile php yourself. It's simply 2-4 commands and its also explained. I can run configure then make install. You can run configure --help to see all the options. It can be useful if you compile for fast-cgi or need more space or a faster php.
The source code you downloaded needs to be built...
You can download a binary version from here (assuming you're using Windows, of course).
Or read this if you want to build it yourself. There are many other tutorials online.