Jump to content

the_oliver

Members
  • Posts

    364
  • Joined

  • Last visited

    Never

Everything posted by the_oliver

  1. It was the ' that was causing the problem.  Genius's!
  2. [quote]DocumentRoot "/home/www/mail.server"[/quote] Apache will be expecting this to point to a folder not a single file.  Somthing like DocumentRoot "/home/www/mail/" with files like index.html in the folder.  not sure what mail.server is? A script? Im not sure if apache can handle strait IP's in the server name part either.  It takes this from the header.
  3. Hello, I have a scrip which i want to add a line onto the bottom of the text file.  If i am in terminal i can just type: [code]printf "bla bla" >> /etc/filename.whatever[/code] If i then do this: [code]$output = shell_exec('printf "bla bla" >> /etc/filename.whatever');[/code] It works like a dream!  However if i try to involve variable it all goes wrong!  The code below for example places nothing into the file. [code]$fun = "me"; $funky = "'printf \"".$fun."\" >> /BlueEmu/test.txt'"; $output = shell_exec('$funky'); neither does: $output = shell_exec('printf \"".$fun."\" >> /BlueEmu/test.txt'); [/code] Can someone tell me where im going wrong? - Thanks
  4. Hello. I am using a php script to connect to a database.  I was wondering does the database connection request come from the server holding the php script or the client mashine?  I ask because i wish to restrict the ip's allowed to connect to the database!  I assume that it comes from the server, but i was wonder is anyone could confirm this.  If i was to restrict access to the database to only that servers IP address can anyone forsee any problems? - Thanks
  5. Virtual hosts would be far supirior!  What type of hosting are you on? In theiory if both domain names point to the same file, you can display content determined by which address has been sent.... In theory!  However it can get messy!  Why are you trying this? 
  6. One of them would have to be log-in in this case to gain the correct privilages..... One way i was thinking of doing it would be to have a php script submit results to a database, and then another running under roots cron jobs, getting the infomation back, and dealing with it.  Does this sound like it would work?
  7. Are you using virtual hosts?  if so you can specify it in the top line of each host.  Eg: I have an https and docs folder and the following conf: [code]//FOR STANDARD <VirtualHost *:80>   ServerAdmin webmaster@bla.net   DocumentRoot /var/www/html/bla.co.uk/docs   ServerName www.bla.co.uk   .......etc </VirtualHost> //FOR SSL <VirtualHost *:443>   ServerAdmin webmaster@bla.net   DocumentRoot /var/www/html/bla.co.uk/https   ServerName www.bla.co.uk   .......etc </VirtualHost>[/code]
  8. If it realy forces you to use 777 not 755 (or 775 if appropriate) there will be a good resion!  Can always resort to chroot and jail users if this becomes a problem.  Gets a bit complex though!
  9. If you can connect through phpMyAdmin then it proves your system is working! Good news!  What are the connection  details you used for phpMyAdmin, are they the same as the ones you used above? Try creating a new database, username and password in phpMyAdmin and then re-run your script with these details. I cant really comment much on your Server2Go USB stuff, but i would guess that as the USB stick is not the host, it places all the database files on the real host, possibly for faster access?
  10. Thanks, i look at shell_exec but i cant work out how to make it a two way thing?  For example if i send it a comand that sends me on option back, how do i get it to hold its state? dbo: Security risks were my main consern!  Some of the things i run have to be run as root, and i clearly dont want to put the root password anywhere near my web server if i can avoid it!  But im not entirly sure what you meen by this: [quote]validate the input and escape[/quote] - Thanks
  11. Sure, one example would be creating a local user on the linux server, using a variable (eg the name) passed to it from a php scrit.  I want this to happen when a web user submits a form or something. - Thanks
  12. If you comment out the default page at the top of the virtual hosts part of the config (part 3) then this will not be a problem, so long as your using name based hosting.  If your using ip based hosting then it may do a revers lookup on service ip, and show you that page, but it depend how your distributing your ips. As to the ssl or normal, i do it by setting up the following.  each site has a folder: www.example.com.  With in this they also have to have three other folders docs (for standard on port 80) https (for ssl).  Thus when the user starts by typing https:// they hit the https folder other wise the docs folder.  My third folder is there cgi-bin. Im assuming your using mod_vhost_alias and something like [i]VirtualDocumentRoot /var/www/html/%0/docs[/i] to achive this?  How many sites are you hosting?  There are a number of other way to do this that, if your not hosting a huge number of sites may be simpler for what you want!
  13. Add a firewall rule banning connections to your mashine on port 80.
  14. are you testing this from inside your network?  If you are you may find that it works fine outside.  Your router may be getting a little confused by the fact that its dealing with its self!  If this dosent work it is likly to be one of two things. Either as wildteen88 mentions you need to configure your router to enable port forwording, or a firewall on the server its self is objecting. (could be restricting the ip range, or subnet). Let us know how you get on.
  15. How are you connecting to your database?
  16. Have you tried intilation through yum?  eg: yum install 'php-mysql', or 'yum install mysql-server'? Engoy
  17. What OS are you running apache on? I had a problem simmiler to this on a Mac OS X box.  It turned out that it was viewing the apache server as a 'security threat' (due to the way i had configured it) and thus was killing the service.
  18. I would check you php.ini file, and insure that apache is configured to work with php, knowing where the file is. Can you post the http error please.  Could probable be more helpfull then!
  19. if your using centOS you can do it via 'yum'. Have you used this before?  Makes life very simple... First you neet to run something like: rpm --import /usr/share/rhn/RPM-GPG-KEY* in a terminal as root.  (THIS IS NOT THE CORRECT ONE!!). Ones this is working just login in as root any type 'yum search php-whatever' or 'yum search whatever you wish to install' then find the one you like from the list produced.  'yum install whateveryoufound' . . . . . Much simpler!!
  20. Is php compiled with mysql suport? Did you inisiate the mysql database?  What OS are you doing this on,  it will be possible to test mysql on its own.
  21. Hello. Not sure if i am asking this in the wright place or not however . . . . . Im trying to find a way to have a list of tasks done on a linux server, triggered by a PHP script and with values passed to it.  These are things like adding a new user on the service, creating files and permisions etc.  These there for need to be run as root.  How could i go about this?  Slightly lost for ideas! Thanks!
  22. Hello.  Im trying to send a whois query to a server, but have no idea where to start! What i havae is that i need to connecet to a set server, on a specific port, and send it the following: [quote]<hostname of client> <IP address of client> <domain to query><cr><lf>[/quote] eg: somehost.somewhere.co.uk 192.168.0.1 phpfreaks.co.uk The other problam that i have is that i need to run a revers DNS lookup to get the hostname of the client.  Finaly the only other requirement is that the request has to come from my server, as it is ip restricted. Can anyone point me in the right direction? Thanks
  23. Im not sure of the awnser to the first question, but i seem to remember google had a good article they pubblished on this. As far as i am aware bots will always be designed to 'honer' this, but there may be one or two how dont.  However i would emagen that theses are only from small sites that in reality are not getting much traffic.  There is not a way to force them to honer it.  If you know or a specific bot you can block it intirly?  It might also be the case that using an .htaccess file for your testing stuff may stop them.  Would sertinatly stop any one being able to follow a link displaying the content.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.