-
Posts
1,033 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
It doesn't unless you tell it. There are two ways to specify a file location, absolute and relative. If the path starts with a '/' then the path is absolute, otherwise it is relative to the document root. If just the filename is specified then it expects it to be in the document root. If you want it to look "down" then specify the directory without a leadlng '/'.
-
Not sure what is not working since you don't say what error you are getting. .htaccess is managed by httpd and has nothing to do with PHP or "bringing it in." It appears to me like 2 different problems. Let's start with problem one. What URL do you want to rewrite and what do you want the rewritten URL to be?
-
I am getting the impression you don't have a database and are not using user logins at all. That being the case there is no good way to accomplish what I think you are asking.
-
Sessions are always hidden (from the user's perspective) so I'm not sure what you are asking. Also, the time a session exists is limited unless you specifically change it. It seems to me the most secure way to handle this is to store the viewed image names in your user database with each user name. The check to see if the user has already viewed it. You just have to be careful about how you handle interrupted image uploads.
-
Like I said, you can limit the upload size with the php.ini parameter or use requinix suggestion. However, a malicious user could change that parameter in the HTML page.
-
You can't know that from PHP (server side) directly. You can use Javascript/Ajax (client side) to send the file size back to PHP. However, the question is why do you care about the file size before upload? If you want to prevent files over a certain size from being uploaded you can set that with 'upload_max_filesize' in php.ini. The default is 2M.
-
After you json_decode without the true do the following: echo "<pre>"; print_r($result); echo "</pre>"; That will show you the resulting associative array so you can see how to reference the elements by key.
-
If it is running as 'daemon', then that is the user you need to set permissions for.
-
No it can't. Add that code to the PHP file giving you the error then run that code as a user normally would from a web browser. In the case of Linux, the user will normally be 'apache'.
-
First your code is very difficult to read. Edit the post and use the code icon (<>) at the top of the menu and specify PHP or HTML as appropriate. Then post the error message you are getting making sure you have error reporting turned on. error_reporting(E_APLL); If no error then explain what you are getting that is different than what you expect.
-
What is the URL returning? If it is returning JSON then you need to decode it which results in an array. If so you want to array_merge.
-
SSH keys go in the home directory by default. You can change that in /etc/ssh/sshd_config by modifying the AuthorizedKeysFile directive to point where ever you want.
-
php Mail Contact Form - File Attachment - Not sending file
gw1500se replied to cocolembo's topic in PHP Coding Help
How can we help you if you don't post the errant code? The link I gave you has examples to do what you want. -
php Mail Contact Form - File Attachment - Not sending file
gw1500se replied to cocolembo's topic in PHP Coding Help
Where do you "addAttachement" and reference the uploaded file? I think you did not post your complete code. -
Why am I not getting the number of expected result through the loop?
gw1500se replied to Abel1416's topic in PHP Coding Help
Its possible your loop itself is failing after the first pass. Make sure you have error reporting on: error_reporting(E_ALL); -
Which field is missing and post the code where you think it is being displayed? Also make sure you have error reporting turned on. error_reporting(E_ALL);
-
want to send URL but get cut // from my string
gw1500se replied to nitiphone2021's topic in PHP Coding Help
Sounds like a syntax issue. Post your code. -
Share info between 2 Apps in the same server
gw1500se replied to DanteDantas's topic in PHP Coding Help
For that you would need to use a database (e.g. MySQL). -
Don't use $_REQUEST. It has been deprecated. Use $_POST or $_GET depending on your form, which you did not post. Be sure to turn on error reporting. You don't do any error checking of your database query either.
-
PHP Need nested user array values to dump into html table cell
gw1500se replied to Thomas_L's topic in PHP Coding Help
It is not clear what you want displayed in that cell. Post the code you tried and tell us what is not working or what error you get. -
Not sure I understand the question but it sounds like you need to use JavaScript/Ajax on the new page. That code would itself be static but the result would be dynamic.
-
get GitHub Secret (ENV) variable value in PHP
gw1500se replied to abhishekchess1's topic in PHP Coding Help
Passwords should be stored securely in a database (MySQL). -
Reading the manual is a good place to start.
-
After a debian upgrade my php doesn't seem to work :S
gw1500se replied to Fishcakes's topic in PHP Coding Help
Post the actual code and the actual error message. Be sure to use the code icon (<>) in the top menu and specify PHP.