Jump to content

riteshn

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

riteshn's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello I am trying to compile PHP 5.1.4 with xslt support on my Debian box. Before compiling PHP with xslt, I installed the following packages: apt-get install libexpat1-dev apt-get install libxslt-dev I also compiled libxslt from debian source package. Installed expat. Now I configure PHP with options as: http://128.255.45.253/~rnadhani/ As you can see XSLT is not installed and as such xslt_create() function fails. Any help on getting XSLT to work would be appreciated.
  2. Even I was thinking of the above method but I have another peculiar problem. I am using Mac OS X with Apache that comes inbuilt in it and PHP module downloaded from: http://www.entropy.ch/software/macosx/ Now the inbuilt APACHE is configured like, if I do: http://localhost/username : it takes pages from: /Users/acidity/Sites/ so my files are at: /Users/acidity/Sites/csp/ If I do: [code] echo($_SERVER['DOCUMENT_ROOT']) [/code] I get, [code] /Library/WebServer/Documents/ [/code] where as it should give probably: [code]/Users/acidity/Sites[/code] so I use the code: [code]require($_SERVER['DOCUMENT_ROOT'] . '/csp-includes/db.php') [/code] I get the error: [code] Fatal error: require() [function.require]: Failed opening required '/Library/WebServer/Documents/csp-includes/db.php' (include_path='.:/usr/local/php5/lib/php') in /Users/acidity/Sites/csp/csp-admin/search.php on line 14[/code] Now, I have 0 idea of Apache, so I am in a fix :( Ritesh
  3. Hi I have an app whose file structure is like: [code] index.php csp-admin/apply.php csp-includes/db.php [/code] Now in csp-admin/apply.php, I want to add csp-includes/db.php so at the top, i added: [code] require("./csp-includes/db.php"); [/code] and it gives me an error: [code] Warning: require(./csp-includes/db.php) [function.require]: failed to open stream: No such file or directory in /Users/acidity/Sites/csp/csp-admin/apply.php on line 12 [/code] But this code in db.php works: [code] require('./index.php'); [/code] I saw the docs on REQUIRE at http://us3.php.net/require and there seems to be a problem with the PATH issue. What is the problem with my code? Ritesh
  4. Hello I have one config.php where I have defined some variables. [code]<?php   // Database informarion $db_info = array("db_host" => "localhost", "db_user" => "root", "db_pwd" => "", "db_port" => 123, "db" => "preapp"); ?> [/code] Now in another PHP page: [code] <?php require('config.php'); print_r($db_info); // 1 /* This is a complete PHP page all database related stuff goes here */ function ExecuteAndGetResult ( $query ) { print_r($db_info);  // 2 } ?>[/code] In the above case, 1st print_r() works but the 2nd one dosnt. I believe its some GLOBAL variable defining error. What am I doing wrong? Ritesh
  5. Hello I am designing my thrid project in PHP/MySQL. I have a question. In my app, I have to insert user details and couple of info in multiple pages based on sections ie. personal, address, educational marks, etc. 1.) What do you people suggest to implement it? Shoul I have multiple PHP pages each implementing a single form or should I keep the form details in separate pages and just include them in a common PHP page. I will then need to keep track of the page to be displayed using some hidden form value or some session variable. PS: Each form change does and insert or update regarding that info so we should keep that in mind. 2.) Also, how do you people keep your MySQL queries? Do you write queries in place like: $query = "select foobar from sometable"; $mysql_query($query); everywhere or you use some other design methods? Ritesh
×
×
  • 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.