PEAR Availability On Web Hosts
Just wondering if anybody knew the availability of PEAR classes on most web hosts... i mean like if i write a script using say the PEAR db abstraction class, would most web hosts have the PEAR class installed and in the include_path so that my script would work?
View Complete Forum Thread with Replies
Related Forum Messages:
PEAR Availability
I'm starting to look into PEAR, and it looks like there's some interesting stuff in there. I'm wondering how much I can rely on it for a distributed app. If I understand correctly, it's now included in the PHP distro, and installed by default. What version did this start with? Is the default installation just the base class, or are some of the packages included as well? The tricky question is: does anyone have any idea of how commonly it's installed? Do most hosting companies provide it? I know end users can install it for themselves, but I have enough support issues without having to hold users' hands on that.
View Replies !
PEAR On Shared Hosts
If your site is on a shared host and you don't have shell access so you have to just kind of use whatever they got, you can't install PEAR modules, right? This is one thing that confuses me about PEAR. Is part of PEAR build into PHP, so you can assume it will be available? or if you want to use ANY of it, you have to install it by issuing UNIX commands on the console?
View Replies !
Free Hosts With Pear DB
I'm looking for a free host on which to test my codes, but I can't find any with PEAR DB module support. Do any of you know about a site like this? I could just go ahead and buy a servce, but I'd rather test the code and know it works before I pay for hosting services.
View Replies !
PHP Availability Calendar
Do you guys know somewhere where i can find a script which creates a Calendar which can be controled via a database, so if a date is "occupied" then the date will be marked at BOOKED.
View Replies !
Availability Checker
I'm trying to build a site for Broadband and I am wanting to put a Broadband availability checker on my site like alot of other site have, However i am quite new to PHP. Could someone point me in the right direction as how to go about producing the above?
View Replies !
Availability Calendar
where I could get a PHP based availability calendar for a holiday apartment website? I currently have the calendar as a html tables based affair that is updated via DW, but I am trying to migrate the site to PHP and wish to introduce a web based calendar that can be updated online. I am looking for something similar to http://www.lanzarotebreaks.com/vill...ar.php/3882.htm that displays in a table format but is controlled by PHP/MySQL, would like it to have online admin functionality. Am willing to learn how to handcode one if there are any good tutorials. Any help is gratefully received.
View Replies !
Availability Script
i have a number of villas in spain but id like to be able to show there availability online to prosepctive clients to cut down on wasting there time when a particular villa is not available! i need to be able to show booked and available periods from anything from 1 day to two months, does anyone know i way i could do this, are there any ready made scripts out there doing this.
View Replies !
Varying Availability Of Libraries
I'm having problems connecting to postgres via php. Error message = 'undefined function' when I make the call to pg_connect. I have modified the php.ini file to enable the extension=php_pgsql.dll line. The .dll in question exists in both windows and the defined php extensions directory. I have confidence that the php.ini file in question is the one in use by Apache (if I rename, everything bombs). Code:
View Replies !
Writing Pseudo For Availability
creating an online store for a project in on of my classes. I've searched around and cant really find how to create some availability scripts. How can I create a script to check our database on whether certain things are available? Any suggestions? Just asking for a good starting point.
View Replies !
Check Availability Button
I have a form that accepts user info. I want to create a button that enables the user to check for the availability of the username entered before continuing with the rest of the form. I have tried using the button onclick to call a JS function. The JS function have codes to compare the username with database select.
View Replies !
Date Columns Availability
I done an availabilitycheck that until now seems to work just perfect, except 1 problem. For exampel in the database if I have an booking in datecolumns llegada and salida dates 25/11 and 15/12, I would like the days 25/11 and 15/12 to be marked as available. This is the code I have: $result = mysql_query ("SELECT llegada, salida, propiedad from bookings where ( propiedad = '$propiedad' ) AND (('$llegada' BETWEEN llegada AND salida) or ('$salida' BETWEEN llegada AND salida) or (llegada < '$llegada' AND salida > '$salida') or (llegada > '$llegada' AND salida < '$salida'))", $dbh); In this piece of the code this is what I would like to do but don´t work: ('$llegada' BETWEEN llegada AND salida-1) or ('$salida' BETWEEN llegada-1 AND salida)
View Replies !
Calender - Availability Chart
I have availability on my site in an calendar and I manually introduces if available for that day or not. But I want to do it autmatically. At the moment I have the reservations in an database table, I have arrival in one column and departures in another column, both date types.
View Replies !
Redirection And Server Availability
I have two servers, one hosted and one local. My local server uses dynamic dns and I am trying to write a script on my hosted server that will check to see if my local server is accessible. If it is accessible I would like the script to do a browser redirect to my local server. If the connection can't be made I would like the script to be in the header of an index page on the hosted server or redirect to a valid page one the hosted server. From what I've found on the net it should be possible using socket() but am not sure how to go about it.
View Replies !
Check Room Availability System
I am super new to php/mysql etc. i am just trying to do a room availability system. I have 5 rooms in 5 different category. i like to know how to design a DB and write a php that takes two different dates[checkin date / checkout date] and verifies the DB for availble rooms.
View Replies !
Checking Room Availability For Hotel Booking System
I was wondering if anyone could help me with a problem I'm having. I've been using Dreamweaver to create a hotel booking system for a friend of mine, using MySQL (version 4.0.21) and PHP 5. The bit I'm struggling with is checking the Room Availability based on dates that are typed into a textfield and then returning a list of the available rooms on the next page. The three tables involved in this function are: CREATE TABLE `room` ( Room_Number tinyint(1) UNSIGNED NOT NULL, Price_Double_per_Night decimal(5,2) NOT NULL, Price_Twin_per_Night decimal(5,2) NOT NULL, Price_Single_per_Night decimal(5,2) NOT NULL, Price_Double_per_Week decimal(5,2) NOT NULL, Price_Twin_per_Week decimal(5,2) NOT NULL, Price_Single_per_Week decimal(5,2) NOT NULL, PRIMARY KEY(`Room_Number`), ) TYPE=InnoDB ROW_FORMAT=fixed; CREATE TABLE `room_booking_link_entity` ( Room_Number tinyint(1) UNSIGNED NOT NULL, Room_Booking_ID int(11) NOT NULL, Single_Double_Twin enum('Single','Double','Twin') NOT NULL, PRIMARY KEY(`Room_Number`, `Room_Booking_ID`), INDEX `Room_Number`(`Room_Number`), INDEX `Room_Booking_ID`(`Room_Booking_ID`), FOREIGN KEY `Reference_14`(`Room_Number`) REFERENCES `room`(`Room_Number`) ON DELETE NO ACTION ON UPDATE NO ACTION, FOREIGN KEY `Reference_85`(`Room_Booking_ID`) REFERENCES `room_booking`(`Room_Booking_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) TYPE=InnoDB ROW_FORMAT=fixed; CREATE TABLE `room_booking` ( Room_Booking_ID int(11) NOT NULL AUTO_INCREMENT, Customer_ID int(11) NOT NULL, Bill_ID int(11) NOT NULL, Date_of_Arrival date NOT NULL, Date_of_Departure date NOT NULL, Number_of_Nights tinyint(3) NOT NULL, Date_Booking_Made date, Status_of_Booking enum('Booked','Arrived','Departed') NOT NULL, Total_Cost decimal(7,2) NOT NULL, PRIMARY KEY(`Room_Booking_ID`), INDEX `Room_Booking_ID`(`Room_Booking_ID`), INDEX `Customer_ID`(`Customer_ID`), INDEX `Bill_ID`(`Bill_ID`), INDEX `Date_of_Arrival`(`Date_of_Arrival`), INDEX `Date_of_Departure`(`Date_of_Departure`), INDEX `Status_of_Booking`(`Status_of_Booking`), FOREIGN KEY `Reference_03`(`Customer_ID`) REFERENCES `customer`(`Customer_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, FOREIGN KEY `Reference_14`(`Bill_ID`) REFERENCES `bill`(`Bill_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION ) TYPE=InnoDB ROW_FORMAT=fixed; I've just discovered that MySQL 4.0.21 does not support subqueries. I'm basically stuck with this version of MySQL. I think I've got round the subquery problem by using a multi query option as follows: 1.Create a temptable that will store all of the room numbers that have bookings for the particular dates requested as follows: SELECT DISTINCT a.room_number INTO temptable FROM booking_link_entity AS a INNER JOIN room_booking AS b WHERE b.departure_date >$_POST[‘ARRIVAL'] And b.arrival_date < $_POST[‘DEPART']; 2.Left join this with the room table and pull out rows with no match SELECT a.room_number, b.room_number FROM room AS a LEFT JOIN temptable AS b ON a.room_number=b.room_number WHERE b.room_number IS NULL; 3.Delete temp table I've tried doing this in Dreamweaver, but to no avail. I have a feeling it is too complex for Dreamweaver. My php knowledge is very basic and was wondering if anyone could give me some pointers as how to do this in PHP?.
View Replies !
PHP Hosts
Do you know any cheap hosts that support php and mysql, and have proper dns thing, not redirect.
View Replies !
Free PHP Hosts?
Does anyone know of any services that allow free PHP web hosting? I'm new at PHP/mySQL and I am looking for a place to set up a site. I recently set up an ASP site for free at www.ewebcity.com. There are a bunch of places offering free ASP hosting and I was hoping to find something similar for PHP.
View Replies !
Free PHP Hosts.
I just wanted to if anyone knows any free website hosts that offers php scripting. BESIDES f2s.com, I already know that its available from them, but you can only have one account there and I have multiple pages I need to make. So if anyone knows any Free Website Hosts that offer PHP, if you could drop me a link that would be much apprieciated.
View Replies !
Php.ini And Virtual Hosts
I want to control some php configuration options with the php.ini file. Is this possible given that my site is on a virtual host? If so where do I place the file and how do I tell PHP to use it?
View Replies !
Recommended Hosts
Can anyone recommend a good host? Reliability is top most importance. The current place we're using advertises 99.9% uptime but during development I've encounted a few issues connecting to the site. If I've encountered a few issues during my very limited development time. I'm very worried about when we go "live".
View Replies !
Virtual Hosts
Is it at all possible to run a php 'virtual host' like the virtual hosts in apache? I want to be able to make users have their own temp folder in their home folder and also so I can restrict some of their options without disabling mine as well. I have googled this but don't know what it would be called. I haven't found anything after several days of searching. does this mean it doesn't exist?
View Replies !
Sql Queery From 2 Hosts?
Does anyone know if its possible to connect to a remote host? Basically we've got this site that requires you to be registered with a different site - so we need to check that before they can continue to the register page. So they'd type in there existing passwords for the remote host in the local hosts' site and then continue if its successful. Also we'd like to populate some of the new register fields with info from the other host - mainly to save time and to make sure the info is all the same! Code:
View Replies !
Changed Hosts
Just changed my host to hostgator and now I am getting errors. Error 1: Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 in /home/slevytam/public_html/functions.php on line 83 Line 83: $recordExists = mysql_result($query, 0, 0) > 0 ? true : false; Error 2: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/slevytam/public_html/functions.php:326) in /home/slevytam/public_html/functions.php on line 75 Line 75: session_start();
View Replies !
Linking Between Hosts
To cut short I have a website I have had in operation for many years but tied down to a contract I can not change. I want to add the functionality of a MySQL database, but they do not support this. I have other websites on different hosts that do have spare MySQL databases and was wondering whether I can cross link.
View Replies !
PEAR Newbie Trying To User PEAR DB And Falling At The First Hurdle
I've just installed PEAR on my local machine and all is well, updated the include_path to point to my PEAR dir. So, when I just try to make a simple connection like so the script just seems to stop but no error messsages. I do get error messages normally (ie. when I can a method from an object that doesnt actually exist) as I have set...
View Replies !
FOXSERV And VIRTUAL HOSTS
i have added to my "httpd.conf" virtual servers and now it looks like: ....... ServerName localhost DocumentRoot "C:/FoxServ/www/" ........ NameVirtualHost * <VirtualHost *> ServerName serwer1 DocumentRoot /www/serwer1 </VirtualHost> <VirtualHost *> ServerName serwer2 DocumentRoot /www/serwer2 </VirtualHost> the apache window saysno errors and nothing happens when i write http://localhost or http://serwer1 or http://serwer2
View Replies !
.htaccess On Shared Hosts
I asked this question in the php5 area, but it makes more sense to be here. I am on a shared host at the moment, and I am using .htaccess to override the php.ini file so that I am runnin php v5 (according to my hosting company, even though it says v4.4.2).... Newayz, they set it up for me and they said it IS running v5. So, I want to include the "soapclient" functionality, and I have seen online that to do this, I need to include this in the ".ini" file: "extension=php_soap.dll" BUT, php_soap.dll is for WINDOWS, and i am on a LINUX server... so: 1) what file do I include instead? 2) what exactly do I type into "htaccess.txt"?
View Replies !
Transferring Web Hosts - Php/mysql Application
I have an application that is written in php/mysql on a Linux platform and need to transfer hosts. This is a session based application and I don't know a lot about php/Linux/mysql, but can get by. I know windows/asp, etc. much more extensively. So, can I just move the whole thing over to a Windows server, upload the mysql backup database and change the settings for the db connection and have it work? Is there anything that would prevent this from transitioning smoothly? If so, if I stayed with a Linux platform, would the transition be this easy or would I have coding changes with this as well. I need to tell the new host which platform today and I would rather use windows, but if there are going to be too many coding changes on Windows, then I'll leave it on Linux, but if there is just as much work on Linux, then I prefer to stick with Windows.
View Replies !
Transferring Session ID Accross Hosts
What i'm looking to do is have the same session on 2 different hosts. For example: http://www.website.com/ and https://securesite.com/website/ Now i know this is easy by passing PHPSESSID via a get string, with a bit of php.ini tweeking, it does mean that there is a security risk associated with doing this (being able to hijack sessions). What I was hoping to do was specify a setCookie("PHPSESSID", $SID, '/', 'securesite.com'); however it seems to not work either. If anyone knows an easy way of doing this i would be very interested in learning how to do this.
View Replies !
Transferring Variables Between Seperate Hosts
can you tranfer variables stored in a PHP page on one server to a page on a different server via a form POST and be able to access those variables on the new page using Perl? From my understanding of HTTP I can't see why this should be a problem but it does not seem to work at the moment although I am sure it is not a scripting error at this stage...
View Replies !
Open_basedir Leaking Between Virtual Hosts
I am setting open_basedir to include only the DocumentRoot and PHP installation tree in 16 out of 18 VirtualHosts on our (test) apache server. This is running apache 2.0.53 and PHP 5.0.3. If I force a graceful restart, then fetch a trivial PHP page containing little more than a single call to phpinfo(); from each host, I get the correct value reported for open_basedir from the first few requests, then the value seems to cycle round the value expected for the first 5 VirtualHosts - I presume that each pre-forked process that apache uses is hanging on to its value of open_basedir even though it is next used to serve a page from a different VirtualHost. Code:
View Replies !
Mcrypt - Crypt And Decrypt On Different Hosts
I have PHP 4.4 with Mcrypt support installed and I'm creating a crossplatform application which has to crypt and decrypt on different hosts. So I got the problem that if I crypt on the developer host PHP 5.x and decrypt on the PHP 4.4 host the result is not a plain text, it's just a scrambled text (decryption does not work the same). Does anyone had such a problem or does anybody has a solution beside upgrading to PHP 5.x ? I have to upgrade then I will loose all potential customers which run PHP 4.x. I read minimum two hours in this forum but I couldn't find an answer (but a lot of people have some problems with php and mcrypt).
View Replies !
Absolute Paths & Virtual Hosts
I needed a way to include files from anywhere in my file structure. This code worked perfectly: <?php include($_SERVER["DOCUMENT_ROOT"].'/_includes/components/header.php'); ?> Now I have multiple sites that I run locally under virtual hosts in Apache. For my includes to work now, I need the path to resolve to the virtual host directory, instead of the localhost htdocs directory. How can I get the include path to resolve to the virtual host directory?
View Replies !
Mail() Only Works With Trusted Hosts/domains
I have a dedicated linux web server and I am trying to use the PHP mail() function to send emails any site visitor that requests one. This works only if the visitor has an email account on the box. If not then the email request fails. I think this must be something to do with relaying and I have been entering domains and hosts (such as "localhost") to get the script to trust the source of the email request and relay it. Unfortunately I have not had any success.
View Replies !
Process Of Migrating Hosts And Its Stopped Working..
Thing is i get no SQL errors, no php errors and therfore dont have much to go on, globals are on in my php ini and i can view things in my website fine, but when i try and log into my user area it just refreshes the log in page. During the process of migration the account was restored on the following and ive noticed that it now includes collation in MYSQL which appears to have defaulted to ' latin1_swedish_ci ', Ive checked the tables and the user_passwords etc encrypted all looks the same. Code:
View Replies !
Script To Perform Auto-update Of Client Hosts?
I'm currently checking out what's available to add an auto-update feature ŕ la Yahoo/MSN to our Windows applications written in VB. Those that I checked so far require generating a list of files along with a copy (full, or just a patched version) of each file, upload the stuff to a www server, and have the client app download the list of files to check whether it needs such and such patch. To make it easier for developers, I was thinking that the actual work of generating the list and patches could be done by a PHP script directly. Does someone know of such a beast, ie. go through the list of files in the directory, generates a hash for each to give it a unique ID, build a patched version of each file, build an INI file, and let the client apps handle things from there?
View Replies !
Checking On $_SERVER['http_referer'] ? -> Easily Spoofed Or Not And What About Virtual Hosts On One Machine ?
I've read the FAQ allready on security and saw i'd had to start a new thread about security and it's about .. yes security and forms. I have a form and when I post the input from the users I want to check several things to be sure that it definitely came from my form, so not from somewhere else. I'm coding with register_globals=off so that's a good start. Now I want to be sure that it is really my form. (Maybe I'll sound a bit paranoic) what would be more secure ? 1) checking on $_SERVER['http_referer'] ? -> easily spoofed or not and what about virtual hosts on one machine ? 2) creating session-id ? -> /tmp folder ? a hacker can always get into the machine maybe ? 3) a combination of both ? 4) something else ?
View Replies !
Use Virtual Hosts To Develop Locally But Upload Throws Error In Source File References
On my development computer, I have virtual named host set up, like www.site1.lab. When I upload those to my web site for customer review under mywebsite.com/clients/site1/ it throws some of the source file references off and it does not work properly. My references are like: require_once($_SERVER['DOCUMENT_ROOT']."/utility/top.php"); Obviously those will not work since $_SERVER['DOCUMENT_ROOT'] references mywebsite.com. Is there anything I can do in apache.conf for a virtual directory that would make it so when I upload a site for customer review, I don't have to change the source references?
View Replies !
Pear Shaped PEAR
I read about PEAR in here a few days ago and thought I would give it a try but I have got myself in a mess with the installation. I have found some guides but they seem to move swiftly on from installation and get down to using it. I am using PHP 5.2.3 which came with NuSPhere PhED and is installed under...
View Replies !
Go-pear.bat:okay - Pear.bat Error - 5.2.4
first attempt at PEAR installation: PHP 5.2.4 - WinXP Sp2 - Apache 2.2 the Initial instruction, post-installation [local, vs system-wide] tells me (not verbatim) "...old version found... remember to use ./php/pear.bat instead...." hence, the following command. note the feedback. Code:
View Replies !
Emails Blocked By Certain Mail Hosts? (mail() Function)
I'm using mail($address,$subjectheading,$message,"From: me@mysite.com") to send emails from my site. For the most part, it works okay (for example, I receive the mail in my Yahoo box). But when I check my university email, the message is not delivered. I thought maybe it was because I had included my web address in the subject heading and that it was being filtered out, but I removed that from the subject and it still fails to get through. I'm making a wedding site for some friends now and they want to be able to email everyone on their guest list at once, but I'm afraid the same will happen to some of these addresses as well. Any comments/suggestions on what may be blocking the mail and how I can get around it? I'm not trying to send out any kind of mass ad mailings or anything. Just to people on a mailing list for this site.
View Replies !
To PEAR Or NOT To Pear?
This is just a discussion type post, I'm interesed to know your opinion and experiance with Pear Libraries, I have used some Pear libraries a while back, but not enough to form an opinion wheather it is worth it or not. Some of the question I have is scalability and performance specs, and if I ever have to switch hosts do I need to make sure they have the same version or are they usualy backward compatible... so to Pear or Not to Pear that is the question?
View Replies !
PEAR DB Help
I am currently running Windows XP Pro with PHP 5.2 and MySQL 5.0 installed. My remote server is a UNIX system with PHP 5.1 installed and MySQL 5.0 installed. Here is the code I'm trying to run: // Load up the PEAR DB class // $this->mysql = DB::connect(sprintf("%s://%s:%s@%s/%s", TYPE, USERNAME, PASSWORD, HOST, DATABASE)); echo "hello"; On my computer it works perfectly fine, returns a db_mysql class and no errors. On my server it does nothing. I put echo "hello" there as a test, and when I run the script I don't even see "hello" get printed to the screen, for some reason it's just screwing the entire script up. I checked the USERNAME, PASSWORD, etc. values against the ones I have in CPANEL and they match. Does anyone know what might be causing this problem?
View Replies !
Help For Pear
where can i find some sample code for PEAR. i have pear manual but it is not sufficient to get all details of how PEAR work.
View Replies !
OOP And Pear::DB
I am currently working on a PHP application which I am using as a personal learning environment for getting a better working understanding about how to tackle application development in an OOP/MVC pattern fashion. I am using PEAR::DB to create database connection objects, and my major question concerns where these objects should be created. For example: Let's say I have a login application that that has a controller-like script that looks something like this: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // login.php <?php require_once('User.class.php'); $user = new $User; $user->getAdminRights(); ?> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ....and a model-like User class that looks something like this: (The important note is that I may need to load data multiple times from a database.) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // User.class.php <?php class User { public $user_name; public $user_id; public $admin_rights = array(); protected $db_connection; function __construct() { if (!this->db_connection){ require_once(); $this->db_connection = DB::connect(DB_DSN); } $sql = "SELECT USERNAME, USER_ID FROM SOME_TABLE..."; $result = $this->dbh->getAll($sql, array($this->request_id); $this->user_name = $result['USERNAME']; $this->user_id = $result['USER_ID']; } function getAdminRights() { $sql = "SELECT * FROM SOME_TABLE WHERE ADMIN_ID = ?"; $this->admin_rights = $this->dbh->getAll($sql, array($this->user_id); } } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
View Replies !
|